Home Forums Plugins Add to Wishlist Support [Resolved] Fatal Error on Wishlist Page Reply To: Fatal Error on Wishlist Page

#9121
jackharrybill
Participant

I have actually created a fix that works but it was a hack and I can’t offer support if it doesn’t work

in common.php replace the above code with

if( !function_exists( ‘wpsc_vl_product_price’ ) ) {

function wpsc_vl_product_price($product_id) {
$args = array (
‘post_type’ => ‘wpsc-product’,
‘p’ => $product_id
);
$products = new WP_Query($args);
while ( $products->have_posts() ) : $products->the_post();
$price = get_product_meta( get_the_ID(), ‘price’, true );
$special_price = get_product_meta( get_the_ID(), ‘special_price’, true );
if ( ($special_price > 0) && (($price – $special_price) > 0) ){$theprice = $special_price;}else{$theprice = $price;}
endwhile;
// Reset Post Data
wp_reset_postdata();
return $theprice;
}
}

and in wpsc-account_wishlist.php within the templates/store folder replace line 35 to 39 inclusive (I think) with

product_id )); ?>