Title: Complex Variations, please help.
Last modified: March 21, 2022

---

# Complex Variations, please help.

 *  Resolved [bathroo](https://wordpress.org/support/users/bathroo/)
 * (@bathroo)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/)
 * Hello legends.
 * I am trying to recreate this functionality in Woocommerce here [https://www.thebluespace.com.au/collections/marquis-vanities/products/marquis-tide-wall-hung-vanity](https://www.thebluespace.com.au/collections/marquis-vanities/products/marquis-tide-wall-hung-vanity)
 * But Woocommerce doesn’t seems to add up the variation costs based on user selection.
   For example if the basin size is one cost – let’s say $10, then the bench top
   option is another cost – let’s say – $20. Then the total should say $30.
 * I would have thought that when the user selects each option the total cost would
   increment but it doesn’t.
 * It seems like for that variation, I need to already have that combination totalled
   up which means I need to work out every combination in advance, which isn’t good.
 * Please help. Thanking the brains trust in advance.

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/complex-variations-please-help/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/complex-variations-please-help/page/2/?output_format=md)

 *  [WP Native](https://wordpress.org/support/users/nazreenexe/)
 * (@nazreenexe)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15478153)
 * Hello [@bathroo](https://wordpress.org/support/users/bathroo/),
 * Such an impressive website. Well designed! There are a couple of things to address
   here.
 * 1. WooCommerce will not show/change price/qty/SKU after certain number of variations
   in the front-end. This simply because, when user is clicks on a particular product
   Woo does pre-load certain number of variation. This is obvious, because, when
   you’ve let say 200 different variations, it may take awhile to preload all of
   them at once. I’m not sure the exact, but I guess the number of pre-loaded variation
   is something like 30.
 * 2. But fortunately, you can override the number by adding the below code on your
   themes functions.php. Alternatively, you can use this plugin in order to add 
   safely.
 *     ```
       /**
        * Fix for issue where too many variations causes the front end to not pre-load
        * all variations and rely on AJAX.
        */
   
       function custom_wc_ajax_variation_threshold( $qty, $product )
       {
           return 200;
       }
       add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
       ```
   
 * As I mentioned above, There’s a caveat to the above code and that is performance.
   This may slowdown your website. So use with caution.
 * Hope this helps,
    Naz.
 *  [WP Native](https://wordpress.org/support/users/nazreenexe/)
 * (@nazreenexe)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15478158)
 * Hello [@bathroo](https://wordpress.org/support/users/bathroo/),
 * Such an impressive website. Well designed! There are a couple of things to address
   here.
 * 1. WooCommerce will not show/change price/qty/SKU after certain number of variations
   in the front-end. This simply because, when user is clicks on a particular product
   Woo does pre-load certain number of variation. This is obvious, because, when
   you’ve let say 200 different variations, it may take awhile to preload all of
   them at once. I’m not sure the exact, but I guess the number of pre-loaded variation
   is something like 30.
 * 2. But fortunately, you can override the number by adding the below code on your
   themes functions.php. Alternatively, you can use [this](https://wordpress.org/plugins/code-snippets/)
   plugin in order to add safely.
 *     ```
       /**
        * Fix for issue where too many variations causes the front end to not pre-load
        * all variations and rely on AJAX.
        */
   
       function custom_wc_ajax_variation_threshold( $qty, $product )
       {
           return 200;
       }
       add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
       ```
   
 * As I mentioned above, There’s a caveat to the above code and that is performance.
   This may slowdown your website. So use with caution.
 * Hope this helps,
    Naz.
 *  Thread Starter [bathroo](https://wordpress.org/support/users/bathroo/)
 * (@bathroo)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15478172)
 * Thanks for you reply! At the moment it’s not a combination limit issues but more
   a functional one.
 * Do you think a composite product plugin would solve this better?
 *  [WP Native](https://wordpress.org/support/users/nazreenexe/)
 * (@nazreenexe)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15478182)
 * Well, Yes. A composite plugin makes sense when you have two products that you
   wish sell together. However, the same given in the blue space site can be achieved
   just with Woocommerce attributes out of the box. Let me know if you want me to
   show an example on this.
 * Naz.
 *  [Igor H](https://wordpress.org/support/users/ihereira/)
 * (@ihereira)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15479013)
 * Hello everyone,
 * Please refer to this documentation for more details about the number of variations
   on your site (the default is 30):
    [https://woocommerce.com/document/variable-product/#functionality-behavior-for-more-than-30-variations](https://woocommerce.com/document/variable-product/#functionality-behavior-for-more-than-30-variations)
 * For more information about how to implement the code provided previously by [@nazreenexe](https://wordpress.org/support/users/nazreenexe/)
   please check: [How to add custom code](http://rynaldo.com/how-to-add-custom-code-to-your-woocommerce-wordpress-site-the-right-way/).
 * Let us know how it goes.
 *  Thread Starter [bathroo](https://wordpress.org/support/users/bathroo/)
 * (@bathroo)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15497524)
 * Yes, this will end up creating hundreds of variations and it’s going to be difficult
   to manage.
 * Do you think it’s worth using one of those combination plugins because as you
   can see on that website customers build the product as they go?
 * I’ll create a shaving cabinet product now using the traditional method and post
   the link to get feedback and would love thoughts on how it can be done better
   in WordPress so we can be better than Shopify (that website runs on Shopify)
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15497537)
 * Hi there 👋
 * It sounds like the Composite Products plugin might do the job for you. Here is
   a direct link to this plugin:
 * [https://woocommerce.com/products/composite-products/](https://woocommerce.com/products/composite-products/)
 * For Pre-Sales questions, please contact us at:
 * [https://woocommerce.com/contact-us/#sales-form](https://woocommerce.com/contact-us/#sales-form)
 * From there, click on the tab “I have a question about a specific extension or
   theme I’d like to purchase.”
 * I hope this helps.
 *  Thread Starter [bathroo](https://wordpress.org/support/users/bathroo/)
 * (@bathroo)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15497541)
 * OK, I’ve uploaded it. I found creating the attributes in the backend then exporting
   it to excel then importing with changes the fastest way to make the changes. 
   Can you please have a look and give feedback on how it can be better [https://bathroomhut.com.au/marquis-frameless-shaving-cabinet/](https://bathroomhut.com.au/marquis-frameless-shaving-cabinet/).
   I’ve always been a WordPress fan, not a Shopify fan and I want to beat them.
 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15497685)
 * Hi [@bathroo](https://wordpress.org/support/users/bathroo/)
 * > I found creating the attributes in the backend then exporting it to excel then
   > importing with changes the fastest way to make the changes.
 * Great job! The product is set up well and is working normally when changing variations.
 * > give feedback on how it can be better [https://bathroomhut.com.au/marquis-frameless-shaving-cabinet/](https://bathroomhut.com.au/marquis-frameless-shaving-cabinet/).
   > I’ve always been a WordPress fan, not a Shopify fan and I want to beat them.
 * If you’d like to add more functionalities then you can let us know and we’ll 
   try to offer suggestions/solutions accordingly. Also, if you need help with troubleshooting–
   we’re here for you. 🙂
 * Cheers!
 *  Thread Starter [bathroo](https://wordpress.org/support/users/bathroo/)
 * (@bathroo)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15501862)
 * OK, I’ve created the variations, please see here [https://bathroomhut.com.au/marquis-frameless-shaving-cabinet/](https://bathroomhut.com.au/marquis-frameless-shaving-cabinet/)
 * I’m ok doing this now but I’ve run into a major issue which is page speed. The
   load time is VERY VERY slow and slow load time impacts conversion, big time.
 * From the research, I’ve done using options could help the speed but some of the
   vanities, for example, any variation change will change the price. I’m pretty
   sure a product with 2000 variations in WordPress will die or load time will be
   way over 5 seconds.
 * What are our options here?
    -  This reply was modified 4 years, 2 months ago by [bathroo](https://wordpress.org/support/users/bathroo/).
    -  This reply was modified 4 years, 2 months ago by [bathroo](https://wordpress.org/support/users/bathroo/).
    -  This reply was modified 4 years, 2 months ago by [bathroo](https://wordpress.org/support/users/bathroo/).
 *  Thread Starter [bathroo](https://wordpress.org/support/users/bathroo/)
 * (@bathroo)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15502062)
 * I found an example of the complexity I need to implement [https://www.idealbathroomcentre.com.au/products/marquis-cove-wall-hung-vanity](https://www.idealbathroomcentre.com.au/products/marquis-cove-wall-hung-vanity)
 * I think variation will kill my site? any suggestion is greatly appreciated.
 * Question on the composite plugin. When you have a lot of options to compose for
   a product, does it slow the site down like variations?
 *  [hegenberg](https://wordpress.org/support/users/hegenberg/)
 * (@hegenberg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15503526)
 * Hi [@bathroo](https://wordpress.org/support/users/bathroo/)
 * > I’m ok doing this now but I’ve run into a major issue which is page speed.
 * As a general guide for slow sites, please refer to these docs below for performance
   tips and tricks:
 * * [Troubleshooting a Slow Site](https://docs.woocommerce.com/document/troubleshooting-a-slow-site/)
   *
   [Why is My WooCommerce Site Slow? And How To Fix It](https://woocommerce.com/posts/woocommerce-site-slow-fixes/)
 * >  Question on the composite plugin. When you have a lot of options to compose
   > for a product, does it slow the site down like variations?
 * We have separate support channel for customers of Premium extensions.
 * Please contact us at:
    [https://woocommerce.com/contact-us/#sales-form](https://woocommerce.com/contact-us/#sales-form)
 * From there, click on the tab “I have a question about a specific extension or
   theme I’d like to purchase.”
 * Best,
 *  Thread Starter [bathroo](https://wordpress.org/support/users/bathroo/)
 * (@bathroo)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15504230)
 * Hi Berg, the site is optimised but the technical architecture around large variation
   is sub-optimal so my question is especially around how we technically solve it.
   Any help would be great.
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15504290)
 * Hi [@bathroo](https://wordpress.org/support/users/bathroo/),
 * I suggest getting feedback from your hosting company regarding the appropriate
   resources to have for what you want to accomplish.
 * Generally, you’d want to increase the `WordPress memory limit` and `PHP max input
   vars` values. Also, having the store set up on shared hosting isn’t ideal, although
   it’s a cheaper option.
 * Best regards.
 *  Thread Starter [bathroo](https://wordpress.org/support/users/bathroo/)
 * (@bathroo)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/#post-15504422)
 * I’m not sure what PHP max input vars have to do with Database reads and the slow
   SQL to retrieve variations in Woocommerce? for example, the SQL which is fired
   off to retrieve variations is a separate query for
 * > each
 *  variation and is sub-optimal.
 * If someone has 1000 variations with is 1000 separate database calls. How can 
   this be optimised?

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/complex-variations-please-help/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/complex-variations-please-help/page/2/?output_format=md)

The topic ‘Complex Variations, please help.’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [product variations](https://wordpress.org/support/topic-tag/product-variations/)

 * 26 replies
 * 6 participants
 * Last reply from: [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/complex-variations-please-help/page/2/#post-15543061)
 * Status: resolved