Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Location
    Hong Kong
    Posts
    307
    Plugin Contributions
    0

    help question Question regarding $manufacturers_id in tpl_product_info_display.php

    Hi everyone,

    In my previous shopping cart (1.3.8) I was able to use these codes in tpl_product_info_display.php to turn the manufacturer name into a link, but now that I'm using 1.5.1 the codes no longer work... It correctly turns into a link but there is nothing at the end of "index.php?main_page=index&manufacturers_id=", which means when I click on the link it redirects me to the homepage.

    I'm not familiar with php so if anyone could help me out that would be greatly appreciated... thanks in advance!

    PHP Code:
    <?php echo '<li>' TEXT_PRODUCT_MANUFACTURER '<a class="manufacturerlink" href="' zen_href_link(FILENAME_DEFAULT'manufacturers_id=' $manufacturers_id) . '" title="' $manufacturers_name '">' $manufacturers_name "</a></li>\n"?>
    Keywords: manufacturer link, clickable manufacturer name, manufacturer id

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Question regarding $manufacturers_id in tpl_product_info_display.php

    Chances are your old site had made changes to the files in /includes/modules/pages/product_info/ and added code in there to retrieve the mfg value and put it into a variable named $manufacturers_id so that it could be output in your template.
    You'll need to re-do that.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2005
    Location
    Hong Kong
    Posts
    307
    Plugin Contributions
    0

    Default Re: Question regarding $manufacturers_id in tpl_product_info_display.php

    Thank you, Dr. Byte sensei! I added this line in /includes/modules/pages/product_info/main_template_vars.php and it worked like a charm!

    PHP Code:
    $manufacturers_idzen_get_products_manufacturers_id((int)$_GET['products_id']); 

 

 

Similar Threads

  1. Replies: 13
    Last Post: 15 May 2015, 05:18 PM
  2. v154 question regarding line 510 of the admin/english.php
    By Thannaree in forum General Questions
    Replies: 5
    Last Post: 24 Jan 2015, 05:04 AM
  3. Question regarding https in configure.php
    By Hell Guapo in forum Basic Configuration
    Replies: 4
    Last Post: 2 Nov 2011, 05:03 PM
  4. php help with tpl_product_info_display.php
    By JamesM in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 29 Sep 2010, 08:09 PM
  5. Replies: 0
    Last Post: 13 Oct 2008, 10:08 AM

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