correct gramm formula
This commit is contained in:
@@ -48,7 +48,7 @@ function checkout_kuri($priceslug, $delivery_id = 1){
|
||||
}
|
||||
else {
|
||||
$price = $price_id['offline_price']; // бумажный прайс
|
||||
$delivery = delivery_list(); // список доставок для бумажной версии
|
||||
$delivery = delivery_list($price_id['weight']); // список доставок для бумажной версии
|
||||
}
|
||||
|
||||
|
||||
@@ -308,17 +308,26 @@ function status_kuri($order_id){
|
||||
}
|
||||
|
||||
|
||||
function delivery_list() {
|
||||
function delivery_list($weight = 250) {
|
||||
|
||||
$result = [];
|
||||
|
||||
$delivery = db_get("SELECT * FROM delivery WHERE delivery_id > 1");
|
||||
|
||||
foreach ($delivery as $del){
|
||||
|
||||
|
||||
$key = $del['delivery_id'];
|
||||
$result[$key] = $del;
|
||||
|
||||
if ($del['delivery_id'] == 4){
|
||||
if ($weight > 250){
|
||||
$result[$key]['delivery_price'] = 450;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user