Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    red flag Adding More Links in the Information Box?

    Hi All,

    I have just installed the latest zen-Cart 1.3.8a.
    I would like to add pages/links to the Information Box, NOT the More Information box!

    For Example, I changed the Text in Page_2, Page_3 & Page_4, Now I want to link to them from the Information Box as I do NOT want another box to display them as I don't want many boxes on my wesbite!

    I know about EZ-Pages, but that doesn't allow me to add the Links Created in the INFORMATION Box!

    I am sure this can be done by adding the new links to the Information Box, I just don't know what code and what PHP file I would need to edit!

    Can anyone please help.

    Thank you

    Best Regards,

  2. #2
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Adding More Links in the Information Box:

    Hi All,

    It's me again.
    I just figured it out myself through Trial & Error :)

    Just incase anyone else is interested in the same solution, here is what I did:

    I Edited these PHP Files, Includes/modules/sideboxes/information.php & Includes/modules/sideboxes/more_information.php:

    I took the following code from ( (Includes/modules/sideboxes/more_information.php):

    if (DEFINE_PAGE_2_STATUS <= 1) {
    $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>';
    }
    if (DEFINE_PAGE_3_STATUS <= 1) {
    $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_3) . '">' . BOX_INFORMATION_PAGE_3 . '</a>';
    }
    if (DEFINE_PAGE_4_STATUS <= 1) {
    $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_4) . '">' . BOX_INFORMATION_PAGE_4 . '</a>';

    I then added the code above to the (Includes/modules/sideboxes/information.php) under the below code, but you can add it wherever you like:

    if (DEFINE_SITE_MAP_STATUS <= 1) {
    $information[] = '<a href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a>';
    }

    The ONLY thing I changed in the Code was I Deleted the (more_) from each line:

    So my New Code looked like this:

    if (DEFINE_PAGE_2_STATUS <= 1) {
    $information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>';
    }
    if (DEFINE_PAGE_3_STATUS <= 1) {
    $information[] = '<a href="' . zen_href_link(FILENAME_PAGE_3) . '">' . BOX_INFORMATION_PAGE_3 . '</a>';
    }
    if (DEFINE_PAGE_4_STATUS <= 1) {
    $information[] = '<a href="' . zen_href_link(FILENAME_PAGE_4) . '">' . BOX_INFORMATION_PAGE_4 . '</a>';


    I then Uploaded the New (Information.php) to my overides folder... (Includes/modules/sideboxes/Your_Template/information.php).

    Now All the extra Links are showing in the Information Box so no need for the More Information Sidebox, WOOHOO :)

    If anyone thinks what I did above was a bad for some reason, please let me know.

    Best Regards,

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Adding More Links in the Information Box:

    Thanks for posting the solution that worked for you as it is a help to others ...

    The variable that you changed is meant to work that way ...

    The variable is set to match the sidebox to help make more sense of what is being done as well as to keep the content separate from one sidebox to the next ...

    So, the changes you made to get things to work from one sidebox to the other were correct ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    red flag Re: Adding More Links in the Information Box?

    Hi Ajeh,

    Over 50,000 Posts, how awesome to know you have help SO SO many People - Thank You!
    I got one question please....
    I tried to edit the link name for page_2, page_3 and page_4, but could Not do it through trial and error!
    Example change ww.....com/page_2.html to ww......com/promotion.html!

    Again, I rather not create a ez-pages links!

    Can the link names actually be changed or is it futile to keep trying?
    If they can, how would one attempt such a journey?

    Please Advise.

    Best Regards,

  5. #5
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: Adding More Links in the Information Box?

    That would be a bit more complex. The filenames are defined somewhere else. After editing those names, you'd either need to create files with those names, or else use the page_2 file itself, and add a URL rewrite to your .htaccess file to connect a URL request for example.com/your-page-name to the script at /index.php?main_page=page&id=page_2 or wherever it is located.

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Adding More Links in the Information Box?

    The system I use could be easier...

    I do away with the standard "Information" and "More Information" sideboxes completely.

    I activate the EZPages sidebox - "Important Links" and change the box's define LABEL to "Information".

    I then create EZPages INTERNAL LINKS for all those that would normally appear in the standard "Information" sidebox...
    eg: Contact us = index.php?main_page=contact_us

    I then use the MUCH EASIER ezpages facility to create new pages, and have an UNLIMITED number to play with.
    20 years a Zencart User

  7. #7
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: Adding More Links in the Information Box?

    Yet more ways to skin ze cat!

    Good post.

  8. #8
    Join Date
    Dec 2003
    Posts
    11
    Plugin Contributions
    0

    Default Re: Adding More Links in the Information Box?

    Just a quick thank you to the original poster - this is awesome!
    Confucious says:
    he who stands on commode, is high on pot&#33;

 

 

Similar Threads

  1. Adding links to More Information?
    By maronesty in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Oct 2011, 11:37 PM
  2. Adding extra links in the More Information Box
    By hfxracing in forum Addon Sideboxes
    Replies: 4
    Last Post: 25 Jul 2011, 09:08 PM
  3. more information box - adding more pages
    By ALFO in forum Basic Configuration
    Replies: 3
    Last Post: 11 Dec 2007, 10:56 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