How to show large image in checkout page using WP Ecommerce plugin [closed]

I want to show large image in checkout page right now it showing 31×31 size image in wpsc-shopping_cart_page and using <img src="https://wordpress.stackexchange.com/questions/50618/<?php echo wpsc_cart_item_image(); ?> to call thumbnail image.

what should i do for that?

enter image description here

3 Answers
3

I agree with Goran on editing the core files. It should not be done. But, if a user has dimensions in the name of the image, they will also be replaced and the image won’t display with this regular expression. Instead, you can create a new function in your theme’s functions.php file. Something like this:

function wpsc_cart_item_image2( $width = 95, $height = 95 ) {
    global $wpsc_cart;
    $cart_image = wpsc_the_product_thumbnail( $width, $height, $wpsc_cart->cart_item->product_id, "shopping_cart");
    if( is_ssl() )
        $cart_image = str_replace( 'http://', 'https://', $cart_image );
    return $cart_image;
}

Then, make sure you copy wpsc-shopping_cart_page.php to your theme directory and replace

wpsc_cart_item_image();

with

wpsc_cart_item_image2();

Or, use a regular expression that gets the last instance of an image size.

Leave a Comment