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

5 replies2 participantsUpdated by Olga Barlow

  • Avatar: paulgor
    paulgor
    Participant

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

    Best,
    Paul

    5 Answers

    Avatar: Olga Barlow
    Olga Barlow
    Participant

    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

    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
    Participant

    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

    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
    Participant

    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

Want to reply? Log in, or register with your ThemeForest purchase code, to reply to this topic.

Login / Register