Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Option information POP-UP?


Synd

Recommended Posts

Posted

Hey guys.

 

I am looking for a contribution, really just a small snippet of code to do the following.

 

Say your product is a pair of pants.

 

You have an option pull down menu on your Pants product page for "COLOR".

 

This COLOR pull down menu has the options BLUE, BLACK, AND GREEN.

 

I want to have a small link/image to the right of the pull down menu that links to a pop-up that is dynamically identified by the selected option (BLUE,BLACK,GREEN).

 

To better explain, we'll say that BLUE has a value of 1, Black 2, and Green 3. Once the option "GREEN" is selected, I want the link to the right to be dynamically updated to "3.php".

 

I have already implemented a javascript pop-up for the General category (COLOR), but I want one specific to each option.

 

From catalog/product_info.php :

The code I have to support this is:

 

<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, "onChange='showPrice(this.form);'"); ?></td>

 

<?php

echo '<td class="main"><a href="java script:popupWindow(\'' . $products_options_name['products_options_id'] . '.php\')"><img src="images/i.bmp" border="0"></a></td>';

?>

 

The popup window links to the variable $products_options_name['products_options_id'] .

I need this variable to be the dynamic currently selected option (GREEN,BLACK, or BLUE from above)

 

Really appreciate it.

Posted

Let me add a bit to this.

 

The value I want it to call as the *.php is the value ID used to call the Option, so Green has a value assigned of "1" when you add it to OSC as an option, your next addition (BLUE) gets a value of "2". I want the dynamic link to be 1.php for Green and 2.php for Blue. So I just want it to call the Option's ID value variable for the link location instead of the current menu option ID value (COLOR).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...