WooCommerce store with large amount of variations
Hi Dave, I watched over you Wordcamp Brighton video (from some years back) and i've read a few of your blog posts in relation to Woocommerce sites with products with tons of variations. Just thought i'd reach out to you. My client is an Apple reseller, we built his site using WP / WC and we are encoutering the same issue. Once a prodyct gets over 500+ variations it's starting to slow down. We have built out 1 product (Mac Pro) that have around 12000 variations and we used object caching and this worked in terms of making the page load - although still pretty slow (https://www.wearesync.co.uk/product/apple-mac-pro/). So i had a few questions really. Do you have any tips in speeding up these processes without caching? Not sure if it's of any help but all the main mac products don't appear on any 'shop' type pages so it's onlt the main WC product pages we are concerned about. I noticed you have a plugin for scalabilty - will this help at all? It does mention: WooCommerce runs some slow code to count the variations on the product detail page. By disabling this, it forces some Ajax code to run when the user clicks the variation option which is far faster. This sounds promising. We are also currently using WP Rocket for general site caching etc. I'm sure your a busy guy so any of your time is grealy appreciated. Thanks, Alex
I’m still working on a major fix for product variations which will be built into Scalability Pro, but as yet it’s still not complete. The current speed boost for variations is fairly limited in Scalability Pro.
One thing I would highly recommend is if there’s any way you can avoid having this many variations then do so. For example – each variation has its own image and its own price – if you have some selectable options which don’t actually change the price then change them to product options (many plugins for this functionality) instead of product variations.
Similarly, if you have any variation options which do change the price but change it consistently then you can use Product Addons here – for example, if Medium adds £10 to the price and Large adds £25 to the price then you could use Product Addons (and some other product options plugins too) instead of variations.
The variations multiply quite quickly – the difference between having 6 options and 4 options configured in your variations is significant. For example, if each configurable option has 5 choices, then with 4 of these you’d have 625 variations but with 6 you’d have 15,625 variations.
Meanwhile that major fix for product variations in Scalability Pro is completed? I am asking because I need your product to speed up productpages that have many (1500) variations?
(Productpages with like up to 500 variations are just fine, quite fast).
If your changelog is up-to-date I already got the answer: No. Because last update for Scalability Pro is dated september 2020, that before the above answer you gave to Alex. But please confirm.
Changelog is up to date – fresh update released today, but still not for product variations. I’m kind of holding fire on optimising this because Woo are restructuring their tables which will help me optimise. In the meantime, use product rules where possible instead of variations and use an object cache to speed up the remaining variations.
Product rules and product options are better/faster if the price doesn’t change with these options or if the price changes by a set amount.
Thanks Dave for your fast reply. Any idea when Woo is going to restructure their tables? I (think I) need variations because I use it for a spare parts shop. I use one variation for each electronic device for which the spare part is suitable.. Some spare parts are suitable for like 1500 electronic devices. Price is the same for all product variations.
Tried object cache with W3 Total Cache, no luck.
You say it’s the same product, regardless of which machine it’s compatible with – so why have these as variations at all? Just have them as a product attribute so users can search on that attribute filter. The compatible attribute will still appear on the product detail pages, but it makes no sense for the users to choose the machine for a single part when it’s the same part for all machines.
You should change this variation to just be an attribute – then, if you use my Faster Woo Widgets plugin, you can have the ‘compatible device’ as a scrollable list of items with a little search box above for them to enter their device name to show that attribute from 1500 possibilities. Then the search results would show all parts for that device with a single add to cart button available from the /shop/ product archive since there really are no variations the way you described. You’re selling that one product, it just so happens to be compatible with 1500 devices, but it’s still a SIMPLE PRODUCT not a VARIABLE PRODUCT. You might have variations if the same part was available in different colours, or maybe with different power outputs or EU/US connectors or something like that, but even then you might have them as separate products like ‘EU kettle plug’, ‘US kettle plug’ or whatever.
And if you really DO want to force users to select the compatible device when buying (to reduce returns?) then just add that as a Product Option instead and force users to pick one in order to purchase. With that approach, you’d still have a Simple Product rather than a Variable Product, so you’d just sidestep this product variations performance issue.
This sounds very interesting! And yes we want to force users to select the compatible device when buying to reduce returns indeed! So I tried to get your solution working in order to sidestep the product variations performance issue. I have a few questions.
I used to have two different attributes, Model and Type (we don’t use Brand as an attribute because the webshop only sells spare parts for just one Brand). I guess that now, when I switch from variable products to simple products, I need to make 1 attribute called something like ‘Model and Type’ right? Probably that would be fine, to combine those two attributes into one.
You are saying that ‘Faster woo widgets’ can be used for the filter bar right? What plugin (or woo core configuration) do I use at the product page in order to do this: ..just add that as a Product Option instead and force users to pick one in order to purchase. This is where I am now: In the newly added Simple product, attributes tab, I checked the checkbox ‘Show attribute at productpage’ for the attribute ‘Modal and Type’. As usual all attribute values (all compatible devices) do show up (in the additional information tab) but not yet as a selectable list, fselect for example, could you help me out on what to add now?
There are a few choices for Product Options/Product Addons. Here’s a free one: https://wordpress.org/plugins/woo-extra-product-options/
They all do similar things – basically let you collect additional info (e.g. with a select box containing compatible models) before purchase.
re: your single attribute – If model and type depend on each other then yes, one attribute, but if there are a list of models and a separate list of types that don’t depend on each other and are valid on their own then 2 attributes would work.
Thanks for those links! Am I understanding correctly that after I add for example the 1500 compatible devices as attribute values for the attribute ‘Model and Type’ I also need to add those 1500 values in a new field as ‘options’ (as they are called in Woo extra product options plugin), please see: https://share.getcloudapp.com/9Zux7ZjO.
So it’s not that the new field shows all the compatible devices that were added as attribute values right? That would save work.
And yes, the two attributes Model and Type depend on each other, for example:
Active Best R1140
Active Best R1780
So I could indeed turn them into one ‘Model en Type’ attribute:
Active Best R1140
Active Best R1780
Better image at https://share.getcloudapp.com/mXupelX7
All 4 plugins seem to lack the possibility of importing option values. So, I am still in doubt whether using product options (and faster woo widgets), can indeed, even in my case, be a way to sidestep the product variations performance issue. Adding 1500 product option values manually is quite labor intensive. But maybe I am overlooking something on the ‘use product options instead of variations’ idea?
The idea sounded great, waiting for that database tables structure update of woocommerce (and the Scalability update that will follow on that) sounded less appealing.
I also reached out to the plugin that seems to me at this point the most promising plugin of those 4 plugins (Product Addons for Woocommerce By Acowebs) and asked them whether it is possible to somehow use the variations terms as product option values (this way we wouldn’t have to import things separately at all).
Why don’t you just alter your import job to import those variation values as options instead? WP All Import will definitely be able to help with this and the options will just be custom postmeta data.
Oke, thanks again Dave. WP All Import was indeed able to help me That is, they told me they’ve “..never come across a Products Add-On plugin that’s easy to import into. They’ve all required quite a bit of custom code to be compatible.”