/ Published in: PHP
Sale Price/Variation custom
this code just work if all variation price is a same as product price
this code just work if all variation price is a same as product price
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$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;