Hello outthere,
i would like to change the link destination of “Continue shopping” to the main shop-page in the popup when add a product to the cart?
Is that possible?
Thanks!
Sven
This topic has 8 replies, 2 voices, and was last updated 10 years, 4 months ago ago by Jack Richardson
Hello outthere,
i would like to change the link destination of “Continue shopping” to the main shop-page in the popup when add a product to the cart?
Is that possible?
Thanks!
Sven
Hello,
You can change that link in wp-content/themes/royal/etheme.js (line 1392), find the code:
href: 'javascript:void(0);', and replace javascript:void(0); with your shop link, for example it will look like this href: 'http://site.com/shop',.
Best regards,
Jack Richardson.
Thanks, thats what i’ve done. Found it in /royal/js/etheme.js. Works!
What about Theme-Updates? Is it possible to put the JS in the child-theme folder somehow?
My first try to put it in royal-child/js/ doesn’t work.
Best, Sven
Hello,
Please refer to these articles:
http://benfrain.com/how-to-easily-add-jquery-scripts-to-a-wordpress-child-theme/
http://wordpress.stackexchange.com/questions/26822/how-to-override-javascript-files-in-child-theme
http://themes.simplethemes.com/skeleton/tutorials/how-to-add-custom-css-and-javascript-using-a-child-theme/
https://wordpress.org/support/topic/how-to-add-js-files-to-child-theme
Best regards,
Jack Richardson.
Hello Jack,
i’ve tried some variations to include the JS in the royal-child.
If i include the complete etheme.js with the customized link there is an error on the popup. It loads double. I can close one and the second is not closeable. Anyway it looks broken.
Another try was to create a second JS which has only the function of the popup. Via Firebug i can see that its loaded, but it seems that its overridden by the etheme.js. The link is not changed.
Any ideas?
Thanks a lot! Sven
Hello,
You need add the code in your child theme functions.php file:
add_action( 'wp_enqueue_scripts', 'etheme' );
function etheme() {
wp_enqueue_script( 'etheme', get_stylesheet_directory_uri() . '/js/etheme.js' );
}
Create “js” folder in child theme and copy etheme.js file with needed changes in the child theme “js” directory so you won’t lose modifications after theme update.
Best regards,
Jack Richardson.
Perfect!
Many thanks!
Hello,
You’re welcome.
Best regards,
Jack Richardson.
The issue related to '‘Change link in popup’' has been successfully resolved, and the topic is now closed for further responses