Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Jul 2020
    Location
    USA
    Posts
    68
    Plugin Contributions
    0

    Default Re: Extras Record Companies Image

    This is the error log

    [22-Jul-2021 22:01:40 UTC] PHP Parse error: syntax error, unexpected ';', expecting ')' in /includes/templates/responsive0clone/templates/tpl_product_music_info_display.php on line 388

    [22-Jul-2021 22:01:40 UTC] Request URI: /lp-c-1/bonzai-seeds-to-roots-vinyl-lp-p-215.html, IP address: xxxxx

    line 388

    PHP Code:
    <?php echo sprintf(TEXT_RECORD_COMPANY_URLzen_href_link(FILENAME_REDIRECT'action=url&goto=' urlencode($products_record_company_url), 'NONSSL'truefalse); ?>

  2. #12
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    8,071
    Plugin Contributions
    9

    Default Re: Extras Record Companies Image

    I have been hoping someone would jump in here on the code.

    Not my forte. I do think you should not be using sprintf. There is an example of code in the docs. Search for SHOW_PRODUCT_MUSIC_INFO_RECORD_COMPANY on https://docs.zen-cart.com/dev/code/p...ter-side-boxes[FONT=SFMono-Regular, Menlo, Monaco, Consolas, liberation mono, courier new, monospace].

    You would not want to use the table tags.[/FONT]
    Did you read the posting tips?!?
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free Domain, SSL, and Magic Thumb with Semi-Annual or longer plan.

  3. #13
    Join Date
    Jul 2020
    Location
    USA
    Posts
    68
    Plugin Contributions
    0

    Default Re: Extras Record Companies Image

    I do appreciate the help! Thank you. Would you know how I can make just the image appear? I can live without the link.

  4. #14
    Join Date
    Jul 2020
    Location
    USA
    Posts
    68
    Plugin Contributions
    0

    Default Re: Extras Record Companies Image

    I managed to get a link working using

    PHP Code:
    <?php echo (($flag_show_product_music_info_record_company == and !empty($products_record_company_name)) ? '' TEXT_PRODUCT_RECORD_COMPANY '<a href="' zen_href_link(FILENAME_DEFAULT'&typefilter=record_company&record_company_id=' $products_record_company_id) . '">' $products_record_company_name '' '') . '</a>'?>
    and I have the image showing but it links to the home page.

    PHP Code:
    <?php echo sprintf('' TEXT_RECORD_COMPANY_URLzen_href_link(FILENAME_REDIRECT'action=url&goto=' urlencode($products_record_company_url), 'NONSSL'truefalse) . '">' zen_image(DIR_WS_IMAGES $record_company->fields['record_company_image']) . '</a>'); ?></div>
    Name:  Capture.PNG
Views: 15
Size:  53.7 KB
    Can be seen here https://fuzztrip.com/lp-c-1/bonzai-s...-lp-p-215.html

    Any help combining the two so it is a clickable image would be great! Thanks.
    Last edited by Fuzztrip; 24 Jul 2021 at 05:48 PM.

  5. #15
    Join Date
    Jul 2020
    Location
    USA
    Posts
    68
    Plugin Contributions
    0

    Default Re: Extras Record Companies Image

    I managed to make this work using the following

    PHP Code:
    <?php echo (($flag_show_product_music_info_record_company == and !empty($products_record_company_name)) ? '' '<a href="' zen_href_link(FILENAME_DEFAULT'&typefilter=record_company&record_company_id=' .  $products_record_company_id) . '">' .  '' '') . zen_image(DIR_WS_IMAGES $record_company->fields['record_company_image']) .  '</a>'?>
    This was done by trial and error and I'm sure the code could be cleaned up. Any advice would be welcome. Thanks.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v139h Record companies on product page
    By doooomed in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 Dec 2012, 08:24 PM
  2. record companies shows zeros (Image attached)
    By fadi21 in forum Customization from the Admin
    Replies: 4
    Last Post: 21 Aug 2010, 05:37 PM
  3. Record Companies side box
    By Sushigal in forum General Questions
    Replies: 4
    Last Post: 14 Jul 2009, 12:39 PM
  4. Replies: 1
    Last Post: 19 Jun 2006, 12:12 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR