Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Place link on product page if Attributes Exist


zalik22

Recommended Posts

Hi,

 

I want to display a link on the product pages if attributes exist. For example, if I have options for sizes, I want to display a link that helps the customer determine what size fits them. Is there an easy way to make a new window pop up when they click on the link? If there are no sizes, I don't want anything to be displayed.

 

Thanks!

Link to comment
Share on other sites

I think if I modify this part in product_info.php it will work:

 

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

 

Anybody have ideas? Basically, if the pull down menu exists with attributes, I want to display "Click here for additional sizes" which creates a new window to another php file on my site. I appreciate your help! Thanks.

Link to comment
Share on other sites

Hi,

 

I want to display a link on the product pages if attributes exist. For example, if I have options for sizes, I want to display a link that helps the customer determine what size fits them. Is there an easy way to make a new window pop up when they click on the link? If there are no sizes, I don't want anything to be displayed.

 

Thanks!

 

Wellllll. Of course it is possible but since I am not gettin paid.. :thumbsup: I will give you the easy answer.

 

The easiest way would be to build a page like findyoursize.php or something. then at the end of the product description for every product that needs it you could put something like:

 

<br><br>

<a href="www.yourdomain.com/findyoursize.php" target="_blank"> Click here to find your size!!</a>

 

the hard answer would be to put in a if statement on product_info.php

 

logic only---- no idea what the code would be

 

if exist attributes

then display link

I thought this stuff was gonna be easy!!

BACK IT UP BEFORE YOU JACK IT UP!!!!

Link to comment
Share on other sites

Wellllll. Of course it is possible but since I am not gettin paid.. :thumbsup: I will give you the easy answer.

 

The easiest way would be to build a page like findyoursize.php or something. then at the end of the product description for every product that needs it you could put something like:

 

<br><br>

<a href="www.yourdomain.com/findyoursize.php" target="_blank"> Click here to find your size!!</a>

 

the hard answer would be to put in a if statement on product_info.php

 

logic only---- no idea what the code would be

 

if exist attributes

then display link

 

Hi Matt,

 

Thanks for the tip. I will continue to play around with this. I have my "find your size" php file built, and there is a link to it on my info box, but I was hoping to make it more user friendly. I really would like the code to see if attributes exist, display the link, so I will keep trying. Thanks for the help!

Link to comment
Share on other sites

Hey,

 

Anybody know how to code this? I have attempted but failed so far...

 

if attributes exist {

display link to sizes}

else{

display nothing}

 

I know it needs to be in the product_info.php file.

 

Thanks!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...