Abo Einmalprodukte und Bestätigung abschließen
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
2bdc9ada3c
commit
2269ce031f
57 changed files with 3647 additions and 371 deletions
|
|
@ -238,6 +238,13 @@ class OrderController extends Controller
|
|||
$image = $product->images->first()?->slug ?? '';
|
||||
$yard = Yard::instance($this->instance);
|
||||
|
||||
$additionalWeight = (int) $product->weight * $quantity;
|
||||
if ($additionalWeight > 0 && $yard->exceedsMaxWeight($additionalWeight)) {
|
||||
\Session::flash('alert-error', __('msg.cart_max_weight_reached'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$cartItem = $yard->add(
|
||||
$product->id,
|
||||
$product->getLang('name'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue