Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / making new pages, links etc..(please help, have scoured!)

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

Locked

Views: 2,904

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
9 Feb 2007, 4:14 PM
#1
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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 https://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

9 Feb 2007, 4:24 PM
#2
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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...

9 Feb 2007, 4:42 PM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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:

     </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&../../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&../../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.

9 Feb 2007, 5:23 PM
#5
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

9 Feb 2007, 5:29 PM
#6
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

Kim:

http://www.websiteoptimization.com/services/analyze/wso.php?url=http://www.noahsarkbikes.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!

9 Feb 2007, 5:32 PM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

9 Feb 2007, 10:35 PM
#8
burtjesus avatar

burtjesus

New Zenner

Join Date:
Sep 2006
Posts:
32
Plugin Contributions:
0

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.

12 Feb 2007, 9:24 AM
#9
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

kobra:

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!

12 Feb 2007, 9:25 AM
#10
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

burtjesus:

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?

12 Feb 2007, 3:30 PM
#11
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

thanks very much for all your help guys, it's all up and working now, and I got a link for the new page up in the header.

thanks again,

arum

3 Mar 2007, 11:15 PM
#12
zinfandel avatar

zinfandel

Zen Follower

Join Date:
Feb 2007
Location:
NNJ
Posts:
205
Plugin Contributions:
0

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

Hi!

Similarly, I have a size guide page for my products and I want a link to this page listed in the information menu, instead of the important links menu where ezpages usually go.

I really don't want a sidebox just for this one link.

I hunted down all of the 'shippinginfo' files and created a comparable 'size_guide' file.

The link tries to go to the correct URL, but I end up with 404 page.
I've done everything I can think of to define a new defined page.
The link just isn't finding the page.

Does anyone have a procedure list to acocmplish this.
Eureka, procedure lists are just what we need.

thanks,
Zinfandel wants good grapes.

4 Mar 2007, 12:00 AM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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

Nice looking site ...

However ... I cannot figure out how to navigate it so I packed up my credit card and went home ... :cry:

Consider when in the product info pages turning on the navigation between products ...

I finally find the Downhill Bikes but get lost on how to get to the next bike as there isn't a next bike unless I know to go back to the categories menu and find the listing and find the product and figure out what I have and haven't seen ...

4 Mar 2007, 3:23 PM
#14
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

Zinfandel, I managed to find an about us addon somewhere on here (lost the link now but shouldn't be hard to find) with instructions on how to add a page... was very helpful.

4 Mar 2007, 3:25 PM
#15
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

Ajeh, thanks for the feedback, sounds bad!

I will look into what you suggested RE: next product buttons, is this something that can be easily turned on? having not set up the site from scratch it has been and continues to be a very steep learning curve for me.

4 Mar 2007, 3:28 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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

You might peek at the Configuration ... Product Info ...

Previous Next - Navigation Bar Position
Location of Previous/Next Navigation Bar
0= off
1= Top of Page
2= Bottom of Page
3= Both Top and Bottom of Page

4 Mar 2007, 9:04 PM
#17
zinfandel avatar

zinfandel

Zen Follower

Join Date:
Feb 2007
Location:
NNJ
Posts:
205
Plugin Contributions:
0

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

Thanks! Arumdevil,

Found that addon module for the about us page, and got my page working!... based on that procedure.

I had it pretty much figured out except for some minor details.

Thanks for your push in the right direction.

~Zin

5 Mar 2007, 9:46 AM
#18
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

No worries Zinfandel, glad to help!

5 Mar 2007, 9:47 AM
#19
arumdevil avatar

arumdevil

New Zenner

Join Date:
Feb 2007
Posts:
23
Plugin Contributions:
0

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

thanks again Ajeh, I agree it's better with that on. Have to try and spruce it up a bit with some images to make it clearer, but it definitely helps.

:D