This topic has 9 replies, 2 voices, and was last updated 7 years, 7 months ago ago by Olga Barlow
Hi,
There are a few cart notices from YITH Themes that print at the top of the cart and checkout page.
Can you help me move them to another location. preferably to woocommerce_cart_collaterals and woocommerce_checkout_after_customer_details
I’d like to leave the “Returning Customer” message at the top.
The YITH developer gave me a bit of code to try, but it didn’t work:
function move_woocommerce_message(){
remove_action( 'woocommerce_before_cart', 'wc_print_notices', 10 );
add_action( 'woocommerce_cart_collaterals', 'wc_print_notices', 35 ); }
add_filter('wp', 'move_woocommerce_message');
He says they are defined in the cart.php file:
https://snag.gy/a0Io2T.jpg
Any help would be appreciated! Thanks!
Hello,
You sent screenshot from the checkout page but you are talking about cart page. Let’s clear the situation: code does not work for the cart page or for the checkout page?
Because cart page code won’t work for the checkout page.
Regards
The issue is for cart and checkout.
Here is screenshot of cart too:
https://snag.gy/Brvljh.jpg
Hello? Any help on this?
Hello,
We are not sure if the code you get from the previous developer works even for the default theme.
To move notices on the cart page add the following code in child theme functions.php
function move_woocommerce_message(){
add_action( 'woocommerce_cart_coupon', 'wc_print_notices', 35 ); }
add_filter('wp', 'move_woocommerce_message');
Then copy file xstore/woocommerce/cart/cart.php into child theme and comment out the line from screenshot http://prntscr.com/epxve0
If you need any other additional customization, please, contact customization team because theme support does not includes additional customization service.
Regards
Thanks! When I copy into the child theme, should it be in:
xstore/xstore-child/woocommerce/cart
or just:
xstore/xstore-child/woocommerce/
Also, I just edited the file xstore/woocommerce/cart/cart.php and it did nothing
Hello,
Files should be paced in wp-content/themes/xstore-child/woocommerce/cart/cart.php + code into child theme functions.php (wp-content/themes/xstore-child/functions.php).
Regards
You must be logged in to reply to this topic.Log in/Sign up