Page 1 of 1
Remove Add to Cart on specific products
Posted: Sat Dec 11, 2010 11:33 am
by PaulJaff
New user to OpenCart verison 1.4.9.1.
I am setting up a Cart for my brother's Bike Shop, the issue is that some Bikes cannot be sold online, must be purchased in store. So what I want to do it to allow the Add to Cart on products that can be sold online, and not allow this on the Bikes brands that have this restriction.
Any thoughts, suggestions, help.
Thanks
Re: Remove Add to Cart on specific products
Posted: Sat Dec 11, 2010 12:23 pm
by rezter
The easiest way would be to leave the Stock of the item at 0 and explain that customers must come to the store to purchase the bike in the description. Probably not the neatest or most effective but it will work.
Re: Remove Add to Cart on specific products
Posted: Sat Dec 11, 2010 1:53 pm
by PaulJaff
Hi Rezter, I thought maybe having an option like Out of Stock to Purchase in Store, and maybe modifying the code to identify this, but not sure if this is the best option or what the flags/variables might be to identify this or what template to mod. Thoughts?
Re: Remove Add to Cart on specific products
Posted: Sat Dec 11, 2010 2:46 pm
by jty
There is a free mod, I think there might even be 2 of them, that enables using different templates for different products (and categories).
The idea is to assign the product to a different template and make the necessary changes on that .tpl viz remove the buy buttons and put a note saying buy from physical shop only.
The mods are in the extensions section of the main site. I seem to recall seeing 2 of them but I haven't used either. One might be called Product Custom Layout (not sure). Also note that they may be for older versions so you may need to upgrade them to the current version
Another way is to add another field to the product table. Then on product.tpl, you can use an if statement to determine whether to show the buy button or not.
Re: Remove Add to Cart on specific products
Posted: Sun Dec 12, 2010 7:25 am
by PaulJaff
Cheers jty, will have a look into it. I like the idea of different templates but I am not against modding code to get it to do what I need. Your second solution was the option I was thinking I would have to do, but never against using tools that smarter people than me have developed.