This commit is contained in:
Prashant Singh 2019-06-29 18:49:08 +05:30
commit 3d352b690a
4 changed files with 12 additions and 6 deletions

View File

@ -130,12 +130,12 @@
<div class="graph-stats">
<div class="left-card-container graph">
<div class="card">
<div class="card" style="overflow: hidden;">
<div class="card-title" style="margin-bottom: 30px;">
{{ __('admin::app.dashboard.sales') }}
</div>
<div class="card-info">
<div class="card-info" style="height: 100%;">
<canvas id="myChart" style="width: 100%; height: 87%"></canvas>

View File

@ -1124,7 +1124,7 @@ class Cart {
$data['quantity'] = 1;
$data['product'] = $product->id;
\Event::fire('checkout.cart.add.after', $product->id);
\Event::fire('checkout.cart.add.before', $product->id);
$result = $this->add($product->id, $data);

View File

@ -134,10 +134,16 @@ class WishlistController extends Controller
if(!isset($wishlistItem) || $wishlistItem->customer_id != auth()->guard('customer')->user()->id) {
session()->flash('warning', trans('shop::app.security-warning'));
return redirect()->route( 'customer.wishlist.index');
return redirect()->route('customer.wishlist.index');
}
$result = Cart::moveToCart($wishlistItem);
try {
$result = Cart::moveToCart($wishlistItem);
} catch (\Exception $e) {
session()->flash('warning', $e->getMessage());
return redirect()->back();
}
if ($result == 1) {
if ($wishlistItem->delete()) {

View File

@ -16,7 +16,7 @@ use Cart;
* Cart controller for the customer and guest users for adding and
* removing the products in the cart.
*
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class CartController extends Controller