Merge pull request #4487 from rahulshukla-webkul/development
This commit is contained in:
commit
b168a3f0b5
|
|
@ -166,6 +166,11 @@ return [
|
|||
'type' => 'number',
|
||||
'validation' => 'min:0',
|
||||
],
|
||||
[
|
||||
'name' => 'out_of_stock_items',
|
||||
'title' => 'admin::app.admin.system.allow-out-of-stock-items',
|
||||
'type' => 'boolean',
|
||||
],
|
||||
],
|
||||
], [
|
||||
'key' => 'catalog.products.storefront',
|
||||
|
|
|
|||
|
|
@ -1337,6 +1337,10 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'فهرس',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'منتجات',
|
||||
'guest-checkout' => 'ضيف المحاسبة',
|
||||
'allow-guest-checkout' => 'السماح للضيف بالخروج',
|
||||
|
|
|
|||
|
|
@ -1345,6 +1345,10 @@ return [
|
|||
'system' =>
|
||||
[
|
||||
'catalog' => 'Katalog',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'Produkte',
|
||||
'guest-checkout' => 'Gastbestellungen',
|
||||
'allow-guest-checkout' => 'Gastbestellungen erlauben',
|
||||
|
|
|
|||
|
|
@ -1348,6 +1348,7 @@ return [
|
|||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'Products',
|
||||
'guest-checkout' => 'Guest Checkout',
|
||||
'allow-guest-checkout' => 'Allow Guest Checkout',
|
||||
|
|
|
|||
|
|
@ -1326,6 +1326,10 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'Catálogo',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'Productos',
|
||||
'guest-checkout' => 'Compras como invitado',
|
||||
'allow-guest-checkout' => 'Permitir compras como invitado',
|
||||
|
|
|
|||
|
|
@ -1334,6 +1334,10 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'کاتالوگ',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'محصولات',
|
||||
'guest-checkout' => 'وارسی میهمان',
|
||||
'allow-guest-checkout' => 'مجاز به پرداخت مهمان',
|
||||
|
|
|
|||
|
|
@ -1337,6 +1337,10 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'Catalogo',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'Prodotti',
|
||||
'guest-checkout' => 'Checkout come Ospite',
|
||||
'allow-guest-checkout' => 'Consenti Checkout come Ospite',
|
||||
|
|
|
|||
|
|
@ -1333,6 +1333,10 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'Catalogus',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'Producten',
|
||||
'guest-checkout' => 'Gast afrekenen',
|
||||
'allow-guest-checkout' => 'Gast afrekenen toestaan',
|
||||
|
|
|
|||
|
|
@ -1334,6 +1334,10 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'Katalog',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'Produkty',
|
||||
'guest-checkout' => 'Zamówienia gości',
|
||||
'allow-guest-checkout' => 'Zezwalaj na zamówienia gości',
|
||||
|
|
|
|||
|
|
@ -1333,6 +1333,10 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'Catálogo',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'Produtos',
|
||||
'guest-checkout' => 'Compras sem cadastro?',
|
||||
'allow-guest-checkout' => 'Permitir compra para clientes sem cadastros?',
|
||||
|
|
|
|||
|
|
@ -1321,6 +1321,10 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'Katalog',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'products' => 'Ürünler',
|
||||
'guest-checkout' => 'Ziyaretçi Satışı',
|
||||
'allow-guest-checkout' => 'Ziyaretçi Alımına İzin Ver',
|
||||
|
|
|
|||
|
|
@ -189,9 +189,15 @@ class CartRuleController extends Controller
|
|||
$cartRule = $this->cartRuleRepository->findOrFail($id);
|
||||
|
||||
if ($cartRule->coupon_type) {
|
||||
$this->validate(request(), [
|
||||
'coupon_code' => 'required_if:use_auto_generation,==,0|unique:cart_rule_coupons,code,' . $cartRule->cart_rule_coupon->id,
|
||||
]);
|
||||
if ($cartRule->cart_rule_coupon) {
|
||||
$this->validate(request(), [
|
||||
'coupon_code' => 'required_if:use_auto_generation,==,0|unique:cart_rule_coupons,code,' . $cartRule->cart_rule_coupon->id,
|
||||
]);
|
||||
} else {
|
||||
$this->validate(request(), [
|
||||
'coupon_code' => 'required_if:use_auto_generation,==,0|unique:cart_rule_coupons,code',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Event::dispatch('promotions.cart_rule.update.before', $cartRule);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,13 @@
|
|||
|
||||
@foreach (app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts() as $productFlat)
|
||||
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@if (core()->getConfigData('catalog.products.homepage.out_of_stock_items'))
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@else
|
||||
@if ($productFlat->isSaleable())
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,13 @@
|
|||
|
||||
@foreach (app('Webkul\Product\Repositories\ProductRepository')->getNewProducts() as $productFlat)
|
||||
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@if (core()->getConfigData('catalog.products.homepage.out_of_stock_items'))
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@else
|
||||
@if ($productFlat->isSaleable())
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue