-1

I’m trying to build a Drupal Commerce store which is going to be my first timer with Drupal 8+. However, the approach described in the Drupal Commerce documentation regarding the creation of a filterable product catalog really doesn’t seem to be what you usually see on a good e-commerce site.

Having only a page to display products from all categories seems to be SEO counter-intuitive.

How can I create a product catalog with categories that list the products in that particular category but, for example, also list the sub-terms of the currently selected term as well?

There isn't really a showcase where I could look at different shops using Drupal Commerce 2 as if nobody was event using it. All the ones I found on Drupal Commerce official pages are either not working or use Commerce 1.

1
  • 1
    I’ve never actually used it for a serious project (pretty much exactly for the reasons you’ve mentioned here), but anecdotally, the philosophy for that project seems to be “know Drupal well and you’ll know commerce well”. Everything is set up to be used like a normal Drupal “thing”, with content types, taxonomy, views, search api, facets, and so on. I think the implication is that if you know how to set up a catalogue of content, you’ll know how to do the same for products. But they don’t seem to offer strong opinions on how that should be done. Again, that’s anecdotal, I’ve never asked them
    – Clive
    Commented Sep 15, 2022 at 15:44

2 Answers 2

1

I finally found a solution... You can use the https://www.drupal.org/project/tvi module on the vocabulary for product categories. You then set up a Product Index view with a url of taxonomy/term/% and enable a context filter to search in product categories. Works like a charm!

-1

I found the tutorials at https://www.acromedia.com/article/creating-a-product-catalogue-with-search-api-solr-facets (with video) as well as the official documentation at https://docs.drupalcommerce.org/commerce2/developer-guide/products/marketing-products/product-catalog-facets pretty straightforward to follow.

To summarize: you assign a category to each product, then create a view that lets the customer choose which category to view. I can't explain the details better than those tutorials though.

1
  • Yes I know about this but that's exactly what's not correct about it all. Having just one page with filters is not good for overall SEO since you are not clicking-through the different category pages. You are just filtering the products on the same page with no-follow filter links. This way you don't even have the category terms indexed in a sitemap because when you go to a category page detail, it's just an empty taxonomy since taxonomy pages don't display product entities, only nodes.
    – crzpiot
    Commented Sep 29, 2022 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.