20-02-2026

This commit is contained in:
Kevin Adametz 2026-02-20 17:55:06 +01:00
parent a8b395e20d
commit a00c42e770
252 changed files with 28785 additions and 8907 deletions

View file

@ -257,7 +257,7 @@ class Yard extends Cart
if (! $shipping_price) {
return;
}
if ($this->weight() == 0) {
if ($this->allItemsFreeShippingConsultant() || $this->weight() == 0) {
$shipping_price->price = 0;
$shipping_price->price_comp = 0;
} else {
@ -416,6 +416,18 @@ class Yard extends Cart
return $total;
}
public function allItemsFreeShippingConsultant()
{
$content = $this->getContent();
if ($content->isEmpty()) {
return false;
}
return $content->every(function (CartItem $cartItem) {
return (bool) $cartItem->options->free_shipping_consultant;
});
}
public function points()
{
$content = $this->getContent();
@ -510,7 +522,7 @@ class Yard extends Cart
}
$price = $product->price;
if ($set_price === 'with') {
$cartItem = $this->getCartItem($product->id, $product->getLang('name'), 1, $price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
$cartItem = $this->getCartItem($product->id, $product->getLang('name'), 1, $price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping, 'show_on' => $product->show_on]);
$price = $product->getPriceWith(false, true, $this->getUserCountry());
}
if ($set_price === 'withTaxFree') {