Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2011
    Posts
    27
    Plugin Contributions
    0

    Default Creating custom buttons linking to extra pages

    I have read about this version of Zencart using CSS buttons now (I am in the process of setting up a new version of our v1.54 site that badly needed an update). But it's not clear to me what the actual steps are. Lets say I want to add a couple of buttons to the front page that link to a Store Locator page and the About Us page. Is there documentation that would walk me through that or am I better off using a template that offers buttons?

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,716
    Plugin Contributions
    123

    Default Re: Creating custom buttons linking to extra pages

    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
    Jul 2011
    Posts
    27
    Plugin Contributions
    0

    Default Re: Creating custom buttons linking to extra pages

    Thank you for the links, if I look at the information sidebox template it has much less content than for example the tpl_index_default.php file (since I want the links on the main page I assume this would be the file to add it to). Would the link, in this case the documentation example
    PHP Code:
    $content .= '<li><a href="' zen_href_link(FILENAME_EZPAGES,'id=9') . '">' "My new page" '</a></li>'
    be placed after all of the center boxes?

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,716
    Plugin Contributions
    123

    Default Re: Creating custom buttons linking to extra pages

    The placement is your call. Put them where ever you like.
    If you only want them on the main page, you might consider using the main page define page for the buttons, but remember that it's HTML only and not PHP.
    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
    Jul 2011
    Posts
    27
    Plugin Contributions
    0

    Default Re: Creating custom buttons linking to extra pages

    So I would insert it more like this;
    HTML Code:
    <a href="' . zen_href_link(FILENAME_EZPAGES,'id=9') . '">' . "Store Locator" . '</a>
    And is there a section in the docs on the CSS buttons being added in an HTML page?

  6. #6
    Join Date
    Jul 2011
    Posts
    27
    Plugin Contributions
    0

    Default Re: Creating custom buttons linking to extra pages

    Ok so I did get the button to show up using this in the define pages editor (main page);
    HTML Code:
    <button class="button" onclick="location.href='index.php?main_page=index&cPath=1';">About Us</button>
    Now I just have to adjust the CSS style to suit my needs.

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,716
    Plugin Contributions
    123

    Default Re: Creating custom buttons linking to extra pages

    Great! Hope the upgrade goes well and gets deployed soon.
    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.

 

 

Similar Threads

  1. Linking custom content to define pages
    By MaxBodine in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Jan 2018, 03:24 PM
  2. Linking to Ez-pages from custom header
    By squire11 in forum Basic Configuration
    Replies: 2
    Last Post: 4 Nov 2007, 09:19 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