Product variations variable (5 posts)

  1. TimoVeld
    Posted 3 years ago #

    Hi all,
    I'd like to edit my product page in a way that is depending on the selected variation. Meaning: I want action-A to occur when option a is selected, when option-B is selected as variation, I want action-B to happen.

    So basically I just want to "catch" what variation is selected and use that information to make something happen on the product page.

    Any suggestions?


  2. TimoVeld
    Posted 3 years ago #

    I'm gessing I need something like

    if ($selected_value == 'AttributeValue')
     {$phpVar = 1;}
    {$phpVar = 5;}

    But I can't seem to get it to work

  3. IgniteWoo Team
    Posted 3 years ago #

    If you want to do that when the variation is selected ( e.g. not added to cart yet ) then you should use jQuery. Or do you want to do this after it's added to the cart?

  4. TimoVeld
    Posted 3 years ago #

    No I want to do it before it is added to cart.
    So are you saying I'm in the right direction with $selected value? Only I have to make the change with jQuery, not with php?

  5. TimoVeld
    Posted 3 years ago #

    What I'm actually keen on finding, is how the prices are generated when selecting an attribute. If I could see how this functions works, I could just copy and modify it's code to my needs.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.