Merge pull request #1695 from jitendra-webkul/jitendra
Move wishlist to cart issue fixed
This commit is contained in:
commit
fb4e977dbd
|
|
@ -710,7 +710,6 @@ class Cart {
|
|||
$address = $cart->billing_address;
|
||||
}
|
||||
|
||||
|
||||
$taxRates = $taxCategory->tax_rates()->where([
|
||||
'state' => $address->state,
|
||||
'country' => $address->country,
|
||||
|
|
@ -913,7 +912,9 @@ class Cart {
|
|||
|
||||
if (! $wishlistItem->additional)
|
||||
$wishlistItem->additional = ['product_id' => $wishlistItem->product_id];
|
||||
|
||||
|
||||
request()->merge($wishlistItem->additional);
|
||||
|
||||
$result = $this->addProduct($wishlistItem->product_id, $wishlistItem->additional);
|
||||
|
||||
if ($result) {
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class WishlistController extends Controller
|
|||
if (! $wishlistItem)
|
||||
abort(404);
|
||||
|
||||
try {
|
||||
// try {
|
||||
$result = Cart::moveToCart($wishlistItem);
|
||||
|
||||
if ($result) {
|
||||
|
|
@ -170,11 +170,11 @@ class WishlistController extends Controller
|
|||
}
|
||||
|
||||
return redirect()->back();
|
||||
} catch (\Exception $e) {
|
||||
session()->flash('warning', $e->getMessage());
|
||||
// } catch (\Exception $e) {
|
||||
// session()->flash('warning', $e->getMessage());
|
||||
|
||||
return redirect()->route('shop.products.index', ['slug' => $wishlistItem->product->url_key]);
|
||||
}
|
||||
// return redirect()->route('shop.products.index', ['slug' => $wishlistItem->product->url_key]);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue