Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2005
    Posts
    20
    Plugin Contributions
    0

    Default Defining different (dynamic) main page

    Hi there!

    I've been working with ZenCart a lot the last week, integrating a design made by a designer with no specific software in mind, into ZenCart. It has all been working very well (see the current progress here: http://www.freshfash.nl/index.php) so I'm pretty happy.

    Now I'm going to create a news module where the shop owner can add news. The idea is that on the index.php it will show a brief welcome message and then the newest 5 items. The PHP and MySQL to do this is no problem for me but I have two questions concerning ZenCart.

    1) Where should I put the news module so that it shows in the main page? Where do I put the logic? In the main page or do I setup the main page to link somewhere else?

    2) I want to integrate the news admin part into the admin panel, is there some sort of tutorial or how-to written on how to make an extra menu item in the admin panel?

    Thanks!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Defining different (dynamic) main page

    1. The "where" all depends on what exactly you need to use to display the content. Maybe embedding the PHP into define_main_page.php might do it?
    Or maybe you need to create another centerbox much like the featured-products or whats-new centerboxes ... which is a little more complicated than the define_main_page.php (which you would just edit as a regular PHP file using your text editor).

    2. The Backup MySQL plugin which can be obtained from the Admin Tools section of the Downloads area is a simple addon that can shows all the pieces required for adding something to the admin menu.
    .

    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
    Feb 2005
    Posts
    20
    Plugin Contributions
    0

    Default Re: Defining different (dynamic) main page

    Quote Originally Posted by DrByte View Post
    1. The "where" all depends on what exactly you need to use to display the content. Maybe embedding the PHP into define_main_page.php might do it?
    Or maybe you need to create another centerbox much like the featured-products or whats-new centerboxes ... which is a little more complicated than the define_main_page.php (which you would just edit as a regular PHP file using your text editor).

    2. The Backup MySQL plugin which can be obtained from the Admin Tools section of the Downloads area is a simple addon that can shows all the pieces required for adding something to the admin menu.
    I will try it out today, thanks! If I can't get it to work (I think I will though) I'll let it know!

  4. #4
    Join Date
    Feb 2005
    Posts
    20
    Plugin Contributions
    0

    Default Re: Defining different (dynamic) main page

    Define main page does the trick.

    I have a question about the admin part though, if you copy the MySQL backup tool into your FTP folder it will automatically add it to the menu, however if I edit the files, rename them and upload them it won't create a menu item for me. Where and how exactly does it find out what to add?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Defining different (dynamic) main page

    Quote Originally Posted by Dzy View Post
    I have a question about the admin part though, if you copy the MySQL backup tool into your FTP folder it will automatically add it to the menu, however if I edit the files, rename them and upload them it won't create a menu item for me. Where and how exactly does it find out what to add?
    In the example of the backup-mysql tool, the only files in the contribution that actually deal with the backups are the /admin/backup_mysql.php and /admin/includes/languages/english/backup_mysql.php. All the other files are used for the menu option. Hopefully that helps you piece things together for your own additional menu.
    .

    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.

  6. #6
    Join Date
    Feb 2005
    Posts
    20
    Plugin Contributions
    0

    Default Re: Defining different (dynamic) main page

    Yeah, I thought those were it but apparently I did something wrong because it works now.

    Thanks!

 

 

Similar Threads

  1. header different on main page
    By johnybravo in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Sep 2011, 10:30 AM
  2. Custom Main Page With Dynamic URLs
    By shazam_1973 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 25 Feb 2011, 09:07 PM
  3. Different main page
    By CabernetCat in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Jul 2009, 10:48 AM
  4. Dynamic Main Page
    By Makover in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Aug 2008, 08:33 AM
  5. different main page
    By MacZooma in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 18 Feb 2008, 04:14 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