add postprice in checkout.phtml
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
|
||||
<?if ($price_id['weight'] > 499){
|
||||
$postprice = 450;
|
||||
}
|
||||
else {
|
||||
$postprice = 300;
|
||||
}?>
|
||||
|
||||
<script>
|
||||
|
||||
var product_price = <?=$price_id['offline_price']?>;
|
||||
|
||||
var postprice = <?=$postprice?>;
|
||||
|
||||
function itog(){
|
||||
|
||||
var itog = product_price;
|
||||
@@ -18,7 +25,7 @@
|
||||
itog = itog + 300;
|
||||
}
|
||||
else if (document.getElementById('devilery_id3').checked){
|
||||
itog = product_price + 300;
|
||||
itog = product_price + postprice;
|
||||
itog = itog * count;
|
||||
}
|
||||
|
||||
@@ -99,7 +106,9 @@
|
||||
$checked = ($ditem['delivery_id'] == $delivery_id) ? ' checked': '';?>
|
||||
<p><input name="delivery_id" type="radio" id="devilery_id<?=$dd?>" onclick="devilery_check();" value="<?=$ditem['delivery_id']?>"<?=$checked?>>
|
||||
<?=$ditem['delivery']?>
|
||||
<?if ($ditem['delivery_price'] > 0):?>
|
||||
<?if ($ditem['delivery_id'] == 4):?>
|
||||
+ <?= $postprice?> руб.
|
||||
<?elseif ($ditem['delivery_price'] > 0):?>
|
||||
+ <?=$ditem['delivery_price']?> руб.
|
||||
<?endif?>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user