Results 1 to 4 of 4
  1. #1
    Join Date
    May 2010
    Location
    Texas
    Posts
    393
    Plugin Contributions
    0

    help question Check out message box.... insert hyperlink in TABLE_HEADING_COMMENTS

    The define for TABLE_HEADING_COMMENTS controls what is displayed above the message box on the checkout page in checkout_shipping.php
    I would like to insert an hyperlink in that string

    PHP Code:
    define('TABLE_HEADING_COMMENTS''Special instruction'); 
    Something like this:
    PHP Code:
    define('TABLE_HEADING_COMMENTS''<a href="https://mysite/page.html">Special instruction</a> '); 
    When I do so, the hyperlink works, but the message box ends up with
    Code:
    Special instruction</a> ">
    in it.
    How do I fix this?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Check out message box.... insert hyperlink in TABLE_HEADING_COMMENTS

    Assuming that includes/ templates/ YOUR_TEMPLATE/ templates/ tpl_checkout_shipping_default.php echos the content in a way similar to below: https://github.com/zencart/zencart/b...fault.php#L128
    Then either there is a problem with the validation of the page or the content of that define is not quite correct.

    By the way, links to internal content should not be so hard coded as shown in the original write up. Should be a relative link or created outside of the define with zen_href_link()
    Last edited by mc12345678; 16 Jan 2022 at 03:47 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2010
    Location
    Texas
    Posts
    393
    Plugin Contributions
    0

    Default Re: Check out message box.... insert hyperlink in TABLE_HEADING_COMMENTS

    I'm using the default template and the contents of the file tpl_checkout_shipping_default.php are unaltered
    The hyperlink that results is correctly formed...its just a mystery why some of it ends up in the message box

    define('TABLE_HEADING_COMMENTS', '<a href="https://mysite/page.html">Special instructions</a>');

    Name:  comment box.jpg
Views: 59
Size:  18.7 KB
    Last edited by split63; 16 Jan 2022 at 04:42 PM.

  4. #4
    Join Date
    May 2010
    Location
    Texas
    Posts
    393
    Plugin Contributions
    0

    Default Re: Check out message box.... insert hyperlink in TABLE_HEADING_COMMENTS

    I just removed the term that adds the TABLE_HEADING_COMMENTS in the message box itself. Problem solved

 

 

Similar Threads

  1. Check out page - add another message
    By enzo-ita in forum General Questions
    Replies: 12
    Last Post: 18 Feb 2017, 02:47 AM
  2. Please Help I'm Getting a 404 Message When Users Go to Check Out
    By watzursn in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 4 Jul 2008, 09:00 PM
  3. opt in / out check box
    By Taf1938 in forum General Questions
    Replies: 1
    Last Post: 1 May 2008, 01:32 PM
  4. Cart hangs when clicking on go to check out...get this error message
    By Ken Joy in forum Upgrading from 1.3.x to 1.3.9
    Replies: 6
    Last Post: 14 Mar 2007, 07:16 AM
  5. adding a message to check out page
    By davek7 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 9 Dec 2006, 12:25 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