Post by tolinho » Sat Aug 18, 2012 3:18 pm

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

New member

Posts

Joined
Sat Jul 21, 2012 2:01 am

Post by MarketInSG » Sat Aug 18, 2012 8:08 pm

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.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by tolinho » Mon Aug 20, 2012 9:03 pm

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.

New member

Posts

Joined
Sat Jul 21, 2012 2:01 am

Post by mabsabbas » Wed Sep 05, 2012 1:40 am

thanks alots............... its working.... this is what i was looking for long time.....

Newbie

Posts

Joined
Sat Aug 11, 2012 6:26 pm

Post by Saberpartz » Thu Sep 06, 2012 3:49 pm

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!

Newbie

Posts

Joined
Thu Aug 30, 2012 9:12 pm

Post by MarketInSG » Thu Sep 06, 2012 8:49 pm

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.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by tolinho » Thu Sep 06, 2012 9:09 pm

Uuaaauu... :)
Now that helpfull information.
Thanks. Really good stuff :)

New member

Posts

Joined
Sat Jul 21, 2012 2:01 am

Post by fabema » Thu Nov 01, 2012 2:40 am

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

Produse naturiste, produse bio si cosmetice naturale
la http://www.sanolife.ro


New member

Posts

Joined
Thu Oct 18, 2012 11:05 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by fabema » Thu Nov 01, 2012 8:21 pm

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?

Produse naturiste, produse bio si cosmetice naturale
la http://www.sanolife.ro


New member

Posts

Joined
Thu Oct 18, 2012 11:05 pm

Post by yasirmalik » Tue Nov 06, 2012 1:43 pm

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

Newbie

Posts

Joined
Tue Nov 06, 2012 1:37 pm

Post by rfollett » Tue Nov 13, 2012 6:17 pm

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?

New member

Posts

Joined
Wed Oct 24, 2012 1:09 am

Post by rfollett » Tue Nov 13, 2012 7:16 pm

I found this
http://www.templatemonster.com/help/ope ... u-tab.html

Should this work? I have a template applied?

New member

Posts

Joined
Wed Oct 24, 2012 1:09 am

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by Ga9rri5son7 » Wed Nov 14, 2012 2:53 pm

thank you for your sharing

Newbie

Posts

Joined
Wed Nov 14, 2012 10:41 am

Post by adriankoooo » Tue Nov 20, 2012 1:25 am

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.

Active Member

Posts

Joined
Thu Mar 03, 2011 6:52 am


Post by MarketInSG » Tue Nov 20, 2012 9:03 am

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


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by SincoMart » Fri Jan 04, 2013 6:04 am

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!

Newbie

Posts

Joined
Fri Jan 04, 2013 5:56 am

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by pooks » Sun Feb 10, 2013 12:22 am

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

New member

Posts

Joined
Tue Mar 27, 2012 1:42 am
Who is online

Users browsing this forum: No registered users and 26 guests