| = $cartItem->position === null ? $cnt : $this->Number->format($cartItem->position) ?> |
= $cartItem->foreign_key_uuid ?? $cartItem->foreign_key ?> |
= $cartItem->model; ?> |
= $this->Form->control('qty', [
'label' => false,
'min' => 1,
'step' => 1,
'default' => $cartItem->qty,
'value' => $cartItem->qty,
'style' => 'width: 120px;',
'type' => 'number',
'data-cart-item-id' => $cartItem->id,
'hx-put' => $this->Url->build([
'controller' => 'CartItems',
'action' => 'edit',
$cartItem->id,
]),
'hx-swap' => 'none',
'hx-include' => '[name="_csrfToken"], [data-cart-item-id="' . $cartItem->id . '"]',
]) ?>
|
= $this->Form->control('price', [
'label' => false,
'min' => 0,
'default' => $cartItem->price,
'value' => $cartItem->price,
'style' => 'width: 120px;',
'type' => 'text',
'data-cart-item-id' => $cartItem->id,
'hx-put' => $this->Url->build([
'controller' => 'CartItems',
'action' => 'edit',
$cartItem->id,
]),
'hx-swap' => 'none',
'hx-include' => '[name="_csrfToken"], [data-cart-item-id="' . $cartItem->id . '"]',
]) ?>
|
= $cartItem->subtotal === null ? '' : $this->Number->currency($cartItem->subtotal, 'USD') ?> |
= $this->Form->postLink(__('Delete'), [
'controller' => 'CartItems',
'action' => 'delete',
$cartItem->id
], ['confirm' => __('Are you sure you want to delete # {0}?', $cartItem->id)]) ?>
|