Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Adding A Link Next To An Option Name

Adding A Link Next To An Option Name

Locked

Views: 967

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
3 Feb 2010, 6:53 PM
#1
abeez avatar

abeez

New Zenner

Join Date:
Feb 2010
Posts:
1
Plugin Contributions:
0

Adding A Link Next To An Option Name

I've been using Zen cart for work for the last couple of years and am now using it for my own site. Usually, if I have a question i can find it pretty easily searching the forums or tutorials, however I'm stumped by this one - hence my first post...

I want to create a link next to the option name and limit it to show only if the option name is 'Theme'... here's an example:

Originally I thought to edit this section includes/modules/MYTEMPLATE/attributes.php (line 589):

if ($show_attributes_qty_prices_icon == 'true') {
                    $options_name[] = ATTRIBUTES_QTY_PRICE_SYMBOL . $products_options_names->fields['products_options_name'];
                  } else {
                    $options_name[] = '<label class="attribsSelect" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '">' . $products_options_names->fields['products_options_name'] . '</label><br />';
                  }

This was the only place that I could find in this file where the option name was printed out. The problem is that I'm not sure where to add my statement...

I tried adding:

if ($show_attributes_qty_prices_icon == 'true') {
$options_name[] = ATTRIBUTES_QTY_PRICE_SYMBOL . $products_options_names->fields['products_options_name'];
} else {

 if ($options_name[] == 'Theme'){
 $options_name[] = '<label class="attribsSelect" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '">' . $products_options_names->fields['products_options_name'] . '<a href="#">My Link</a></label><br />';
}else{
                $options_name[] = '<label class="attribsSelect" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '">' . $products_options_names->fields['products_options_name'] . '</label><br />';

This just made the entire page disappear...

Any thoughts on how to get this to work would be greatly appreciated! :)

1 Jun 2010, 2:18 AM
#2
skinnyalbert avatar

skinnyalbert

New Zenner

Join Date:
Sep 2007
Posts:
30
Plugin Contributions:
0

Re: Adding A Link Next To An Option Name

Hello, I'm looking up this exact same thing. If anyone has any tips, or if the original poster found an answer it would be appreciated.
Thanks!

1 Jun 2010, 5:21 AM
#3
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,176
Plugin Contributions:
0

Re: Adding A Link Next To An Option Name

@skinnyalbert

pm me I have a tiny mod that will do this.. Here is An Example
Take a look at Bracelets: Guidelines

But you should look into AJAX popup. Instead of clicking on the link and a new page loads the Ajax just give a little popup....