Home › Forums › WoodMart support forum › Checkout page product images
Checkout page product images
- This topic has 5 replies, 2 voices, and was last updated 4 years, 4 months ago by Elise Noromit.
-
AuthorPosts
-
July 24, 2020 at 6:04 pm #214009
benrekiaParticipantI have the following code to display product images in woocommerce checkout page under REVIEW ORDER (theme function.php). However, every time the theme updates this code will obviously disappear. Is there a way to include this code in the function.php for future updates or is there a place where I can have his code remains despite any updates?
It would be great to have the checkout layout same as the cart page layout.
//////ADD IMAGE TO CHECKOUT
add_filter( ‘woocommerce_cart_item_name’, ‘ts_product_image_on_checkout’, 10, 3 );
function ts_product_image_on_checkout( $name, $cart_item, $cart_item_key ) {
/* Return if not checkout page */
if ( ! is_checkout() ) {
return $name;
}/* Get product object */
$_product = apply_filters( ‘woocommerce_cart_item_product’, $cart_item[‘data’], $cart_item, $cart_item_key );/* Get product thumbnail */
$thumbnail = $_product->get_image();/* Add wrapper to image and add some css */
$image = ‘<div class=”ts-product-image” style=”width: 80px; height: 80px; display: block; padding-right: 10px;”>’
. $thumbnail .
‘</div>’;/* Prepend image to name and return it */
return $image . $name;
}July 25, 2020 at 9:47 am #214085
Elise NoromitMemberHello,
Thank you very much for choosing our theme and for contacting us.
Please install and activate the child theme and add your custom code into functions.php of the child theme and the customization would never disappear again.
Best Regards
July 25, 2020 at 7:10 pm #214207
benrekiaParticipantThank you. All done and it’s working fine but now I am getting this link https://childthemewp.com in the bottom of my website footer which I don’t know how to remove. Please let me know how to remove this link. Thanks.
July 26, 2020 at 9:59 am #214268
Elise NoromitMemberHello,
Please check the content added in the Theme Settings > Footer > Copyright text. If there is nothing and you still see this, deactivate all the plugins not related to the theme and check the issue.
Best Regards
July 26, 2020 at 10:24 am #214274
benrekiaParticipantI’ve already tried that before and it’s still showing. Uninstalling it. Can’t waste more time. Please look into this isuue and let me know when a fix is available
July 26, 2020 at 2:01 pm #214312
Elise NoromitMemberHello,
Please deactivate all the plugins not related to the theme and switch the parent theme, check the issue, if the problem remains, leave the plugins not activated and provide the site admin access to the private area
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register