Post by CraftyPanda » Thu Jul 04, 2013 12:29 am

Hi,

I have put please read because I have already bought 2 extension for this task, and neither worked.
I simply need a solution that redirects the web user to the cart page when they add something to the basket.

the closest ive got is one extension worked but only if i was on the product page itself. Would not work from the home page or category page.

Any help would be really appreciated.

Andy

New member

Posts

Joined
Tue May 07, 2013 10:02 pm

Post by CraftyPanda » Thu Jul 04, 2013 3:24 pm

Anyone????

New member

Posts

Joined
Tue May 07, 2013 10:02 pm

Post by pprmkr » Thu Jul 04, 2013 7:16 pm

First edit catalog/view/theme/YOUR_THEME/template/product/product.tpl

Find:

Code: Select all

			if (json['error']) {
				if (json['error']['option']) {
					for (i in json['error']['option']) {
						$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
					}
				}
			} 
Add after:

Code: Select all

			if (json['redirect']) {
				location = json['redirect'];
			}
Then edit controller/checkout/cart.php

Find:

Code: Select all

$json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
Add after:

Code: Select all

$json['redirect'] = $this->url->link('checkout/cart');

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by CraftyPanda » Fri Jul 05, 2013 10:32 pm

Wow! Thank you very much!

Regards
Andy

New member

Posts

Joined
Tue May 07, 2013 10:02 pm
Who is online

Users browsing this forum: No registered users and 3 guests