Community Forums

Multiple Product/Category Templates + CSS Override [1.5.x.x]

Commercial Themes can be listed here

Multiple Product/Category Templates + CSS Override [1.5.x.x]

Postby spikeachu » Sun Apr 04, 2010 4:44 am

Multiple Template System
This will allow you to add some variance throughout your store by giving each product a different template.
Upload all templates you wish to use to your theme's template folder.

Under the data tab for each product and category you will find a Template dropdown. Select the template that you wish to use.

Provided as vQmod.


CSS Override
This will allow you to add some variance throughout your store by adding new CSS files and applying them to any product.
Upload all stylesheetss you wish to use to your theme's stylesheet folder.

Under the data tab for each product you will find a Stylesheet dropdown. Select the stylesheet that you wish to use to override.

Provided as vQmod.




Spike.

Mods have now been updated to v1.5.4.1

Multiple Template System ($15)
http://www.opencart.com/index.php?route ... on_id=2359

CSS Override ($15)
http://www.opencart.com/index.php?route ... on_id=8496

Or buy both together and save $10
http://www.opencart.com/index.php?route ... on_id=8497
Last edited by spikeachu on Sun Sep 30, 2012 7:27 am, edited 12 times in total.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6]

Postby spikeachu » Mon Apr 05, 2010 10:55 am

Would there be any interest in me extending this to also allow variation of category templates across the store?
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6]

Postby i2Paq » Mon Apr 05, 2010 11:35 am

Why not?

Any demo-site where I/we can see this?
Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.

FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.

BUGs?: Known BUGS for All OC Versions.

[How to] OC 1.5.4.x en hoger; BTW + Verzend + betaalmethodes.
User avatar
i2Paq
Global Moderator
 
Posts: 11224
Joined: Mon Nov 09, 2009 6:00 am
Location: Winkel - The Netherlands

Re: Multiple Product Templates [1.4.6]

Postby spikeachu » Mon Apr 05, 2010 12:11 pm

I've only got it running on a local WAMP right now. I'll set it up on my live server so people can have a look. Will post link when done.

To be honest, i would have thought it should be a feature that would have been included as standard anyway. Maybe it will be integrated in a future release.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6]

Postby spikeachu » Mon Apr 05, 2010 12:50 pm

Test environment is set up at

http://www.celebritysweepstake.co.uk/opencart/admin

user: opencart
pass: opencart

The product template feature is available at Catalog > Product > Edit > Data Tab > Template drop down

Not all the templates uploaded are product compatible, but you should be able to see the effects in the actual store at http://www.celebritysweepstake.co.uk/opencart/

I have also added a mod for separating out orders of Zero value, which can be viewed under Sales > Zero Value Order

Any improvements or alterations required, let me know.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6]

Postby cmebd » Wed Apr 07, 2010 12:34 am

spikeachu wrote:Test environment is set up at

http://www.celebritysweepstake.co.uk/opencart/admin

user: opencart
pass: opencart

The product template feature is available at Catalog > Product > Edit > Data Tab > Template drop down

Not all the templates uploaded are product compatible, but you should be able to see the effects in the actual store at http://www.celebritysweepstake.co.uk/opencart/

I have also added a mod for separating out orders of Zero value, which can be viewed under Sales > Zero Value Order

Any improvements or alterations required, let me know.


G'day,

I am getting a lot of errors when visiting the product pages (after clicking on a link from the categories list).

10mins later: It was because the Category had a product template attached. If there was some way you could separate the different template types that would help I think.

Also not sure what the differences are in some of the product templates??
A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4
User avatar
cmebd
 
Posts: 403
Joined: Thu Nov 12, 2009 10:17 pm
Location: Tasmania, Australia

Re: Multiple Product Templates [1.4.6]

Postby spikeachu » Wed Apr 07, 2010 1:27 am

cmebd wrote:
spikeachu wrote:Test environment is set up at

http://www.celebritysweepstake.co.uk/opencart/admin

user: opencart
pass: opencart

The product template feature is available at Catalog > Product > Edit > Data Tab > Template drop down

Not all the templates uploaded are product compatible, but you should be able to see the effects in the actual store at http://www.celebritysweepstake.co.uk/opencart/

I have also added a mod for separating out orders of Zero value, which can be viewed under Sales > Zero Value Order

Any improvements or alterations required, let me know.


G'day,

I am getting a lot of errors when visiting the product pages (after clicking on a link from the categories list).

10mins later: It was because the Category had a product template attached. If there was some way you could separate the different template types that would help I think.

Also not sure what the differences are in some of the product templates??


Right now, there's very little difference between product templates. Just a line of text saying 'Template 1' , 'template 2' etc ... Which was so I could identify that a different template was loading while testing. When I get a spare hour i'll make a couple that look visually different.

The point you make about selecting incompatible templates is valid and i'll amend the code over the next couple of days.

Thanks for the feedback.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6]

Postby spikeachu » Wed Apr 07, 2010 3:22 pm

Updated to prevent selection of incompatible templates.
Now includes category template system.

Tested with 1.4.6 and 1.4.7
<<Scroll Down for v 1.4.8 / 1.4.8b>>
Last edited by spikeachu on Fri Jun 17, 2011 8:31 pm, edited 2 times in total.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6]

Postby cmebd » Wed Jul 14, 2010 10:20 pm

I am so sorry I missed this previously - the notifications are getting a bit spasmodic - I am getting notification of posts in threads from May at the moment.

Thank you so much for this - I will install and test out the concept I am looking to achieve and post back here.

Cheers
Christine
A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4
User avatar
cmebd
 
Posts: 403
Joined: Thu Nov 12, 2009 10:17 pm
Location: Tasmania, Australia

Re: Multiple Product Templates [1.4.6]

Postby 900pixels » Thu Jul 15, 2010 10:21 pm

Any plans for getting this working on 1.4.8 version of opencart?
Will it work on a 1.4.8 install as it is?

Cheers.
900pixels
 
Posts: 109
Joined: Tue Dec 08, 2009 12:36 am

Re: Multiple Product Templates [1.4.6]

Postby cmebd » Sun Jul 18, 2010 8:45 am

spikeachu wrote:Updated to prevent selection of incompatible templates.
Now includes category template system.


I seem to be having problems with the download. I keep getting an error when trying to unzip: does not appear to be a valid archive. I am sure its at my end but I have downloaded about 7 times (turning off my security scans (which I wouldn't normally do)) but still get the error.

Is it possible to send to me please. I will PM you details if that is OK?

Cheers
A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4
User avatar
cmebd
 
Posts: 403
Joined: Thu Nov 12, 2009 10:17 pm
Location: Tasmania, Australia

Re: Multiple Product Templates [1.4.6]

Postby spikeachu » Sun Jul 18, 2010 12:40 pm

cmebd wrote:
spikeachu wrote:Updated to prevent selection of incompatible templates.
Now includes category template system.


I seem to be having problems with the download. I keep getting an error when trying to unzip: does not appear to be a valid archive. I am sure its at my end but I have downloaded about 7 times (turning off my security scans (which I wouldn't normally do)) but still get the error.

Is it possible to send to me please. I will PM you details if that is OK?

Cheers


The files uploaded above have become corrupted. I've updated for v1.4.8 and attached to this post.
Any issues, let me know.

The zip file attached contains 2 versions.
v0.1 for 1.4.6 - 1.4.7
v0.2 for 1.4.8 - 1.4.8b
Last edited by spikeachu on Fri Jun 17, 2011 8:31 pm, edited 2 times in total.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby timkirtley » Tue Jul 20, 2010 10:12 am

All good - except one small hitch..

Pretty sure I made all the correct edits but obviously have missed something...

The setting in the back end to select a template for a category was there, but when I tried to save my change I get this error:

Error: Unknown column 'template' in 'field list'
Error No: 1054
UPDATE category SET parent_id = '0', sort_order = '1', template = 'category_35.tpl', status = '1', date_modified = NOW() WHERE category_id = '35'


I'm pretty sure I have created the 'template' field in the products table correctly.

Any ideas what I've done wrong?
timkirtley
 
Posts: 65
Joined: Thu Jun 03, 2010 6:01 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Wed Jul 21, 2010 6:41 am

timkirtley wrote:All good - except one small hitch..

Pretty sure I made all the correct edits but obviously have missed something...

The setting in the back end to select a template for a category was there, but when I tried to save my change I get this error:

Error: Unknown column 'template' in 'field list'
Error No: 1054
UPDATE category SET parent_id = '0', sort_order = '1', template = 'category_35.tpl', status = '1', date_modified = NOW() WHERE category_id = '35'


I'm pretty sure I have created the 'template' field in the products table correctly.

Any ideas what I've done wrong?



You'll need to insert a new column named 'template' of type VARCHAR into your product table. That should do the job.

Regards, Spike.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby timkirtley » Wed Jul 21, 2010 6:59 am

Okay, I'm pretty sure I've done that correctly though..

Using phpmyadmin, selected the 'product' table. Added a new field at the bottom of the table called 'template' as varchar(64).

Does that sound right?
timkirtley
 
Posts: 65
Joined: Thu Jun 03, 2010 6:01 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Wed Jul 21, 2010 7:20 am

Sorry, misread the error. It needs one in the category table too.
I updated the module to support category as well as product, but might have missed that step from the documentation.

I'll update the docs when I get home, thanks for bringing it to my attention.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby cmebd » Wed Jul 21, 2010 8:17 pm

Hi Spikeachu,

I installed in 1.4.8 installation went very smoothly. However when installing the 1.4.6 -1.4.7 version I am getting this error on the product /general tab page

Notice: Undefined variable: entry_tags in /path/html/admin/view/template/catalog/product_form.tpl on line 43

Any idea what my problem may be?

Cheers
A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4
User avatar
cmebd
 
Posts: 403
Joined: Thu Nov 12, 2009 10:17 pm
Location: Tasmania, Australia

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby DannyMacD » Thu Jul 22, 2010 11:17 am

as mine is a custom install and would love this feature, would you happen to have the snippets of code rather than files at all? :)

thank you so much.
DannyMacD
 
Posts: 480
Joined: Thu Jun 25, 2009 5:39 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Thu Jul 22, 2010 4:47 pm

cmebd wrote:Hi Spikeachu,

I installed in 1.4.8 installation went very smoothly. However when installing the 1.4.6 -1.4.7 version I am getting this error on the product /general tab page

Notice: Undefined variable: entry_tags in /path/html/admin/view/template/catalog/product_form.tpl on line 43

Any idea what my problem may be?

Cheers


Hi,

Looks like i've managed to sneak in a template for 1.4.8 into the 1.4.6 - 7 folders. Tags weren't introduced until 1.4.8, so the variable on that line of code in the template needs removing.

Regards, Spike.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Thu Jul 22, 2010 4:50 pm

DannyMacD wrote:as mine is a custom install and would love this feature, would you happen to have the snippets of code rather than files at all? :)

thank you so much.


I'll put together some code snippets, but my work load is quite high at the moment. Can you hang on till the weekend?
If not, v1.4.8 should be commented, so you can find the comments and make the changes in your customised files.

The only change for 1.4.8 is the token system.

Regards, Spike.
spikeachu
 
Posts: 175
Joined: Thu Mar 11, 2010 5:31 pm

Next

Return to Themes

Who is online

Users browsing this forum: No registered users and 14 guests

Hosted by Arvixe Web Hosting