Thread: zen_href_link

Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default zen_href_link

    Greetings

    I have dozens of new pages created using the About_Us mod, which are accesed via dropdowns located in the header and footer, and also via the sitemap and other pages. The content of these pages is of no great concern and visitors are not required to login to the store to view the content.

    For links to these pages, I have used the format:

    <a href="index.php?main_page=example">Example</a>

    however upon discovering other pages linked as follows

    <a href="' . zen_href_link(FILENAME_PRIVACY,'','NONSSL') . '">Privacy</a>

    I am wondering what is the criteria for using the latter format over the former and whether I should convert all of the former link types to the latter type.

    In addition, I have several forms created using the Band Signup mod, all of which are linked to by the former link format. None of these forms writes to the database, other than via the Email Archive Manager mod, although I may wish them to be so written further down the track as the forms require the input of private and business information to be sent via email. Should the latter link format also be applied to these form pages.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: zen_href_link

    The latter is really best practice. It handles SSL, zenid, etc. correctly.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: zen_href_link

    Thanks for replying swguy

    In adopting the latter format,

    a) how does one determine (where do I found out) what code should be inserted into the middle section, ie that highlighted in red as follows:
    Code:
    zen_href_link(FILENAME_PRIVACY,'HERE','NONSSL')
    b) With respect to the forms, in what situations should the NONSSL be replaced by SSL.

    Thanks

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: zen_href_link

    a) The list of defines is in includes/filenames.php.

    b) When you want SSL. :) In most cases you won't.
    "Are you concerned about the content being intercepted" is the question to ask.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: zen_href_link

    Quote Originally Posted by swguy View Post
    a) The list of defines is in includes/filenames.php.
    Thanks, however, now I am confused as none of these following provides an indication of what to put in the middle.

    In includes/filenames.php,
    Code:
    define('FILENAME_ACCOUNT', 'account');
    
    define('FILENAME_PRIVACY', 'privacy');
    yet in tpl_site_map_default.php

    Code:
    <a href="' . zen_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">
    
    <a href="' . zen_href_link(FILENAME_PRIVACY) . '">
    Surprisingly,

    Code:
    <a href="' . zen_href_link(FILENAME_PRIVACY,'','NONSSL') . '">
    does not occur in tpl_site_map_default.php.


    Quote Originally Posted by swguy View Post
    b) When you want SSL. :) In most cases you won't.
    "Are you concerned about the content being intercepted" is the question to ask.
    For form pages, I would have thought "yes", but for other pages - "no".

    Yet, in tpl_site_map_default.php, zen_href_link(FILENAME_CONTACT_US) does not mention either SSL or NONSSL.

    Am I understanding correctly that form input data sent via email transmission is relatively insecure, and that invoking SSL via zen_href_link to the form pages will provide an SSL layer for those pages.

    Please deconfuse me.

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

    Default Re: zen_href_link

    The "middle" parameter contains any parameters you need passed to the page. If you're not doing that kind of advanced coding, you just pass an empty string instead.

    In the future you can determine the answer yourself by looking at the function definition for zen_href_link and all its parameters, by using the Developers Toolkit and looking for "function zen_href_link", and then do another search for just "zen_href_link" and see how it's used in various places to understand what parameters are inserted there and when.
    .

    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.

 

 

Similar Threads

  1. v139h zen_href_link question
    By gaffettape in forum General Questions
    Replies: 1
    Last Post: 29 Feb 2012, 05:39 AM
  2. zen_href_link
    By shlomoweb1 in forum Bug Reports
    Replies: 1
    Last Post: 20 Aug 2010, 01:14 AM
  3. zen_href_link
    By nikfiend in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Jun 2010, 11:09 PM
  4. zen_href_link... ?
    By warstormer in forum General Questions
    Replies: 2
    Last Post: 14 Aug 2007, 04: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