How to fix “people who bought this item also bought” no image error in wp e-commerce

Cross Sales is a feature under WP E-Commerce . You can find this under Store Settings > Marketing.

An user will see what other people bought with regard to the current product being displayed.

Upon activating it though, an error, “NO IMAGE” default thumbnail under that category which does not display the thumbnails properly.

To fix this, open up the file “display.functions.php” found in

/wp-content/plugins/wp-e-commerce/wpsc-includes/

1. Locate function : wpsc_also_bought( $product_id )
2. Replace line 89 with

if ( wpsc_the_product_thumbnail( null, null, $also_bought_data['ID'] ) ) {

3. Replace line 91 with

$image_path = wpsc_the_product_thumbnail( $image_display_width, $image_display_height, $also_bought_data['ID'] );

Products are now supposed to display their corresponding thumbnails properly. This works well with the latest WP E-Commerce Version 3.8.5. It’s now up to you to code up that CSS to have them display just the way you like em.

If you use a lower version such as 3.8.4, you do the same steps only with a minor difference.

1. Locate function : wpsc_also_bought( $product_id )
2. Replace line 88 with

if ( wpsc_the_product_thumbnail( null, null, $also_bought_data['ID'] ) ) {

3. Replace line 90 with

$image_path = wpsc_the_product_thumbnail( $image_display_width, $image_display_height, $also_bought_data['ID'] );

4. Replace line 92 with

$output .= '';

source: Getshopped.org forum


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: