issue #760 wishlist
This commit is contained in:
parent
4c2a0a08fc
commit
fdb6284856
|
|
@ -56,7 +56,7 @@ class OrderItemRepository extends Repository
|
||||||
|
|
||||||
$totalInvoiced += $invoiceItem->total;
|
$totalInvoiced += $invoiceItem->total;
|
||||||
$baseTotalInvoiced += $invoiceItem->base_total;
|
$baseTotalInvoiced += $invoiceItem->base_total;
|
||||||
|
|
||||||
$taxInvoiced += $invoiceItem->tax_amount;
|
$taxInvoiced += $invoiceItem->tax_amount;
|
||||||
$baseTaxInvoiced += $invoiceItem->base_tax_amount;
|
$baseTaxInvoiced += $invoiceItem->base_tax_amount;
|
||||||
}
|
}
|
||||||
|
|
@ -70,7 +70,7 @@ class OrderItemRepository extends Repository
|
||||||
|
|
||||||
$orderItem->total_invoiced = $totalInvoiced;
|
$orderItem->total_invoiced = $totalInvoiced;
|
||||||
$orderItem->base_total_invoiced = $baseTotalInvoiced;
|
$orderItem->base_total_invoiced = $baseTotalInvoiced;
|
||||||
|
|
||||||
$orderItem->tax_amount_invoiced = $taxInvoiced;
|
$orderItem->tax_amount_invoiced = $taxInvoiced;
|
||||||
$orderItem->base_tax_amount_invoiced = $baseTaxInvoiced;
|
$orderItem->base_tax_amount_invoiced = $baseTaxInvoiced;
|
||||||
|
|
||||||
|
|
@ -90,14 +90,14 @@ class OrderItemRepository extends Repository
|
||||||
|
|
||||||
$product = $orderItem->type == 'configurable' ? $orderItem->child->product : $orderItem->product;
|
$product = $orderItem->type == 'configurable' ? $orderItem->child->product : $orderItem->product;
|
||||||
|
|
||||||
if (! $product) {
|
if (! $product)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
$orderedInventory = $product->ordered_inventories()
|
$orderedInventory = $product->ordered_inventories()
|
||||||
->where('channel_id', $orderItem->order->channel->id)
|
->where('channel_id', $orderItem->order->channel->id)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if ($orderedInventory) {
|
if ($orderedInventory) {
|
||||||
$orderedInventory->update([
|
$orderedInventory->update([
|
||||||
'qty' => $orderedInventory->qty + $orderItem->qty_ordered
|
'qty' => $orderedInventory->qty + $orderItem->qty_ordered
|
||||||
|
|
@ -126,14 +126,15 @@ class OrderItemRepository extends Repository
|
||||||
->where('channel_id', $orderItem->order->channel->id)
|
->where('channel_id', $orderItem->order->channel->id)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if ($orderedInventory) {
|
if (! $orderedInventory)
|
||||||
if (($qty = $orderedInventory->qty - $orderItem->qty_to_cancel) < 0) {
|
return ;
|
||||||
$qty = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$orderedInventory->update([
|
if (($qty = $orderedInventory->qty - $orderItem->qty_to_cancel) < 0) {
|
||||||
'qty' => $qty
|
$qty = 0;
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$orderedInventory->update([
|
||||||
|
'qty' => $qty
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -42,11 +42,13 @@
|
||||||
|
|
||||||
{{-- Uncomment the line below for activating share links --}}
|
{{-- Uncomment the line below for activating share links --}}
|
||||||
{{-- @include('shop::products.sharelinks') --}}
|
{{-- @include('shop::products.sharelinks') --}}
|
||||||
|
|
||||||
@auth('customer')
|
@auth('customer')
|
||||||
<a class="add-to-wishlist" href="{{ route('customer.wishlist.add', $product->id) }}">
|
<a class="add-to-wishlist" href="{{ route('customer.wishlist.add', $product->id) }}">
|
||||||
</a>
|
</a>
|
||||||
@endauth
|
@endauth
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -157,6 +159,17 @@
|
||||||
zoomImage.data('zoom-image', $(this).data('zoom-image'));
|
zoomImage.data('zoom-image', $(this).data('zoom-image'));
|
||||||
zoomImage.ezPlus();
|
zoomImage.ezPlus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).mousemove(function(event) {
|
||||||
|
if ( (event.pageX - $('.product-hero-image').offset().left > 440 ) && (event.pageX - $('.product-hero-image').offset().left < 465) && (event.pageY - $('.product-hero-image').offset().top > 16) && (event.pageY - $('.product-hero-image').offset().top < 38)) {
|
||||||
|
|
||||||
|
$('.zoomContainer').attr('style', 'z-index: -1 !important');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('.zoomContainer').css({"position": "absolute", "top": "143px", "left"
|
||||||
|
: "249px", "height": "480px", "width": "480px", "z-index": "999" });
|
||||||
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue