Community Forums

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

Commercial Themes can be listed here

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby DannyMacD » Thu Jul 22, 2010 9:51 pm

i am in no rush and would rather wait for a pro to code haha :)

many thanks
DannyMacD
 
Posts: 471
Joined: Thu Jun 25, 2009 10:39 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Thu Jul 22, 2010 9:58 pm

DannyMacD wrote:i am in no rush and would rather wait for a pro to code haha :)

many thanks


No problem, which version are you running?
spikeachu
 
Posts: 173
Joined: Thu Mar 11, 2010 10:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby DannyMacD » Fri Jul 23, 2010 11:24 am

1.4.8b but its custom. thanks :)
DannyMacD
 
Posts: 471
Joined: Thu Jun 25, 2009 10:39 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby ThePath » Fri Jul 23, 2010 11:42 am

Just found this thread and I must say this is awesome. I would also request that Q and Daniel build this functionality into the core as it means you can be hugely flexible with the design!! It would be getting more like a wordpress templating system with this! Awesome.

Please integrate this into the core, this is the most useful addon I have seen!! O0 :laugh: :joker: :crazy:
User avatar
ThePath
 
Posts: 257
Joined: Fri Jun 26, 2009 3:53 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby Karen » Fri Jul 30, 2010 12:49 am

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

Regards, Spike.


Hi Spike,

There are 2 tables that seem relevant: "product" and "product_description". Do I need to amend them both?

Karen
Using OC version 1.4.8b
http://catandcaboodle.com/
User avatar
Karen
 
Posts: 159
Joined: Thu Jun 10, 2010 6:51 am
Location: WA State, USA

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Fri Jul 30, 2010 6:55 am

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

Regards, Spike.


Hi Spike,

There are 2 tables that seem relevant: "product" and "product_description". Do I need to amend them both?

Karen


Two tables need a 'template' field inserting. These are 'category' and 'product'. 'product_description' shouldn't be amended by the mod.
spikeachu
 
Posts: 173
Joined: Thu Mar 11, 2010 10:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Sat Jul 31, 2010 9:22 pm

As requested. Hopefully i've included all the code. I've had a very busy week, so if there's any issues I hope you'll forgive me and let me know. I'll look where i went wrong.


Code removed as making mod commercial.
Last edited by spikeachu on Sat Jun 18, 2011 1:30 am, edited 1 time in total.
spikeachu
 
Posts: 173
Joined: Thu Mar 11, 2010 10:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby JAY6390 » Sat Jul 31, 2010 9:37 pm

Very detailed list of changes :) Very nice work spikeachu. Personally I'd rather these templates were in their own separate folders rather than directly in the product folder with all the others, just for continuity, but that's nothing major. Great job!
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4639
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby mfrerebeau » Fri Aug 20, 2010 2:49 pm

This is a very great betterment for OpenCart !
Is this contribution will be insert in core application as it suggested before ?
Single we go faster, together we go more away...
User avatar
mfrerebeau
 
Posts: 21
Joined: Fri Aug 13, 2010 9:29 am
Location: France

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Sat Aug 21, 2010 8:09 am

Integration into the core i think is a decision for Qphoria / Daniel to make for v1.5.0 - Needless to say, I have no problem with it going in there.
spikeachu
 
Posts: 173
Joined: Thu Mar 11, 2010 10:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby timkirtley » Mon Sep 13, 2010 4:12 pm

Hey spike.

Firstly thanks for helping me out with my previous question, which was a good few months ago it seems, but I'm only just getting back on to this project - and I've run into another issue, where I've obviously messed something up when installing.

Now I appreciate there may well be a number of reasons for this, but I thought I'd ask you first so you could point me in the right direction... I've got the option in the back end to select a template for my product and can choose an item and 'Save changes' with no problems or errors, the thing is my choice isnt being saved, the template reverts back to 'product.tpl' every time I go back to edit the product.

I've successfully add and changed template for categories, so I must have done something right during the install.

As I say, if you point out which bits of code I should be looking at that would be great. It seems like months since I installed the plugin and even touched opencart at all, so I can't instantly remember what I did to install it.......

Thanks.
timkirtley
 
Posts: 65
Joined: Thu Jun 03, 2010 11:01 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Mon Sep 13, 2010 4:42 pm

timkirtley wrote:Hey spike.

Firstly thanks for helping me out with my previous question, which was a good few months ago it seems, but I'm only just getting back on to this project - and I've run into another issue, where I've obviously messed something up when installing.

Now I appreciate there may well be a number of reasons for this, but I thought I'd ask you first so you could point me in the right direction... I've got the option in the back end to select a template for my product and can choose an item and 'Save changes' with no problems or errors, the thing is my choice isnt being saved, the template reverts back to 'product.tpl' every time I go back to edit the product.

I've successfully add and changed template for categories, so I must have done something right during the install.

As I say, if you point out which bits of code I should be looking at that would be great. It seems like months since I installed the plugin and even touched opencart at all, so I can't instantly remember what I did to install it.......

Thanks.


From the description, ithink the likely candidate is file admin/model/catalog/product.php

Ensure that the first line of function addProduct,
$this->db->query ...
contains; template = '" . $data['template'] . '"
and the same for function editProduct.

Let me know how you get on.

Regards, Spike.
spikeachu
 
Posts: 173
Joined: Thu Mar 11, 2010 10:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby timkirtley » Tue Sep 14, 2010 8:32 am

Ah brilliant,

Yeah turns out I didnt have that entry at all in the edit product function which would explain a lot.

You know your stuff, thanks Spike.
timkirtley
 
Posts: 65
Joined: Thu Jun 03, 2010 11:01 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby konfetaz » Sun Sep 19, 2010 4:36 pm

what about 1.4.9? i installed it, but don't working...
konfetaz
 
Posts: 17
Joined: Thu Sep 16, 2010 2:14 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Sun Sep 19, 2010 5:33 pm

Not tested it for 1.4.9. To be honest, I'm not developing for 1.4.9 right now, as i've still not finished my 1.4.8 project. I will probably update the mod eventually, but it's not near the top of my agenda.
spikeachu
 
Posts: 173
Joined: Thu Mar 11, 2010 10:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby konfetaz » Mon Sep 20, 2010 2:37 pm

so maybe i can pay you some cash to make it on 1.4.9.1 ?
konfetaz
 
Posts: 17
Joined: Thu Sep 16, 2010 2:14 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Mon Sep 20, 2010 10:19 pm

Money isn't the issue. Any mods I make available will always be for free as I strongly believe in the take something / give something back philosophy. Finding time at the moment is the problem, there aren't enough hours in the day right now.

I'm nearing the end of the project i'm currently working on. As this has been ongoing for some months, it is going to take priority.

If all goes well, i'll see if I can find some free time at the weekend to update the mod, but I can't make any promises.
spikeachu
 
Posts: 173
Joined: Thu Mar 11, 2010 10:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby badcat » Tue Dec 21, 2010 8:39 pm

Hi - Has there been any progress on this? 1.4.9.3 is here and it seems like 1.5 will change things substantially... thanks
badcat
 
Posts: 3
Joined: Wed Sep 22, 2010 8:34 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby spikeachu » Tue Dec 21, 2010 9:23 pm

I've picked up further paid work, so updates for 1.4.9 are on the back burner for now. I haven't checked, but I can't imagine that there will be any update required to work with 1.4.9. I understand that the template system is being radically overhauled in 1.5, so functionality of this module may already be included out of the box.
spikeachu
 
Posts: 173
Joined: Thu Mar 11, 2010 10:31 pm

Re: Multiple Product Templates [1.4.6 - 1.4.8]

Postby fourgood » Mon May 30, 2011 9:00 pm

This is a great mod! Thanks for sharing it with us.
Im using 1.4.9 aswell and cant seem to get it working.
I replaced all code as youve mentioned, but the chosen template has no effect. It still loads the default template. Was anyone able to fix this issue?

regards
moritz
fourgood
 
Posts: 107
Joined: Wed Oct 20, 2010 1:49 pm

PreviousNext

Return to Themes

Who is online

Users browsing this forum: No registered users and 7 guests

Hosted by Arvixe Web Hosting