fix devops error
This commit is contained in:
@@ -9,7 +9,7 @@ class Baskets
|
||||
public static function addBasket($offerId, $quantity = 1, $update = false)
|
||||
{
|
||||
if (ShopCart::has($offerId) && ! $quantity) {
|
||||
$ret = ShopCart::remove($offerId);
|
||||
ShopCart::remove($offerId);
|
||||
}
|
||||
$data = $quantity ? self::getBasketData($offerId, $quantity) : false;
|
||||
|
||||
@@ -28,6 +28,7 @@ class Baskets
|
||||
$total = 0;
|
||||
$totalTaxed = 0;
|
||||
$totalWeight = 0;
|
||||
$detail = [];
|
||||
$basket = ShopCart::getContent();
|
||||
$offers = Offers::getWithVariationByIds(self::getIds());
|
||||
|
||||
@@ -42,7 +43,7 @@ class Baskets
|
||||
}
|
||||
$shipping = DeliveryTypeCalculations::getPriceByDeliveryType($deliveryTypeId, $totalWeight);
|
||||
|
||||
$data = [
|
||||
return [
|
||||
'detail' => $detail,
|
||||
'total' => $total,
|
||||
'taxes' => $totalTaxed - $total,
|
||||
@@ -54,8 +55,6 @@ class Baskets
|
||||
'weight' => $totalWeight,
|
||||
'sale_channel' => SaleChannels::getArray($saleChannelId),
|
||||
];
|
||||
|
||||
return $data ?? false;
|
||||
}
|
||||
|
||||
public static function getRowDetail($item, $offer, $prices, $weight)
|
||||
@@ -132,7 +131,6 @@ class Baskets
|
||||
public static function getArticleName(&$offer)
|
||||
{
|
||||
return $offer->article->name;
|
||||
// return $offer->article->name . ' (' . $offer->variation->name . ')';
|
||||
}
|
||||
|
||||
public static function getIds()
|
||||
|
||||
Reference in New Issue
Block a user