• Resolved stoicassistant

    (@nickschmitt)


    Hello,

    I have many products with variations. I need to display variations of all products in a product table.

    Is this possible with your plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WC Product Table

    (@wcproducttable)

    Hi,

    Thank you for using WCPT and writing in with your query!

    While you cannot show product variations in separate rows in WCPT Lite, this facility is available in WCPT PRO.

    [product_table id=”123″ product_variations=”true” ids=”456″]

    In the above example 123 is the product table ID and 456 is the product variation ID from where the variations will be picked up for display in the table in separate rows.

    Keep in mind that a table created using this facility is only going to show product variations. When you use the ‘product_variations’ attribute the table cannot show simple or variable products.

    Please see this doc on the product variations table facility.

    I hope this information helps! Please feel free to write in again if you have any other queries regarding WCPT.

    Regards,
    Kartik

    Thread Starter stoicassistant

    (@nickschmitt)

    Thank you for your response. I’m confused about variation ids in the shortcode. If I have 20 products and 40 variations, would I have to list all 40 variation IDs in the shortcode?

    Plugin Author WC Product Table

    (@wcproducttable)

    The ids you enter are for the variable products, not the product variations. So you need to enter the product ids for those 20 variable products you mentioned in order to display their variations in the table.

    [product_table id=”10″ product_variations=”true” ids=”100, 101, 102, 103…″]

    In the above example 100, 101, 102, 103… are ids for variable products. The table will display all their product variations in the table.

    Also – in case these 20 variable products happen to be the only variable products on your entire site then you do not even need to use the ids shortcode attribute to target them. Juse use product_variations=”true” in your table and that will be enough. This is only true if the table settings > Query does not have any category / sku / product ids selected in it.

    How this works – by default the plugin attempts to display all the products on your site in any given table. So if no query is set for the table the plugin is already targeting all the products including variable products.

    But you still need to use product_variations=”true” to tell the plugin you only want product variations showing up from the current query.

    As soon as you use the shortcode attribute product_variations=”true” in your shortcode, the plugin starts targeting only product variations for display in the table. So any variable products that fall in the current query are converted into product variations and those are displayed in separate rows.

    I hope this information helps. Please ensure you refer to the doc I linked in my previous reply. However, if you have any other questions about this please feel free to reach out again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to display variations for many products on one table?’ is closed to new replies.