Jump to content

display customizable text only when user selects combination


stdio

Recommended Posts

Hi,

 

I am trying to achieve the following:

 

I have 2 combinations in my shop. Something like Yes/No. Yes increases the price and "No" retains the current product price.

 

What I am trying to achieve is to display the customizable text area only when the combination is selected "Yes". Can someone help me please? I am willing to pay $5 to the person that helps me.

 

Thank you.

 

Edited by stdio (see edit history)
Link to comment
Share on other sites

btw.

 

 

Give your topics concise but well explained titles!
Topics titles must be a short description of the message, so that the topic is more easily found while doing a search. Avoid terms like "URGENT""Help me", etc.

thanks in advance ;)

Link to comment
Share on other sites

  • 3 weeks later...

1. in ../themes/yourtheme/js/product.js file put this code inside jquery ready function

$('div#attributes select').change(function(){
if($(this).val() == 6) // where 6 is the number of the attribute group you want to be selected
{
$('.mypopup').fadeIn();
}
});

2. then in product.tpl file you have to put the ".mypopup class div container" somewhere (would recommend to place it at the bottom of div attributes)

<div class="mypopup"> YOUR CUSRTOM TEXT HERE </div>

3. in ../themes/yourtheme/css/global.css  you have to add property for your .mypopup class

.mypopup {display:none;}

Hope this will help you :-)

Edited by 3cubes (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...