Post by Asterixin » Wed Feb 10, 2010 4:51 pm

Hello all, When i click Add to cart i want to go to other page.... someone can tell me where is link :)

Newbie

Posts

Joined
Wed Feb 10, 2010 4:50 pm

Post by fido-x » Wed Feb 10, 2010 5:01 pm

If you have the "AJAX add to cart" turned on, you will remain on the current page. If you have the "AJAX add to cart" turned off, you will be re-directed to the shopping cart page.

What "other" page do you want to go to?
Last edited by fido-x on Wed Feb 10, 2010 5:03 pm, edited 1 time in total.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Asterixin » Wed Feb 10, 2010 5:02 pm

To Index with contacts.... but not Shop contacts, my other page

Newbie

Posts

Joined
Wed Feb 10, 2010 4:50 pm

Post by fido-x » Wed Feb 10, 2010 5:04 pm

Could you be more specific? Do you mean the home page?

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Asterixin » Wed Feb 10, 2010 5:07 pm

mysite/shop/Contacts.html

Newbie

Posts

Joined
Wed Feb 10, 2010 4:50 pm

Post by fido-x » Wed Feb 10, 2010 5:34 pm

In "catalog/controller/product/product.php", around line 161, you'll find the following line of code:-

Code: Select all

$this->data['redirect'] = $this->url->http('product/product' . $url . '&product_id=' . $this->request->get['product_id']);
Change to:

Code: Select all

$this->data['redirect'] = $this->url->http('information/contact');
That should then redirect to your contact page after clicking the "add to cart" button.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Asterixin » Thu Feb 11, 2010 1:43 pm

Someone can help ne, i change the link but when i click "Add to cart" is not move me to contact..... i go to my cart.... ??? ??? ??? ???

Newbie

Posts

Joined
Wed Feb 10, 2010 4:50 pm

Post by fido-x » Thu Feb 11, 2010 3:46 pm

OK then, let's move on to "Stage 2".

In "catalog/controller/cart.php" around line 37, you'll find the following code:-

Code: Select all

$this->session->data['redirect'] = $this->request->post['redirect'];
Below this line, insert the following:-

Code: Select all

$this->redirect(html_entity_decode($this->request->post['redirect']));
Then, further on in the same file at what is now line 168, you'll find the following:-

Code: Select all

$this->data['continue'] = $this->url->http('common/home');
Replace with:

Code: Select all

if ($_SERVER['HTTP_REFERER'] == $this->url->http('checkout/cart')) {
	$this->data['continue'] = $this->url->http('common/home');
} else {
	$this->data['continue'] = html_entity_decode($_SERVER['HTTP_REFERER']);
}

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Asterixin » Thu Feb 11, 2010 4:39 pm

i do it' and nothing.. please can you find me in skype... i will show you

Newbie

Posts

Joined
Wed Feb 10, 2010 4:50 pm
Who is online

Users browsing this forum: Bing [Bot] and 14 guests