Post by helenkanta » Mon May 09, 2011 2:10 pm

Hi There,

So, I have searched for a solution, and just when i thought i found it, it was for an older version of opencart. I hope someone can help me, I am using 1.4.9.3.

There is a button in the cart "Continue Shopping". If you click this, it currently directs you to the home page, which i don't believe gives customers the most convenient shopping experience. I wanted to redirect customers to the category of the last viewed product, unless of course, they have gone into their account and viewed their cart. In this case, it will take them back to the home page.

Please note, i am not a super duper programmer, so please provide simple instructions. Really appreciate any help and I must say, this community is EXCELLENT! have done so much with these forums. Thanks

New member

Posts

Joined
Thu Apr 28, 2011 4:06 pm

Post by SXGuy » Mon May 09, 2011 2:47 pm

I dont think its as easy as redirecting someone to the last viewed product, but i can tell you where the info is, and you can change it accordingly to your liking.

for category pages

catalog/controller/product/category.php

find

Code: Select all

$this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';
replace route=common/home to something else you wish, like perhaps a category page

same principle for the product file, and any other that has a continue button.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by mystifier » Mon May 09, 2011 4:56 pm

I use:

Code: Select all

<a href="javascript:history.go(-1)"  onMouseOver="self.status=document.referrer;return true" class="button"><span>Continue</span></a>
which presents a button which has the same effect as clicking Back in the browser.

It works fine but I think there may be a more elegant way using route=

Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products


User avatar
Active Member

Posts

Joined
Tue May 18, 2010 5:15 pm

Post by helenkanta » Tue May 10, 2011 9:42 am

Hi All,

Thanks for your feedback...

What i needed was more of what was suggested by fido-x in the post from the link below:

http://forum.opencart.com/viewtopic.php ... 7&start=40

Of course the only problem is, I don't know how to change the code to do this exact same thing in 1.4.9.3 file (the post by fido-x was made in 2008, so a fairly old version with very different code).

New member

Posts

Joined
Thu Apr 28, 2011 4:06 pm

Post by BulletJules » Thu Jun 09, 2011 1:46 am

SXGuy wrote:I dont think its as easy as redirecting someone to the last viewed product, but i can tell you where the info is, and you can change it accordingly to your liking.

for category pages

catalog/controller/product/category.php

find

Code: Select all

$this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';
replace route=common/home to something else you wish, like perhaps a category page

same principle for the product file, and any other that has a continue button.
I think I understand this code to work from the 'continue shopping', what about all the other information pages which have a continue button?
If you use this code for the "continue" button, what will happen if you have an information page which is long and it has say a second page of reading? If the reader clicks on the 'continue' button what happens? Will the reader then be taken to the 'home' page or will the reader see page two of what they were reading?
Will this code have to be done on each and every information page 'continue' button or will it work globally? Do you see what I'm asking?

Newbie

Posts

Joined
Sun Apr 17, 2011 4:12 am
Who is online

Users browsing this forum: Baidu [Spider] and 33 guests