Merge pull request #2013 from jitendra-webkul/1.0
Issues #1997, #1994 fixed
This commit is contained in:
commit
55df0ad02f
|
|
@ -83,7 +83,7 @@
|
|||
|
||||
<div class="control-group">
|
||||
<label for="locale-{{ $locale->code }}">{{ $locale->name . ' (' . $locale->code . ')' }}</label>
|
||||
<input type="text" class="control" id="locale-{{ $locale->code }}" name="<?php echo $locale->code; ?>[name]" value="{{ old($locale->code)['name'] }}"/>
|
||||
<input type="text" class="control" id="locale-{{ $locale->code }}" name="<?php echo $locale->code; ?>[name]" value="{{ old($locale->code)['name'] ?? '' }}"/>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
<div class="control-group">
|
||||
<label for="locale-{{ $locale->code }}">{{ $locale->name . ' (' . $locale->code . ')' }}</label>
|
||||
<input type="text" class="control" id="locale-{{ $locale->code }}" name="<?php echo $locale->code; ?>[name]" value="{{ old($locale->code)['name'] ?: $attribute->translate($locale->code)['name'] }}"/>
|
||||
<input type="text" class="control" id="locale-{{ $locale->code }}" name="<?php echo $locale->code; ?>[name]" value="{{ old($locale->code)['name'] ?? $attribute->translate($locale->code)['name'] }}"/>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('{{$locale}}[name]') ? 'has-error' : '']">
|
||||
<label for="name" class="required">{{ __('admin::app.catalog.categories.name') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="name" name="{{$locale}}[name]" value="{{ old($locale)['name'] ?: $category->translate($locale)['name'] }}" data-vv-as=""{{ __('admin::app.catalog.categories.name') }}""/>
|
||||
<input type="text" v-validate="'required'" class="control" id="name" name="{{$locale}}[name]" value="{{ old($locale)['name'] ?? $category->translate($locale)['name'] }}" data-vv-as=""{{ __('admin::app.catalog.categories.name') }}""/>
|
||||
<span class="control-error" v-if="errors.has('{{$locale}}[name]')">@{{ errors.first('{!!$locale!!}[name]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -180,23 +180,23 @@
|
|||
|
||||
<div class="control-group">
|
||||
<label for="meta_title">{{ __('admin::app.catalog.categories.meta_title') }}</label>
|
||||
<input type="text" class="control" id="meta_title" name="{{$locale}}[meta_title]" value="{{ old($locale)['meta_title'] ?: $category->translate($locale)['meta_title'] }}"/>
|
||||
<input type="text" class="control" id="meta_title" name="{{$locale}}[meta_title]" value="{{ old($locale)['meta_title'] ?? $category->translate($locale)['meta_title'] }}"/>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('{{$locale}}[slug]') ? 'has-error' : '']">
|
||||
<label for="slug" class="required">{{ __('admin::app.catalog.categories.slug') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="slug" name="{{$locale}}[slug]" value="{{ old($locale)['slug'] ?: $category->translate($locale)['slug'] }}" data-vv-as=""{{ __('admin::app.catalog.categories.slug') }}"" v-slugify/>
|
||||
<input type="text" v-validate="'required'" class="control" id="slug" name="{{$locale}}[slug]" value="{{ old($locale)['slug'] ?? $category->translate($locale)['slug'] }}" data-vv-as=""{{ __('admin::app.catalog.categories.slug') }}"" v-slugify/>
|
||||
<span class="control-error" v-if="errors.has('{{$locale}}[slug]')">@{{ errors.first('{!!$locale!!}[slug]') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="meta_description">{{ __('admin::app.catalog.categories.meta_description') }}</label>
|
||||
<textarea class="control" id="meta_description" name="{{$locale}}[meta_description]">{{ old($locale)['meta_description'] ?: $category->translate($locale)['meta_description'] }}</textarea>
|
||||
<textarea class="control" id="meta_description" name="{{$locale}}[meta_description]">{{ old($locale)['meta_description'] ?? $category->translate($locale)['meta_description'] }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="meta_keywords">{{ __('admin::app.catalog.categories.meta_keywords') }}</label>
|
||||
<textarea class="control" id="meta_keywords" name="{{$locale}}[meta_keywords]">{{ old($locale)['meta_keywords'] ?: $category->translate($locale)['meta_keywords'] }}</textarea>
|
||||
<textarea class="control" id="meta_keywords" name="{{$locale}}[meta_keywords]">{{ old($locale)['meta_keywords'] ?? $category->translate($locale)['meta_keywords'] }}</textarea>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.category.edit_form_accordian.seo.controls.after', ['category' => $category]) !!}
|
||||
|
|
@ -220,7 +220,7 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('{{$locale}}[description]') ? 'has-error' : '']">
|
||||
<label for="description" :class="isRequired ? 'required' : ''">{{ __('admin::app.catalog.categories.description') }}</label>
|
||||
<textarea v-validate="isRequired ? 'required' : ''" class="control" id="description" name="{{$locale}}[description]" data-vv-as=""{{ __('admin::app.catalog.categories.description') }}"">{{ old($locale)['description'] ?: $category->translate($locale)['description'] }}</textarea>
|
||||
<textarea v-validate="isRequired ? 'required' : ''" class="control" id="description" name="{{$locale}}[description]" data-vv-as=""{{ __('admin::app.catalog.categories.description') }}"">{{ old($locale)['description'] ?? $category->translate($locale)['description'] }}</textarea>
|
||||
<span class="control-error" v-if="errors.has('{{$locale}}[description]')">@{{ errors.first('{!!$locale!!}[description]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -720,23 +720,23 @@ class Cart {
|
|||
}
|
||||
|
||||
$taxRates = $taxCategory->tax_rates()->where([
|
||||
'state' => $address->state,
|
||||
'country' => $address->country,
|
||||
])->orderBy('tax_rate', 'desc')->get();
|
||||
|
||||
if (count( $taxRates) > 0) {
|
||||
if ($taxRates->count()) {
|
||||
foreach ($taxRates as $rate) {
|
||||
$haveTaxRate = false;
|
||||
|
||||
if ($rate->state != '' && $rate->state != $address->state)
|
||||
break;
|
||||
|
||||
if (! $rate->is_zip) {
|
||||
if ($rate->zip_code == '*' || $rate->zip_code == $address->postcode) {
|
||||
if ($rate->zip_code == '*' || $rate->zip_code == $address->postcode)
|
||||
$haveTaxRate = true;
|
||||
}
|
||||
} else {
|
||||
if ($address->postcode >= $rate->zip_from && $address->postcode <= $rate->zip_to) {
|
||||
if ($address->postcode >= $rate->zip_from && $address->postcode <= $rate->zip_to)
|
||||
$haveTaxRate = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($haveTaxRate) {
|
||||
$item->tax_percent = $rate->tax_rate;
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ class ProductFlat
|
|||
}
|
||||
}
|
||||
|
||||
$productFlat->{$attribute->code} = $productAttributeValue[ProductAttributeValue::$attributeTypeFields[$attribute->type]];
|
||||
$productFlat->{$attribute->code} = $productAttributeValue[ProductAttributeValue::$attributeTypeFields[$attribute->type]] ?? null;
|
||||
|
||||
if ($attribute->type == 'select') {
|
||||
$attributeOption = $this->attributeOptionRepository->find($product->{$attribute->code});
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ class Product extends Model implements ProductContract
|
|||
}
|
||||
}
|
||||
|
||||
return $attributeValue[ProductAttributeValue::$attributeTypeFields[$attribute->type]];
|
||||
return $attributeValue[ProductAttributeValue::$attributeTypeFields[$attribute->type]] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ class TaxRateController extends Controller
|
|||
'zip_code' => 'sometimes|required_without:is_zip',
|
||||
'zip_from' => 'nullable|required_with:is_zip',
|
||||
'zip_to' => 'nullable|required_with:is_zip,zip_from',
|
||||
'state' => 'required|string',
|
||||
'country' => 'required|string',
|
||||
'tax_rate' => 'required|numeric|min:0.0001'
|
||||
]);
|
||||
|
|
@ -125,7 +124,6 @@ class TaxRateController extends Controller
|
|||
'is_zip' => 'sometimes',
|
||||
'zip_from' => 'nullable|required_with:is_zip',
|
||||
'zip_to' => 'nullable|required_with:is_zip,zip_from',
|
||||
'state' => 'required|string',
|
||||
'country' => 'required|string',
|
||||
'tax_rate' => 'required|numeric|min:0.0001'
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue