Is is possible to have php code in an information page (using code edit). I don't think it's working.
Basically i set up a new info page for "new/latest products".
Here is what i'm pretty sure is the code that shows the most recently added products.
">" title="" alt="" />
">
Now, ideally i could just paste that in the code edit for the info page and it would work. However I doesn't like it and if you go back into the edit screen it's removed the code. Do i need to page a seperate "real" page for it or is there a simple work around?
Basically i set up a new info page for "new/latest products".
Here is what i'm pretty sure is the code that shows the most recently added products.
">" title="" alt="" />
">
Now, ideally i could just paste that in the code edit for the info page and it would work. However I doesn't like it and if you go back into the edit screen it's removed the code. Do i need to page a seperate "real" page for it or is there a simple work around?
Well, the issue is more than just that.
You can't really get product information from the information page because you don't have all the constructs and classes set up. Information page knows nothing about $products or anything like that.
I do like the idea of where you are going with that, however, it can't be done as simply as you are trying to make it.
This is something we could look into tho.
You can't really get product information from the information page because you don't have all the constructs and classes set up. Information page knows nothing about $products or anything like that.
I do like the idea of where you are going with that, however, it can't be done as simply as you are trying to make it.
This is something we could look into tho.
Can a make a seperate page with just the latest products on it then? I mean the layout.tpl file is just a PHP file and I skinned that by basically finding out what bits of PHP call which information and then moving them around to where I wanted them displayed. That's the php from the layout file that would show the latest products. I just don't want it on the main page :]
Here's what you can do.
1. Clone the home page files:
- /catalog/controller/home.php
- /catalog/language/english/controller/home.php
- /catalog/template/default/content/home.tpl
2. Rename them to new_products
3. Edit /catalog/template/default/content/home.tpl file and put just what you want in there with normal hardcoded html. Unless you want something else like categories or something listed on that page instead.
4. Now decide where you want to put the "New Products" link.
- header bar?
- category sidebox?
- information sidebox?
5. Edit that particular extension and add the link there:
New Products
Now home will be something else and new products will have all the stuff on home.
1. Clone the home page files:
- /catalog/controller/home.php
- /catalog/language/english/controller/home.php
- /catalog/template/default/content/home.tpl
2. Rename them to new_products
3. Edit /catalog/template/default/content/home.tpl file and put just what you want in there with normal hardcoded html. Unless you want something else like categories or something listed on that page instead.
4. Now decide where you want to put the "New Products" link.
- header bar?
- category sidebox?
- information sidebox?
5. Edit that particular extension and add the link there:
New Products
Now home will be something else and new products will have all the stuff on home.
The feature/latest/specials adds those items to the homepage if I'm understanding how it works. I think our friend here wants a separate page with just the latest products on it.
But using that contrib, he could probably take the latest product code out of it and put it into a separate controller & template
That would be the best place to start
But using that contrib, he could probably take the latest product code out of it and put it into a separate controller & template
That would be the best place to start
I've had a fiddle and nothing is quite working. I looked at the "feaured Prodcut" addon, but it still seems to an extra peice of code rather than a new "page".
I think what I need to do it just have a new blank controller. controller=contact is a controller which just has some content in it (ie: a contact form). I just need a new one that I can paste the original latlest products code into.
Soooo. How do i go about that. I tried just duplicating an existing one, but I think there must be a file that identifys existing controllers.
I think what I need to do it just have a new blank controller. controller=contact is a controller which just has some content in it (ie: a contact form). I just need a new one that I can paste the original latlest products code into.
Soooo. How do i go about that. I tried just duplicating an existing one, but I think there must be a file that identifys existing controllers.
Does this thread help
See Q's post on October 15 for how to create a module
http://forum.opencart.com/index.php/topic,2033.0.html
See Q's post on October 15 for how to create a module
http://forum.opencart.com/index.php/topic,2033.0.html
my original post in this thread should still apply:
http://forum.opencart.com/index.php/top ... l#msg10932
You just need to figure out the sql for "latest products" and display that on your new page
http://forum.opencart.com/index.php/top ... l#msg10932
You just need to figure out the sql for "latest products" and display that on your new page
Who is online
Users browsing this forum: No registered users and 3 guests