Hola,
the price wpec plugin conflict when there are have variations products. So the price will 0.00. Sorry.. I can’t fix this.
With the greatest respect, the plugin is kinda useless without that…
Thanks for letting me know …
try this pathch:
in this file
/wp-content/plugins/wpec-related-products/wpec-related-product.php
replace:
function on_wpec_related(){
global $post;
with:
function mopu_on_wpec_related(){
global $post, $wpsc_query_vars, $wpsc_variations, $wpsc_custom_meta;
replace:
while($related_product->have_posts()) : $related_product->the_post();
?>
<li>
<div class="prodbox <?php echo $wp_query->current_post ; ?> product-<?php echo wpsc_the_product_id();?>">
<div class="prodimg"><a href="<?php echo wpsc_the_product_permalink(); ?>"><img src="<?php echo wpsc_the_product_thumbnail(); ?>" alt="" title="" /></a></div>
<div class="prodname"><a href="<?php echo wpsc_the_product_permalink(); ?>"><?php echo wpsc_the_product_title(); ?></a>
<?php if (wpsc_have_variation_groups()===false) { ?><div class="prodprice"><?php echo wpsc_the_product_price(); ?></div><? }?>
</div>
</div>
</li>
<?php
endwhile;
with:
while($related_product->have_posts()) : $related_product->the_post();
$wpsc_custom_meta = new wpsc_custom_meta( get_the_ID() );
$wpsc_variations = new wpsc_variations( get_the_ID() );
?>
<li>
<div class="prodbox <?php echo $wp_query->current_post ; ?> product-<?php echo wpsc_the_product_id();?>">
<div class="prodimg">
<a href="<?php echo wpsc_the_product_permalink(); ?>"><img src="<?php echo wpsc_the_product_thumbnail(); ?>" alt="" title="" /></a>
</div>
<div class="prodname">
<a href="<?php echo wpsc_the_product_permalink(); ?>"><?php echo wpsc_the_product_title();
?></a>
<div class="prodprice">
<?php if(wpsc_product_on_special()) {
?>
<span class="salestrike"> <?php }
echo wpsc_product_normal_price();
?></span>
</div>
<?php if(wpsc_product_on_special()) :
?><div class="prodpricesale"><span class="salered"> <?php echo wpsc_the_product_price(); ?></span></div><?php endif;
?>
</div>
</div>
</li>
<?php
endwhile;
Onnay: I take back what I said; I’m using this plugin to display product pics and titles only and its actually the preferable look for what I’m working on now, so the plugin is useful either way.
Salexch: Well done for your hard work, I am not going to test this myself for the reason above – BUT this very same problem also exists in the WPEC sidebar widget for Special Offers – the developers have just released a dev version with a fix for that: http://getshopped.org/getshopped-news/wp-e-commerce-3-8-8-2-dev/ I wondered if perhaps the two problems were linked.
Many thanks to Salexh for help me also the code. I will add that script on next update.
Sorry for late fixing the bugs.
I have update this plugin, enjoy the show \m/
Hi Onnay, I’ve just updated… I restyled the output because H5 is now H3, and I had to comment out your CSS which appears in the head section so my CSS in style.css would take over, not sure if thats how I am supposed to work regarding plugins? (I have edited the wpec-related-product.php)
But my reason for commenting is that I thought I’d try displaying the price again, and it looks nice; but I have some products showing £0.00 still? The site I’m working on is linen cupboard dot com, I will leave this online so you can see.
Thanks,
Chris
Maybe I spoke too soon, I’ve just upgraded the WP-E-Commerce plugin and done the database update; now I cannot find any £.0.00 prices on the site. I’ll keep an eye on it, but all looks ok now : )
Cheers.
Hola sonic1243,
Yeah, I’m happy for hear that. Your site is awesome mate, clean and beautiful site 😉
Cheers!
Thank you! About half way through tidying up the CSS.
Problem is that the checkout page is broken, it works before adding a product, but then after adding a product the page content fails to load, so I have a broken shop… and not much we can do until NewZealand wakes up. Great fun.
Thanks Onnay.
Good luck with your shop mate 😉