{"id":214,"date":"2012-03-23T11:17:40","date_gmt":"2012-03-23T11:17:40","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=214"},"modified":"2014-05-25T12:33:36","modified_gmt":"2014-05-25T12:33:36","slug":"how-to-fix-also-bought-noimage-error-wp-ecommerce","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/how-to-fix-also-bought-noimage-error-wp-ecommerce\/","title":{"rendered":"How to fix &#8220;people who bought this item also bought&#8221; no image error in wp e-commerce"},"content":{"rendered":"<p>Cross Sales is a feature under WP E-Commerce . You can find this under Store Settings &gt; Marketing.<\/p>\n<p>An user will see what other people bought with regard to the current product being displayed.<\/p>\n<p>Upon activating it though, an error, \u201cNO IMAGE\u201d default thumbnail under that category\u00a0which does not display the thumbnails properly.<\/p>\n<p>To fix this, open up the file \u201cdisplay.functions.php\u201d found in<\/p>\n<p>\/wp-content\/plugins\/wp-e-commerce\/wpsc-includes\/<\/p>\n<p>1. Locate function : wpsc_also_bought( $product_id )<br \/>\n2. Replace line 89 with<\/p>\n<blockquote><p><code>if ( wpsc_the_product_thumbnail( null, null, $also_bought_data['ID'] ) ) {<\/code><\/p><\/blockquote>\n<p>3. Replace line 91 with<\/p>\n<blockquote><p><code>$image_path = wpsc_the_product_thumbnail( $image_display_width, $image_display_height, $also_bought_data['ID'] );<\/code><\/p><\/blockquote>\n<p>Products are now supposed to display their corresponding thumbnails properly. This works well with the latest WP E-Commerce Version 3.8.5. It\u2019s now up to you to code up that CSS to have them display just the way you like em.<\/p>\n<p>If you use a lower version such as 3.8.4, you do the same steps only with a minor difference.<\/p>\n<p>1. Locate function : wpsc_also_bought( $product_id )<br \/>\n2. Replace line 88 with<\/p>\n<blockquote><p><code>if ( wpsc_the_product_thumbnail( null, null, $also_bought_data['ID'] ) ) {<\/code><\/p><\/blockquote>\n<p>3. Replace line 90 with<\/p>\n<blockquote><p><code>$image_path = wpsc_the_product_thumbnail( $image_display_width, $image_display_height, $also_bought_data['ID'] );<\/code><\/p><\/blockquote>\n<p>4. Replace line 92 with<\/p>\n<blockquote><p><code>$output .= '';<\/code><\/p><\/blockquote>\n<p>source: Getshopped.org forum<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cross Sales is a feature under WP E-Commerce . You can find this under Store Settings &gt; Marketing. An user will see what other people bought with regard to the current product being displayed. Upon activating it though, an error, \u201cNO IMAGE\u201d default thumbnail under that category\u00a0which does not display the thumbnails properly. To fix [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[54,5],"tags":[55,92,6,7,91],"class_list":["post-214","post","type-post","status-publish","format-standard","hentry","category-code-snippet","category-wordpress","tag-code-snippet-2","tag-getshopped","tag-wordpress-2","tag-wp","tag-wp-e-commerce"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-3s","jetpack-related-posts":[{"id":257,"url":"https:\/\/pixert.com\/blog\/conditional-tags-for-wp-e-commerce\/","url_meta":{"origin":214,"position":0},"title":"Conditional Tags for WP E-Commerce","author":"Pixel Insert \/ Pixert","date":"August 29, 2012","format":false,"excerpt":"The following conditional works when you install WP E-Commerce and you want to add PHP code in page.php .I want to breadcrumbs in pages but doesn't want it to display on WP E-Commerce Product page, because the product already showing its own breadcrumbs The following conditional tag apple to non-Product\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":101,"url":"https:\/\/pixert.com\/blog\/wordpress-click-an-attachment-image-to-view-next-image-in-order\/","url_meta":{"origin":214,"position":1},"title":"WordPress: Click an attachment image to view next image in order","author":"Pixel Insert \/ Pixert","date":"May 8, 2011","format":false,"excerpt":"Add the following to the top of attachment.php Find your attachment image code in attachment.php","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":218,"url":"https:\/\/pixert.com\/blog\/how-to-fix-custom-field-for-thumbnails-wpzoom-featured-category-widget\/","url_meta":{"origin":214,"position":2},"title":"How to fix Custom Field for thumbnails in WPZoom Featured Category widget","author":"Pixel Insert \/ Pixert","date":"April 6, 2012","format":false,"excerpt":"WPZoom Featured Widget is a widget built inside WPZOOM themes to show Featured Category posts The widget display thumbnail images, post titles and post meta datas from selected Featured Category There's a bug in wpzoom-widgets.php where as all widgets code are. The widget cannot display thumbnail images from custom field\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/04\/featuredcat-208x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":289,"url":"https:\/\/pixert.com\/blog\/full-screen-background-on-wp-login-page\/","url_meta":{"origin":214,"position":3},"title":"Full Screen Background on WP Login Page","author":"Pixel Insert \/ Pixert","date":"March 5, 2013","format":false,"excerpt":"The following function add full screen background on WP Login page 1. Open functions.php in your theme directory 2. Add this function to functions.php 3. Save","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"WordPress - the logo","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":96,"url":"https:\/\/pixert.com\/blog\/center-images-with-css\/","url_meta":{"origin":214,"position":4},"title":"Center Images with CSS","author":"Pixel Insert \/ Pixert","date":"May 5, 2011","format":false,"excerpt":"xHTML code CSS code","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/do-you-have-facebook-300x223.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":134,"url":"https:\/\/pixert.com\/blog\/install-favicon-into-a-wordpress-website\/","url_meta":{"origin":214,"position":5},"title":"Install Favicon into a WordPress website","author":"Pixel Insert \/ Pixert","date":"August 22, 2011","format":false,"excerpt":"1. Upload favicon.ico to the theme directory, e.g wp-content\/themes\/twentyeleven 2. Open file header.php, add the following code between <head> and <\/head>","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/214\/revisions"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}