Post by Up Running » Thu Jul 30, 2015 2:34 am

Hello,
I'm new to Opencart, so sorry in advance. I'm trying to create a custom template and have it to only activate on a certain Category. The site already has a custom theme installed and is working. So this is what I have tried. I copied the product.tpl file and made my changes. Then I renamed it (new-product) and reloaded uploaded it to the same location (my-theme > template > product). Then in Opencart I went to System > Design > Layouts and create a layout with the route product/new-product. Then I went to Catalog > Categories > New Products and clicked the design tab. The I selected my New Product layout and clicked save. Nothing changed. Am I missing a step or doing it wrong? Thanks

Edited: I'm using version 1.5.5.1

Newbie

Posts

Joined
Thu Jul 30, 2015 2:19 am

Post by IP_CAM » Mon Aug 03, 2015 7:10 am

if you would have shown a few images, on your work, or then added a few links, to your admin section as well, as DEMO/DEMO Admin, by example, one would possibly have been able to assist, even on your a little ancient OC Version.

But this was your Post number 1, at this Forum, so, it's kind of hard, to find out, where to start, in the first place. But just copy&paste/renamed Files, leaving their 'source' untouched, will not work.

Possibly, this can be of some (little only) help:
http://forum.opencart.com/viewtopic.php?f=20&t=149796

and check here on already existing such Options, at least,
to compare, and so find out, on how it can be done.
http://www.opencart.com/index.php?route ... 20Category

just to reply with some ideas...
Ernie
good luck!

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by qahar » Thu Aug 06, 2015 4:44 pm

@upRunning
You misunderstand OpenCart "Layout"
The "Layout" at Admin > System > Design is related to module position to page (by route url) and or used as override specific layout for product, category etc. But still, the Layout here is related to module position.

OpenCart doesn't have admin option to select custom template, it will always use the same filename template (product.tpl, category.tpl etc). To have custom template for certain categories you need to use Modification (vQmod) to check the category id and apply different template.

I would suggest you to read and adapt according to your need http://www.opencartnews.com/tutorials/s ... duct-page/

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia
Who is online

Users browsing this forum: No registered users and 6 guests