Return to Snippet

Revision: 35215
at November 4, 2010 06:15 by haftim


Initial Code
$price = $priceandstock_values['price'] - $sale_discount;


change to this

if(($product['special_price'] == $priceandstock_values['price'] > 0) and (($priceandstock_values['price'] - $product['special_price']) >= 0)) {
	$sale_discount = (float)$product['special_price'];
} else {
	$sale_discount = 0;
}
$price = $priceandstock_values['price'] - $sale_discount;

Initial URL

                                

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

Initial Title
WP-Ecommerce - cart.class.php

Initial Tags
wordpress

Initial Language
PHP