• Resolved mattfinnegangt

    (@mattfinnegangt)


    I have an ecommerce website with 2 x product types: Simple and Bookable, and I need to be able to display on a Shop page only those products of a certain type – e.g. Simple products, but not Bookable products; and another Shop page display only the Bookable products, but not the Simple products.
    I have looked at the woocommerce shortcodes documentation to display products, and see that display can be chosen to show products by
    · product category,
    · product attribute,
    · featured products,
    · sale products,
    · best selling products,
    · recent products, and
    · top rated products?
    but not product type?

    Could anyone help me with some code I can add to a page to only show products of, let’s only the ‘simple’ type?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shaun Kuschel a11n

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @mattfinnegangt,

    That is correct, the shortcodes included in WooCommerce do not have an option to display products based on the product type. From what I’ve seen, the most common way to approach situations like this is to use either Product Categories (like having additional categories for Bookable Products and Simple Products), as that allows for you to specify which products are shown on the different pages via the shortcodes.

    Thread Starter mattfinnegangt

    (@mattfinnegangt)

    Thank you Shaun, for looking into a solution for me.
    I already correctly use my product categories in a hierarchy relevant to my customers, which is reflected on my nav menu, etc. So it wouldn’t be appropriate to add single/bookable as a product category, but thanks you anyway.
    In the meantime, I think I’ll just create an product_attribute for product_type (single/bookable) and use that to display the product_type I want- although it would have been better if Automattic (WooCommerce) had a built-in shortcode for product_type, so avoid such unneccesary duplication of information, as a “workaround”.

    Again, many thanks Shaun

    Matt

    Plugin Support Shaun Kuschel a11n

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @mattfinnegangt,

    Sorry for the delay getting back to you, as I was out of the office for the last week. Using the attribute for the product type sounds like a good workaround, but I’d suggest adding this to the Ideas Board as well, so that the developers can see the need for this shortcode (and allow for other users to add ‘votes’ to that suggestion as well- since that is one of the ways they prioritize enhancements).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Display products by Product Type?’ is closed to new replies.