Merge pull request #868 from rahulshukla-webkul/development

Development
This commit is contained in:
Jitendra Singh 2019-04-24 14:49:13 +05:30 committed by GitHub
commit 81666cef16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 10 deletions

View File

@ -20,7 +20,7 @@
</div>
</div>
<button type="submit" class="btn btn-lg btn-primary" @click="closeModal">
<button type="submit" class="btn btn-lg btn-primary">
{{ __('admin::app.export.export') }}
</button>
@ -29,11 +29,8 @@
<script>
Vue.component('export-form', {
template: '#export-form-template',
methods: {
closeModal () {
this.$parent.closeModal();
}
}
});
</script>

View File

@ -167,6 +167,7 @@
this.reloadPrice();
this.changeProductImages();
this.changeStock(this.simpleProduct);
},
getSelectedIndex (attribute, value) {
@ -320,6 +321,16 @@
});
}
},
changeStock(productId) {
var inStockElement = document.getElementById('in-stock');
if (productId) {
inStockElement.style.display= "block";
} else {
inStockElement.style.display= "none";
}
},
}
});

View File

@ -1,7 +1,13 @@
{!! view_render_event('bagisto.shop.products.view.stock.before', ['product' => $product]) !!}
<div class="stock-status {{ $product->type != 'configurable' && ! $product->haveSufficientQuantity(1) ? '' : 'active' }}">
{{ $product->type != 'configurable' && ! $product->haveSufficientQuantity(1) ? __('shop::app.products.out-of-stock') : __('shop::app.products.in-stock') }}
</div>
@if ($product->type == 'simple')
<div class="stock-status {{! $product->haveSufficientQuantity(1) ? '' : 'active' }}">
{{ $product->haveSufficientQuantity(1) ? __('shop::app.products.in-stock') : __('shop::app.products.out-of-stock') }}
</div>
@else
<div class="stock-status in-stock" id="in-stock" style="display: none;">
{{ __('shop::app.products.in-stock') }}
</div>
@endif
{!! view_render_event('bagisto.shop.products.view.stock.after', ['product' => $product]) !!}

View File

@ -298,4 +298,4 @@ class TaxRateController extends Controller
return redirect()->route($this->_config['redirect']);
}
}
}