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