Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    27
    Plugin Contributions
    0

    Custom Dynamic Extra Pages with URL parameters, GET, POST - for Define and EZ Pages

    Current version: 1.2.6d

    I've been looking around for a post to help solve my problem but haven't had any luck. I have done a number of successful modifications to my client's website but am now snagged on this new problem. I need some help--or guidance at least.

    PROBLEM:
    -----------
    I am setting up an extra page that can be edited with the Define Pages Editor. The page is a builders showcase/gallery and includes a menu of specific galleries. Rather than create an extra page for each gallery, I would like to pass another paramater to Zen Cart and use it to determine which gallery to generate. The menu would look something like:

    <a href://www.anyzenstore.com/zencart/index.php?main_page=builders_showcase&gallery=1>Gallery 1</a><br>
    <a href://www.anyzenstore.com/zencart/index.php?main_page=builders_showcase&gallery=2>Gallery 2</a><br>
    <a href://www.anyzenstore.com/zencart/index.php?main_page=builders_showcase&gallery=3>Gallery 3</a><br>
    ....

    I am confused how to handle this on the server side with Zen-Cart. I think I should be able to reference $_GET but this doesn't get the job done. The URL is sent to the server and Zen Cart doesn't know what to do with extra info so it defaults to the home page. Where does Zen-Cart 'catch' parameter values, such as 'main_page'? I assume it uses $_GET somewhere but how can I add more parameters, such as 'gallery'? Or do I need to use a form with hidden inputs?

    Any help or suggestions would be greatly appreciated.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Custom Dynamic Extra Pages with URL parameters, GET, POST - for Define and EZ Pag

    You need:

    1. /includes/modules/pages/builders_showcase/header_php.php

    inside this file, you need the intelligence to read the &gallery=x value:
    $page_to_display = $_GET['gallery'];

    Then act accordingly based on $page_to_display

    2. includes/languages/english/builders_showcase.php
    This is the language file ... which you can build from components in the privacy.php file in the same folder.

    3. includes/templates/YOURTEMPLATE/templates/tpl_builders_showcase_default.php

    This is the template which displays your actual content.
    Again, you could base it off the tpl_privacy_default.php as an example, since you stated you're using it to display define-page content specifically.
    .

    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.

  3. #3
    Join Date
    May 2006
    Posts
    27
    Plugin Contributions
    0

    Default Re: Custom Dynamic Extra Pages with URL parameters, GET, POST - for Define and EZ Pages

    Thanks DrByte. I will let you know how this works.

 

 

Similar Threads

  1. how to get URL to categories, products, manufactures and ez-pages
    By eVelt in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Feb 2015, 05:08 PM
  2. Define Pages Editor Not Working With My Custom Template
    By kizmar in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 11 Mar 2009, 02:13 PM
  3. Define Custom Page Titles for Individual Pages - not custom titles for site wide use
    By antonyx in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 20 May 2008, 06:35 PM
  4. extra define pages
    By poosk in forum Basic Configuration
    Replies: 6
    Last Post: 28 Jun 2006, 07:34 PM

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