fixed issue with preorder button not coming on storefront
This commit is contained in:
parent
170377509c
commit
1c1dc3c834
|
|
@ -53,6 +53,8 @@ class PreOrderItemRepository extends Repository
|
|||
*/
|
||||
public function canBeComplete($orderItem)
|
||||
{
|
||||
$this->resetScope();
|
||||
|
||||
$preOrderItem = $this->findOneByField('order_item_id', $orderItem->id);
|
||||
|
||||
if (! $preOrderItem || $preOrderItem->status == 'completed')
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}">
|
||||
{{ $item->name }}
|
||||
|
||||
@if ($preOrderItem = $preOrderItemRepository->findOneByField('order_item_id', $item->id))
|
||||
@if ($preOrderItem = $preOrderItemRepository->resetScope()->findOneByField('order_item_id', $item->id))
|
||||
<div class="pre-order-item-info">
|
||||
<span class="heading" @if($item->type == 'configurable')style="margin-top: 0"@endif>
|
||||
{{ __('preorder::app.shop.sales.orders.preorder-information') }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue