• Resolved bassplayer84

    (@bassplayer84)


    Hello,

    i know there is no limit in product variations, but there is the limit of creating 50 per time.
    How to increase this limit?

    I read on some forums to add this line:

    define( ‘WC_MAX_LINKED_VARIATIONS’, 100 );

    but where? in theme function.php it won’t do anything but appearing this code in the website fronted.

    Any other help?

    thanks

    https://www.ads-software.com/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Usually define statements go in wpconfig.php

    Thread Starter bassplayer84

    (@bassplayer84)

    it seems not working if added to wp-config.php

    any help?

    Thread Starter bassplayer84

    (@bassplayer84)

    i have noticed maybe i need to ask my hosting some server PHP.ini modifications, can some one tell me what to ask them?

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    Hi @bassplayer84,

    You shouldn’t need to get your hosting company involved. The code that you have is correct, you can place it either in your functions.php file or your wp-config.php file. You will need to make sure it is after the first <?php tag and before any closing ?> tag, if there is one. If it is not included within the tags, then it will just be printed out on the screen.

    You would only need to get your hosting company involved if you are wanting to do a very large number of variations at a time, this is due to memory limits. There’s more information here about it.

    Thread Starter bassplayer84

    (@bassplayer84)

    the problem is that i have a lot of variations, something like 7.000 or more.
    This is due the presence of 3-4 product attributes, sometimes with 20+ values each.

    I’ve set the WC_MAX_LINKED_VARIATIONS to 500 each passage.
    Sometimes it loops the creations.

    How should i set the memory limit?

    I’ve read this but i do not know exactly what to ask to my provider to do.

    thanks

    Plugin Contributor royho

    (@royho)

    Remember if you don’t need/have a separate price/sku/stock, you don’t actually need to generate all those variations. You can use ANY.

    Some attributes can be exposed as “add-ons” to reduce the number of variations.
    https://codecanyon.net/item/woocommerce-extra-product-options/7908619
    There are other “add-on” type plugins.

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    7000+ sounds like it would wind up being extremely hard to manage over time. I will have to agree with @royho about the ANY option, or you could go the add-on route like @lorro mentioned.

    Thread Starter bassplayer84

    (@bassplayer84)

    HEllo and thanks for your replies first.
    I have not understood some points..

    I can not have less product variations, technical informations for the contact lenses shop are a must.
    Costumers have to select the attributes before placing the order via the e-commerce, such as gradation (there are about 30+ selectable values in the dropdown menu) that need to be combined each with other values. This is the real scanario with 3-4 dropdown menus of the attributes on the frontend, with selectable values of each lens / product.

    I have not understood what you mean with “ANY” value, maybe this could be a solution insted of creating each 7.000+ linked variations.

    My understanding is that ANY can be used if the price and SKU are the same.

    Thread Starter bassplayer84

    (@bassplayer84)

    What is this “ANY”? i can not understand..

    I have 1 product, with 1 SKU and price.
    The product is not set as “simple” but “variable”.
    I added 4 attributes, with tons of values each.
    Then i create all linked variations.

    This is what i did for each contact lens product on my e-commerce catalogue.

    I still find difficult to understand what you mean with “use ANY”.

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    If you add the Attributes, set them to be used in the Variations, then manually create one variation with “Any” selected in the attributes, all options will show under the product. See this doc.

    I sell T-shirts.

    Product Data section, Attribute tab:
    Attribute name: Size
    Attribute values: Small | Medium | Large
    Visible on the product page: checked
    Used for variations: checked

    Product Data section, Variations tab:
    Add variation – click Go
    Leave topmost drop-down to show: “Any Size”
    Set a price (this will apply to all variations)
    Optionally set a SKU (same SKU will apply to all variations)
    Save Changes

    Only 1 variation is created.

    Front-end: shows 3 variations.

    Cart page and Checkout page will show the size selected by the customer.

    Thread Starter bassplayer84

    (@bassplayer84)

    Thanks guys, this is a real good and final solution!!
    thank a lot!!

    U have 1 beer paid! ??

    RJB

    (@rbeaujard)

    This is not resolved whatsoever, more like a compromise. I have same issues. I NEED many variations, 300+, all with their own sku and price. Woocommerce comes to a halt with over 50. The ANY “solution” does not work for exclusions. Example:

    In the T-Shirt scenario above sizes S,M,L are used. On one site we need s,m,l,xl,xxl,xxxl,xxxxl and several garment styles and colors many of which DO NOT come in XXL, XXXL, and XXXXL.

    The only way to exclude as far as I can tell is to have all possible variations explicitly entered, which is correct for accounting as well. This way ordering a garment that doesn’t come in XXXL would not be possible. It would be possible in the ANY scenario.

    So, again there is no solution for ACTUALLY needing more than 50 variations. And yes, server has 32gb ram, php and mysql optimized, max inputs set, etc. etc.

    Fact is woocommerce looks like it just fails with many options and can’t handle it.

    Anyone? Would love to be proven wrong ??

    RJB

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘How to create more than 50 variations for execution’ is closed to new replies.