Merge branch 'master' of https://github.com/bagisto/bagisto into patch-1

This commit is contained in:
Shubham Mehrotra 2020-07-28 18:59:00 +05:30
commit 198d778328
45 changed files with 329 additions and 158 deletions

View File

@ -241,6 +241,8 @@ class DashboardController extends Controller
->addSelect('id', 'customer_id', 'customer_email', 'customer_first_name', 'customer_last_name')
->where('orders.created_at', '>=', $this->startDate)
->where('orders.created_at', '<=', $this->endDate)
->where('orders.status', '<>', 'closed')
->where('orders.status', '<>', 'canceled')
->groupBy('customer_email')
->orderBy('total_base_grand_total', 'DESC')
->limit(5)

View File

@ -108,8 +108,6 @@ class ShipmentController extends Controller
}
$this->validate(request(), [
'shipment.carrier_title' => 'required',
'shipment.track_number' => 'required',
'shipment.source' => 'required',
'shipment.items.*.*' => 'required|numeric|min:0',
]);

View File

@ -16,22 +16,22 @@ class Order
{
/**
* Send new order Mail to the customer and admin
*
*
* @param \Webkul\Sales\Contracts\Order $order
* @return void
*/
public function sendNewOrderMail($order)
{
try {
/* email to customer */
$configKey = 'emails.general.notifications.emails.general.notifications.new-order';
if (core()->getConfigData($configKey)) {
if (core()->getConfigData($configKey))
Mail::queue(new NewOrderNotification($order));
}
/* email to admin */
$configKey = 'emails.general.notifications.emails.general.notifications.new-admin';
if (core()->getConfigData($configKey)) {
app()->setLocale(env('APP_LOCALE'));
Mail::queue(new NewAdminNotification($order));
}
} catch (\Exception $e) {
@ -41,7 +41,7 @@ class Order
/**
* Send new invoice mail to the customer
*
*
* @param \Webkul\Sales\Contracts\Invoice $invoice
* @return void
*/
@ -64,7 +64,7 @@ class Order
/**
* Send new refund mail to the customer
*
*
* @param \Webkul\Sales\Contracts\Refund $refund
* @return void
*/
@ -83,7 +83,7 @@ class Order
/**
* Send new shipment mail to the customer
*
*
* @param \Webkul\Sales\Contracts\Shipment $shipment
* @return void
*/

View File

@ -418,7 +418,7 @@
optionRowCount: 0,
optionRows: [],
show_swatch: "{{ $attribute->type == 'select' ? true : false }}",
swatch_type: "{{ $attribute->swatch_type }}",
swatch_type: "{{ $attribute->swatch_type == '' ? 'dropdown' : $attribute->swatch_type }}",
isNullOptionChecked: false,
idNullOption: null
}

View File

@ -5,9 +5,9 @@
@stop
@section('content-wrapper')
@section('content')
<div class="content full-page">
<div class="content">
{!! view_render_event('admin.customer.addresses.create.before') !!}
<form method="POST" action="{{ route('admin.customer.addresses.store', ['id' => $customer->id]) }}" @submit.prevent="onSubmit">

View File

@ -5,9 +5,9 @@
@stop
@section('content-wrapper')
@section('content')
<div class="content full-page">
<div class="content">
{!! view_render_event('admin.customer.addresses.edit.before', ['address' => $address]) !!}
<form method="post" action="{{ route('admin.customer.addresses.update', $address->id) }}" @submit.prevent="onSubmit">

View File

@ -21,7 +21,8 @@
<div class="page-header">
<div class="page-title">
<h1>
<i class="icon angle-left-icon back-link" @click="redirectBack('{{ url('/admin/dashboard') }}')"></i>
<i class="icon angle-left-icon back-link"
onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
{{ __('admin::app.promotions.cart-rules.add-title') }}
</h1>

View File

@ -26,7 +26,8 @@
<div class="page-header">
<div class="page-title">
<h1>
<i class="icon angle-left-icon back-link" @click="redirectBack('{{ url('/admin/dashboard') }}')"></i>
<i class="icon angle-left-icon back-link"
onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
{{ __('admin::app.promotions.cart-rules.edit-title') }}
</h1>

View File

@ -21,7 +21,8 @@
<div class="page-header">
<div class="page-title">
<h1>
<i class="icon angle-left-icon back-link" @click="redirectBack('{{ url('/admin/dashboard') }}')"></i>
<i class="icon angle-left-icon back-link"
onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
{{ __('admin::app.promotions.catalog-rules.add-title') }}
</h1>

View File

@ -21,7 +21,8 @@
<div class="page-header">
<div class="page-title">
<h1>
<i class="icon angle-left-icon back-link" @click="redirectBack('{{ url('/admin/dashboard') }}')"></i>
<i class="icon angle-left-icon back-link"
onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
{{ __('admin::app.promotions.catalog-rules.edit-title') }}
</h1>

View File

@ -199,20 +199,14 @@
</span>
</div>
<div class="control-group" :class="[errors.has('shipment[carrier_title]') ? 'has-error' : '']" style="margin-top: 40px">
<label for="shipment[carrier_title]" class="required">{{ __('admin::app.sales.shipments.carrier-title') }}</label>
<input type="text" v-validate="'required'" class="control" id="shipment[carrier_title]" name="shipment[carrier_title]" data-vv-as="&quot;{{ __('admin::app.sales.shipments.carrier-title') }}&quot;"/>
<span class="control-error" v-if="errors.has('shipment[carrier_title]')">
@{{ errors.first('shipment[carrier_title]') }}
</span>
<div class="control-group" style="margin-top: 40px">
<label for="shipment[carrier_title]">{{ __('admin::app.sales.shipments.carrier-title') }}</label>
<input type="text" class="control" id="shipment[carrier_title]" name="shipment[carrier_title]"/>
</div>
<div class="control-group" :class="[errors.has('shipment[track_number]') ? 'has-error' : '']">
<label for="shipment[track_number]" class="required">{{ __('admin::app.sales.shipments.tracking-number') }}</label>
<input type="text" v-validate="'required'" class="control" id="shipment[track_number]" name="shipment[track_number]" data-vv-as="&quot;{{ __('admin::app.sales.shipments.tracking-number') }}&quot;"/>
<span class="control-error" v-if="errors.has('shipment[track_number]')">
@{{ errors.first('shipment[track_number]') }}
</span>
<div class="control-group">
<label for="shipment[track_number]">{{ __('admin::app.sales.shipments.tracking-number') }}</label>
<input type="text" class="control" id="shipment[track_number]" name="shipment[track_number]"/>
</div>
</div>
</div>

View File

@ -33,7 +33,7 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra
public function swatch_value_url()
{
if ($this->swatch_value && $this->attribute->swatch_type == 'image') {
return Storage::url($this->swatch_value);
return url('cache/small/'.$this->swatch_value);
}
return;

View File

@ -195,13 +195,13 @@ class Booking extends Virtual
continue;
}
$cartProducts = parent::prepareForCart([
$cartProducts = parent::prepareForCart(array_merge($data, [
'product_id' => $data['product_id'],
'quantity' => $qty,
'booking' => [
'ticket_id' => $ticketId,
],
]);
]));
if (is_string($cartProducts)) {
return $cartProducts;
@ -272,4 +272,4 @@ class Booking extends Virtual
return app($this->bookingHelper->getTypeHepler($bookingProduct->type))->validateCartItem($item);
}
}
}

View File

@ -177,10 +177,9 @@ class CartRule
if ($rule->coupon_type) {
if (strlen($cart->coupon_code)) {
/** @var \Webkul\CartRule\Models\CartRule $rule */
// Laravel relation is used instead of repository for performance
// reasons (cart_rule_coupon-relation is pre-loaded by self::getCartRuleQuery())
$coupon = $rule->cart_rule_coupon;
$coupon = $rule->cart_rule_coupon->where('code', $cart->coupon_code)->first();
if ($coupon && $coupon->code === $cart->coupon_code) {
if ($coupon->usage_limit && $coupon->times_used >= $coupon->usage_limit) {
@ -444,29 +443,34 @@ class CartRule
$cart = Cart::getCart();
foreach ($this->getCartRules() as $rule) {
if (! $this->canProcessRule($cart, $rule)) {
continue;
}
foreach ($cart->items->all() as $item) {
if (! $this->validator->validate($rule, $cart)) {
continue;
}
foreach ($this->getCartRules() as $rule) {
if (! $rule || ! $rule->free_shipping) {
continue;
}
if (! $this->canProcessRule($cart, $rule)) {
continue;
}
$selectedShipping->price = 0;
/* given CartItem instance to the validator */
if (! $this->validator->validate($rule, $item)) {
continue;
}
$selectedShipping->base_price = 0;
if (! $rule || ! $rule->free_shipping) {
continue;
}
$selectedShipping->save();
$selectedShipping->price = 0;
$appliedRuleIds[$rule->id] = $rule->id;
$selectedShipping->base_price = 0;
if ($rule->end_other_rules) {
break;
$selectedShipping->save();
$appliedRuleIds[$rule->id] = $rule->id;
if ($rule->end_other_rules) {
break;
}
}
}

View File

@ -58,7 +58,7 @@ class CoreServiceProvider extends ServiceProvider
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'core');
Event::listen('bagisto.shop.layout.head', static function(ViewRenderEventManager $viewRenderEventManager) {
Event::listen('bagisto.shop.layout.body.after', static function(ViewRenderEventManager $viewRenderEventManager) {
$viewRenderEventManager->addTemplate('core::blade.tracer.style');
});

View File

@ -54,7 +54,7 @@
}
$(this).remove();
})
});
$('.path-hint').on('mouseover', function(e) {
e.stopPropagation();

View File

@ -95,7 +95,7 @@ class Toolbar extends AbstractProduct
$sortBy = core()->getConfigData('catalog.products.storefront.sort_by')
? core()->getConfigData('catalog.products.storefront.sort_by')
: 'created_at-asc';
if ($key == $sortBy) {
return true;
}
@ -155,4 +155,27 @@ class Toolbar extends AbstractProduct
? core()->getConfigData('catalog.products.storefront.mode')
: 'grid';
}
/**
* Returns the view option if mode is set by param then it will overwrite default one and return new mode
*
* @return string
*/
public function getViewOption()
{
/* checking default option first */
$viewOption = core()->getConfigData('catalog.products.storefront.mode');
/* checking mode param if exist then overwrite the default option */
if ($this->isModeActive('grid')) {
$viewOption = 'grid';
}
/* checking mode param if exist then overwrite the default option */
if ($this->isModeActive('list')) {
$viewOption = 'list';
}
return $viewOption;
}
}

View File

@ -111,9 +111,9 @@ class ProductRepository extends Repository
if (core()->getConfigData('catalog.products.storefront.products_per_page')) {
$pages = explode(',', core()->getConfigData('catalog.products.storefront.products_per_page'));
$perPage = isset($params['limit']) ? $params['limit'] : current($pages);
$perPage = isset($params['limit']) ? (!empty($params['limit']) ? $params['limit'] : 9) : current($pages);
} else {
$perPage = isset($params['limit']) ? $params['limit'] : 9;
$perPage = isset($params['limit']) && !empty($params['limit']) ? $params['limit'] : 9;
}
$page = Paginator::resolveCurrentPage('page');
@ -151,17 +151,17 @@ class ProductRepository extends Repository
$orderDirection = 'asc';
if( isset($params['order']) && in_array($params['order'], ['desc', 'asc']) ){
$orderDirection = $params['order'];
} else {
$sortOptions = $this->getDefaultSortByOption();
$orderDirection = !empty($sortOptions) ? $sortOptions[1] : 'asc';
}
if (isset($params['sort'])) {
$attribute = $this->attributeRepository->findOneByField('code', $params['sort']);
if ($attribute) {
if ($attribute->code == 'price') {
$qb->orderBy('min_price', $orderDirection);
} else {
$qb->orderBy($params['sort'] == 'created_at' ? 'product_flat.created_at' : $attribute->code, $orderDirection);
}
$this->checkSortAttributeAndGenerateQuery($qb, $params['sort'], $orderDirection);
} else {
$sortOptions = $this->getDefaultSortByOption();
if (!empty($sortOptions)) {
$this->checkSortAttributeAndGenerateQuery($qb, $sortOptions[0], $orderDirection);
}
}
@ -388,7 +388,7 @@ class ProductRepository extends Repository
->where('product_flat.channel', $channel)
->where('product_flat.locale', $locale)
->whereNotNull('product_flat.url_key')
->where(function($subQuery) use ($term) {
->where(function($subQuery) use ($term) {
$queries = explode('_', $term);
foreach (array_map('trim', $queries) as $value) {
@ -399,7 +399,7 @@ class ProductRepository extends Repository
->orderBy('product_id', 'desc');
})->paginate(16);
}
return $results;
}
@ -453,4 +453,41 @@ class ProductRepository extends Repository
->orderBy('product_id', 'desc');
})->get();
}
/**
* Get default sort by option
*
* @return array
*/
private function getDefaultSortByOption()
{
$value = core()->getConfigData('catalog.products.storefront.sort_by');
$config = $value ? $value : 'name-desc';
return explode('-', $config);
}
/**
* Check sort attribute and generate query
*
* @param object $query
* @param string $sort
* @param string $direction
* @return object
*/
private function checkSortAttributeAndGenerateQuery($query, $sort, $direction)
{
$attribute = $this->attributeRepository->findOneByField('code', $sort);
if ($attribute) {
if ($attribute->code == 'price') {
$query->orderBy('min_price', $direction);
} else {
$query->orderBy($sort == 'created_at' ? 'product_flat.created_at' : $attribute->code, $direction);
}
}
return $query;
}
}

View File

@ -278,7 +278,7 @@ class Bundle extends AbstractType
if (! $bundleOptionProduct->product->getTypeInstance()->isSaleable()) {
continue;
}
if (in_array($option->type, ['multiselect', 'checkbox'])) {
if (! isset($optionPrices[$option->id][0])) {
$optionPrices[$option->id][0] = 0;
@ -315,7 +315,7 @@ class Bundle extends AbstractType
if (! $bundleOptionProduct->product->getTypeInstance()->isSaleable()) {
continue;
}
if (in_array($option->type, ['multiselect', 'checkbox'])) {
if (! isset($optionPrices[$option->id][0])) {
$optionPrices[$option->id][0] = 0;
@ -381,6 +381,25 @@ class Bundle extends AbstractType
];
}
/**
* Get bundle product special price
*
* @return boolean
*/
private function checkBundleProductHaveSpecialPrice()
{
$haveSpecialPrice = false;
foreach ($this->product->bundle_options as $option) {
foreach ($option->bundle_option_products as $index => $bundleOptionProduct) {
if ($bundleOptionProduct->product->getTypeInstance()->haveSpecialPrice()) {
$haveSpecialPrice = true;
break;
}
}
}
return $haveSpecialPrice;
}
/**
* Get product minimal price
*
@ -390,7 +409,12 @@ class Bundle extends AbstractType
{
$prices = $this->getProductPrices();
$priceHtml = '<div class="price-from">';
$priceHtml = '';
if ($this->checkBundleProductHaveSpecialPrice())
$priceHtml .= '<div class="sticker sale">' . trans('shop::app.products.sale') . '</div>';
$priceHtml .= '<div class="price-from">';
if ($prices['from']['regular_price']['price'] != $prices['from']['final_price']['price']) {
$priceHtml .= '<span class="regular-price">' . $prices['from']['regular_price']['formated_price'] . '</span>'

View File

@ -139,6 +139,23 @@ class Grouped extends AbstractType
return min($minPrices);
}
/**
* Get group product special price
*
* @return boolean
*/
private function checkGroupProductHaveSpecialPrice()
{
$haveSpecialPrice = false;
foreach ($this->product->grouped_products as $groupOptionProduct) {
if ($groupOptionProduct->associated_product->getTypeInstance()->haveSpecialPrice()) {
$haveSpecialPrice = true;
break;
}
}
return $haveSpecialPrice;
}
/**
* Get product minimal price
*
@ -146,9 +163,16 @@ class Grouped extends AbstractType
*/
public function getPriceHtml()
{
return '<span class="price-label">' . trans('shop::app.products.starting-at') . '</span>'
. ' '
. '<span class="final-price">' . core()->currency($this->getMinimalPrice()) . '</span>';
$html = '';
if ($this->checkGroupProductHaveSpecialPrice())
$html .= '<div class="sticker sale">' . trans('shop::app.products.sale') . '</div>';
$html .= '<span class="price-label">' . trans('shop::app.products.starting-at') . '</span>'
. ' '
. '<span class="final-price">' . core()->currency($this->getMinimalPrice()) . '</span>';
return $html;
}
/**

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/shop.js": "/js/shop.js?id=d64fdfe9e3fe3e4b9ee4",
"/css/shop.css": "/css/shop.css?id=d5a7b8d843e219c2fa28"
"/css/shop.css": "/css/shop.css?id=72d87fe2508fdcd9f397"
}

View File

@ -3308,6 +3308,10 @@ section.review {
margin-top: 5.5%;
margin-bottom: 5.5%;
a.btn.btn-lg.btn-primary {
float: right;
}
.sidebar {
display: flex;
flex-direction: column;
@ -3564,6 +3568,7 @@ section.review {
}
}
.account-items-list , .edit-form {
margin-top: 20px;
@ -3648,6 +3653,8 @@ section.review {
height: 130px;
float: right;
border-collapse: collapse;
left: 3px;
position: relative;
tr {
@ -4331,6 +4338,10 @@ section.review {
float: left;
}
a.btn.btn-lg.btn-primary {
float: left;
}
.account-item-card {
.media-info .info {
margin-right: 20px;
@ -4584,7 +4595,7 @@ body {
td {
padding: 15px;
min-width: 250px;
min-width: 25px;
max-width: 250px;
line-height: 30px;
vertical-align: top;

View File

@ -579,7 +579,7 @@ return [
'final-summary' => 'Thanks for showing your interest in our store we will send you tracking number once it shipped',
'help' => 'If you need any kind of help please contact us at :support_email',
'thanks' => 'Thanks!',
'comment' => [
'subject' => 'New comment added to your order',
'dear' => 'Dear :customer_name',
@ -618,9 +618,9 @@ return [
'shipment' => [
'heading' => 'Shipment #:shipment_id has been generated for Order #:order_id',
'inventory-heading' => 'New shipment #:shipment_id had been generated for Order #:order_id',
'inventory-heading' => 'New shipment #:shipment_id has been generated for Order #:order_id',
'subject' => 'Shipment for your order #:order_id',
'inventory-subject' => 'New shipment had been generated for Order #:order_id',
'inventory-subject' => 'New shipment has been generated for Order #:order_id',
'summary' => 'Summary of Shipment',
'carrier' => 'Carrier',
'tracking-number' => 'Tracking Number',

View File

@ -180,6 +180,10 @@
} else {
this.$set(this, 'products', this.products.filter(product => product.id != productId));
}
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message }];
this.$root.addFlashMessages();
})
.catch(error => {
console.log("{{ __('velocity::app.error.something_went_wrong') }}");
@ -196,6 +200,10 @@
}
this.setStorageValue('compared_product', updatedItems);
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message }];
this.$root.addFlashMessages();
}
},

View File

@ -46,9 +46,9 @@
@if (in_array($category->display_mode, [null, 'products_only', 'products_and_description']))
<?php $products = $productRepository->getAll($category->id); ?>
@if ($products->count())
@include ('shop::products.list.toolbar')
@include ('shop::products.list.toolbar')
@if ($products->count())
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,24 +0,0 @@
/* flatpickr v4.6.3, @license MIT */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/**
*
*
* @author Jerry Bendy <jerry@icewingcc.com>
* @licence MIT
*
*/

View File

@ -1,4 +1,4 @@
{
"/js/ui.js": "/js/ui.js?id=e5e928de0a10dc274cd5",
"/css/ui.css": "/css/ui.css?id=7a610c96759844d71103"
"/js/ui.js": "/js/ui.js?id=3ccd955983e91b6ccc96",
"/css/ui.css": "/css/ui.css?id=b5bedc0ff04a145ca18a"
}

View File

@ -120,7 +120,7 @@
justify-content: space-between;
align-items: center;
font-size: 14px;
height: 28px;
height: 40px;
border-radius: 2px;
margin-right: 20px;
@ -132,7 +132,7 @@
align-items: center;
background: #E7E7E7;
font-size: 14px;
height: 28px;
height: 40px;
color: #000311;
letter-spacing: -0.22px;
@include border-radius(2px);

View File

@ -35,4 +35,6 @@ return [
'items-per-page' => 'Przedmioty na stronę',
'value-here' => 'Wartość tutaj',
'numeric-value-here' => 'wartość liczbowa tutaj',
'submit' => 'Prześlij'
'submit' => 'Prześlij'
]
];

View File

@ -544,7 +544,7 @@
newParams = '';
for(i = 0; i < this.filters.length; i++) {
if (this.filters[i].column == 'status') {
if (this.filters[i].column == 'status' || this.filters[i].column == 'value_per_locale' || this.filters[i].column == 'value_per_channel' || this.filters[i].column == 'is_unique') {
if (this.filters[i].val.includes("True")) {
this.filters[i].val = 1;
} else if (this.filters[i].val.includes("False")) {

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
{
"/js/velocity.js": "/js/velocity.js?id=226121407d7f6a559c67",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=612d35e452446366eef7",
"/css/velocity.css": "/css/velocity.css?id=8701fa5149428fb74491"
"/css/velocity.css": "/css/velocity.css?id=36aea00f600c674a2a60"
}

View File

@ -691,7 +691,7 @@
.product-quantity {
.quantity {
float: left;
label {
display: none !important;
}
@ -1152,7 +1152,7 @@
input {
display: none;
}
img.preview {
width: 100%;
height: 100%;
@ -2265,6 +2265,7 @@
}
.selective-div {
width: 150px;
-webkit-appearance: none;
}

View File

@ -1,3 +1,4 @@
.vc-small-screen {
display: none !important;
}
@ -30,6 +31,7 @@
}
}
@media only screen and (max-width: 992px) {
}
@ -47,6 +49,36 @@
.footer .currency {
display: block !important;
}
.table {
width: 90%;
margin-bottom: 1rem;
margin-top: 68px;
color: #212529;
}
.per-page {
position: absolute;
margin-top: 66px;
margin-right: -1px;
margin-left: 17px;
width: 151px;
}
.filter-left {
position: relative;
margin-right: -6px!important;
}
.dropdown-filters {
margin-left: 15px;
}
button.btn.btn-sm.btn-primary.apply-filter {
margin-top: 10px;
margin-left: -158px;
}
}
@media only screen and (max-width: 992px) {

View File

@ -776,7 +776,7 @@ a {
}
.scrollable {
max-height: 100vh;
max-height: 100%;
overflow-y: scroll;
scrollbar-width: none;
-ms-overflow-style: none;

View File

@ -251,11 +251,20 @@
href="?locale={{ $locale->code }}"
@endif>
<div class="category-logo">
<img
@if( $locale->code == 'en')
<div class="category-logo">
<img
class="category-icon"
src="{{ asset('/themes/velocity/assets/images/flags/en.png') }}" />
</div>
@else
<div class="category-logo">
<img
class="category-icon"
src="{{ asset('/storage/' . $locale->locale_image) }}" />
</div>
</div>
@endif
<span>
{{ isset($serachQuery) ? $locale->title : $locale->name }}

View File

@ -308,7 +308,7 @@
searchedItem.forEach(item => {
let splitedItem = item.split('=');
updatedSearchedCollection[splitedItem[0]] = splitedItem[1];
updatedSearchedCollection[splitedItem[0]] = decodeURI(splitedItem[1]);
});
if (updatedSearchedCollection['image-search'] == 1) {

View File

@ -498,7 +498,7 @@
name="billing[phone]"
v-validate="'required'"
v-model="address.billing.phone"
@keyup="validateForm('address-form')"
@change="validateForm('address-form')"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.phone') }}&quot;" />
<span class="control-error" v-if="errors.has('address-form.billing[phone]')">

View File

@ -6,7 +6,9 @@
@section('page-detail-wrapper')
@if ($addresses->isEmpty())
<a href="{{ route('customer.address.create') }}" class="theme-btn light unset pull-right">
<a href="{{ route('customer.address.create') }}" class="theme-btn light unset address-button">
{{ __('shop::app.customer.account.address.index.add') }}
</a>
@endif
@ -80,3 +82,19 @@
}
</script>
@endpush
@if ($addresses->isEmpty())
<style>
a#add-address-button {
position: absolute;
margin-top: 92px;
}
.address-button {
position: absolute;
margin-top: 92px;
}
</style>
@endif

View File

@ -81,7 +81,7 @@
class="product-image-container">
<img
loading="lazy"
loading="lazy"
class="card-img-top"
alt="{{ $product->name }}"
src="{{ $productBaseImage['large_image_url'] }}"

View File

@ -8,40 +8,22 @@
<script type="text/x-template" id="toolbar-template">
<div class="toolbar-wrapper" v-if='!isMobile()'>
<div class="view-mode">
@if (
! ($toolbarHelper->isModeActive('grid')
|| $toolbarHelper->isModeActive('list'))
)
<div class="rango-view-grid-container active">
<span class="rango-view-grid fs24"></span>
</div>
@else
@if ($toolbarHelper->isModeActive('grid'))
<div class="rango-view-grid-container active">
<span class="rango-view-grid fs24"></span>
</div>
@else
<div class="rango-view-grid-container">
<a href="{{ $toolbarHelper->getModeUrl('grid') }}" class="grid-view unset">
<span class="rango-view-grid fs24"></span>
</a>
</div>
@endif
@endif
@php
$viewOption = $toolbarHelper->getViewOption();
@endphp
@if ($toolbarHelper->isModeActive('list'))
<div class="rango-view-list-container active">
<div class="rango-view-grid-container {{ $viewOption === 'grid' ? 'active' : '' }}">
<a href="{{ $toolbarHelper->getModeUrl('grid') }}" class="grid-view unset">
<span class="rango-view-grid fs24"></span>
</a>
</div>
<div class="rango-view-list-container {{ $viewOption === 'list' ? 'active' : '' }}">
<a
href="{{ $toolbarHelper->getModeUrl('list') }}"
class="list-view unset">
<span class="rango-view-list fs24"></span>
</div>
@else
<div class="rango-view-list-container">
<a
href="{{ $toolbarHelper->getModeUrl('list') }}"
class="list-view unset">
<span class="rango-view-list fs24"></span>
</a>
</div>
@endif
</a>
</div>
</div>
<div class="sorter">

View File

@ -149,4 +149,26 @@
});
})()
</script>
<script>
$(document).ready(() => {
/* waiting for the window to appear */
let waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
callback();
} else {
setTimeout(function() {waitForEl(selector, callback);}, 100);
}
};
/* positioning when .zoomWindow div available */
waitForEl('.zoomWindow', function() {
if ($('body').hasClass("rtl")) {
let widthOfImage = $('.zoomContainer').width();
$('.zoomWindow').css('right', `${widthOfImage}px`);
}
});
});
</script>
@endpush