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

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="<?php echo wpsc_cart_item_image(); ?> to call thumbnail image.

what should i do for that?

Read More

enter image description here

Related posts

Leave a Reply

3 comments

  1. 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.

  2. I suggest you not to hack core files because of updates.
    Rather transfer WPEC files to your theme folder and then in wpsc-shopping_cart_page.php file add following above image call

    <?php
    $imgurl = wpsc_cart_item_image();
    $image = preg_replace('&(-[0-9]{1,4}x[0-9]{1,4})&is', '', $imgurl);
    ?>
    

    then call original image with <?php echo $image; ?>

    regards

  3. here is the solution i find myself with just 4 easy step

    1. go to wp ecommerce plugin folder
    2. find cart.class.php file
    3. find wpsc_cart_item_image function
    4. change $width and $height accordingly