Post by kreativ » Wed Sep 28, 2011 4:10 am

This is more than a question than a problem as such (I think), but I was trying to figure out how to use or the purpose of the Products Layout Override tab.

1) I created a new Layout on System>Design>Layouts
2) Changed a new product's Design>Layout Override to the new Layout created on previous step, but I can't seem to get it to work.

I tried creating a new subfolder in template>my_template>template>products and added an edited copy of the products.tpl cahnging the route on the System>Design>Layouts to the new path but I still get the defaul products.tpl

Any ideas or pointers are welcome as there is little to no explanation available. Thanks in advance
Last edited by kreativ on Thu Sep 29, 2011 11:39 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Sep 02, 2011 4:55 am

Post by Xsecrets » Wed Sep 28, 2011 9:29 am

Layouts and templates are two very different things. Layouts simply hold modules in whatever position you want. Those are supported per product/category/information page etc. Templates change the look and those are not supported on anything more granular than a per store basis.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by kreativ » Wed Sep 28, 2011 9:17 pm

Thanks for the quick response, I understand what layouts and templates are....but my query was more to do with how to make one particular product from ALL the products in the shop link to a particular layout which in turn has it's own template?is that possible???

Let me explain what I am trying to achieve...I read in another post in this forum (http://forum.opencart.com/viewtopic.php ... te#p185780) that:
1.- In admin/system/dessign/layout create a new layout for product. For example named product_no_price

2.- Edit that file and erase the button add to cart

3.- Assing to the products without price that layout.

4.- Create in that layout a link to your contact us page to send a mail to the owner of the store to request a quote.
So what I wish to do is steps 2 and 3 of the quoted post.

Newbie

Posts

Joined
Fri Sep 02, 2011 4:55 am

Post by Xsecrets » Thu Sep 29, 2011 1:29 am

kreativ wrote:Thanks for the quick response, I understand what layouts and templates are....but my query was more to do with how to make one particular product from ALL the products in the shop link to a particular layout which in turn has it's own template?is that possible???

Let me explain what I am trying to achieve...I read in another post in this forum (http://forum.opencart.com/viewtopic.php ... te#p185780) that:
1.- In admin/system/dessign/layout create a new layout for product. For example named product_no_price

2.- Edit that file and erase the button add to cart

3.- Assing to the products without price that layout.

4.- Create in that layout a link to your contact us page to send a mail to the owner of the store to request a quote.
So what I wish to do is steps 2 and 3 of the quoted post.
whoever said that in the other thread does not know what they are talking about. As I said layouts and templates are completely different and do not interact with each other in any way whatsoever. You cannot assign a template to a layout, so all you can do with a different layout is put module in different positions, so you can change the layout(module positions) on a per product basis, but you cannot in any way shape form or fashion (without editing code) make anything other than different stores have a different template.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by spikeachu » Thu Sep 29, 2011 2:21 am

If I understand what you are trying to achieve, I have a Mod already programmed that will let you change the .tpl file of individual products.

Have a look at the Multiple Product / Category Templates mod in my footer, see if that's what you're after.

Basically, you would create a second template file and replace the code for the Add to Cart button with code that read Request a Quote. Save this as product_request_quote.tpl .. and assign that template to the product. That product would then be unable to be added to the cart.

I have different templates on my site, one redirects to an affiliate site, one adds to basket.

Add to cart template - http://www.love2print.co.uk/collisons-w ... ions-NW051

Redirect to supplier's website template - http://www.love2print.co.uk/cca-occasio ... 000-6LI010

Wedding Invitations and Stationery by Love2print

Commercial Mods
Product Colours on Category Page
Cardsave Direct Gateway
Clear Cache
Promotional Watermarks on Images
Multiple Category / Product Templates ** Popular **
Log Failed Login Attempts
Display Eligible Coupons with Products
Twitter Feeds

Have I helped you out or saved you some time? Please donate


Active Member

Posts

Joined
Fri Mar 12, 2010 6:31 am

Post by kreativ » Thu Sep 29, 2011 7:32 pm

Thanks guys for the reply, I was just playing around with some of the settings and options in OC getting myself acquainted with OC's structure and coding, nothing serious yet.

To Xsecrets, as I mentioned I know what Layouts and Templates are, is just that the post made it seem as they could be done without to much of a hassle (my mistake!!! :-[ I came across this post before I even started playing around with OC; as I see the code structure is more complex than anticipated), but that doesn't mean that it cannot be achieved with a bit of coding, otherwise spikeachu would not have been able to do it.

I don't mind spending some time in getting the code to work.

Newbie

Posts

Joined
Fri Sep 02, 2011 4:55 am

Post by Xsecrets » Thu Sep 29, 2011 8:15 pm

well of course pretty much anything can be achieved depending on how much coding you are willing to do.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by richdtt » Sat Mar 31, 2012 8:53 am

So did you ever figure it out? Or did you use the MOD that someone else suggested? I'm actually on the exact same boat as you.

Newbie

Posts

Joined
Wed Mar 21, 2012 9:26 am
Who is online

Users browsing this forum: No registered users and 96 guests