ResolvedBack button

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19488

    HI guys,

    Thanks for the great theme, absolutely love it. Once selected a specific product my clients complain its complicated to go back to the products after adding to cart or not. Is there a way I can add a “back” button on product eg: this page: http://crispmeals.ommsocial.co.za/product/bbq-bun-less-burger/

    Thanks your help will be much appreciated.

    #19510
    Althemist
    Keymaster

    Hi richard@wildcolour.net,

    Sorry for the late reply. We had a national holiday (long weekend) in our country.

    I am afraid the only way to achieve this would be with JS trigerring the browser back button behavior. Something like this should do the job:

    $(document).ready(function(){
    	$('a.back').click(function(){
    		parent.history.back();
    		return false;
    	});
    });

    Of course, you’d need to place a button with class “.back” somewhere in the page.

    Regards,
    Dimitar

    #19533

    Thank you for the reply, and apologies for disturbing your public holiday 🙂

    This solution you have provided will work perfectly, thank you.

    I am not too sharp with javascript and editing theme files, could you direct me on where to place the code? Would I need to place the back button on each of the product pages, or will it automatically update all of them? Would I need to place it in the theme files manually?

    Your help will be greatly appreciated.

    Regards
    Richard

    #19550

    Hi guys, any feedback here?

    #19563
    Althemist
    Keymaster

    Hi richard@wildcolour.net,

    the best place to add the JS code would be in a JS file in the child theme. As for the button, there are multiple ways to add it to the page – either with JS or by editing the product single template.

    I’ll ask our lead developer Alex to give you some detailed instructions in which file it you can add the button code.

    Also, please note that this is more into the customization requests filed and basically not covered by support.

    Regards,
    Dimitar

    #19576
    Alex
    Keymaster

    Hi richard@wildcolour.net,

    The best place to put this snippet is inside the Lafka child theme: lafka-child\js\lafka-front.js

    There is also other way to do it. From within WP Bakery page builder you can add Button element and if you tick “Advanced on click action”, you can add JS code directly in the form.
    So in the field “On click code”, you can add:
    parent.history.back(); return false;

    And the button will bring you back.

    Regards,
    Alex

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register