How to add thumbnail of the purchase product at the checkout / order / summary

This topic has 6 replies, 2 voices, and was last updated 7 years, 8 months ago ago by Olga Barlow

  • Avatar: paulgor
    paulgor
    Participant
    March 30, 2017 at 12:51

    Hi, EightTheme.
    How to Show Product Image on Checkout / Order / Summary Page?
    Thanks

    Best,
    Paul

    5 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 30, 2017 at 13:05

    Hello,

    Unfortunately, WooCommerce does not have such options by default. You can try to implement this only by overwriting and editing appropriate WC files, use child theme. What files you need to edit you may ask on WC support forum.

    Regards

    Avatar: paulgor
    paulgor
    Participant
    March 30, 2017 at 13:44

    Hi, Olga Barlow.
    Please tell me what files I need to edit, or where can be found this in the theme manual?
    Thanks

    Best,
    Paul

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 30, 2017 at 14:05

    Hello,

    It’s related to WC plugin files. Check this post https://stanhub.com/woocommerce-how-to-show-product-image-on-checkout-page/ Maybe it helps you.

    Regards

    Avatar: paulgor
    paulgor
    Participant
    March 30, 2017 at 17:04

    Hi,
    Thanks, but this code don’t work for this pages http://mysite.com/my-account/view-order/4570/
    We need to show product images at this page.

    For mail we use this code at function.php:

    // Email Templates Image + SKU
    function sww_add_wc_order_email_images( $table, $order ) {
      
    	ob_start();
    	
    	$template = $plain_text ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php';
    	wc_get_template( $template, array(
    		'order'                 => $order,
    		'items'                 => $order->get_items(),
    		'show_download_links'   => $show_download_links,
    		'show_sku'              => true,
    		'show_purchase_note'    => $show_purchase_note,
    		'show_image'            => true,
    		'image_size'            => $image_size
    	) );
       
    	return ob_get_clean();
    }
    add_filter( 'woocommerce_email_order_items_table', 'sww_add_wc_order_email_images', 10, 2 );
    
    // SKU new line
    function sww_edit_order_item_name( $name ) {
        return $name . '<br />';
    }
    add_filter( 'woocommerce_order_item_name', 'sww_edit_order_item_name' );

    Thanks

    Best,
    Paul

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 31, 2017 at 10:31

    Hello,

    I would recommend you to contact WC plugin developers on WC support forum. Theme support does not include services to modify or extend the item beyond the original features, style and functionality described on the item page.

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.