Zen Cart Logo
Forums / Addon Templates / Duplicating a page?

Duplicating a page?

Locked

Views: 976

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
5 Jan 2010, 7:31 AM
#1
amirgtr avatar

amirgtr

New Zenner

Join Date:
Mar 2009
Posts:
45
Plugin Contributions:
0

Duplicating a page?

Say we want to have a duplication of the All Products page, but with a different name and URL. Or any page for that matter.

And let's say we don't want to use the "require" call thing, we want to actually duplicate it for modification (so the original All Products will remain as it is, and the new one gets a makeover).

I have very impressive skills such as copying and pasting :P but seriously this is like, beyond my knowledge lol. I tried copying everything to a new define pages but it keeps saying "more products will be added soon".

Help! :blush:

5 Jan 2010, 12:56 PM
#2
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: Duplicating a page?

You would need to duplicate the core PHP files, rather than creating a new define page. Define Pages are really meant for static content, whereas the page you want to build needs to be completely dynamic, so as to load in all the new products.

You need module files, which is found in includes/modules/pages/new_products/

You need a language file found in includes/languages/english/new_products.php

You need template pages, which are found in your templates directory.

You may also need to duplicate other pages if it is the actual layout you want to change, as there are a number of other templated files, and module files which are called in addition, such as those files which build the product listing sections.

In all, not a simple task, but certainly achieveable.

Absolute

5 Jan 2010, 11:52 PM
#3
amirgtr avatar

amirgtr

New Zenner

Join Date:
Mar 2009
Posts:
45
Plugin Contributions:
0

Re: Duplicating a page?

Absolute:

You would need to duplicate the core PHP files, rather than creating a new define page. Define Pages are really meant for static content, whereas the page you want to build needs to be completely dynamic, so as to load in all the new products.

You need module files, which is found in includes/modules/pages/new_products/

You need a language file found in includes/languages/english/new_products.php

You need template pages, which are found in your templates directory.

You may also need to duplicate other pages if it is the actual layout you want to change, as there are a number of other templated files, and module files which are called in addition, such as those files which build the product listing sections.

In all, not a simple task, but certainly achieveable.

Absolute

Ah, I see. Doesn't sound too hard, I shall use my impressive copypasta skills then haha

Thanks for the info man, really appreciate it.

Will update the thread once I get around to try this out.

6 Jan 2010, 5:27 AM
#4
amirgtr avatar

amirgtr

New Zenner

Join Date:
Mar 2009
Posts:
45
Plugin Contributions:
0

Re: Duplicating a page?

Hell yeah man you rock!

See I told you I got mad copypasta skills :flex:

http://e-techsiliconvalley.com/store/index.php?main_page=list_all_products

Only thing left...I want to keep the original all products page as it is (to show 10 per page) but configure this one to show lets say 50 a page. Now I'm pretty sure it's just one variable I have to change to a specific number...but question is, which variable is it?