• Resolved kirits

    (@kirits)


    Hi,

    I would like to sort my products on sidebar by multiple categories, for example, ‘season’ and ‘clothes’. Through widgets I can add one option to sort by category. How can I add to sidebar and in new product listing second group of categories? I need both to find right products. Use taxonomies plug in? How and which?

    Thank you,
    Kristaps

    • This topic was modified 2 years, 4 months ago by kirits.
    • This topic was modified 2 years, 4 months ago by kirits.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @kirits!

    For the sidebar, there are widgets that allow displaying the sorted product list based on a single category.

    For displaying sorted product list for multiple categories, you can use the Shortcode widget.

    WooCommerce supports several shortcodes that you can use to display filtered products. The shortcodes can be entered via the shortcode widget.

    The shortcode to display a sorted product list for two categories would be something like the following:

    [products category="hoodies,tshirts" limit="-1" orderby="include" order="DESC"]

    Here is the complete guide on using the ‘products’ shortcode: https://woocommerce.com/document/woocommerce-shortcodes/#products

    Products code in the shortcode widget for the sidebar can be created as follows: https://d.pr/i/W8F1Yf

    Additionally, you can change the display style of the content generated by this widget by using custom CSS (from the ‘Appearance > Customize > Additional CSS’ section).

    Best!

    Thread Starter kirits

    (@kirits)

    Hi,
    Thank you for information. Sorry, I am not very good with such information. Will this help me to add to sidebar two groups of categories? For exanmple:

    SEASON:
    – Summer
    – Autumn
    – Winter
    – Spring
    CLOTHES:
    – Skirt
    – Coat
    – Pens
    – Dress

    And customer can checkbox one category of each group? Only on woocommerce sidebar. Can I separate these categories product page?

    Thanks,
    Kristaps

    Hello @kirits!

    To ensure that we are on the same page, it is better that you share with us an example of what exactly you want to display in your sidebar; like a URL of any webpage that already displays the sidebar data the way you want.

    The shortcode that I previously provided will create a product list in the sidebar as follows:
    1. https://d.pr/i/GN75iT
    2. https://d.pr/i/7EQbLk

    This auto-generated list is a general product listing that includes the products under the specified categories (including the products in their subcategories).

    Best!

    Thread Starter kirits

    (@kirits)

    Hi,
    Thanks for getting back to me. Here is example:

    https://www.skipperspetproducts.com/collections/dog-treats-products?constraint=salmon+white-fish+small

    Look at the left sidebar. They can sort products in same time by flavor categories and dog size categories. I am looking for this kind of sorting.

    Regards,
    Kristaps

    Hey @kirits!

    I checked the website URL that you provided; they have displayed the product categories in the left sidebar along with the other product attributes. Their end-users can choose one or more attributes, and accordingly the results of the main product list change.

    Similar functionality can be achieved using WooCommerce Product Search extension.

    As an example, please check this screenshot of the implementation: https://d.pr/i/gubrCe

    In this example, I have made my product list filterable according to the “Color”, “Price”, and “Category” attributes of the products. End-user can select multiple filter options, and accordingly, the product list will adjust to meet the filter criteria.

    You can read more about the extension’s features here: https://woocommerce.com/document/woocommerce-product-search/

    This is a paid WooCommerce extension; if you buy it; you’ll become eligible for Woo Premium support. You can get in touch with the Woo support team to set it up for your site.

    Note: If you want to try WooCommerce products, please note we have a 30-day refund policy. If the product doesn’t work the way you need or you think another product would work better, we are more than happy to offer a full refund. You can read more about our refund policy on our website here: https://woocommerce.com/refund-policy/

    Best!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sort products by 2 categories on sidebar’ is closed to new replies.