• Resolved ra00f

    (@raoof)


    Hi all,

    I need to make a cart for spectacles shop.

    Along with choosing a frame, I need to enable the users to choose the lens also, and the prices are to be added up in the following way.

    First, choose one among the following three

    Power type
    ———-
    1. Single Vision
    2. Zero power
    3. Frame only (no further selection required, just proceed with the payment of original product, the frame)

    When the user choose either 1 or 2 above, he should be able to choose another option from a set of available options (as shown below), and the price need to be added to total

    Lens type
    ———-
    1) Option 1
    Option description
    i) sub option 1 – price 100
    ii) sub option 2 – price 200
    iii) sub option 3 – price 300
    iv) sub option 4 – price 400

    2) Option 2
    Option description
    i) sub option 1 – price 400
    ii) sub option 2 – price 500
    iii) sub option 3 – price 600

    3) Option 3
    i) sub option 1 – price 700

    Can anyone please suggest a plugin that could be used in this context?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @raoof

    Thanks for the detailed explanation, this really helps.

    When the user choose either 1 or 2 above, he should be able to choose another option from a set of available options (as shown below), and the price need to be added to total

    What you’re looking for here is “conditional logic”. This will either be a custom code solution or using a plugin/extension – there are a lot of options out there. On the commercial WooCommerce.com site, we have a few options for sale. Take at our “How to bundle” documentation since this is the scenario you’re looking to solve – https://docs.woocommerce.com/document/group-bundle-products-woocommerce/

    For example, something like https://woocommerce.com/products/composite-products/ would fit what you’re looking for I feel.

    Alternatively, I’d recommend searching for plugins/extensions which offer “conditional logic” functionality.

    Hope you find something which fits your needs.

    Thanks,

    Thread Starter ra00f

    (@raoof)

    Thanks for the quick reply.

    I still don’t get how to make it the way I want.

    I need to have something like the following in the final markup. That is, the second set need to have a common heading and then sub headings for each. However, all of them share the same name attribute so that selection of one make all the other one deselected.

    Hope this is clear now.

    <form>
        
          <strong>Power type</strong>
           <input type="radio" value="single_vision" name="power">
            <input type="radio" value="zero_power" name="power">
            <input type="radio" value="frame_only" name="power">
         
          <strong>Lens type</strong>
             <strong>Type 1</strong>
           
            <input type="radio" value="radio_11" name="lens">
            <input type="radio" value="radio_12" name="lens">
           <input type="radio" value="radio_13" name="lens">
           <input type="radio" value="radio_14" name="lens">
           
          <strong>Type 2</strong>
            
            <input type="radio" value="radio_21" name="lens">
            <input type="radio" value="radio_22" name="lens">
           <input type="radio" value="radio_23" name="lens">
        <strong>Type 3</strong>
            
            <input type="radio" value="radio_31" name="lens">
            .........
    </form>
    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @raoof

    What you’ve explained sounds like it is possible with the premium Composite Product extension but the conditional logic you’re asking for doesn’t exist in WooCommerce core. You would need either a custom solution or a plugin to achieve this.

    As my replies have clarified this isn’t part of WooCommerce functionality and I’ve given some solutions, I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product add-ons – multilevel options’ is closed to new replies.