WP-Ecommerce - cart.class.php


/ Published in: PHP
Save to your folder(s)

Sale Price/Variation custom
this code just work if all variation price is a same as product price


Copy this code and paste it in your HTML
  1. $price = $priceandstock_values['price'] - $sale_discount;
  2.  
  3.  
  4. change to this
  5.  
  6. if(($product['special_price'] == $priceandstock_values['price'] > 0) and (($priceandstock_values['price'] - $product['special_price']) >= 0)) {
  7. $sale_discount = (float)$product['special_price'];
  8. } else {
  9. $sale_discount = 0;
  10. }
  11. $price = $priceandstock_values['price'] - $sale_discount;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.