Page 3 of 6

Re: Creating a Custom Page in OpenCart

Posted: Sat Aug 18, 2012 3:18 pm
by tolinho
hi.
well the main reason I'm avoiding changes to the product file is because I don't want to change the original files.

so I'm looking for alternatives for that.

I used your tutorial to create the static page.
I have static file in
catalog/model
catalog/controller
I have the static.tpl and the language files.

if I call static page directly in the browser the page works fine.

but I want to load stuff from those files in product page.

that I've been having a hard time to get gone.

I tried added a include for my static page in product.tpl
the result was getting to getting two complete pages in each other. two headers two footers etc.
I figure that I can controll that by chancing my static.tpl file not to load header and footer etc.
but in the example above when I called static from product.tpl the functions in static.php were not run. all I got were programming errors.

how can I load my static model and controller files to work in product page?

its a little confusing I suppose. hope you understand. :-)

Re: Creating a Custom Page in OpenCart

Posted: Sat Aug 18, 2012 8:08 pm
by MarketInSG
if you don't wish to directly modify your files, you can use vQmod. To add in the static to product, edit catalog/controller/product/product.php

find

Code: Select all

$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
and change it to

Code: Select all

$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
				'information/static'
			);
you can call for static in product.tpl with <?php echo $static; ?> but make sure you change the route of the codes I gave you accordingly.

Re: Creating a Custom Page in OpenCart

Posted: Mon Aug 20, 2012 9:03 pm
by tolinho
Thank you MarketInSG for your help and assitance :)
I'll try out the solution you pointed out and let you know how it went later.

Re: Creating a Custom Page in OpenCart

Posted: Wed Sep 05, 2012 1:40 am
by mabsabbas
thanks alots............... its working.... this is what i was looking for long time.....

Re: Creating a Custom Page in OpenCart

Posted: Thu Sep 06, 2012 3:49 pm
by Saberpartz
Hello MarketInSG.
Thanks for the custom page help.
Ive seen you've been helping a lot of guys out here.
Can you please give me a hand of what ive been working on.
I made this static page from your tutorial already. (credits and acknowledgement to you.)
Now I want to put several products on it. Or maybe a manufacturer link so that it would be easier.
Can I integrate this to the page?
I know this would be a piece of cake for you.
Please let me know!
Thanks!

Re: Creating a Custom Page in OpenCart

Posted: Thu Sep 06, 2012 8:49 pm
by MarketInSG
Hi there, thanks for being so appreciative to our contribution. We have written another tutorial to help you guys with something more advance: http://www.opencartnews.com/tutorials/c ... rt-part-2/

To get products and all onto the static page, you will have to run queries. The following tutorial will guide you with something simple.

Re: Creating a Custom Page in OpenCart

Posted: Thu Sep 06, 2012 9:09 pm
by tolinho
Uuaaauu... :)
Now that helpfull information.
Thanks. Really good stuff :)

Re: Creating a Custom Page in OpenCart

Posted: Thu Nov 01, 2012 2:40 am
by fabema
MarketInSG wrote:Well, you must be missing something then. Try creating everything the same as mine, name it static etc.
Hey I did exactlly you did, the problem I have is that I don't know where to look for the page to be inserted in the site.
All that codding is doing what in the admin and frontstore page...what should I look for?

I am waiting for your replay
Thanks

Re: Creating a Custom Page in OpenCart

Posted: Thu Nov 01, 2012 8:52 am
by MarketInSG

Re: Creating a Custom Page in OpenCart

Posted: Thu Nov 01, 2012 8:21 pm
by fabema
MarketInSG wrote:find out more here: http://www.opencartnews.com/tutorials/c ... rt-part-1/
Yes but how can I customize the page and how can I put that static page in the menu bar to be accessible to click on it?

Re: Creating a Custom Page in OpenCart

Posted: Tue Nov 06, 2012 1:43 pm
by yasirmalik
i have add new page in my custom theme but not showing here

it seems
"The page you requested cannot be found!"

Thanks in Advance

Re: Creating a Custom Page in OpenCart

Posted: Tue Nov 13, 2012 6:17 pm
by rfollett
I am trying to add a new page to the main heading but it is not appearing. I have created the 3 files and uploaded.
I have a theme applied to my site so do I need to change anything?

I created static.php in controller/information folder
I created static.tpl in catalog/view/theme/nicole-shop/template/information
I created static.php in catalog/english/information

Is that correct?

Re: Creating a Custom Page in OpenCart

Posted: Tue Nov 13, 2012 7:16 pm
by rfollett
I found this
http://www.templatemonster.com/help/ope ... u-tab.html

Should this work? I have a template applied?

Re: Creating a Custom Page in OpenCart

Posted: Wed Nov 14, 2012 12:29 pm
by MarketInSG
http://www.opencartnews.com/tutorials/c ... rt-part-1/

Here's a full tutorial with explanation. It should answer your question on having custom themes

Re: Creating a Custom Page in OpenCart

Posted: Wed Nov 14, 2012 2:53 pm
by Ga9rri5son7
thank you for your sharing

Re: Creating a Custom Page in OpenCart

Posted: Tue Nov 20, 2012 1:25 am
by adriankoooo
Is there any way to create a single page, which shows latest products (this is my entry page in my webshop)? I have solution for 1.4, but I don't think it would work in 1.5.x.

Re: Creating a Custom Page in OpenCart

Posted: Tue Nov 20, 2012 9:03 am
by MarketInSG
call for the model file and load the latest products

Code: Select all

$this->load->model('catalog/product');
$this->data['products'] = $this->model_catalog_product->getLastestProducts(10)
then add it to your template file

Re: Creating a Custom Page in OpenCart

Posted: Fri Jan 04, 2013 6:04 am
by SincoMart
I came upon this thread while searching for help with another(related) issue, but it shows me that I'm learning a lot about coding on my own because I'd gone ahead and created my own custom page by using this very same method before even reading this.
My problem, however, is that this custom page is actually a sort of confirmation page linked to my contact form (which I also custom-built instead of using the onsite form) but when it calls for the final page i get the following error:
"Fatal error: Class 'Controller' not found in.....php on line 2"
Interestingly enough, if I view the page itself directly without calling it through the contact form it displays perfectly and with full functionality! Can anyone help me?
I was hoping to launch this site on NYD but this contact form error has stumped me for nearly a week and prevented me from moving on and even loading my products! :-[

HELP ME PLEASE!

Re: Creating a Custom Page in OpenCart

Posted: Thu Jan 31, 2013 7:55 am
by MarketInSG
still looks alright to me

Re: Creating a Custom Page in OpenCart

Posted: Sun Feb 10, 2013 12:22 am
by pooks
Im trying to change page name into products getting this error constantly any fix?

Fatal error: Class 'Controllerinformationproducts' not found in /public_html/system/engine/front.php on line 39