Skip to content

Commit 82ac1c6

Browse files
stock management
1 parent 9fc5427 commit 82ac1c6

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

app/base/controllers/Admin/Commerce/OrderShipments.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,6 @@ protected function beforeRender(): BasePage|Response
358358
return parent::beforeRender();
359359
}
360360

361-
public static function exposeDataToDashboard() : mixed
362-
{
363-
return null;
364-
}
365-
366361
protected function renderShipmentInfo(OrderShipmentModel $orderShipment) : string
367362
{
368363
$locationScript = '';

app/base/controllers/Frontend/Commerce/Cart.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,12 @@ public function formSubmitted(FAPI\Form $form, array &$form_state): mixed
291291
->where(['cart_item_id' => $this->getCart()->getCartItem($item_id)->getId()])->getFirst();
292292
if ($stockMovement) {
293293
$stockMovement->setQuantity($quantity)->persist();
294+
} else {
295+
$stockMovement = StockMovement::createForCartItem(
296+
$this->getCart()->getCartItem($item_id)
297+
);
298+
$stockMovement->persist();
294299
}
295-
296300
}
297301

298302
} else {

scss/site.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,8 @@ ul.breadcrumbs {
258258
}
259259
}
260260
}
261+
262+
.feather {
263+
width: 16px;
264+
height: 16px;
265+
}

0 commit comments

Comments
 (0)