Results 1 to 10 of 19

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    23
    Plugin Contributions
    0

    Default making new pages, links etc..(please help, have scoured!)

    Hello all.

    I started a new job 3 days ago maintaining website and store (Zen-cart, obviously) for a Mountainbike/Snowboard shop.

    Before starting the job I had done several sites and am fairly proficient with XHTML and CSS for teble-less layout. However I had never touched on PHP or used Zen-Cart before.

    I have figured out how to change various things (changing the define_pages files and stylesheets etc...) by digging around the file structure and checking this forum and the FAQ section, but I am now stuck, so some specific help would be much appreciated.

    Bear in mind that I have been thrown into the midst of a live Zencart setup, rather than starting with the installation process, so I may have missed certain key points and concepts.


    I want to add a new PAGE/S and links to it/them. For reference the site is at www.noahsark.co.uk/zencart.

    I would like to add a "News & Events" page with a link to it appearing next to the contact us, log In links etc (header?).

    I have tried to do this with the EZ pages in the admin section with no luck. I feel it may be easier for me to achieve this by editing the actual HTML/PHP files - I just don't know what I need to edit and where....

    Any help MUCH appreciated.

    many thanks in advance,

    Arum

  2. #2
    Join Date
    Feb 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: making new pages, links etc..(please help, have scoured!)

    just FYI, the things I have managed to sus-out and change so far are on the linked page:

    added body text, Products by Brand and Products by Type boxes.

    edited header logo so it is a URL to main page.

    widened the whole template to 950px...

    some other basic changes on contact page etc...

  3. #3
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: making new pages, links etc..(please help, have scoured!)

    http://www.websiteoptimization.com/s...co.uk/zencart/

    Please - before you make any other change, OPTIMIZE!!! The images and page are huge and shoppers won't wait for it to download.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  4. #4
    Join Date
    Feb 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: making new pages, links etc..(please help, have scoured!)

    Quote Originally Posted by Kim View Post
    http://www.websiteoptimization.com/s...co.uk/zencart/

    Please - before you make any other change, OPTIMIZE!!! The images and page are huge and shoppers won't wait for it to download.
    My intial reaction was "WTF?" (no offence, was just my initial reaction) but then I checked all the images on that page. the header and other images were no more than around 40k which I thought was reasonable. Then I came to the "featured products" images at the bottom of the page and they do seem a little on the large (file-size) side!

    I understand the ins and outs of image optimisation and it is something I WILL get around to in due course but there is a lot to do and a LOT of images, and this is only my 3rd day here!! (I know, not your problem, but hey - there's only so much time in a day).

    I hope my reply didn't come across wrong, it's a good point made and thanks for bringing it to my attention, but it will take time...

    in the meantime, any advice on my original question?

    (I will not reply until monday) have a good weekend!

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: making new pages, links etc..(please help, have scoured!)

    I feel it may be easier for me to achieve this by editing the actual HTML/PHP files - I just don't know what I need to edit and where....
    For the most part this does not exist as you might be thinking.and therefore there is not a complete page that you can edit like you would for a html site. The high side of this is that ou do not have to maintain the many pages that a html site requires as each page is built dynamically from the defined pieces. Down side - you need to grasp where these pieces are defined/customized.

    My suggestion to you would be to NOT mess with the live site directly. Create another install with it's own DB in another directory. Then you can make your attempts to change things without worring about bringing the live site down. And when you are confident that you have your alterations down and know which files are changed/added and where to make them function it is easy to move just these to the live site.

    The previous individual has created a custom template named "classic2" and you should breif youself on the ins & outs of the override system to maintain this and your edits to files. This information is in the FAQ's and the wiki here.

    To add what you want - the design of this site has employed a table for the top links with the following code:
    Code:
         </td>
              </tr>
            </table>
    		<table border="0" cellspacing="0" cellpadding="0" class="headerNavigation" align="center">
              <tr class="headerNavigation">
                <td align="left" valign="top" width="60%" class="headerNavigation">
                  <a href="http://noahsarkbikes.co.uk/zencart/index.php?main_page=index&amp;../../classic/common">Home</a>|
    
    <a href="http://www.noahsark.co.uk/newshop/">New Shop</a>|
    <a href="http://www.noahsark.co.uk/blog/">Blog</a>|
    <a href="http://noahsarkbikes.co.uk/zencart/index.php?main_page=contact_us/">Contact Us</a>|
                  <a href="https://noahsarkbikes.co.uk/zencart/index.php?main_page=login&amp;../../classic/common">Log In</a>
                </td>
                <td align="center" width="0%"></td>
                <td class="headerNavigation" align="right" valign="top" width="50%">
                </td>
              </tr>
    
            </table>
    It appears that they have not utilized the tpl_header.php file and the associated div's contained in that file like:<div id="headerWrapper"> and <div id="logoWrapper">
    Not the way I would have done it but then it does work. You would have to add your additional link to the code that they have defined for this nav bar which is not part of the Zen Cart files as distributed.
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Feb 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: making new pages, links etc..(please help, have scoured!)

    thanks Kobra. I understand the basic concept behind PHP, and that the pages as seen by the end user are created dynamically, and also the reason for this and that all makes sense to me. It's just that I have never actually encountered this system before so am not sure of the details.

    I have already managed to make the changes I outlined above on the live site, and while I understand why you recommended not to do it that way, I feel adding links and new pages is fairly safe... and I have backed up!

    I found the "about_us" page module and tried to follow it but at the end came up with this error:

    Warning: require(includes/templates/template_default/templates/tpl_news_events_default.php) [function.require]: failed to open stream: No such file or directory in /home/noahsark/public_html/zencart/includes/templates/template_default/common/tpl_main_page.php on line 115

    Fatal error: require() [function.require]: Failed opening required 'includes/templates/template_default/templates/tpl_news_events_default.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/noahsark/public_html/zencart/includes/templates/template_default/common/tpl_main_page.php on line 115
    I will look into this farther and the code you posted above on monday!

    Thanks for your suggestions so far.

    arum

  7. #7
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: making new pages, links etc..(please help, have scoured!)

    I think that the error is generated due to the fact that tpl_news_events_default.php is not a file found in /includes/templates/template_default/common/

    Try placing a copy (even a null file) of this file in this location. There is some convention of looking for the file and the override and the file has to exist in the default location to be overrideable - I do not fully understand it but know that this has been an issue for me in the past
    Zen-Venom Get Bitten

  8. #8
    Join Date
    Sep 2006
    Posts
    32
    Plugin Contributions
    0

    Default Re: making new pages, links etc..(please help, have scoured!)

    arumdrum,

    Why didn't ezpages work for you?

    I would simply create a new ezpage called News & Events.
    Make sure you turn on the ezpages sidebox under Tools -> Layout Boxes.
    Then notice the new ezpages sidebox on the main site. Copy or note the link to "News & Events"

    Then drop a link in the header:
    Home| New Shop| Blog| Contact Us| Log In | News & Events | etc.
    and just hard link it to the new ezpage url...

    Works for me... very easy.
    -----
    Steve

  9. #9
    Join Date
    Feb 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: making new pages, links etc..(please help, have scoured!)

    Quote Originally Posted by burtjesus View Post
    arumdrum,

    Why didn't ezpages work for you?

    I would simply create a new ezpage called News & Events.
    Make sure you turn on the ezpages sidebox under Tools -> Layout Boxes.
    Then notice the new ezpages sidebox on the main site. Copy or note the link to "News & Events"

    Then drop a link in the header:
    Home| New Shop| Blog| Contact Us| Log In | News & Events | etc.
    and just hard link it to the new ezpage url...

    Works for me... very easy.
    no idea TBH. I just tried again following the steps you mentioned but couldn't see any changes..

    perhaps I am missing something that should be really obvious?

  10. #10
    Join Date
    Feb 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: making new pages, links etc..(please help, have scoured!)

    Quote Originally Posted by kobra View Post
    I think that the error is generated due to the fact that tpl_news_events_default.php is not a file found in /includes/templates/template_default/common/

    Try placing a copy (even a null file) of this file in this location. There is some convention of looking for the file and the override and the file has to exist in the default location to be overrideable - I do not fully understand it but know that this has been an issue for me in the past
    [hmm, sounded logical but still didn't work after trying that. perhaps I missed a file out somewhere...]

    right, it seems to be working now, did what you suggested but in the templates_default/templates/ folder. I will try to update the page now. thanks!

 

 

Similar Threads

  1. v151 Links open in new page help please !
    By bocahydro in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 4 Sep 2013, 08:54 PM
  2. v139h please help find location of welcome to etc etc on main page
    By Carl in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 13 Aug 2012, 08:08 PM
  3. making new pages
    By suman07 in forum General Questions
    Replies: 2
    Last Post: 14 Dec 2007, 06:17 PM
  4. Replies: 7
    Last Post: 23 Aug 2006, 06: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