merge master and resolve conflicts

This commit is contained in:
Steffen Mahler 2020-02-07 10:44:04 +01:00
commit b94fc9fc8c
112 changed files with 1089 additions and 53462 deletions

View File

@ -1,6 +1,6 @@
APP_NAME=Bagisto
APP_ENV=local
APP_VERSION=0.1.8
APP_VERSION=1.0.0
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

View File

@ -1,6 +1,6 @@
APP_NAME=Laravel
APP_ENV=local
APP_VERSION=0.1.5
APP_VERSION=1.0.0
APP_KEY=base64:G4KY3tUsTaY9ONo1n/QyJvVLQZdJDgbIkSJswFK01HE=
APP_DEBUG=true
APP_URL=http://localhost

View File

@ -2,7 +2,7 @@
#### This changelog consists the bug & security fixes and new features being included in the releases listed below.
## **v0.1.0(28th of January 2020)** - *Release*
## **v1.0.0-BETA1(5th of February 2020)** - *Release*
* [feature] Updated to laravel version 6.

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/admin.js": "/js/admin.js?id=8c0724bfd64081ee94bf",
"/css/admin.css": "/css/admin.css?id=9a8c6ebe5e08965b7ae6"
"/css/admin.css": "/css/admin.css?id=51bad88a58200b49c06a"
}

View File

@ -146,7 +146,7 @@ class AttributeDataGrid extends DataGrid
$this->addMassAction([
'type' => 'delete',
'action' => route('admin.catalog.attributes.massdelete'),
'label' => 'Delete',
'label' => trans('admin::app.datagrid.delete'),
'index' => 'admin_name',
'method' => 'DELETE'
]);

View File

@ -81,7 +81,7 @@ class CMSPageDataGrid extends DataGrid
{
$this->addMassAction([
'type' => 'delete',
'label' => 'Delete',
'label' => trans('admin::app.datagrid.delete'),
'action' => route('admin.cms.mass-delete'),
'method' => 'DELETE'
]);

View File

@ -89,7 +89,7 @@ class CartRuleCouponsDataGrid extends DataGrid
// $this->addMassAction([
// 'type' => 'delete',
// 'action' => route('admin.catalog.attributes.massdelete'),
// 'label' => 'Delete',
// 'label' => trans('admin::app.datagrid.delete'),
// 'method' => 'DELETE'
// ]);
}

View File

@ -161,14 +161,14 @@ class CustomerDataGrid extends DataGrid
{
$this->addMassAction([
'type' => 'delete',
'label' => 'Delete',
'label' => trans('admin::app.datagrid.delete'),
'action' => route('admin.customer.mass-delete'),
'method' => 'PUT',
]);
$this->addMassAction([
'type' => 'update',
'label' => 'Update Status',
'label' => trans('admin::app.datagrid.update-status'),
'action' => route('admin.customer.mass-update'),
'method' => 'PUT',
'options' => [

View File

@ -28,7 +28,7 @@ class CustomerGroupDataGrid extends DataGrid
{
$this->addColumn([
'index' => 'id',
'label' => 'ID',
'label' => trans('admin::app.datagrid.id'),
'type' => 'number',
'searchable' => false,
'sortable' => true,
@ -37,7 +37,7 @@ class CustomerGroupDataGrid extends DataGrid
$this->addColumn([
'index' => 'code',
'label' => 'Code',
'label' => trans('admin::app.datagrid.code'),
'type' => 'string',
'searchable' => false,
'sortable' => true,
@ -46,7 +46,7 @@ class CustomerGroupDataGrid extends DataGrid
$this->addColumn([
'index' => 'name',
'label' => 'Name',
'label' => trans('admin::app.datagrid.name'),
'type' => 'string',
'searchable' => true,
'sortable' => true,

View File

@ -109,14 +109,14 @@ class CustomerReviewDataGrid extends DataGrid
public function prepareMassActions() {
$this->addMassAction([
'type' => 'delete',
'label' => 'Delete',
'label' => trans('admin::app.datagrid.delete'),
'action' => route('admin.customer.review.massdelete'),
'method' => 'DELETE'
]);
$this->addMassAction([
'type' => 'update',
'label' => 'Update Status',
'label' => trans('admin::app.datagrid.update-status'),
'action' => route('admin.customer.review.massupdate'),
'method' => 'PUT',
'options' => [

View File

@ -180,14 +180,14 @@ class ProductDataGrid extends DataGrid
public function prepareMassActions() {
$this->addMassAction([
'type' => 'delete',
'label' => 'Delete',
'label' => trans('admin::app.datagrid.delete'),
'action' => route('admin.catalog.products.massdelete'),
'method' => 'DELETE'
]);
$this->addMassAction([
'type' => 'update',
'label' => 'Update Status',
'label' => trans('admin::app.datagrid.update-status'),
'action' => route('admin.catalog.products.massupdate'),
'method' => 'PUT',
'options' => [

View File

@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Event;
use Webkul\Core\Repositories\CoreConfigRepository;
use Webkul\Core\Tree;
use Illuminate\Support\Facades\Storage;
use Webkul\Admin\Http\Requests\ConfigurationForm;
/**
* Configuration controller
@ -116,16 +117,10 @@ class ConfigurationController extends Controller
* @param \Webkul\Admin\Http\Requests\ConfigurationForm $request
* @return \Illuminate\Http\Response
*/
public function store()
public function store(ConfigurationForm $request)
{
Event::dispatch('core.configuration.save.before');
if (request()->has('general.design.admin_logo.logo_image') && ! request()->input('general.design.admin_logo.logo_image.delete')) {
$this->validate(request(), [
'general.design.admin_logo.logo_image' => 'required|mimes:jpeg,bmp,png,jpg'
]);
}
$this->coreConfigRepository->create(request()->all());
Event::dispatch('core.configuration.save.after');

View File

@ -24,12 +24,20 @@ class ConfigurationForm extends FormRequest
*/
public function rules()
{
$this->rules = [
'sales.*.*.title' => 'required',
'sales.*.*.active' => 'required',
'sales.*.*.order_status' => 'required',
'sales.*.*.file' => 'max:2048',
];
$this->rules = [];
// if (request()->has('sales.orderSettings.order_number')) {
// $this->rules = [
// 'sales.orderSettings.order_number.order_number_prefix' => 'required|regex:/^[a-zA-Z0-9$%^&*@]+$/u',
// 'sales.orderSettings.order_number.order_number_suffix' => 'required|regex:/^[a-zA-Z0-9$%^&*@]+$/u',
// ];
// }
if (request()->has('general.design.admin_logo.logo_image') && ! request()->input('general.design.admin_logo.logo_image.delete')) {
$this->rules = [
'general.design.admin_logo.logo_image' => 'required|mimes:jpeg,bmp,png,jpg'
];
}
return $this->rules;
}
@ -42,9 +50,9 @@ class ConfigurationForm extends FormRequest
public function messages()
{
return [
'sales.*.*.title.required' => 'The title field is required.',
'sales.*.*.active.required' => 'The status field is required.',
'sales.*.*.order_status.required' => 'Order Status field is required',
// 'sales.orderSettings.order_number.order_number_prefix.regex' => 'Invalid format. Can not use #.',
// 'sales.orderSettings.order_number.order_number_suffix.regex' => 'Invalid format. Can not use #.',
'general.design.admin_logo.logo_image.mimes' => 'Invalid file format. Use only jpeg, bmp, png, jpg.'
];
}
}

View File

@ -68,6 +68,8 @@ body {
.dropdown-list {
top: 63px;
right: 0px !important;
bottom: inherit !important;
}
.name {
@ -89,7 +91,7 @@ body {
}
}
.navbar-left {
.navbar-left {
position: fixed;
left: 0;
top: 60px;
@ -98,10 +100,10 @@ body {
border-right: 1px solid rgba(162, 162, 162, 0.2);
height: auto;
bottom: 0;
z-index: 2;
z-index: 2;
background-color: $white;
ul.menubar {
ul.menubar {
// padding-bottom: 60px;
li.menu-item {
padding: 10px 5px;

View File

@ -153,6 +153,7 @@ return [
'refunded' => 'Refunded',
'rtl' => 'RTL',
'ltr' => 'LTR',
'update-status' => 'Update Status'
],
'account' => [

View File

@ -216,6 +216,7 @@ return [
'delete' => 'Delete',
'rtl' => 'RTL',
'ltr' => 'LTR',
'update-status' => 'Update Status'
],
'account' => [
@ -420,7 +421,7 @@ return [
'adjustment-refund' => 'Adjustment Refund',
'adjustment-fee' => 'Adjustment Fee',
'update-qty' => 'Update Quantities',
'invalid-qty' => 'Found invalid quantity for return items.',
'invalid-qty' => 'We found an invalid quantity to refund items.',
'refund-limit-error' => 'The most money available to refund is :amount.',
'refunded' => 'Refunded',
'date' => 'Refund Date',

View File

@ -170,6 +170,7 @@ return [
'refunded' => 'Refunded',
'rtl' => 'RTL',
'ltr' => 'LTR',
'update-status' => 'Update Status'
],
'account' => [

View File

@ -158,6 +158,7 @@ return [
'refunded' => 'Refunded',
'rtl' => 'RTL',
'ltr' => 'LTR',
'update-status' => 'Update Status'
],
'account' => [
'title' => 'Minha Conta',

View File

@ -5,7 +5,7 @@
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.downloadable.links.controls.before', ['product' => $product]) !!}
<div class="section">
<div id="downloadable-link-list-section" class="section">
<div class="secton-title">
<span>{{ __('admin::app.catalog.products.links') }}</span>
</div>
@ -19,7 +19,7 @@
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.downloadable.samples.controls.before', ['product' => $product]) !!}
<div class="section">
<div id="downloadable-sample-list-section" class="section">
<div class="secton-title">
<span>{{ __('admin::app.catalog.products.samples') }}</span>
</div>

View File

@ -268,10 +268,47 @@
data: function() {
return {
variants: variants,
old_variants: @json(old('variants')),
superAttributes: super_attributes
}
},
created: function () {
var index = 0;
for (var key in this.old_variants) {
var variant = this.old_variants[key];
if (key.indexOf('variant_') !== -1) {
var inventories = [];
for (var inventorySourceId in variant['inventories']) {
inventories.push({'qty': variant['inventories'][inventorySourceId], 'inventory_source_id': inventorySourceId})
}
variant['inventories'] = inventories;
variants.push(variant);
} else {
for (var code in variant) {
if (code != 'inventories') {
variants[index][code] = variant[code];
} else {
variants[index][code] = [];
for (var inventorySourceId in variant[code]) {
variants[index][code].push({'qty': variant[code][inventorySourceId], 'inventory_source_id': inventorySourceId})
}
}
}
}
index++;
}
},
methods: {
removeVariant: function(variant) {
let index = this.variants.indexOf(variant)
@ -301,6 +338,7 @@
created: function () {
var this_this = this;
this.inventorySources.forEach(function(inventorySource) {
this_this.inventories[inventorySource.id] = this_this.sourceInventoryQty(inventorySource.id)
this_this.totalQty += parseInt(this_this.inventories[inventorySource.id]);
@ -336,8 +374,11 @@
},
sourceInventoryQty: function (inventorySourceId) {
if (! Array.isArray(this.variant.inventories))
return 0;
var inventories = this.variant.inventories.filter(function(inventory) {
return inventorySourceId === inventory.inventory_source_id;
return inventorySourceId === parseInt(inventory.inventory_source_id);
})
if (inventories.length)
@ -348,6 +389,7 @@
updateTotalQty: function () {
this.totalQty = 0;
for (var key in this.inventories) {
this.totalQty += parseInt(this.inventories[key]);
}

View File

@ -56,7 +56,7 @@
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
<label for="vat_id">{{ __('shop::app.customer.account.address.create.vat_id') }}</label>
<input type="text" class="control" name="vat_id" value="{{ old('vat_id') }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<input type="text" class="control" name="vat_id" v-validate="" value="{{ old('vat_id') }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<span class="control-error" v-if="errors.has('vat_id')">@{{ errors.first('vat_id') }}</span>
</div>

View File

@ -55,7 +55,7 @@
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
<label for="vat_id">{{ __('shop::app.customer.account.address.create.vat_id') }}</label>
<input type="text" class="control" name="vat_id" value="{{ $address->vat_id }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<input type="text" class="control" name="vat_id" v-validate="" value="{{ $address->vat_id }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<span class="control-error" v-if="errors.has('vat_id')">@{{ errors.first('vat_id') }}</span>
</div>

View File

@ -74,9 +74,11 @@
<span class="control-error" v-if="errors.has('root_category_id')">@{{ errors.first('root_category_id') }}</span>
</div>
<div class="control-group">
<div class="control-group" :class="[errors.has('hostname') ? 'has-error' : '']">
<label for="hostname">{{ __('admin::app.settings.channels.hostname') }}</label>
<input class="control" id="hostname" name="hostname" value="{{ old('hostname') }}" placeholder="https://www.example.com"/>
<input class="control" v-validate="''" id="hostname" name="hostname" value="{{ old('hostname') }}" placeholder="https://www.example.com"/>
<span class="control-error" v-if="errors.has('hostname')">@{{ errors.first('hostname') }}</span>
</div>
</div>

View File

@ -78,9 +78,11 @@
<span class="control-error" v-if="errors.has('root_category_id')">@{{ errors.first('root_category_id') }}</span>
</div>
<div class="control-group">
<div class="control-group" :class="[errors.has('hostname') ? 'has-error' : '']">
<label for="hostname">{{ __('admin::app.settings.channels.hostname') }}</label>
<input type="text" class="control" id="hostname" name="hostname" value="{{ $channel->hostname }}" placeholder="https://www.example.com"/>
<input type="text" v-validate="''" class="control" id="hostname" name="hostname" value="{{ $channel->hostname }}" placeholder="https://www.example.com"/>
<span class="control-error" v-if="errors.has('hostname')">@{{ errors.first('hostname') }}</span>
</div>
</div>

View File

@ -1028,10 +1028,13 @@ class Cart
$found = false;
foreach ($wishlistItems as $wishlistItem) {
if ($cartItem->product->getTypeInstance()->compareOptions($cartItem->additional,
$wishlistItem->item_options)) {
$options = $wishlistItem->item_options;
if (! $options)
$options = ['product_id' => $wishlistItem->product_id];
if ($cartItem->product->getTypeInstance()->compareOptions($cartItem->additional, $options))
$found = true;
}
}
if (!$found) {

View File

@ -79,7 +79,8 @@ class ChannelController extends Controller
'favicon.*' => 'mimes:jpeg,jpg,bmp,png',
'seo_title' => 'required|string',
'seo_description' => 'required|string',
'seo_keywords' => 'required|string'
'seo_keywords' => 'required|string',
'hostname' => 'unique:channels,hostname',
]);
$data = request()->all();
@ -138,7 +139,8 @@ class ChannelController extends Controller
'base_currency_id' => 'required',
'root_category_id' => 'required',
'logo.*' => 'mimes:jpeg,jpg,bmp,png',
'favicon.*' => 'mimes:jpeg,jpg,bmp,png'
'favicon.*' => 'mimes:jpeg,jpg,bmp,png',
'hostname' => 'unique:channels,hostname,' . $id,
]);
$data = request()->all();

View File

@ -10,6 +10,7 @@ namespace Webkul\Customer\Rules;
* @see https://raw.githubusercontent.com/danielebarbaro/laravel-vat-eu-validator
*
* @package Danielebarbaro\LaravelVatEuValidator
* @author Vivek Sharma <viveksh047@webkul.com> @vivek-webkul
*/
class VatValidator
{
@ -36,6 +37,7 @@ class VatValidator
'HR' => '\d{11}',
'HU' => '\d{8}',
'IE' => '[A-Z\d]{8}|[A-Z\d]{9}',
'IN' => 'V\d{11}',
'IT' => '\d{11}',
'LT' => '(\d{9}|\d{12})',
'LU' => '\d{8}',
@ -59,14 +61,14 @@ class VatValidator
*/
public function validate(string $vatNumber): bool
{
$country = request()->input('country');
$vatNumber = $this->vatCleaner($vatNumber);
list($country, $number) = $this->splitVat($vatNumber);
if (! isset(self::$pattern_expression[$country])) {
return false;
}
return preg_match('/^' . self::$pattern_expression[$country] . '$/', $number) > 0;
return preg_match('/^' . self::$pattern_expression[$country] . '$/', $vatNumber) > 0;
}
/**
@ -79,17 +81,4 @@ class VatValidator
$vatNumber_no_spaces = trim($vatNumber);
return strtoupper($vatNumber_no_spaces);
}
/**
* @param string $vatNumber
*
* @return array
*/
private function splitVat(string $vatNumber): array
{
return [
substr($vatNumber, 0, 2),
substr($vatNumber, 2),
];
}
}

View File

@ -4,6 +4,7 @@ namespace Webkul\Shop\Http\Controllers;
use Webkul\Customer\Repositories\WishlistRepository;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Checkout\Contracts\Cart as CartModel;
use Cart;
/**
@ -16,13 +17,6 @@ use Cart;
*/
class CartController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* WishlistRepository Repository object
*
@ -55,7 +49,7 @@ class CartController extends Controller
$this->productRepository = $productRepository;
$this->_config = request('_config');
parent::__construct();
}
/**
@ -85,7 +79,7 @@ class CartController extends Controller
return redirect()->back();
}
if ($result instanceof Cart) {
if ($result instanceof CartModel) {
session()->flash('success', trans('shop::app.checkout.cart.item.success'));
if ($customer = auth()->guard('customer')->user())

View File

@ -12,13 +12,6 @@ use Webkul\Category\Repositories\CategoryRepository;
*/
class CategoryController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* CategoryRepository object
*
@ -36,6 +29,6 @@ class CategoryController extends Controller
{
$this->categoryRepository = $categoryRepository;
$this->_config = request('_config');
parent::__construct();
}
}

View File

@ -9,4 +9,21 @@ use Illuminate\Foundation\Validation\ValidatesRequests;
class Controller extends BaseController
{
use DispatchesJobs, ValidatesRequests;
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->_config = request('_config');
}
}

View File

@ -13,13 +13,6 @@ use Webkul\Sales\Repositories\DownloadableLinkPurchasedRepository;
*/
class DownloadableProductController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* DownloadableLinkPurchasedRepository object
*
@ -39,9 +32,9 @@ class DownloadableProductController extends Controller
{
$this->middleware('customer');
$this->_config = request('_config');
$this->downloadableLinkPurchasedRepository = $downloadableLinkPurchasedRepository;
parent::__construct();
}
/**

View File

@ -13,8 +13,6 @@ use Webkul\Core\Repositories\SliderRepository;
*/
class HomeController extends Controller
{
protected $_config;
/**
* SliderRepository object
*
@ -30,9 +28,9 @@ use Webkul\Core\Repositories\SliderRepository;
*/
public function __construct(SliderRepository $sliderRepository)
{
$this->_config = request('_config');
$this->sliderRepository = $sliderRepository;
parent::__construct();
}
/**

View File

@ -19,13 +19,6 @@ use Webkul\Customer\Repositories\CustomerRepository;
*/
class OnepageController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* OrderRepository object
*
@ -54,7 +47,7 @@ class OnepageController extends Controller
$this->customerRepository = $customerRepository;
$this->_config = request('_config');
parent::__construct();
}
/**

View File

@ -15,13 +15,6 @@ use PDF;
*/
class OrderController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* OrderrRepository object
*
@ -50,11 +43,11 @@ class OrderController extends Controller
{
$this->middleware('customer');
$this->_config = request('_config');
$this->orderRepository = $orderRepository;
$this->invoiceRepository = $invoiceRepository;
parent::__construct();
}
/**

View File

@ -16,14 +16,6 @@ use Webkul\Product\Repositories\ProductDownloadableLinkRepository;
*/
class ProductController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* ProductRepository object
*
@ -76,7 +68,7 @@ class ProductController extends Controller
$this->productDownloadableLinkRepository = $productDownloadableLinkRepository;
$this->_config = request('_config');
parent::__construct();
}
/**

View File

@ -9,13 +9,6 @@ use Webkul\Product\Repositories\ProductRepository;
class ProductsCategoriesProxyController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* CategoryRepository object
*
@ -33,17 +26,21 @@ class ProductsCategoriesProxyController extends Controller
/**
* Create a new controller instance.
*
* @param CategoryRepository $categoryRepository
* @param ProductRepository $productRepository
* @param Webkul\Category\Repositories\CategoryRepository $categoryRepository
* @param Webkul\Product\Repositories\ProductRepository $productRepository
*
* @return void
*/
public function __construct(CategoryRepository $categoryRepository, ProductRepository $productRepository)
public function __construct(
CategoryRepository $categoryRepository,
ProductRepository $productRepository
)
{
$this->categoryRepository = $categoryRepository;
$this->productRepository = $productRepository;
$this->_config = request('_config');
parent::__construct();
}
/**

View File

@ -13,13 +13,6 @@ use Webkul\Product\Repositories\ProductReviewRepository;
*/
class ReviewController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* ProductRepository object
*
@ -49,7 +42,7 @@ class ReviewController extends Controller
$this->productReviewRepository = $productReviewRepository;
$this->_config = request('_config');
parent::__construct();
}
/**

View File

@ -12,13 +12,6 @@ use Webkul\Product\Repositories\SearchRepository;
*/
class SearchController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* SearchRepository object
*
@ -34,9 +27,9 @@ use Webkul\Product\Repositories\SearchRepository;
*/
public function __construct(SearchRepository $searchRepository)
{
$this->_config = request('_config');
$this->searchRepository = $searchRepository;
parent::__construct();
}
/**

View File

@ -14,13 +14,6 @@ use Webkul\Core\Repositories\SubscribersListRepository;
*/
class SubscriptionController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* SubscribersListRepository
*
@ -38,7 +31,7 @@ class SubscriptionController extends Controller
{
$this->subscriptionRepository = $subscriptionRepository;
$this->_config = request('_config');
parent::__construct();
}
/**

View File

@ -40,26 +40,20 @@
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.create.last_name') }}</label>
<input value="<?= old('last_name'); ?>" type="text" class="control" name="last_name" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.last_name') }}&quot;">
<input value="{{ old('last_name') }}" type="text" class="control" name="last_name" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.last_name') }}&quot;">
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
</div>
<div class="control-group {!! $errors->has('vat_id') ? 'has-error' : '' !!}">
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
<label for="vat_id">{{ __('shop::app.customer.account.address.create.vat_id') }}</label>
<input type="text" class="control" name="vat_id"
value="<?= old('vat_id'); ?>"
data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<span class="control-error" v-if="{!! $errors->has('vat_id') !!}">
@foreach ($errors->get('vat_id') as $message)
{{ $message }}
@endforeach
</span>
<input type="text" class="control" name="vat_id" value="{{ old('vat_id') }}"
v-validate="''" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<span class="control-error" v-if="errors.has('vat_id')">@{{ errors.first('vat_id') }}</span>
</div>
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
<label for="address_0" class="required">{{ __('shop::app.customer.account.address.create.street-address') }}</label>
<input type="text" class="control" name="address1[]" id="address_0" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.street-address') }}&quot;">
<label for="address1" class="required">{{ __('shop::app.customer.account.address.create.street-address') }}</label>
<input type="text" class="control" name="address1[]" value="<?= old('address1'); ?>" id="address1" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.street-address') }}&quot;">
<span class="control-error" v-if="errors.has('address1[]')">@{{ errors.first('address1[]') }}</span>
</div>

View File

@ -41,21 +41,15 @@
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.create.last_name') }}</label>
<input type="text" class="control" name="last_name" v-validate="'required'" value="{{ $address->last_name }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.last_name') }}&quot;">
<input type="text" class="control" name="last_name" v-validate="'required'" value="{{ old('last_name') ?: $address->last_name }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.last_name') }}&quot;">
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
</div>
<div class="control-group {!! $errors->has('vat_id') ? 'has-error' : '' !!}">
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
<label for="vat_id">{{ __('shop::app.customer.account.address.create.vat_id') }}</label>
<input type="text" class="control" name="vat_id"
value="{{ $address->vat_id }}"
data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<span class="control-error" v-if="{!! $errors->has('vat_id') !!}">
@foreach ($errors->get('vat_id') as $message)
{{ $message }}
@endforeach
</span>
<input type="text" class="control" name="vat_id" value="{{ old('vat_id') ?: $address->vat_id }}"
v-validate="''" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<span class="control-error" v-if="errors.has('vat_id')">@{{ errors.first('vat_id') }}</span>
</div>
<?php $addresses = explode(PHP_EOL, $address->address1); ?>

View File

@ -11,9 +11,30 @@ return [
'edit' => 'هل تريد حقا تحرير هذا :resource?',
],
'zero-index' => 'Index columns can have values greater than zero only',
'no-records' => 'لا توجد سجلات',
'filter-fields-missing' => 'بعض الحقل المطلوب هو لاغ ، رجاء تفقد عمود ، حالة و قيمة صحيح',
'click_on_action' => 'هل تريد حقا أن تؤدي هذا العمل؟',
'search' => 'Search Here...',
'filter' => 'Filter',
'column' => 'Select Column',
'condition' => 'Select Condition',
'contains' => 'Contains',
'ncontains' => 'Does not contains',
'equals' => 'Is Equals to',
'nequals' => 'Is Not equals to',
'greater' => 'Greater than',
'less' => 'Less than',
'greatere' => 'Greater than equals to',
'lesse' => 'Less than equals to',
'value' => 'Select Value',
'true' => 'True / Active',
'false' => 'False / Inactive',
'between' => 'Is between',
'apply' => 'Apply',
'items-per-page' => 'Items Per Page',
'value-here' => 'Value here',
'numeric-value-here' => 'Numeric Value here',
'submit' => 'Submit'
]
];

View File

@ -1,9 +1,5 @@
<?php
return [
'one-col' => '<div class="mt-10">Use class: <b>"static-container one-column"</b> for one column layout.</div>',
'two-col' => '<div class="mt-10">Use class: <b>"static-container two-column"</b> for two column layout.</div>',
'three-col' => '<div class="mt-10">Use class: <b>"static-container three-column"</b> for three column layout.</div>',
'helper-classes' => 'Helper Classes',
'datagrid' => [
'actions' => 'Actions',
'id' => 'Index columns have value greater than zero only',
@ -37,5 +33,8 @@ return [
'between' => 'Is between',
'apply' => 'Apply',
'items-per-page' => 'Items Per Page',
'value-here' => 'Value here',
'numeric-value-here' => 'Numeric Value here',
'submit' => 'Submit'
]
];

View File

@ -33,5 +33,8 @@ return [
'between' => 'ما بین',
'apply' => 'درخواست',
'items-per-page' => 'Items Per Page',
'value-here' => 'Value here',
'numeric-value-here' => 'Numeric Value here',
'submit' => 'Submit'
]
];

View File

@ -33,5 +33,8 @@ return [
'between' => 'Está entre',
'apply' => 'Aplicar',
'items-per-page' => 'Items Per Page',
'value-here' => 'Value here',
'numeric-value-here' => 'Numeric Value here',
'submit' => 'Submit'
]
];

View File

@ -25,7 +25,9 @@
</select>
</div>
<input type="submit" class="btn btn-sm btn-primary" style="margin-left: 10px;">
<button type="submit" class="btn btn-sm btn-primary" style="margin-left: 10px;">
{{ __('ui::app.datagrid.submit') }}
</button>
</form>
</div>
</th>

View File

@ -58,7 +58,7 @@
{{-- Response fields based on the type of columns to be filtered --}}
<li v-if='stringCondition != null'>
<div class="control-group">
<input type="text" class="control response-string" placeholder="Value here" v-model="stringValue" />
<input type="text" class="control response-string" placeholder="{{ __('ui::app.datagrid.value-here') }}" v-model="stringValue" />
</div>
</li>
@ -79,7 +79,7 @@
<li v-if='numberCondition != null'>
<div class="control-group">
<input type="number" class="control response-number" placeholder="Numeric Value here" v-model="numberValue"/>
<input type="number" class="control response-number" placeholder="{{ __('ui::app.datagrid.numeric-value-here') }}" v-model="numberValue"/>
</div>
</li>

File diff suppressed because one or more lines are too long

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,5 +1,5 @@
{
"/js/velocity.js": "/js/velocity.js",
"/css/velocity.css": "/css/velocity.css",
"/css/velocity-admin.css": "/css/velocity-admin.css"
"/js/velocity.js": "/js/velocity.js?id=65a146da75db9d89424d",
"/css/velocity.css": "/css/velocity.css?id=b10c5f40830f0e5a94e7",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=612d35e452446366eef7"
}

View File

@ -20,7 +20,7 @@ class CategoryDataGrid extends DataGrid
public function prepareQueryBuilder()
{
$defaultChannel = core()->getCurrentChannel();
$queryBuilder = DB::table('velocity_category as v_cat')
->select('v_cat.id as category_menu_id', 'v_cat.category_id', 'ct.name', 'v_cat.icon', 'v_cat.tooltip', 'v_cat.status')
->leftJoin('categories as c', 'c.id', '=', 'v_cat.category_id')
@ -109,7 +109,7 @@ class CategoryDataGrid extends DataGrid
$this->addMassAction([
'type' => 'delete',
'action' => route('velocity.admin.category.mass-delete'),
'label' => 'Delete',
'label' => trans('admin::app.datagrid.delete'),
'method' => 'DELETE'
]);
}

View File

@ -84,12 +84,14 @@ class ContentDataGrid extends DataGrid
'searchable' => true,
'filterable' => true,
'wrapper' => function($value) {
if ($value->content_type == 'link')
if ($value->content_type == 'category')
return 'Category Slug';
else if ($value->content_type == 'link')
return 'Link';
else if ($value->content_type == 'product')
return 'Product';
else if ($value->content_type == 'static')
return 'Static';
return 'Static';
}
]);
}
@ -116,7 +118,7 @@ class ContentDataGrid extends DataGrid
$this->addMassAction([
'type' => 'delete',
'action' => route('velocity.admin.content.mass-delete'),
'label' => 'Delete',
'label' => trans('admin::app.datagrid.delete'),
'method' => 'DELETE'
]);
}

View File

@ -1,39 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateVelocityCategoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('velocity_category', function (Blueprint $table) {
$table->increments('id');
$table->integer('category_id')->unsigned()->nullable();
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
$table->string('icon', 250)->nullable();
$table->string('tooltip', 250)->nullable();
$table->boolean('status')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('velocity_category');
}
}

View File

@ -24,11 +24,7 @@ class VelocityMetaDataSeeder extends Seeder
'subscription_bar_content' => '<div class="social-icons col-lg-6"><a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-facebook" title="facebook"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-twitter" title="twitter"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-linked-in" title="linkedin"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-pintrest" title="Pinterest"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-youtube" title="Youtube"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-instagram" title="instagram"></i></a></div>',
'product_policy' => '<div class="row col-12 remove-padding-margin"><div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-van-ship fs40"></i></div> <div class="right"><span class="font-setting fs20">Free Shippingon Order $20 or More</span></div></div></div></div> <div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-exchnage fs40"></i></div> <div class="right"><span class="font-setting fs20">ProductReplace &amp; Return Available </span></div></div></div></div> <div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-exchnage fs40"></i></div> <div class="right"><span class="font-setting fs20">ProductExchange and EMI Available </span></div></div></div></div></div>',
]);
DB::table('locales')->where('code', 'en')->update([
'locale_image' => '/themes/velocity/assets/images/flags/en.png'
'product_policy' => '<div class="row col-12 remove-padding-margin"><div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-van-ship fs40"></i></div> <div class="right"><span class="font-setting fs20">Free Shipping on Order $20 or More</span></div></div></div></div> <div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-exchnage fs40"></i></div> <div class="right"><span class="font-setting fs20">Product Replace &amp; Return Available </span></div></div></div></div> <div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-exchnage fs40"></i></div> <div class="right"><span class="font-setting fs20">Product Exchange and EMI Available </span></div></div></div></div></div>',
]);
}
}

View File

@ -32,11 +32,20 @@ class AdminHelper
return $locale;
}
public function storeCategoryIcon($categoryId)
public function storeCategoryIcon($category)
{
$category = $this->categoryRepository->findOrFail($categoryId);
$oldPath = null;
$iconName = 'category_icon_path.image_1';
$uploadedImagePath = $this->uploadImage($category, 'category_icon_path.image_1');
if (gettype($category) !== "object") {
// getting id on update
$iconName = 'category_icon_path.image_0';
$category = $this->categoryRepository->findOrFail($category);
$oldPath = $category->category_icon_path;
}
$uploadedImagePath = $this->uploadImage($category, $iconName, $oldPath);
if ($uploadedImagePath) {
$category->category_icon_path = $uploadedImagePath;
@ -46,7 +55,7 @@ class AdminHelper
return $category;
}
public function uploadImage($record, $type)
public function uploadImage($record, $type, $oldPath = null)
{
$request = request();
@ -55,11 +64,8 @@ class AdminHelper
$dir = 'velocity/' . $type;
if ($request->hasFile($file)) {
if ($type == 'locale_image.image_0' && $record->locale_image) {
Storage::delete($record->locale_image);
}
if ($type == 'category_icon_path.image_1' && $record->category_icon_path) {
Storage::delete($record->category_icon_path);
if ($oldPath) {
Storage::delete($oldPath);
}
$image = $request->file($file)->store($dir);

View File

@ -68,14 +68,17 @@ class ConfigurationController extends Controller
}
}
foreach ($params['product_view_images'] as $index => $productViewImage) {
if ($productViewImage !== "") {
$params['product_view_images'][$index] = $this->uploadImage($productViewImage, $index);
if (isset($params['product_view_images'])) {
foreach ($params['product_view_images'] as $index => $productViewImage) {
if ($productViewImage !== "") {
$params['product_view_images'][$index] = $this->uploadImage($productViewImage, $index);
}
}
$params['product_view_images'] = json_encode($params['product_view_images']);
}
$params['advertisement'] = json_encode($params['advertisement']);
$params['product_view_images'] = json_encode($params['product_view_images']);
$params['home_page_content'] = str_replace('=&gt;', '=>', $params['home_page_content']);
unset($params['images']);

View File

@ -9,7 +9,7 @@ use Webkul\Product\Repositories\ProductRepository;
use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRepository;
/**
* Search controller
* Shop controller
*
* @author Shubham Mehrotra <shubhammehrotra.symfony@webkul.com> @shubhwebkul
* @copyright 2019 Webkul Software Pvt Ltd (http://www.webkul.com)
@ -95,7 +95,8 @@ use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRep
];
} else {
$response = [
'status' => false
'status' => false,
'slug' => $slug,
];
}
@ -176,6 +177,22 @@ use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRep
];
}
public function fetchFancyCategoryDetails($slug)
{
$categoryDetails = app('Webkul\Category\Repositories\CategoryRepository')->findByPath($slug);
if ($categoryDetails) {
$response = [
'status' => true,
'categoryDetails' => $this->getCategoryFilteredData($categoryDetails)
];
}
return $response ?? [
'status' => false,
];
}
private function getCategoryFilteredData($category)
{
$formattedChildCategory = [];
@ -209,7 +226,7 @@ use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRep
'firstReviewText' => trans('velocity::app.products.be-first-review'),
'addToCartHtml' => view('shop::products.add-to-cart', [
'product' => $product,
'addWishlistClass' => !(isset($list) && $list) ? 'col-lg-4 col-md-4 col-sm-12 offset-lg-4 pr0' : '',
'addWishlistClass' => !(isset($list) && $list) ? '' : '',
'addToCartBtnClass' => !(isset($list) && $list) ? $addToCartBtnClass ?? '' : ''
])->render(),
];

View File

@ -12,5 +12,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
Route::get('/categories', 'ShopController@fetchCategories')->name('velocity.categoriest');
Route::get('/category-details', 'ShopController@categoryDetails')->name('velocity.category.details');
Route::get('/fancy-category-details/{slug}', 'ShopController@fetchFancyCategoryDetails')->name('velocity.fancy.category.details');
});
});

View File

@ -70,9 +70,9 @@ class VelocityServiceProvider extends ServiceProvider
*/
protected function registerConfig()
{
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/system.php', 'core'
);
// $this->mergeConfigFrom(
// dirname(__DIR__) . '/Config/system.php', 'core'
// );
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin'

View File

@ -122,7 +122,7 @@ class ContentRepository extends Repository
{
$query = $this->model::orderBy('position', 'ASC');
$content = $query
$contentCollection = $query
->select('velocity_contents.*', 'velocity_contents_translations.*')
->where('velocity_contents.status', 1)
->leftJoin('velocity_contents_translations', 'velocity_contents.id', 'velocity_contents_translations.content_id')
@ -131,6 +131,16 @@ class ContentRepository extends Repository
->limit(5)
->get();
return $content;
$formattedContent = [];
foreach ($contentCollection as $content) {
array_push($formattedContent, [
'title' => $content->title,
'page_link' => $content->page_link,
'link_target' => $content->link_target,
'content_type' => $content->content_type,
]);
}
return $formattedContent;
}
}

View File

@ -3,10 +3,35 @@
namespace Webkul\Velocity\Repositories\Product;
use Webkul\Core\Eloquent\Repository;
use Illuminate\Container\Container as App;
use Webkul\Product\Repositories\ProductFlatRepository;
use Webkul\Attribute\Repositories\AttributeRepository;
class ProductRepository extends Repository
{
/**
* AttributeRepository object
*
* @var array
*/
protected $attributeRepository;
/**
* Create a new controller instance.
*
* @param Webkul\Attribute\Repositories\AttributeRepository $attributeRepository
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
App $app
)
{
$this->attributeRepository = $attributeRepository;
parent::__construct($app);
}
/**
* Specify Model class name
*
@ -78,30 +103,85 @@ class ProductRepository extends Repository
$term = $params['term'];
$categoryId = $params['category'];
$results = app(ProductFlatRepository::class)->scopeQuery(function($query) use($term, $categoryId) {
$results = app(ProductFlatRepository::class)->scopeQuery(function($query) use($term, $categoryId, $params) {
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
$locale = request()->get('locale') ?: app()->getLocale();
$query = $query->distinct()
->addSelect('product_flat.*')
->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
->leftJoin('product_categories', 'products.id', '=', 'product_categories.product_id')
->where('product_flat.status', 1)
->where('product_flat.visible_individually', 1)
->where('product_flat.channel', $channel)
->where('product_flat.locale', $locale)
->whereNotNull('product_flat.url_key')
->where('product_flat.name', 'like', '%' . urldecode($term) . '%')
->orderBy('product_id', 'desc');
->whereNotNull('product_flat.url_key');
if ( $term )
$query->where('product_flat.name', 'like', '%' . urldecode($term) . '%');
if ($categoryId && $categoryId !== "") {
$query = $query
->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
->leftJoin('product_categories', 'products.id', '=', 'product_categories.product_id')
->where('product_categories.category_id', $categoryId);
$query = $query->where('product_categories.category_id', $categoryId);
}
return $query;
})->paginate(16);
if (isset($params['sort'])) {
$attribute = $this->attributeRepository->findOneByField('code', $params['sort']);
if ($params['sort'] == 'price') {
if ($attribute->code == 'price') {
$query->orderBy('min_price', $params['order']);
} else {
$query->orderBy($attribute->code, $params['order']);
}
} else {
$query->orderBy($params['sort'] == 'created_at' ? 'product_flat.created_at' : $attribute->code, $params['order']);
}
}
$query = $query->leftJoin('products as variants', 'products.id', '=', 'variants.parent_id');
$query = $query->where(function($query1) use($query) {
$aliases = [
'products' => 'filter_',
'variants' => 'variant_filter_'
];
foreach($aliases as $table => $alias) {
$query1 = $query1->orWhere(function($query2) use ($query, $table, $alias) {
foreach ($this->attributeRepository->getProductDefaultAttributes(array_keys(request()->input())) as $code => $attribute) {
$aliasTemp = $alias . $attribute->code;
$query = $query->leftJoin('product_attribute_values as ' . $aliasTemp, $table . '.id', '=', $aliasTemp . '.product_id');
$column = ProductAttributeValue::$attributeTypeFields[$attribute->type];
$temp = explode(',', request()->get($attribute->code));
if ($attribute->type != 'price') {
$query2 = $query2->where($aliasTemp . '.attribute_id', $attribute->id);
$query2 = $query2->where(function($query3) use($aliasTemp, $column, $temp) {
foreach($temp as $code => $filterValue) {
if (! is_numeric($filterValue))
continue;
$columns = $aliasTemp . '.' . $column;
$query3 = $query3->orwhereRaw("find_in_set($filterValue, $columns)");
}
});
} else {
$query2->where('product_flat.min_price', '>=', core()->convertToBasePrice(current($temp)))
->where('product_flat.min_price', '<=', core()->convertToBasePrice(end($temp)));
}
}
});
}
});
return $query->groupBy('product_flat.id');
})->paginate(isset($params['limit']) ? $params['limit'] : 9);
return $results;
}

View File

@ -1,5 +1,6 @@
<template>
<carousel
:id="id"
:navigationEnabled="true"
:paginationEnabled="true"
:perPage="parseInt(slidesPerPage)"

View File

@ -34,9 +34,11 @@
<a :href="`${baseUrl}/${product.slug}`" :title="product.name" class="product-image-container">
<img
loading="lazy"
:src="product.image"
:alt="product.name"
class="card-img-top">
:src="product.image"
:data-src="product.image"
class="card-img-top lzy_img" />
<!-- :src="`${$root.baseUrl}/vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png`" /> -->
<!-- <quick-view-btn details="{{ $product }}"></quick-view-btn> -->
</a>

View File

@ -50,11 +50,12 @@ $(document).ready(function () {
Vue.mixin({
data: function () {
return {
'baseUrl': document.querySelector("script[src$='velocity.js']").getAttribute('baseurl'),
'baseUrl': document.querySelector("script[src$='velocity.js']").getAttribute('baseUrl'),
'navContainer': false,
'responsiveSidebarTemplate': '',
'responsiveSidebarKey': Math.random(),
'sharedRootCategories': [],
'imageObserver': null,
}
},
@ -174,10 +175,13 @@ $(document).ready(function () {
},
mounted: function () {
// this.addServerErrors();
document.body.style.display = "block";
this.$validator.localize(document.documentElement.lang);
this.loadCategories();
this.addIntersectionObserver();
},
methods: {
@ -257,10 +261,22 @@ $(document).ready(function () {
.catch(error => {
console.log('failed to load categories');
})
},
addIntersectionObserver: function () {
this.imageObserver = new IntersectionObserver((entries, imgObserver) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
const lazyImage = entry.target
lazyImage.src = lazyImage.dataset.src
}
})
});
}
}
});
// for compilation of html coming from server
Vue.component('vnode-injector', {
functional: true,
props: ['nodes'],

View File

@ -220,6 +220,26 @@ body {
.modal-footer {
justify-content: unset;
}
.modal-content {
padding: 0;
ul {
li {
&:hover {
background-color: $border-light;
}
a {
padding: 10px 20px;
}
&:last-child {
margin-bottom: 5px;
}
}
}
}
}
}
@ -290,6 +310,7 @@ body {
.no-padding {
padding: 0px !important;
cursor: default;
}
.btn-normal {
@ -374,7 +395,6 @@ header {
height: 40px;
margin: 5px 0px;
background: $white-color;
padding: 4px 1px 0px 0px;
* {
height: 100%;
@ -391,6 +411,8 @@ header {
right: 8px;
z-index: 10;
font-size: 18px;
background-color: $white-color;
height: 20px;
}
}
@ -455,7 +477,7 @@ header {
.mini-cart-container {
height: 50px;
padding: 5px 22px;
padding: 5px 17px;
#mini-cart {
.mini-cart-content {

View File

@ -125,6 +125,10 @@
color: $font-color;
background-color: white;
}
.down-icon-position {
pointer-events: none;
background-color: $white-color;
}
}
> div:not(:first-child) {
@ -270,17 +274,34 @@
}
}
.cart-wish-wrap {
.wishlist-icon {
height: 38px;
display: table;
text-align: right;
.wishlist-icon {
height: 38px;
display: table;
text-align: right;
> i {
display: table-cell;
vertical-align: middle;
> i {
display: table-cell;
vertical-align: middle;
}
}
.add-to-cart-btn {
width: 100%;
position: relative;
padding-right: 35px;
.btn-add-to-cart {
max-width: 140px;
&.small-padding {
max-width: 130px;
}
}
~ .wishlist-icon {
right: 10px;
position: absolute;
}
}
}
@ -442,6 +463,8 @@
.customer-session {
padding: 10px 20px 0 20px;
label {
font-size: 18px;
color: $light-grey-clr;
@ -967,6 +990,25 @@
}
}
}
.filter-row-two {
.filter-tag {
.cross-icon {
@extend .rango-default;
&::before {
top: 1px;
content: "\e91f";
margin-left: 4px;
position: relative;
}
&:hover {
cursor: pointer;
}
}
}
}
}
.account-items-list {
@ -1194,6 +1236,8 @@
}
.order-summary-container {
top: 75px;
.theme-btn {
display: none;
}
@ -1348,8 +1392,10 @@
}
.order-summary-container {
top: 50px;
padding-top: 25px;
height: max-content;
position: sticky !important;
max-width: 500px !important;
> div {
@ -1589,10 +1635,8 @@
li {
a {
padding: 7px 0 5px 15px;
}
&:hover {
> a {
&:hover {
background: $border-light;
}
}
@ -1850,14 +1894,12 @@
padding: 40px 15px !important;
.hero-image {
height: 100%;
max-width: 500px;
max-height: 400px;
display: inline-block;
img {
width: 100%;
height: 100%;
margin-bottom: 30px;
}
}
}
@ -1935,6 +1977,8 @@
}
.slides-container {
position: relative;
.VueCarousel-pagination {
bottom: 10px;
position: absolute;
@ -1959,6 +2003,25 @@
padding-top: 0;
}
.VueCarousel-slide {
position: relative;
.show-content {
top: 0;
left: 0;
width: 100%;
height: 100%;
display: table;
text-align: center;
position: absolute;
p {
display: table-cell;
vertical-align: middle;
}
}
}
.VueCarousel-slide:not(:nth-of-type(1)) {
img {
display: none;

View File

@ -175,24 +175,24 @@
left: 15px;
z-index: 99;
padding: 0px;
overflow: hidden;
margin-top: 10px;
position: relative;
.arrow {
left: 0px;
height: 100%;
z-index: 1001;
opacity: 0.50;
margin-top: 5px;
cursor: pointer;
position: absolute;
line-height: 13em;
background: $border-dark;
&.left {
left: 0px;
line-height: 10em;
}
&.right {
right: 0px;
right: 0;
left: unset;
line-height: 13rem;
}
}
@ -235,7 +235,7 @@
height: 100%;
position: relative;
.left {
> .left {
top: 60px;
padding: 0px;
position: sticky;

View File

@ -703,6 +703,12 @@ select:focus,
.control-error {
color: $color-danger;
}
.mandatory::after {
content: "*";
font-size: 16px;
margin-left: -1px;
color: $color-danger;
}
a {
&.default {
@ -783,6 +789,7 @@ button[disabled] {
right: 10px;
font-size: 16px;
position: absolute;
pointer-events: none;
}
}
}

View File

@ -59,7 +59,7 @@ return [
'autocomplete' => '[Autocomplete]',
'search-hint' => 'Search product here...',
'no-result-found' => 'No record found.',
'mass-delete-success' => 'Success: Selected conent(s) deleted successfully.',
'mass-delete-success' => 'Selected content deleted successfully.',
'tab' => [
'page' => 'Page Setting',
'content' => 'Content Setting',
@ -75,6 +75,7 @@ return [
'custom-title' => 'Custom Title',
'custom-heading' => 'Custom Heading',
'page-link' => 'Page Link [e.g. http://example.com/../../]',
'category-slug' => 'Category Slug',
'link-target' => 'Page Link Target',
'catalog-type' => 'Product Catalog Type',
'custom-product' => 'Store Products',
@ -130,7 +131,7 @@ return [
'status' => 'Status',
'active' => 'Active',
'inactive' => 'Inactive',
'mass-delete-success' => 'Success: Selected categories menu deleted successfully.',
'mass-delete-success' => 'Selected categories menu deleted successfully.',
],
'general' => [
'locale_logo' => 'Locale Logo',
@ -229,6 +230,7 @@ return [
'write-your-review' => 'Write Your Review',
'quick-view' => 'Quick View',
'recently-viewed' => 'Recently Viewed Products',
'not-available' => 'Not Available',
'review-by' => 'Review by',
'be-first-review' => 'Be the first to write a review',
'submit-review' => 'Submit Review',

View File

@ -0,0 +1,38 @@
{!! view_render_event('bagisto.admin.content.create_form_accordian.content.link.before') !!}
<div class="control-group" :class="[errors.has('page_link') ? 'has-error' : '']">
<label for="page_link" class="required">
{{ __('velocity::app.admin.contents.content.category-slug') }}
</label>
<input
type="text"
id="page_link"
class="control"
name="page_link"
v-validate="'required|max:150'"
value="{{ isset($locale) ? (old($locale)['page_link'] ?? $content->translate($locale)['page_link']) : '' }}"
data-vv-as="&quot;{{ __('velocity::app.admin.contents.content.page-link') }}&quot;" />
<span class="control-error" v-if="errors.has('page_link')">
@{{ errors.first('page_link') }}
</span>
</div>
<div class="control-group">
<label for="link_target">
{{ __('velocity::app.admin.contents.content.link-target') }}
</label>
<select class="control" id="link_target" name="link_target" value="">
<option value="0">
{{ __('velocity::app.admin.contents.self') }}
</option>
<option value="1">
{{ __('velocity::app.admin.contents.new-tab') }}
</option>
</select>
</div>
{!! view_render_event('bagisto.admin.content.create_form_accordian.content.link.after') !!}

View File

@ -6,7 +6,7 @@
@push('scripts')
<script type="text/x-template" id="catalog-product-template">
<div>
<?php $catalogType = old($locale)['catalog_type'] ?: $content->translate($locale)['catalog_type']; ?>
<?php $catalogType = old($locale)['catalog_type'] ?? $content->translate($locale)['catalog_type']; ?>
<div class="control-group" :class="[errors.has('{{$locale}}[catalog_type]') ? 'has-error' : '']">
<label for="catalog_type" class="required">

View File

@ -56,12 +56,12 @@
<div class="control-group" :class="[errors.has('status') ? 'has-error' : '']">
<label for="status" class="required">{{ __('velocity::app.admin.contents.page.status') }}</label>
<select class="control" v-validate="'required'" id="status" name="status" data-vv-as="&quot;{{ __('velocity::app.admin.contents.page.status') }}&quot;">
<option value="0">
{{ __('velocity::app.admin.contents.inactive') }}
</option>
<option value="1">
{{ __('velocity::app.admin.contents.active') }}
</option>
<option value="0">
{{ __('velocity::app.admin.contents.inactive') }}
</option>
</select>
<span class="control-error" v-if="errors.has('status')">@{{ errors.first('status') }}</span>
</div>
@ -141,11 +141,14 @@
<div v-else-if="content_type == 'static'">
@include ('velocity::admin.content.content-type.static')
</div>
<div v-else-if="content_type == 'category'">
@include ('velocity::admin.content.content-type.category')
</div>
</div>
</script>
<script>
<script type="text/javascript">
Vue.component('content-type', {
template: '#content-type-template',
@ -158,10 +161,9 @@
},
methods: {
loadFields(event) {
var thisthis = this;
thisthis.content_type = event.target.value;
this.content_type = event.target.value;
if ( thisthis.content_type == 'static') {
if (this.content_type == 'static') {
$(document).ready(function () {
tinymce.init({
selector: 'textarea#description',

View File

@ -59,7 +59,7 @@
{{ __('velocity::app.admin.contents.page.title') }}
<span class="locale">[{{ $locale }}]</span>
</label>
<input type="text" v-validate="'required|max:100'" class="control" id="title" name="{{$locale}}[title]" value="{{ old($locale)['title'] ?: $content->translate($locale)['title'] }}" data-vv-as="&quot;{{ __('velocity::app.admin.contents.page.title') }}&quot;"/>
<input type="text" v-validate="'required|max:100'" class="control" id="title" name="{{$locale}}[title]" value="{{ old($locale)['title'] ?? $content->translate($locale)['title'] }}" data-vv-as="&quot;{{ __('velocity::app.admin.contents.page.title') }}&quot;"/>
<span class="control-error" v-if="errors.has('{{$locale}}[title]')">@{{ errors.first('{!!$locale!!}[title]') }}</span>
</div>
@ -68,7 +68,7 @@
<label for="position" class="required">
{{ __('velocity::app.admin.contents.page.position') }}</span>
</label>
<input type="text" v-validate="'required|numeric|max:2'" class="control" id="position" name="position" value="{{ old('position') ?: $content->position }}" data-vv-as="&quot;{{ __('velocity::app.admin.contents.page.position') }}&quot;"/>
<input type="text" v-validate="'required|numeric|max:2'" class="control" id="position" name="position" value="{{ old('position') ?? $content->position }}" data-vv-as="&quot;{{ __('velocity::app.admin.contents.page.position') }}&quot;"/>
<span class="control-error" v-if="errors.has('position')">@{{ errors.first('position') }}</span>
</div>
@ -132,7 +132,7 @@
id="custom_title"
v-validate="'max:100'"
name="{{$locale}}[custom_title]"
value="{{ old($locale)['custom_title'] ?: $content->translate($locale)['custom_title'] }}"
value="{{ old($locale)['custom_title'] ?? ($content->translate($locale)['custom_title'] ?? '') }}"
data-vv-as="&quot;{{ __('velocity::app.admin.contents.content.custom-title') }}&quot;" />
<span
@ -154,7 +154,7 @@
id="custom_heading"
v-validate="'max:100'"
name="{{$locale}}[custom_heading]"
value="{{ old($locale)['custom_heading'] ?: $content->translate($locale)['custom_title'] }}" data-vv-as="&quot;{{ __('velocity::app.admin.contents.content.custom-heading') }}&quot;" />
value="{{ old($locale)['custom_heading'] ?? $content->translate($locale)['custom_title'] }}" data-vv-as="&quot;{{ __('velocity::app.admin.contents.content.custom-heading') }}&quot;" />
<span
class="control-error"
@ -217,7 +217,7 @@
class="control"
name="{{$locale}}[page_link]"
v-validate="'required|max:150'"
value="{{ old($locale)['page_link'] ?: $content->translate($locale)['page_link'] }}"
value="{{ old($locale)['page_link'] ?? $content->translate($locale)['page_link'] }}"
data-vv-as="&quot;{{ __('velocity::app.admin.contents.content.page-link') }}&quot;" />
<span
@ -264,7 +264,7 @@
v-validate="'required'"
name="{{$locale}}[description]"
data-vv-as="&quot;{{ __('velocity::app.admin.contents.content.static-description') }}&quot;">
{{ old($locale)['description'] ?: $content->translate($locale)['description'] }}
{{ old($locale)['description'] ?? $content->translate($locale)['description'] }}
</textarea>
<span
@ -276,6 +276,10 @@
{!! view_render_event('bagisto.admin.content.edit_form_accordian.content.static.after', ['content' => $content]) !!}
</div>
<div v-else-if="content_type == 'category'">
@include ('velocity::admin.content.content-type.category')
</div>
</div>
</script>

View File

@ -130,22 +130,22 @@
</image-wrapper>
</div>
<div class="control-group">
{{-- <div class="control-group">
<label>{{ __('velocity::app.admin.meta-data.advertisement-one') }}</label>
<image-wrapper
:button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'"
input-name="images[1]">
</image-wrapper>
</div>
</div> --}}
<div class="control-group product-view-image">
{{-- <div class="control-group product-view-image">
<label>{{ __('velocity::app.admin.meta-data.product-view-image') }}</label>
<image-wrapper
input-name="product_view_images">
</image-wrapper>
</div>
</div> --}}
</div>
</accordian>

View File

@ -130,7 +130,7 @@
name="term"
type="search"
class="form-control"
:value="searchedQuery.term"
:value="searchedQuery.term ? searchedQuery.term.split('+').join(' ') : ''"
placeholder="{{ __('velocity::app.header.search-text') }}" />
<button class="btn" type="submit" id="header-search-icon">
@ -503,7 +503,7 @@
<a
v-text="content.title"
:href="`${$root.baseUrl}/${content['page_link']}`"
v-if="(content['content_type'] == 'link')"
v-if="(content['content_type'] == 'link' || content['content_type'] == 'category')"
:target="content['link_target'] ? '_blank' : '_self'">
</a>
</li>
@ -560,6 +560,10 @@
if (modal)
modal.classList.toggle('hide');
let accountModal = $('.account-modal')[0];
if (accountModal)
accountModal.classList.add('hide');
event.stopPropagation();
}
}

View File

@ -16,7 +16,7 @@
<script type="text/x-template" id="cart-template">
<div class="container">
<section class="cart-details row offset-1 col-12">
<section class="cart-details row no-margin col-12">
<h1 class="fw6 col-12">{{ __('shop::app.checkout.cart.title') }}</h1>
@if ($cart)
@ -67,7 +67,7 @@
</a>
<div class="product-details-content col-6">
<div class="row">
<div class="row item-title">
<a
href="{{ route('shop.productOrCategory.index', $product->url_key) }}"
title="{{ $product->name }}"
@ -117,7 +117,11 @@
@endauth
<a
class="unset ml30"
class="unset
@auth('customer')
ml30
@endauth
"
href="{{ route('shop.checkout.cart.remove', ['id' => $item->id]) }}"
onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">
@ -153,7 +157,7 @@
alt="{{ $product->name }}">
</a>
<div class="col-10 pr0">
<div class="col-10 pr0 item-title">
<a
href="{{ route('shop.productOrCategory.index', $product->url_key) }}"
title="{{ $product->name }}"
@ -211,7 +215,7 @@
{!! view_render_event('bagisto.shop.checkout.cart.summary.after', ['cart' => $cart]) !!}
@if ($cart)
<div class="col-lg-4 col-md-12 offset-1 row order-summary-container">
<div class="col-lg-4 col-md-12 offset-2 row order-summary-container">
@include('shop::checkout.total.summary', ['cart' => $cart])
<coupon-component></coupon-component>

View File

@ -83,11 +83,11 @@
</div>
<div class="modal-footer">
<a class="col-6 text-left fs16 link-color remove-decoration" href="{{ route('shop.checkout.cart.index') }}">
<a class="col-4 text-left fs16 link-color remove-decoration" href="{{ route('shop.checkout.cart.index') }}">
{{ __('velocity::app.checkout.cart.view-cart') }}
</a>
<div class="col-6 text-right no-padding">
<div class="col-8 text-right no-padding">
<a href="{{ route('shop.checkout.onepage.index') }}">
<button
type="button"

View File

@ -203,9 +203,12 @@
if (scope == 'address-form') {
this.saveAddress();
document.body.style.cursor = 'default';
} else if (scope == 'shipping-form') {
document.body.style.cursor = 'wait';
this.saveShipping();
} else if (scope == 'payment-form') {
document.body.style.cursor = 'wait';
this.savePayment();
}
}
@ -225,6 +228,9 @@
this_this.$http.post("{{ route('customer.checkout.exist') }}", {email: this_this.address.billing.email})
.then(function(response) {
this_this.is_customer_exist = response.data ? 1 : 0;
if (response.data)
document.body.style.cursor = 'default';
})
.catch(function (error) {})
@ -278,6 +284,11 @@
this.completed_step = this.step_numbers[response.data.jump_to_section] + 1;
this.current_step = this.step_numbers[response.data.jump_to_section];
if (response.data.jump_to_section == "payment") {
this.showPaymentSection = true;
paymentMethods = response.data.paymentMethods;
}
shippingMethods = response.data.shippingMethods;
this.getOrderSummary();

View File

@ -0,0 +1,24 @@
<div class="col-12 form-field" id="password" v-if="is_customer_exist">
<label for="password">{{ __('shop::app.checkout.onepage.password') }}</label>
<input
id="password"
type="password"
class="control"
name="password"
v-model="address.billing.password" />
<div class="forgot-password-link">
<a href="{{ route('customer.forgot-password.create') }}">{{ __('shop::app.customer.login-form.forgot_pass') }}</a>
<div class="mt-10">
@if (Cookie::has('enable-resend') && Cookie::get('enable-resend') == true)
<a href="{{ route('customer.resend.verification-email', Cookie::get('email-for-resend')) }}">{{ __('shop::app.customer.login-form.resend-verification') }}</a>
@endif
</div>
</div>
<button type='button' id="" class="theme-btn" @click="loginCustomer">
{{ __('shop::app.customer.login-form.button_title') }}
</button>
</div>

View File

@ -3,7 +3,7 @@
<accordian :title="'{{ __('shop::app.checkout.onepage.billing-address') }}'" :active="true">
<div class="form-header mb-30" slot="header">
<h3 class="fw6 display-inbl">
1. {{ __('shop::app.checkout.onepage.billing-address') }}
{{ __('shop::app.checkout.onepage.billing-address') }}
</h3>
<a
@ -92,7 +92,7 @@
<accordian :title="'{{ __('shop::app.checkout.onepage.billing-address') }}'" :active="true">
<div class="form-header" slot="header">
<h3 class="fw6 display-inbl">
1. {{ __('shop::app.checkout.onepage.billing-address') }}
{{ __('shop::app.checkout.onepage.billing-address') }}
</h3>
@auth('customer')

View File

@ -366,6 +366,7 @@
v-validate="'required'"
class="control styled-select"
v-model="address.billing.country"
@change="validateForm('address-form')"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.country') }}&quot;">
<option value=""></option>

View File

@ -3,7 +3,7 @@
<accordian :title="'{{ __('shop::app.checkout.payment-methods') }}'" :active="true">
<div class="form-header mb-30" slot="header">
<h3 class="fw6 display-inbl">
3. {{ __('shop::app.checkout.onepage.payment-methods') }}
{{ __('shop::app.checkout.onepage.payment-methods') }}
</h3>
<i class="rango-arrow"></i>
</div>

View File

@ -4,7 +4,7 @@
<accordian :title="'{{ __('shop::app.checkout.onepage.summary') }}'" :active="true">
<div class="form-header mb-30" slot="header">
<h3 class="fw6 display-inbl">
4. {{ __('shop::app.checkout.onepage.summary') }}
{{ __('shop::app.checkout.onepage.summary') }}
</h3>
<i class="rango-arrow"></i>
</div>

View File

@ -3,7 +3,7 @@
<accordian :title="'{{ __('shop::app.checkout.onepage.shipping-method') }}'" :active="true">
<div class="form-header" slot="header">
<h3 class="fw6 display-inbl">
2. {{ __('shop::app.checkout.onepage.shipping-method') }}
{{ __('shop::app.checkout.onepage.shipping-method') }}
</h3>
<i class="rango-arrow"></i>
</div>

View File

@ -20,16 +20,42 @@
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.before') !!}
<div class="control-group" :class="[errors.has('company_name') ? 'has-error' : '']">
<label for="company_name">{{ __('shop::app.customer.account.address.create.company_name') }}</label>
<input type="text" class="control" name="company_name" value="{{ old('company_name') }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.company_name') }}&quot;">
<span class="control-error" v-if="errors.has('company_name')">@{{ errors.first('company_name') }}</span>
</div>
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.first_name') }}</label>
<input type="text" class="control" name="first_name" value="{{ old('first_name') }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.first_name') }}&quot;">
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
</div>
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.create.last_name') }}</label>
<input type="text" class="control" name="last_name" value="{{ old('last_name') }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.last_name') }}&quot;">
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
</div>
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
<label for="vat_id" class="required">{{ __('shop::app.customer.account.address.create.vat_id') }}</label>
<input type="text" class="control" name="vat_id" value="{{ old('vat_id') }}" v-validate="" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<span class="control-error" v-if="errors.has('vat_id')">@{{ errors.first('vat_id') }}</span>
</div>
<?php $addresses = explode(PHP_EOL, (old('address1') ?? '')); ?>
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
<label for="address_0" class="required">{{ __('shop::app.customer.account.address.create.street-address') }}</label>
<input type="text" class="control" name="address1[]" id="address_0" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.street-address') }}&quot;">
<input type="text" class="control" name="address1[]" id="address_0" value="{{ $addresses[0] ?: '' }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.street-address') }}&quot;">
<span class="control-error" v-if="errors.has('address1[]')">@{{ errors.first('address1[]') }}</span>
</div>
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
<div class="control-group" style="margin-top: -25px;">
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
<input type="text" class="control" name="address1[{{ $i }}]" id="address_{{ $i }}">
<input type="text" class="control" name="address1[{{ $i }}]" id="address_{{ $i }}" value="{{ $addresses[$i] ?? '' }}">
@endfor
</div>
@endif
@ -38,19 +64,19 @@
<div class="control-group" :class="[errors.has('city') ? 'has-error' : '']">
<label for="city" class="required">{{ __('shop::app.customer.account.address.create.city') }}</label>
<input type="text" class="control" name="city" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.city') }}&quot;">
<input type="text" class="control" name="city" value="{{ old('city') }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.city') }}&quot;">
<span class="control-error" v-if="errors.has('city')">@{{ errors.first('city') }}</span>
</div>
<div class="control-group" :class="[errors.has('postcode') ? 'has-error' : '']">
<label for="postcode" class="required">{{ __('shop::app.customer.account.address.create.postcode') }}</label>
<input type="text" class="control" name="postcode" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.postcode') }}&quot;">
<input type="text" class="control" name="postcode" value="{{ old('postcode') }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.postcode') }}&quot;">
<span class="control-error" v-if="errors.has('postcode')">@{{ errors.first('postcode') }}</span>
</div>
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
<label for="phone" class="required">{{ __('shop::app.customer.account.address.create.phone') }}</label>
<input type="text" class="control" name="phone" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.phone') }}&quot;">
<input type="text" class="control" name="phone" value="{{ old('phone') }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.phone') }}&quot;">
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
</div>
@ -61,9 +87,7 @@
{{ __('shop::app.customer.account.address.create.submit') }}
</button>
</div>
</div>
</form>
{!! view_render_event('bagisto.shop.customers.account.address.create.after') !!}

View File

@ -22,18 +22,42 @@
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.before', ['address' => $address]) !!}
<?php $addresses = explode(PHP_EOL, $address->address1); ?>
<?php $addresses = explode(PHP_EOL, (old('address1') ?? $address->address1)); ?>
<div class="control-group" :class="[errors.has('company_name') ? 'has-error' : '']">
<label for="company_name">{{ __('shop::app.customer.account.address.edit.company_name') }}</label>
<input type="text" class="control" name="company_name" value="{{ old('company_name') ?? $address->company_name }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.edit.company_name') }}&quot;">
<span class="control-error" v-if="errors.has('company_name')">@{{ errors.first('company_name') }}</span>
</div>
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.first_name') }}</label>
<input type="text" class="control" name="first_name" value="{{ old('first_name') ?? $address->first_name }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.first_name') }}&quot;">
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
</div>
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.create.last_name') }}</label>
<input type="text" class="control" name="last_name" value="{{ old('last_name') ?? $address->last_name }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.last_name') }}&quot;">
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
</div>
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
<label for="vat_id" class="required">{{ __('shop::app.customer.account.address.create.vat_id') }}</label>
<input type="text" class="control" name="vat_id" value="{{ old('vat_id') ?? $address->vat_id }}" v-validate="" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.vat_id') }}&quot;">
<span class="control-error" v-if="errors.has('vat_id')">@{{ errors.first('vat_id') }}</span>
</div>
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
<label for="address_0" class="required">{{ __('shop::app.customer.account.address.edit.street-address') }}</label>
<input type="text" class="control" name="address1[]" id="address_0" v-validate="'required'" value="{{ isset($addresses[0]) ? $addresses[0] : '' }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.street-address') }}&quot;">
<input type="text" class="control" name="address1[]" value="{{ isset($addresses[0]) ? $addresses[0] : '' }}" id="address_0" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.street-address') }}&quot;">
<span class="control-error" v-if="errors.has('address1[]')">@{{ errors.first('address1[]') }}</span>
</div>
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
<div class="control-group" style="margin-top: -25px;">
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
<input type="text" class="control" name="address1[{{ $i }}]" id="address_{{ $i }}" value="{{ isset($addresses[$i]) ? $addresses[$i] : '' }}">
<input type="text" class="control" name="address1[{{ $i }}]" id="address_{{ $i }}" value="{{ $addresses[$i] ?? '' }}">
@endfor
</div>
@endif
@ -42,19 +66,19 @@
<div class="control-group" :class="[errors.has('city') ? 'has-error' : '']">
<label for="city" class="required">{{ __('shop::app.customer.account.address.create.city') }}</label>
<input type="text" class="control" name="city" v-validate="'required|alpha_spaces'" value="{{ $address->city }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.city') }}&quot;">
<input type="text" class="control" name="city" value="{{ old('city') ?? $address->city }}" v-validate="'required|alpha_spaces'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.city') }}&quot;">
<span class="control-error" v-if="errors.has('city')">@{{ errors.first('city') }}</span>
</div>
<div class="control-group" :class="[errors.has('postcode') ? 'has-error' : '']">
<label for="postcode" class="required">{{ __('shop::app.customer.account.address.create.postcode') }}</label>
<input type="text" class="control" name="postcode" v-validate="'required'" value="{{ $address->postcode }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.postcode') }}&quot;">
<input type="text" class="control" name="postcode" value="{{ old('postcode') ?? $address->postcode }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.postcode') }}&quot;">
<span class="control-error" v-if="errors.has('postcode')">@{{ errors.first('postcode') }}</span>
</div>
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
<label for="phone" class="required">{{ __('shop::app.customer.account.address.create.phone') }}</label>
<input type="text" class="control" name="phone" v-validate="'required'" value="{{ $address->phone }}" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.phone') }}&quot;">
<input type="text" class="control" name="phone" value="{{ old('phone') ?? $address->phone }}" v-validate="'required'" data-vv-as="&quot;{{ __('shop::app.customer.account.address.create.phone') }}&quot;">
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
</div>

View File

@ -34,10 +34,10 @@
<div class="col-lg-4 col-md-12">
<div class="card">
<div class="card-body">
<h5 class="card-title fw6">{{ auth()->guard('customer')->user()->name }} {{ $address->name }}</h5>
<h5 class="card-title fw6">{{ $address->first_name }} {{ $address->last_name }}</h5>
<ul type="none">
{{-- <li>{{ $address->name }}</li> --}}
{{-- <li>{{ $address->company_name }}</li> --}}
<li>{{ $address->address1 }},</li>
<li>{{ $address->city }},</li>
<li>{{ $address->state }},</li>

View File

@ -0,0 +1,167 @@
@extends('shop::customers.account.index')
@section('page_title')
{{ __('shop::app.customer.account.profile.index.title') }}
@endsection
@section('page-detail-wrapper')
<div class="account-head">
<span class="back-icon">
<a href="{{ route('customer.account.index') }}">
<i class="icon icon-menu-back"></i>
</a>
</span>
<h1 class="account-heading">
{{ __('shop::app.customer.account.profile.index.title') }}
</h1>
<div class="horizontal-rule"></div>
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.view.before', ['customer' => $customer]) !!}
<form
method="POST"
@submit.prevent="onSubmit"
class="account-table-content"
action="{{ route('customer.profile.edit') }}">
@csrf
<div class="row">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.fname') }}
</label>
<div class="col-12">
<input value="{{ $customer->first_name }}" name="first_name" type="text" v-validate="'required'" />
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
</div>
</div>
<div class="row">
<label class="col-12">
{{ __('shop::app.customer.account.profile.lname') }}
</label>
<div class="col-12">
<input value="{{ $customer->last_name }}" name="last_name" type="text" />
</div>
</div>
<div class="row">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.gender') }}
</label>
<div class="col-12">
<select
name="gender"
class="control styled-select"
v-validate="'required'"
data-vv-as="&quot;{{ __('shop::app.customer.account.profile.gender') }}&quot;">
<option value="" @if ($customer->gender == "") selected @endif></option>
<option
value="Other"
@if ($customer->gender == "Other")
selected="selected"
@endif>
{{ __('velocity::app.shop.gender.other') }}
</option>
<option
value="Male"
@if ($customer->gender == "Male")
selected="selected"
@endif>
{{ __('velocity::app.shop.gender.male') }}
</option>
<option
value="Female"
@if ($customer->gender == "Female")
selected="selected"
@endif>
{{ __('velocity::app.shop.gender.female') }}
</option>
</select>
<div class="select-icon-container">
<span class="select-icon rango-arrow-down"></span>
</div>
<span class="control-error" v-if="errors.has('gender')">@{{ errors.first('gender') }}</span>
</div>
</div>
<div :class="`row ${errors.has('date_of_birth') ? 'has-error' : ''}`">
<label class="col-12">
{{ __('shop::app.customer.account.profile.dob') }}
</label>
<div class="col-12">
<input
type="date"
name="date_of_birth"
placeholder="dd/mm/yyyy"
value="{{ old('date_of_birth') ?? $customer->date_of_birth }}"
v-validate="" data-vv-as="&quot;{{ __('shop::app.customer.account.profile.dob') }}&quot;" />
<span class="control-error" v-if="errors.has('date_of_birth')">
@{{ errors.first('date_of_birth') }}
</span>
</div>
</div>
<div class="row">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.email') }}
</label>
<div class="col-12">
<input value="{{ $customer->email }}" name="email" type="text" v-validate="'required'" />
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
</div>
</div>
<div class="row">
<label class="col-12">
{{ __('velocity::app.shop.general.enter-current-password') }}
</label>
<div class="col-12">
<input value="" name="oldpassword" type="password" />
</div>
</div>
<div class="row">
<label class="col-12">
{{ __('velocity::app.shop.general.new-password') }}
</label>
<div class="col-12">
<input value="" name="password" type="password" />
</div>
</div>
<div class="row">
<label class="col-12">
{{ __('velocity::app.shop.general.confirm-new-password') }}
</label>
<div class="col-12">
<input value="" name="password_confirmation" type="password" />
</div>
</div>
<button
type="submit"
class="theme-btn mb20">
{{ __('velocity::app.shop.general.update') }}
</button>
</form>
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
@endsection

View File

@ -30,12 +30,13 @@
@csrf
<div class="row">
<label class="col-12">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.fname') }}
</label>
<div class="col-12">
<input value="{{ $customer->first_name }}" name="first_name" type="text" />
<input value="{{ $customer->first_name }}" name="first_name" type="text" v-validate="'required'" />
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
</div>
</div>
@ -50,7 +51,7 @@
</div>
<div class="row">
<label class="col-12">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.gender') }}
</label>
@ -90,11 +91,12 @@
<div class="select-icon-container">
<span class="select-icon rango-arrow-down"></span>
</div>
</div>
<span class="control-error" v-if="errors.has('gender')">@{{ errors.first('gender') }}</span>
</div>
</div>
<div class="row">
<div :class="`row ${errors.has('date_of_birth') ? 'has-error' : ''}`">
<label class="col-12">
{{ __('shop::app.customer.account.profile.dob') }}
</label>
@ -104,17 +106,23 @@
type="date"
name="date_of_birth"
placeholder="dd/mm/yyyy"
value="{{ $customer->date_of_birth }}" />
value="{{ old('date_of_birth') ?? $customer->date_of_birth }}"
v-validate="" data-vv-as="&quot;{{ __('shop::app.customer.account.profile.dob') }}&quot;" />
<span class="control-error" v-if="errors.has('date_of_birth')">
@{{ errors.first('date_of_birth') }}
</span>
</div>
</div>
<div class="row">
<label class="col-12">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.email') }}
</label>
<div class="col-12">
<input value="{{ $customer->email }}" name="email" type="text" />
<input value="{{ $customer->email }}" name="email" type="text" v-validate="'required'" />
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
</div>
</div>
@ -156,4 +164,4 @@
</form>
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
@endsection
@endsection

View File

@ -43,7 +43,7 @@
<img class="media" src="{{ $image['small_image_url'] }}"/>
</a>
<div class="col-10">
<div class="col-8">
<div class="product-name">
<a
class="remove-decoration"
@ -59,13 +59,14 @@
<p>{{ $review->comment }}</p>
</div>
</div>
{{-- <div class="">
<a href="{{ route('customer.review.delete', $review->id) }}">
<span class="icon trash-icon"></span>
</a>
</div> --}}
<div class="col-2">
<a class="unset" href="{{ route('customer.review.delete', $review->id) }}">
<span class="rango-delete fs24"></span>
<span class="align-vertical-top">{{ __('shop::app.checkout.cart.remove') }}</span>
</a>
</div>
</div>
</div>
@endforeach

View File

@ -29,6 +29,7 @@
@foreach ($items as $item)
@php
$currentMode = $toolbarHelper->getCurrentMode();
$moveToCartText = __('shop::app.customer.account.wishlist.move-to-cart');
@endphp
@include ('shop::products.list.card', [
@ -36,6 +37,8 @@
'itemId' => $item->id,
'removeWishlist' => true,
'product' => $item->product,
'btnText' => $moveToCartText,
'addToCartBtnClass' => 'small-padding',
])
@endforeach

View File

@ -33,7 +33,7 @@
<form
method="post"
action="{{ route('customer.register.create') }}"
action="{{ route('customer.forgot-password.store') }}"
@submit.prevent="onSubmit">
{{ csrf_field() }}

View File

@ -7,46 +7,93 @@
@section('content-wrapper')
<div class="auth-content">
{!! view_render_event('bagisto.shop.customers.reset_password.before') !!}
<div class="auth-content form-container">
<div class="container">
<div class="col-lg-10 col-md-12 offset-lg-1">
<div class="heading">
<h2 class="fs24 fw6">
{{ __('shop::app.customer.reset-password.title')}}
</h2>
</div>
<form method="post" action="{{ route('customer.reset-password.store') }}" >
<div class="body col-12">
{{ csrf_field() }}
{!! view_render_event('bagisto.shop.customers.forget_password.before') !!}
<div class="login-form">
<form
method="POST"
@submit.prevent="onSubmit"
action="{{ route('customer.reset-password.store') }}">
<div class="login-text">{{ __('shop::app.customer.reset-password.title') }}</div>
{{ csrf_field() }}
<input type="hidden" name="token" value="{{ $token }}">
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
{!! view_render_event('bagisto.shop.customers.reset_password_form_controls.before') !!}
<div :class="`form-group ${errors.has('email') ? 'has-error' : ''}`">
<label for="email" class="required label-style mandatory">
{{ __('shop::app.customer.reset-password.email') }}
</label>
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
<label for="email">{{ __('shop::app.customer.reset-password.email') }}</label>
<input type="text" v-validate="'required|email'" class="control" id="email" name="email" value="{{ old('email') }}"/>
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
<input
id="email"
type="text"
name="email"
class="form-style"
value="{{ old('email') }}"
v-validate="'required|email'" />
<span class="control-error" v-if="errors.has('email')">
@{{ errors.first('email') }}
</span>
</div>
<div :class="`form-group ${errors.has('password') ? 'has-error' : ''}`">
<label for="password" class="required label-style mandatory">
{{ __('shop::app.customer.reset-password.password') }}
</label>
<input
ref="password"
class="form-style"
name="password"
type="password"
v-validate="'required|min:6'" />
<span class="control-error" v-if="errors.has('password')">
@{{ errors.first('password') }}
</span>
</div>
<div :class="`form-group ${errors.has('confirm_password') ? 'has-error' : ''}`">
<label for="confirm_password" class="required label-style mandatory">
{{ __('shop::app.customer.reset-password.confirm-password') }}
</label>
<input
type="password"
class="form-style"
name="confirm_password"
v-validate="'required|min:6|confirmed:password'" />
<span class="control-error" v-if="errors.has('confirm_password')">
@{{ errors.first('confirm_password') }}
</span>
</div>
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.after') !!}
<button class="theme-btn" type="submit">
{{ __('shop::app.customer.reset-password.submit-btn-title') }}
</button>
</form>
{!! view_render_event('bagisto.shop.customers.forget_password.after') !!}
</div>
</div>
</div>
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
<label for="password">{{ __('shop::app.customer.reset-password.password') }}</label>
<input type="password" class="control" name="password" v-validate="'required|min:6'" ref="password">
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
</div>
<div class="control-group" :class="[errors.has('confirm_password') ? 'has-error' : '']">
<label for="confirm_password">{{ __('shop::app.customer.reset-password.confirm-password') }}</label>
<input type="password" class="control" name="password_confirmation" v-validate="'required|min:6|confirmed:password'">
<span class="control-error" v-if="errors.has('confirm_password')">@{{ errors.first('confirm_password') }}</span>
</div>
{!! view_render_event('bagisto.shop.customers.reset_password_form_controls.before') !!}
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.reset-password.submit-btn-title') }}">
</div>
</form>
{!! view_render_event('bagisto.shop.customers.reset_password.before') !!}
</div>
@endsection

View File

@ -83,6 +83,13 @@
this.categoryProducts = response.data.categoryProducts;
this.isCategory = true;
// setTimeout(() => {
// let imagesCollection = document.querySelectorAll('img.lzy_img');
// imagesCollection.forEach((image) => {
// this.$root.imageObserver.observe(image);
// });
// }, 0);
}
})
.catch(error => {});

View File

@ -4,39 +4,69 @@
<div class="row">
@foreach ($category as $slug)
@php
$categoryDetails = app('Webkul\Category\Repositories\CategoryRepository')->findByPath($slug);
@endphp
@if ($categoryDetails)
<div class="col-lg-3 col-md-12 hot-category-wrapper">
<div class="card">
<div class="row velocity-divide-page">
<div class="left">
<img src="{{ asset('/storage/' . $categoryDetails->category_icon_path) }}" />
</div>
<div class="right">
<h3 class="fs20 clr-light text-uppercase">
<a href="{{ $slug }}" class="unset">
{{ $categoryDetails->name }}
</a>
</h3>
<ul type="none">
@foreach ($categoryDetails->children as $subCategory)
<li>
<a href="{{ $slug . '/' . $subCategory->slug }}" class="remove-decoration normal-text">
{{ $subCategory->name }}
</a>
</li>
@endforeach
</ul>
</div>
</div>
</div>
</div>
@endif
<hot-category slug="{{ $slug }}"></hot-category>
@endforeach
</div>
</div>
@push('scripts')
<script type="text/x-template" id="hot-category-template">
<div class="col-lg-3 col-md-12 hot-category-wrapper" v-if="hotCategoryDetails">
<div class="card">
<div class="row velocity-divide-page">
<div class="left">
<img :src="`${$root.baseUrl}/storage/${hotCategoryDetails.category_icon_path}`" />
</div>
<div class="right">
<h3 class="fs20 clr-light text-uppercase">
<a href="${slug}" class="unset">
@{{ hotCategoryDetails.name }}
</a>
</h3>
<ul type="none">
<li :key="index" v-for="(subCategory, index) in hotCategoryDetails.children">
<a :href="`${slug}/${subCategory.slug}`" class="remove-decoration normal-text">
@{{ subCategory.name }}
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</script>
<script type="text/javascript">
(() => {
Vue.component('hot-category', {
template: '#hot-category-template',
props: ['slug'],
data: function () {
return {
'hotCategoryDetails': null
}
},
mounted: function () {
this.getHotCategories();
},
methods: {
'getHotCategories': function () {
this.$http.get(`${this.baseUrl}/fancy-category-details/${this.slug}`)
.then(response => {
if (response.data.status)
this.hotCategoryDetails = response.data.categoryDetails;
})
.catch(error => {
console.log('something went wrong');
})
}
}
})
})()
</script>
@endpush

View File

@ -65,7 +65,6 @@
@include ('shop::products.list.recently-viewed', [
'quantity' => 3,
'addClass' => 'col-lg-3 col-md-12',
'addClassWrapper' => 'scrollable max-height-350',
])
</div>
@else

View File

@ -2,7 +2,9 @@
$direction = core()->getCurrentLocale()->direction;
@endphp
<slider-component direction="{{ $direction }}"></slider-component>
@if ($velocityMetaData->slider)
<slider-component direction="{{ $direction }}"></slider-component>
@endif
@push('scripts')
<script type="text/x-template" id="slider-template">
@ -24,6 +26,9 @@
<img
class="col-12 no-padding banner-icon"
src="{{ url()->to('/') . '/storage/' . $slider['path'] }}" />
<div class="show-content" v-html="'{{ $slider['content'] }}'">
</div>
</a>
</slide>

View File

@ -16,13 +16,12 @@
@if (core()->getCurrentLocale()->direction == 'rtl')
<link href="{{ asset('themes/velocity/assets/css/bootstrap-flipped.css') }}" rel="stylesheet">
@endif
@if ($favicon = core()->getCurrentChannel()->favicon_url)
<link rel="icon" sizes="16x16" href="{{ $favicon }}" />
@else
<link rel="icon" sizes="16x16" href="{{ asset('themes/velocity/assets/images/favicon.png') }}" />
<link rel="icon" sizes="16x16" href="{{ asset('/themes/velocity/assets/images/static/v-icon.png') }}" />
@endif
<script
@ -32,7 +31,7 @@
<script
type="text/javascript"
baseUrl='{{ url()->to('/') }}'
baseUrl="{{ url()->to('/') }}"
src="{{ asset('themes/velocity/assets/js/velocity.js') }}">
</script>
@ -131,8 +130,6 @@
<script type="text/javascript">
(() => {
var baseURL = '{{ url()->to('/') }}';
var showAlert = (messageType, messageLabel, message) => {
if (messageType && message !== '') {
let html = `<div class="alert ${messageType} alert-dismissible" id="alert">

Some files were not shown because too many files have changed in this diff Show More