Merge branch 'development' of https://github.com/rahulcs0082/bagisto into development
This commit is contained in:
commit
6ce2116a49
|
|
@ -218,6 +218,10 @@ return [
|
|||
],
|
||||
],
|
||||
'channel_based' => true,
|
||||
], [
|
||||
'name' => 'buy_now_button_display',
|
||||
'title' => 'admin::app.admin.system.buy-now-button-display',
|
||||
'type' => 'boolean',
|
||||
]
|
||||
],
|
||||
], [
|
||||
|
|
|
|||
|
|
@ -1379,7 +1379,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1353,7 +1353,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1379,7 +1379,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1335,7 +1335,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1371,7 +1371,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1376,7 +1376,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1371,7 +1371,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1360,7 +1360,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
@ -1374,7 +1374,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1357,7 +1357,8 @@ return [
|
|||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...'
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Buy now button display'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -102,11 +102,9 @@ class ProductFlatRepository extends Repository
|
|||
|
||||
foreach ($products as $key => $product) {
|
||||
foreach ($filterAttributes as $attribute) {
|
||||
if ($attribute->code <> 'price') {
|
||||
if (isset($product[$attribute->code])) {
|
||||
if (! in_array($product[$attribute->code], $allProductAttributeOptionsCode)) {
|
||||
array_push($allProductAttributeOptionsCode, $product[$attribute->code]);
|
||||
}
|
||||
if ($attribute->code <> 'price' && isset($product[$attribute->code])) {
|
||||
if (! in_array($product[$attribute->code], $allProductAttributeOptionsCode)) {
|
||||
array_push($allProductAttributeOptionsCode, $product[$attribute->code]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
<div class="add-to-buttons">
|
||||
@include ('shop::products.add-to-cart', ['product' => $product])
|
||||
|
||||
@include ('shop::products.buy-now')
|
||||
@if (core()->getConfigData('catalog.products.storefront.buy_now_button_display'))
|
||||
@include ('shop::products.buy-now')
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.product-add.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{!! view_render_event('bagisto.shop.products.buy_now.before', ['product' => $product]) !!}
|
||||
|
||||
<button type="submit" class="theme-btn text-center buynow" {{ ! $product->isSaleable(1) ? 'disabled' : '' }}>
|
||||
{{ __('shop::app.products.buy-now') }}
|
||||
</button>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.buy_now.after', ['product' => $product]) !!}
|
||||
|
|
@ -124,6 +124,12 @@
|
|||
</div>
|
||||
|
||||
<div class="product-actions">
|
||||
@if (core()->getConfigData('catalog.products.storefront.buy_now_button_display'))
|
||||
@include ('shop::products.buy-now', [
|
||||
'product' => $product,
|
||||
])
|
||||
@endif
|
||||
|
||||
@include ('shop::products.add-to-cart', [
|
||||
'form' => false,
|
||||
'product' => $product,
|
||||
|
|
|
|||
Loading…
Reference in New Issue