Dynamic comparison works when user choose one or more products for comparison by clicking on Add to compare button. Theme supports multi group comparison (when product is added to own group based on product’s category). Also, you can create custom comparison chart to compare only those data which you want.
We added also several functions to create charts automatically. It’s available for WooCommerce products.
How to enable Comparison option?
It’s very easy. Go to theme option – dynamic comparison and choose one of page for comparison. You must have special shortcode in content of this page
Well, that’s all what you need
This will generate comparison chart automatically. Additionally, you can disable some fields in comparison chart via next parameter “disable”
So, for example, if you want to disable brand and stock field in chart, use
If you want to make several groups of product comparison, then, instead of single page, create several pages (you can use the same shortcode for all pages) and add special values in Theme option – dynamic comparison – multi group
This means, that if item is in product category ID = 6 or 22, it will be added to the comparison group “Laptops” and comparison page for this group has ID = 1168. Items from categories 5 or 30 will be in “Mobiles” group and the comparison page is 1169 for this group.
If you want to configure fields which will be in comparison results, you can use Custom Comparison Charts constructor instead of shortcode
Where 1,2,3 is product category ids which you want to assign to “Add more items” button. Without this, button will search inside all categories of products.
Check video how to use dynamic comparison
How to add an additional dynamic row?
Comparison shortcode is totally dynamic and automatic, but sometimes, you may need to add custom element inside table. There is next shortcode for this
[wpsm_woocharts contentlabel="Find prices"]My shortcode[/wpsm_woocharts]
As you see, you can use your custom shortcodes in place “My shortcode” and custom label in contentlabel parameter. For example, this can be very helpful if you use dynamic shortcodes which shows data from your post.
Creating custom comparison charts
You can also build your own comparison page with comparison chart builder. This allows to compare only those data which you want and control every row of chart. To use this, create page, choose Top chart constructor and page attributes and begin to add each row of chart.