Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    1
    Plugin Contributions
    0

    Default 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):

    Code:
    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 {

    Code:
     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! :)

  2. #2
    Join Date
    Sep 2007
    Posts
    30
    Plugin Contributions
    0

    Default 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!

  3. #3
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default 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....

 

 

Similar Threads

  1. Adding a newly created Option Name/Value to every option menu
    By tcarden in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 31 Jan 2014, 05:55 AM
  2. Option name to appear in attribute dropdown and not next to it
    By Graphic Content in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 25 May 2010, 06:54 PM
  3. Adding a link next to product options
    By ktomas in forum Templates, Stylesheets, Page Layout
    Replies: 21
    Last Post: 3 Mar 2010, 04:32 PM
  4. Replies: 0
    Last Post: 8 Nov 2009, 07:48 AM
  5. Adding 'Next Day Delivery' option to UK zone rates
    By SusieTFTF in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 12 Jun 2009, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg