Page 1 of 1
[MOD] Add To Cart Button on Related Products 1.4.6
Posted: Sat Apr 10, 2010 4:11 am
by spikeachu
Places an add to cart button on your related products so that the customer can add to cart without changing pages.
Fewer clicks, and help aid your impulse buys.
Ajax animation remains intact.
Where there are options available on the product, the link will default to normal behaviour and redirect to that product's page.
If you feel Improvements can be made, let me know.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Sat Apr 10, 2010 11:25 am
by rph
Good job spikeachu. I'm surprised this thread isn't getting more responses. People are asking for this functionality all the time.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Mon Apr 12, 2010 4:56 am
by jayson
Thanks for the contribution. Will try it out today.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Thu Apr 15, 2010 3:19 am
by Iwao
Great contribution!
Thx a lot
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Sun Apr 18, 2010 6:12 pm
by SXGuy
I had previously done this myself, but i dunno, after i had done it, i decided it looked abit messey so removed it.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Wed May 05, 2010 1:39 pm
by dramony
how about for OC 1.3.2?
i tried it but this is the error:
Error: Could not load model tool/image!
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Fri May 07, 2010 4:52 am
by spikeachu
I really don't have time to go through older versions of the cart and reprogram it to work.
Anything I contribute is what I program in the course of the project that I am currently working on which I think other people might find useful. I have no intention of maintaining the contributions for future releases unless one of my projects requires it.
I expect however, that if you replace the tool/image line with
$this->load->helper('image');
You might have some success.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Wed May 12, 2010 12:56 pm
by thetanpreclear
This contrib works without any flaw. It should be a default feature. Fantastic job!
I wanted to horizontally align the add-to-cart buttons (some prod titles are longer than the others), so I put the buttons directly underneath the thumbnails.
This contrib I do recommend to all. It has NO bugs whatsoever.
Thanks!
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Wed May 12, 2010 6:09 pm
by amdev
How to apply this mod to show "Add to cart" buttion in hompage.
nice mod
thanks.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Thu May 13, 2010 1:03 am
by mondy
b"h
see my post
http://forum.opencart.com/viewtopic.php?f=23&t=14601" onclick="window.open(this.href);return false;
Mo
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Thu May 13, 2010 8:46 pm
by amdev
Thanks for ur help Mondy.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Sat May 22, 2010 2:56 pm
by American
Downloaded this twice. Using a couple of different zip utilities, can't get it to extract.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Sat May 22, 2010 4:31 pm
by spikeachu
American wrote:Downloaded this twice. Using a couple of different zip utilities, can't get it to extract.
Seems that several files on the forum have become corrupt. I've uploaded it again in this post, hopefully it will be ok.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Sat May 22, 2010 5:18 pm
by American
Thanks, that extracted ok....but, I uploaded and it blew up my product pages:
Notice: Undefined index: template in /home/ststore/domains/store.sporttwin.com/public_html/catalog/controller/product/product.php on line 322Warning: require(/home/ststore/domains/store.sporttwin.com/public_html/catalog/view/theme/default/template/product/) [function.require]: failed to open stream: Success in /home/ststore/domains/store.sporttwin.com/public_html/system/engine/controller.php on line 67
Fatal error: require() [function.require]: Failed opening required '/home/ststore/domains/store.sporttwin.com/public_html/catalog/view/theme/default/template/product/' (include_path='.:/usr/local/lib/php') in /home/ststore/domains/store.sporttwin.com/public_html/system/engine/controller.php on line 67
I'm using 1.4.7.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Sat May 22, 2010 6:27 pm
by spikeachu
Ok, my bad.
I had subsequently edited the mod to fit around a
cart that i'm developing.
Change line 322 of /catalog/controller/product/product.php
Code: Select all
$this->template = 'default/template/product/' . $this->data['template'];
to
Code: Select all
$this->template = 'default/template/product/product.tpl';
I think that should do the job.
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Fri Jun 25, 2010 3:15 am
by mttd
Hi,
sorry i'm new to openCart.
I don't suppose you know how easy it is to add an add to cart button to the homepage for the products listed do you please?
cheers,
tom
Re: [MOD] Add To Cart Button on Related Products 1.4.6
Posted: Fri Jun 25, 2010 3:18 am
by Qphoria
This already exists in 1.4.8