Merge pull request #376 from prashant-webkul/master
Issues and bug fixes
This commit is contained in:
commit
d7b95eec47
|
|
@ -25,7 +25,7 @@ class Order {
|
|||
try {
|
||||
Mail::send(new NewOrderNotification($order));
|
||||
} catch (\Exception $e) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ class Order {
|
|||
try {
|
||||
Mail::send(new NewInvoiceNotification($invoice));
|
||||
} catch (\Exception $e) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ class Order {
|
|||
try {
|
||||
Mail::send(new NewShipmentNotification($shipment));
|
||||
} catch (\Exception $e) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class Order {
|
|||
$productListener = app(\Webkul\Admin\Listeners\Product::class);
|
||||
|
||||
foreach ($order->items as $item) {
|
||||
$productListener->afterProductCreated($item->product);
|
||||
$productListener->afterOrderRecieved($item->product->id, $item->qty_ordered);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -213,6 +213,20 @@ class Product {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the product quantity when the order is received
|
||||
*
|
||||
* @param $productId
|
||||
* @param $itemQuantity
|
||||
*/
|
||||
public function afterOrderRecieved($productId, $itemQuantity) {
|
||||
$productGrid = $this->productGrid->findOneByField('product_id', $productId);
|
||||
|
||||
$productGrid->update(['quantity' => $productGrid->quantity - $itemQuantity]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually invoke this function when you have created the products by importing or seeding or factory.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
const { mix } = require("laravel-mix");
|
||||
require("laravel-mix-merge-manifest");
|
||||
|
||||
var publicPath = 'publishable/assets';
|
||||
// var publicPath = "../../../public/vendor/webkul/admin/assets";
|
||||
// var publicPath = 'publishable/assets';
|
||||
var publicPath = "../../../public/vendor/webkul/admin/assets";
|
||||
|
||||
mix.setPublicPath(publicPath).mergeManifest();
|
||||
mix.disableNotifications();
|
||||
|
|
|
|||
|
|
@ -639,9 +639,9 @@ class Cart {
|
|||
}
|
||||
}
|
||||
|
||||
$cart->customer_email = $cart->shipping_address->email;
|
||||
$cart->customer_first_name = $cart->shipping_address->first_name;
|
||||
$cart->customer_last_name = $cart->shipping_address->last_name;
|
||||
$cart->customer_email = $cart->billing_address->email;
|
||||
$cart->customer_first_name = $cart->billing_address->first_name;
|
||||
$cart->customer_last_name = $cart->billing_address->last_name;
|
||||
$cart->save();
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ class RegistrationController extends Controller
|
|||
/**
|
||||
* Method to verify account
|
||||
*
|
||||
* @param string $token
|
||||
*/
|
||||
public function verifyAccount($token)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,13 @@ return [
|
|||
'name' => 'Wishlist',
|
||||
'route' =>'customer.wishlist.index',
|
||||
'sort' => 4
|
||||
], [
|
||||
'key' => 'account.orders',
|
||||
'name' => 'Orders',
|
||||
'route' =>'customer.orders.index',
|
||||
'sort' => 5
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
?>
|
||||
|
|
@ -57,7 +57,7 @@ class SliderController extends controller
|
|||
$this->validate(request(), [
|
||||
'title' => 'string|required',
|
||||
'channel_id' => 'required',
|
||||
'image' => 'required',
|
||||
'image' => 'required|mimes:jpeg,bmp,png'
|
||||
]);
|
||||
|
||||
$result = $this->slider->save(request()->all());
|
||||
|
|
@ -90,6 +90,7 @@ class SliderController extends controller
|
|||
$this->validate(request(), [
|
||||
'title' => 'string|required',
|
||||
'channel_id' => 'required',
|
||||
'image' => 'sometimes|mimes:jpeg,bmp,png'
|
||||
]);
|
||||
|
||||
$result = $this->slider->updateItem(request()->all(), $id);
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@ class SubscriptionController extends Controller
|
|||
$mailSent = true;
|
||||
|
||||
try {
|
||||
session()->flash('success', trans('shop::app.subscription.subscribed'));
|
||||
|
||||
Mail::send(new SubscriptionEmail($subscriptionData));
|
||||
|
||||
session()->flash('success', trans('shop::app.subscription.subscribed'));
|
||||
} catch(\Exception $e) {
|
||||
session()->flash('error', trans('shop::app.subscription.not-subscribed'));
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,10 @@ body {
|
|||
font-family: "Montserrat", sans-serif;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ return [
|
|||
'newest-first' => 'Newest First',
|
||||
'oldest-first' => 'Oldest First',
|
||||
'cheapest-first' => 'Cheapest First',
|
||||
'expensive-first' => 'Expensive First',
|
||||
'expansive-first' => 'Expensive First',
|
||||
'show' => 'Show',
|
||||
'pager-info' => 'Showing :showing of :total Items',
|
||||
'description' => 'Description',
|
||||
|
|
|
|||
|
|
@ -9,33 +9,34 @@
|
|||
{{ __('shop::app.search.no-results') }}
|
||||
@endif
|
||||
|
||||
<div class="main mb-30" style="min-height: 27vh;">
|
||||
@if($results->isEmpty())
|
||||
<div class="search-result-status">
|
||||
<h2>{{ __('shop::app.products.whoops') }}</h2>
|
||||
<span>{{ __('shop::app.search.no-results') }}</span>
|
||||
</div>
|
||||
@else
|
||||
@if($results->count() == 1)
|
||||
<div class="search-result-status mb-20">
|
||||
<span><b>{{ $results->count() }} </b>{{ __('shop::app.search.found-result') }}</span>
|
||||
@if($results)
|
||||
<div class="main mb-30" style="min-height: 27vh;">
|
||||
@if($results->isEmpty())
|
||||
<div class="search-result-status">
|
||||
<h2>{{ __('shop::app.products.whoops') }}</h2>
|
||||
<span>{{ __('shop::app.search.no-results') }}</span>
|
||||
</div>
|
||||
@else
|
||||
<div class="search-result-status mb-20">
|
||||
<span><b>{{ $results->count() }} </b>{{ __('shop::app.search.found-results') }}</span>
|
||||
@if($results->count() == 1)
|
||||
<div class="search-result-status mb-20">
|
||||
<span><b>{{ $results->count() }} </b>{{ __('shop::app.search.found-result') }}</span>
|
||||
</div>
|
||||
@else
|
||||
<div class="search-result-status mb-20">
|
||||
<span><b>{{ $results->count() }} </b>{{ __('shop::app.search.found-results') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
{{-- @include ('shop::products.list.toolbar')
|
||||
|
||||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar') --}}
|
||||
<div class="product-grid-4">
|
||||
@foreach ($results as $product)
|
||||
@include('shop::products.list.card', ['product' => $product])
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@include('ui::datagrid.pagination')
|
||||
@endif
|
||||
{{-- @include ('shop::products.list.toolbar')
|
||||
|
||||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar') --}}
|
||||
<div class="product-grid-4">
|
||||
@foreach ($results as $product)
|
||||
@include('shop::products.list.card', ['product' => $product])
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@include('ui::datagrid.pagination')
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
const { mix } = require("laravel-mix");
|
||||
require("laravel-mix-merge-manifest");
|
||||
|
||||
var publicPath = 'publishable/assets';
|
||||
// var publicPath = "../../../public/themes/default/assets";
|
||||
// var publicPath = 'publishable/assets';
|
||||
var publicPath = "../../../public/themes/default/assets";
|
||||
|
||||
mix.setPublicPath(publicPath).mergeManifest();
|
||||
mix.disableNotifications();
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class TaxCategoryController extends Controller
|
|||
/**
|
||||
* To show the edit form form the tax category
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return view
|
||||
*/
|
||||
public function edit($id)
|
||||
|
|
@ -130,7 +130,7 @@ class TaxCategoryController extends Controller
|
|||
/**
|
||||
* To update the tax category
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function update($id)
|
||||
|
|
@ -144,7 +144,7 @@ class TaxCategoryController extends Controller
|
|||
]);
|
||||
|
||||
$data = request()->input();
|
||||
|
||||
|
||||
Event::fire('tax.tax_category.update.before', $id);
|
||||
|
||||
$taxCategory = $this->taxCategory->update($data, $id);
|
||||
|
|
@ -153,10 +153,10 @@ class TaxCategoryController extends Controller
|
|||
|
||||
if(!$taxCategory) {
|
||||
session()->flash('error', trans('admin::app.settings.tax-categories.update-error'));
|
||||
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
|
||||
$taxRates = $data['taxrates'];
|
||||
|
||||
//attach the categories in the tax map table
|
||||
|
|
@ -175,16 +175,14 @@ class TaxCategoryController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
if($this->taxCategory->count() == 1) {
|
||||
session()->flash('error', trans('admin::app.settings.tax-categories.atleast-one'));
|
||||
} else {
|
||||
try {
|
||||
Event::fire('tax.tax_category.delete.before', $id);
|
||||
|
||||
$this->taxCategory->delete($id);
|
||||
|
||||
Event::fire('tax.tax_category.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.tax-categories.delete'));
|
||||
} catch(Exception $e) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
|
|
|
|||
|
|
@ -154,17 +154,18 @@ class TaxRateController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
if($this->taxRate->count() == 1) {
|
||||
session()->flash('error', trans('admin::app.settings.tax-rates.atleast-one'));
|
||||
} else {
|
||||
Event::fire('tax.tax_rate.delete.before', $id);
|
||||
// if($this->taxRate->count() == 1) {
|
||||
// session()->flash('error', trans('admin::app.settings.tax-rates.atleast-one'));
|
||||
// } else {
|
||||
|
||||
$this->taxRate->delete($id);
|
||||
|
||||
Event::fire('tax.tax_rate.delete.after', $id);
|
||||
// session()->flash('success', trans('admin::app.settings.tax-rates.delete'));
|
||||
// }
|
||||
Event::fire('tax.tax_rate.delete.before', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.tax-rates.delete'));
|
||||
}
|
||||
$this->taxRate->delete($id);
|
||||
|
||||
Event::fire('tax.tax_rate.delete.after', $id);
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ a:active {
|
|||
color: $brand-color;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue