back to ... on product detail

News Show Pro GK5 - flexible, responsive and easily extendable free Joomla module support forum.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Wed May 04, 2016 8:20 am
Hi,
I set nsp module on specific page for vm products.
Works fine, click on product show detail...nice
Click on 'Back to catagory...' shows virtuemart component with vm layout :(
How can I change this url to return to the right page?

Thanks and reagrds,

Pas
User avatar
Gold Boarder

teitbite
Wed May 04, 2016 9:51 am
Hi

I'm afraid this is how it works. Back means to go one level higher than the product. Please tell me the url to the page with an example of such button and I'll try to hack it to use a browser history instead.
User avatar
Moderator

GK User
Wed May 04, 2016 12:23 pm
Hi,

Check here:
http://pasvorm.com/vino/wijnassortiment
http://pasvorm.com/vino/wijnproef-pakketten
This should also be the urls to 'go back' to after product detail...

Regards,
Pas
User avatar
Gold Boarder

teitbite
Thu May 05, 2016 11:46 am
Hi

I have a feeling that this link was configurable in VM settings, but please try add this script to /layout/blocks/head.php

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
$('.back-to-category a').attr('href','javascript:history.back()');
});})(jQuery)</script>
User avatar
Moderator

GK User
Mon May 09, 2016 7:41 am
Script works, but not if you choose to view next product and then choose to go back to catagory.
Or if you add to bart and choose 'continue shopping' in popup.

Is there a solution to get this right?

Thanks and regards,

Pascal
User avatar
Gold Boarder

teitbite
Tue May 10, 2016 11:55 am
Hi

You can replace "javascript:history.back()" with a direct url to where should it redirect. Also an updated code to include popup button:

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
$('.back-to-category a, a.continue_link').attr('href','javascript:history.back()');
});})(jQuery)</script>
User avatar
Moderator

GK User
Tue May 10, 2016 12:38 pm
Thanks for your reply! Will this work on this module only or can I set this for others too?
What do you mean with 'Also an updated code to include popup button'?

Thanks,
Pascal
User avatar
Gold Boarder

teitbite
Wed May 11, 2016 6:14 pm
Hi

I meant that the code from my last post is a little different and should change the url in the popup button too.

Apply it to page and see which buttons doesn't work still. Than let me know and I'll just add their selectors to code.
User avatar
Moderator

GK User
Thu May 12, 2016 7:57 am
Ok, work fine on http://pasvorm.com/vino/wijnassortiment
But could this be done also on http://pasvorm.com/vino/wijnproef-pakketten?

Thanks,

Pascal
User avatar
Gold Boarder

teitbite
Fri May 13, 2016 11:58 am
Hi

That's why history was a better idea. With the direct url You can set only one link to get back to. Unfortunately that's the best I can think of. Maybe it's time to ask VM support about this button. They should know where it can be set in code or configuration.
User avatar
Moderator

GK User
Fri May 13, 2016 1:45 pm
Thanks, that's what I was afraid of ;) I'll use history for now and will ask vm about this.
Another option could be to add a button to the category description page for each module.
Thanks,

Pascal
User avatar
Gold Boarder


cron