Merge branch 'master' of https://github.com/bagisto/bagisto into development
This commit is contained in:
commit
937d91ea5b
|
|
@ -78,7 +78,7 @@
|
|||
<span class="control-error" v-if="errors.has('admin_name')">@{{ errors.first('admin_name') }}</span>
|
||||
</div>
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
|
||||
<div class="control-group">
|
||||
<label for="locale-{{ $locale->code }}">{{ $locale->name . ' (' . $locale->code . ')' }}</label>
|
||||
|
|
@ -251,7 +251,7 @@
|
|||
|
||||
<th>{{ __('admin::app.catalog.attributes.admin_name') }}</th>
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
|
||||
<th>{{ $locale->name . ' (' . $locale->code . ')' }}</th>
|
||||
|
||||
|
|
@ -280,7 +280,7 @@
|
|||
</div>
|
||||
</td>
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
<td>
|
||||
<div class="control-group" :class="[errors.has(localeInputName(row, '{{ $locale->code }}')) ? 'has-error' : '']">
|
||||
<input type="text" v-validate="'{{ app()->getLocale() }}' == '{{ $locale->code }}' ? 'required': ''" v-model="row['{{ $locale->code }}']" :name="localeInputName(row, '{{ $locale->code }}')" class="control" data-vv-as=""{{ $locale->name . ' (' . $locale->code . ')' }}""/>
|
||||
|
|
@ -356,7 +356,7 @@
|
|||
var rowCount = this.optionRowCount++;
|
||||
var row = {'id': 'option_' + rowCount};
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
row['{{ $locale->code }}'] = '';
|
||||
@endforeach
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
<span class="control-error" v-if="errors.has('admin_name')">@{{ errors.first('admin_name') }}</span>
|
||||
</div>
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
|
||||
<div class="control-group">
|
||||
<label for="locale-{{ $locale->code }}">{{ $locale->name . ' (' . $locale->code . ')' }}</label>
|
||||
|
|
@ -309,7 +309,7 @@
|
|||
|
||||
<th>{{ __('admin::app.catalog.attributes.admin_name') }}</th>
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
|
||||
<th>{{ $locale->name . ' (' . $locale->code . ')' }}</th>
|
||||
|
||||
|
|
@ -339,7 +339,7 @@
|
|||
</div>
|
||||
</td>
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
<td>
|
||||
<div class="control-group" :class="[errors.has(localeInputName(row, '{{ $locale->code }}')) ? 'has-error' : '']">
|
||||
<input type="text" v-validate="'{{ app()->getLocale() }}' == '{{ $locale->code }}' ? 'required': ''" v-model="row['{{ $locale->code }}']" :name="localeInputName(row, '{{ $locale->code }}')" class="control" data-vv-as=""{{ $locale->name . ' (' . $locale->code . ')' }}""/>
|
||||
|
|
@ -397,7 +397,7 @@
|
|||
'swatch_value_url': '{{ $option->swatch_value_url }}'
|
||||
};
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
row['{{ $locale->code }}'] = "{{ $option->translate($locale->code)['label'] }}";
|
||||
@endforeach
|
||||
|
||||
|
|
@ -420,7 +420,7 @@
|
|||
var rowCount = this.optionRowCount++;
|
||||
var row = {'id': 'option_' + rowCount};
|
||||
|
||||
@foreach (Webkul\Core\Models\Locale::all() as $locale)
|
||||
@foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
|
||||
row['{{ $locale->code }}'] = '';
|
||||
@endforeach
|
||||
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@
|
|||
<td>
|
||||
{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1059,6 +1059,8 @@ class Cart {
|
|||
'base_sub_total' => $data['base_sub_total'],
|
||||
'tax_amount' => $data['tax_total'],
|
||||
'base_tax_amount' => $data['base_tax_total'],
|
||||
'discount_amount' => $data['discount_amount'],
|
||||
'base_discount_amount' => $data['base_discount_amount'],
|
||||
|
||||
'shipping_address' => array_except($data['shipping_address'], ['id', 'cart_id']),
|
||||
'billing_address' => array_except($data['billing_address'], ['id', 'cart_id']),
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class BuyAGetB extends Action
|
|||
|
||||
if ($realQty > $disc_quantity) {
|
||||
$amountDiscounted = $amountDiscounted * $disc_quantity;
|
||||
} else {
|
||||
$amountDiscounted = $amountDiscounted * $realQty;
|
||||
}
|
||||
|
||||
if ($amountDiscounted > $item['base_price']) {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class FixedAmount extends Action
|
|||
|
||||
if ($realQty > $disc_quantity) {
|
||||
$amountDiscounted = $amountDiscounted * $disc_quantity;
|
||||
} else {
|
||||
$amountDiscounted = $amountDiscounted * $realQty;
|
||||
}
|
||||
|
||||
if ($amountDiscounted > $item['base_price']) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ class PercentOfProduct extends Action
|
|||
|
||||
if ($realQty > $disc_quantity) {
|
||||
$amountDiscounted = $amountDiscounted * $disc_quantity;
|
||||
} else {
|
||||
$amountDiscounted = $amountDiscounted * $realQty;
|
||||
}
|
||||
|
||||
if ($amountDiscounted > $item['base_price']) {
|
||||
|
|
|
|||
|
|
@ -349,11 +349,16 @@ abstract class Discount
|
|||
$result = true;
|
||||
|
||||
foreach ($conditions as $condition) {
|
||||
$actual_value = ${$condition->attribute};
|
||||
$test_value = $condition->value;
|
||||
$test_condition = $condition->condition;
|
||||
if (isset($condition->attribute))
|
||||
$actual_value = ${$condition->attribute};
|
||||
|
||||
if ($condition->type == 'numeric' || $condition->type == 'string' || $condition->type == 'text') {
|
||||
if (isset($condition->value))
|
||||
$test_value = $condition->value;
|
||||
|
||||
if (isset($condition->condition))
|
||||
$test_condition = $condition->condition;
|
||||
|
||||
if (isset($condition->type) && ($condition->type == 'numeric' || $condition->type == 'string' || $condition->type == 'text')) {
|
||||
if ($test_condition == '=') {
|
||||
if ($actual_value != $test_value) {
|
||||
$result = false;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class ProductImage extends AbstractProduct
|
|||
];
|
||||
}
|
||||
|
||||
if (! count($images)) {
|
||||
if (! $product->parent_id && ! count($images)) {
|
||||
$images[] = [
|
||||
'small_image_url' => asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.png'),
|
||||
'medium_image_url' => asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png'),
|
||||
|
|
|
|||
|
|
@ -519,7 +519,11 @@
|
|||
.then(function(response) {
|
||||
this_this.$emit('onApplyCoupon')
|
||||
})
|
||||
.catch(function(error) {});
|
||||
.catch(function(error) {
|
||||
window.flashMessages = [{'type' : 'alert-error', 'message' : error.response.data.message}];
|
||||
|
||||
this_this.$root.addFlashMessages();
|
||||
});
|
||||
},
|
||||
|
||||
removeCoupon: function () {
|
||||
|
|
@ -529,7 +533,11 @@
|
|||
.then(function(response) {
|
||||
this_this.$emit('onRemoveCoupon')
|
||||
})
|
||||
.catch(function(error) {});
|
||||
.catch(function(error) {
|
||||
window.flashMessages = [{'type' : 'alert-error', 'message' : error.response.data.message}];
|
||||
|
||||
this_this.$root.addFlashMessages();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -113,6 +113,14 @@
|
|||
<td>{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->base_discount_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.discount') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr class="border">
|
||||
<td>{{ __('shop::app.customer.account.order.view.tax') }}</td>
|
||||
<td>-</td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue