Resolved conflicts
This commit is contained in:
commit
e7d7ee58b6
|
|
@ -1,28 +1,29 @@
|
|||
/docker-compose-collection
|
||||
/storage/dcc-data/
|
||||
/node_modules
|
||||
/public/hot
|
||||
/public/storage
|
||||
/public/css
|
||||
/public/js
|
||||
/public/vendor
|
||||
/public/themes
|
||||
/public/fonts
|
||||
/vendor
|
||||
.env
|
||||
.idea
|
||||
.php_cs.cache
|
||||
.vscode
|
||||
.vagrant
|
||||
/data
|
||||
/.idea
|
||||
/.vscode
|
||||
/.vagrant
|
||||
/docker-compose-collection
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
.env
|
||||
/ignorables/*
|
||||
yarn.lock
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
.php_cs.cache
|
||||
storage/*.key
|
||||
/public/css
|
||||
/public/fonts
|
||||
/public/js
|
||||
/public/hot
|
||||
/public/storage
|
||||
/public/themes
|
||||
/public/vendor
|
||||
/resources/themes/velocity/*
|
||||
/resources/lang/vendor/admin/*
|
||||
/resources/lang/vendor/shop/*
|
||||
/resources/lang/vendor/velocity/*
|
||||
/storage/*.key
|
||||
/storage/dcc-data/
|
||||
/vendor
|
||||
yarn.lock
|
||||
yarn-error.log
|
||||
|
|
@ -69,10 +69,18 @@ class AddressController extends Controller
|
|||
{
|
||||
$customer = auth($this->guard)->user();
|
||||
|
||||
request()->merge([
|
||||
'address1' => implode(PHP_EOL, array_filter(request()->input('address1'))),
|
||||
'customer_id' => $customer->id,
|
||||
]);
|
||||
if (request()->input('address1') && ! is_array(json_decode(request()->input('address1')))) {
|
||||
return response()->json([
|
||||
'message' => 'address1 must be an array.',
|
||||
]);
|
||||
}
|
||||
|
||||
if (request()->input('address1')) {
|
||||
request()->merge([
|
||||
'address1' => implode(PHP_EOL, array_filter(json_decode(request()->input('address1')))),
|
||||
'customer_id' => $customer->id,
|
||||
]);
|
||||
}
|
||||
|
||||
$this->validate(request(), [
|
||||
'address1' => 'string|required',
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ namespace Webkul\API\Http\Controllers\Shop;
|
|||
|
||||
use Cart;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
|
@ -142,22 +144,28 @@ class CartController extends Controller
|
|||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function update()
|
||||
public function update(Request $request)
|
||||
{
|
||||
foreach (request()->get('qty') as $qty) {
|
||||
$this->validate($request, [
|
||||
'qty' => 'required|array',
|
||||
]);
|
||||
|
||||
$requestedQuantity = $request->get('qty');
|
||||
|
||||
foreach ($requestedQuantity as $qty) {
|
||||
if ($qty <= 0) {
|
||||
return response()->json([
|
||||
'message' => trans('shop::app.checkout.cart.quantity.illegal'),
|
||||
], 401);
|
||||
], Response::HTTP_UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (request()->get('qty') as $itemId => $qty) {
|
||||
foreach ($requestedQuantity as $itemId => $qty) {
|
||||
$item = $this->cartItemRepository->findOneByField('id', $itemId);
|
||||
|
||||
Event::dispatch('checkout.cart.item.update.before', $itemId);
|
||||
|
||||
Cart::updateItems(request()->all());
|
||||
Cart::updateItems(['qty' => $requestedQuantity]);
|
||||
|
||||
Event::dispatch('checkout.cart.item.update.after', $item);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
|
|
@ -69,24 +70,25 @@ class CustomerController extends Controller
|
|||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
public function create(Request $request)
|
||||
{
|
||||
request()->validate([
|
||||
$this->validate($request, [
|
||||
'first_name' => 'required',
|
||||
'last_name' => 'required',
|
||||
'email' => 'email|required|unique:customers,email',
|
||||
'password' => 'confirmed|min:6|required',
|
||||
]);
|
||||
|
||||
$data = request()->input();
|
||||
|
||||
$data = array_merge($data, [
|
||||
'password' => bcrypt($data['password']),
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'is_verified' => 1,
|
||||
]);
|
||||
|
||||
$data['customer_group_id'] = $this->customerGroupRepository->findOneWhere(['code' => 'general'])->id;
|
||||
$data = [
|
||||
'first_name' => $request->get('first_name'),
|
||||
'last_name' => $request->get('last_name'),
|
||||
'email' => $request->get('email'),
|
||||
'password' => $request->get('password'),
|
||||
'password' => bcrypt($request->get('password')),
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'is_verified' => 1,
|
||||
'customer_group_id' => $this->customerGroupRepository->findOneWhere(['code' => 'general'])->id
|
||||
];
|
||||
|
||||
Event::dispatch('customer.registration.before');
|
||||
|
||||
|
|
|
|||
|
|
@ -9,21 +9,21 @@ use Webkul\API\Http\Resources\Catalog\ProductReview as ProductReviewResource;
|
|||
class ReviewController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains current guard
|
||||
* Contains current guard.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guard;
|
||||
|
||||
/**
|
||||
* ProductReviewRepository object
|
||||
* ProductReviewRepository $reviewRepository
|
||||
*
|
||||
* @var \Webkul\Product\Repositories\ProductReviewRepository
|
||||
*/
|
||||
protected $reviewRepository;
|
||||
|
||||
/**
|
||||
* Controller instance
|
||||
* Controller instance.
|
||||
*
|
||||
* @param Webkul\Product\Repositories\ProductReviewRepository $reviewRepository
|
||||
*/
|
||||
|
|
@ -47,24 +47,25 @@ class ReviewController extends Controller
|
|||
{
|
||||
$customer = auth($this->guard)->user();
|
||||
|
||||
$this->validate(request(), [
|
||||
$this->validate($request, [
|
||||
'comment' => 'required',
|
||||
'rating' => 'required|numeric|min:1|max:5',
|
||||
'title' => 'required',
|
||||
]);
|
||||
|
||||
$data = array_merge(request()->all(), [
|
||||
$productReview = $this->reviewRepository->create([
|
||||
'customer_id' => $customer ? $customer->id : null,
|
||||
'name' => $customer ? $customer->name : request()->input('name'),
|
||||
'name' => $customer ? $customer->name : $request->get('name'),
|
||||
'status' => 'pending',
|
||||
'product_id' => $id,
|
||||
'comment' => $request->comment,
|
||||
'rating' => $request->rating,
|
||||
'title' => $request->title
|
||||
]);
|
||||
|
||||
$productReview = $this->reviewRepository->create($data);
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Your review submitted successfully.',
|
||||
'data' => new ProductReviewResource($this->reviewRepository->find($productReview->id)),
|
||||
'data' => new ProductReviewResource($productReview),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -158,13 +158,13 @@ return [
|
|||
'name' => 'no_of_new_product_homepage',
|
||||
'title' => 'admin::app.admin.system.allow-no-of-new-product-homepage',
|
||||
'type' => 'number',
|
||||
'validation' => 'required|min:0',
|
||||
'validation' => 'min:0',
|
||||
],
|
||||
[
|
||||
'name' => 'no_of_featured_product_homepage',
|
||||
'title' => 'admin::app.admin.system.allow-no-of-featured-product-homepage',
|
||||
'type' => 'number',
|
||||
'validation' => 'required|min:0',
|
||||
'validation' => 'min:0',
|
||||
],
|
||||
],
|
||||
], [
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ class AddressController extends Controller
|
|||
|
||||
session()->flash('success', trans('admin::app.customers.addresses.success-delete'));
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -938,6 +938,7 @@ return [
|
|||
'gender' => 'Gender',
|
||||
'email' => 'Email',
|
||||
'date_of_birth' => 'Date of Birth',
|
||||
'date_of_birth_placeholder' => 'yyyy-mm-dd',
|
||||
'phone' => 'Phone',
|
||||
'customer_group' => 'Customer Group',
|
||||
'save-btn-title' => 'Save Customer',
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@
|
|||
|
||||
<tbody>
|
||||
|
||||
<tr v-for="(row, index) in optionRows">
|
||||
<tr v-for="(row, index) in optionRows" :key="row.id">
|
||||
<td v-if="show_swatch && swatch_type == 'color'">
|
||||
<swatch-picker :input-name="'options[' + row.id + '][swatch_value]'" :color="row.swatch_value" colors="text-advanced" show-fallback />
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('date_of_birth') ? 'has-error' : '']">
|
||||
<label for="dob">{{ __('admin::app.customers.customers.date_of_birth') }}</label>
|
||||
<input type="date" class="control" name="date_of_birth" v-validate="" value="{{ old('date_of_birth') }}" data-vv-as=""{{ __('admin::app.customers.customers.date_of_birth') }}"">
|
||||
<input type="date" class="control" name="date_of_birth" v-validate="" value="{{ old('date_of_birth') }}" placeholder="{{ __('admin::app.customers.customers.date_of_birth_placeholder') }}" data-vv-as=""{{ __('admin::app.customers.customers.date_of_birth') }}"">
|
||||
<span class="control-error" v-if="errors.has('date_of_birth')">@{{ errors.first('date_of_birth') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
{!! view_render_event('bagisto.admin.customer.edit.before', ['customer' => $customer]) !!}
|
||||
|
||||
<form method="POST" action="{{ route('admin.customer.update', $customer->id) }}">
|
||||
<div class="page-content">
|
||||
<div class="form-container">
|
||||
@csrf()
|
||||
|
||||
|
||||
<input name="_method" type="hidden" value="PUT">
|
||||
<div class="style:overflow: auto;"> </div>
|
||||
|
||||
|
||||
<div slot="body">
|
||||
{!! view_render_event('bagisto.admin.customer.edit.form.before', ['customer' => $customer]) !!}
|
||||
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required"> {{ __('admin::app.customers.customers.first_name') }}</label>
|
||||
<input type="text" class="control" name="first_name" v-validate="'required'" value="{{old('first_name') ?:$customer->first_name}}"
|
||||
|
|
@ -19,7 +17,7 @@
|
|||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.first_name.after', ['customer' => $customer]) !!}
|
||||
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required"> {{ __('admin::app.customers.customers.last_name') }}</label>
|
||||
<input type="text" class="control" name="last_name" v-validate="'required'" value="{{old('last_name') ?:$customer->last_name}}" data-vv-as=""{{ __('shop::app.customer.signup-form.lastname') }}"">
|
||||
|
|
@ -95,11 +93,13 @@
|
|||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.customer.edit.form.after', ['customer' => $customer]) !!}
|
||||
|
||||
</div>
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.customers.customers.save-btn-title') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{!! view_render_event('bagisto.admin.customer.edit.after', ['customer' => $customer]) !!}
|
||||
</form>
|
||||
|
|
@ -159,7 +159,11 @@ class CatalogRuleRepository extends Repository
|
|||
if ($attribute->code == 'tax_category_id') {
|
||||
$options = $this->getTaxCategories();
|
||||
} else {
|
||||
$options = $attribute->options;
|
||||
if ($attribute->type === 'select') {
|
||||
$options = $attribute->options()->orderBy('sort_order')->get();
|
||||
} else {
|
||||
$options = $attribute->options;
|
||||
}
|
||||
}
|
||||
|
||||
if ($attribute->validation == 'decimal')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Category\Database\Seeders;
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Webkul\Category\Repositories\CategoryRepository;
|
||||
|
||||
/*
|
||||
* CategoryBulkTableSeeder
|
||||
*
|
||||
* Command: php artisan db:seed --class=Webkul\\Category\\Database\\Seeders\\CategoryBulkTableSeeder
|
||||
*
|
||||
* This seeder has not included anywhere just for development purpose.
|
||||
*/
|
||||
class CategoryBulkTableSeeder extends Seeder
|
||||
{
|
||||
private $numberOfParentCategories = 10;
|
||||
|
||||
private $numberOfChildCategories = 50;
|
||||
|
||||
public function __construct(
|
||||
Faker $faker,
|
||||
CategoryRepository $categoryRepository
|
||||
)
|
||||
{
|
||||
$this->faker = $faker;
|
||||
$this->categoryRepository = $categoryRepository;
|
||||
}
|
||||
|
||||
public function run()
|
||||
{
|
||||
for ($i = 0; $i < $this->numberOfParentCategories; ++$i) {
|
||||
$createdCategory = $this->categoryRepository->create([
|
||||
'slug' => $this->faker->slug,
|
||||
'name' => $this->faker->firstName,
|
||||
'description' => $this->faker->text(),
|
||||
'parent_id' => 1,
|
||||
'status' => 1,
|
||||
]);
|
||||
|
||||
if ($createdCategory) {
|
||||
for ($j = 0; $j < $this->numberOfChildCategories; ++$j) {
|
||||
|
||||
$this->categoryRepository->create([
|
||||
'slug' => $this->faker->slug,
|
||||
'name' => $this->faker->firstName,
|
||||
'description' => $this->faker->text(),
|
||||
'parent_id' => $createdCategory->id,
|
||||
'status' => 1
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -65,12 +65,14 @@ class Category extends TranslatableModel implements CategoryContract
|
|||
*/
|
||||
public function filterableAttributes()
|
||||
{
|
||||
return $this->belongsToMany(AttributeProxy::modelClass(), 'category_filterable_attributes')->with('options');
|
||||
return $this->belongsToMany(AttributeProxy::modelClass(), 'category_filterable_attributes')->with(['options' => function($query) {
|
||||
$query->orderBy('sort_order');
|
||||
}]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the root category of a category
|
||||
*
|
||||
*
|
||||
* @return Category
|
||||
*/
|
||||
public function getRootCategory(): Category
|
||||
|
|
@ -124,7 +126,7 @@ class Category extends TranslatableModel implements CategoryContract
|
|||
if ($category->id === $this->id) {
|
||||
return $category;
|
||||
}
|
||||
|
||||
|
||||
return $this->findInTree($category->children);
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ class Handler extends AppExceptionHandler
|
|||
return response()->json(['error' => $this->jsonErrorMessages[401]], 401);
|
||||
}
|
||||
|
||||
return redirect()->guest(route('auth.login'));
|
||||
return redirect()->guest(route('customer.session.index'));
|
||||
}
|
||||
|
||||
private function isAdminUri()
|
||||
|
|
|
|||
|
|
@ -153,6 +153,10 @@ class ChannelController extends Controller
|
|||
|
||||
$channel = $this->channelRepository->update($data, $id);
|
||||
|
||||
if ($channel->base_currency->code !== session()->get('currency')) {
|
||||
session()->put('currency', $channel->base_currency->code);
|
||||
}
|
||||
|
||||
Event::dispatch('core.channel.update.after', $channel);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.channels.update-success'));
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ return [
|
|||
'code' => 'paypal_smart_button',
|
||||
'title' => 'Paypal Smart Button',
|
||||
'description' => 'Paypal Smart Button',
|
||||
'client_id' => 'sb',
|
||||
'class' => 'Webkul\Paypal\Payment\SmartButton',
|
||||
'sandbox' => true,
|
||||
'active' => true,
|
||||
|
|
|
|||
|
|
@ -87,6 +87,42 @@ class ProductFlatRepository extends Repository
|
|||
return $filterAttributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* filter attributes according to products
|
||||
*
|
||||
* @param array $category
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getProductsRelatedFilterableAttributes($category) {
|
||||
$products = app('Webkul\Product\Repositories\ProductRepository')->getProductsRelatedToCategory($category->id);
|
||||
|
||||
$filterAttributes = $this->getFilterableAttributes($category, $products);
|
||||
|
||||
$allProductAttributeOptionsCode = [];
|
||||
|
||||
foreach ($products as $key => $product) {
|
||||
foreach ($filterAttributes as $attribute) {
|
||||
if ($attribute->code <> 'price') {
|
||||
if (isset($product[$attribute->code])) {
|
||||
if (! in_array($product[$attribute->code], $allProductAttributeOptionsCode)) {
|
||||
array_push($allProductAttributeOptionsCode, $product[$attribute->code]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($filterAttributes as $attribute) {
|
||||
foreach ($attribute->options as $key => $option) {
|
||||
if (! in_array($option->id, $allProductAttributeOptionsCode)) {
|
||||
unset($attribute->options[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $filterAttributes;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* update product_flat custom column
|
||||
|
|
|
|||
|
|
@ -110,6 +110,23 @@ class ProductRepository extends Repository
|
|||
Event::dispatch('catalog.product.delete.after', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $categoryId
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getProductsRelatedToCategory($categoryId = null)
|
||||
{
|
||||
$qb = $this->model
|
||||
->leftJoin('product_categories', 'products.id', '=', 'product_categories.product_id');
|
||||
|
||||
if ($categoryId) {
|
||||
$qb->where('product_categories.category_id', $categoryId);
|
||||
}
|
||||
|
||||
return $qb->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $categoryId
|
||||
*
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=89d1f873e06bef5887c3",
|
||||
"/js/shop.js": "/js/shop.js?id=13a4d80b6b4c45da1ee0",
|
||||
"/css/shop.css": "/css/shop.css?id=4d6a80790b697b2dc931"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
<ul class="slider-images">
|
||||
<li v-for="(image, index) in images" :key="index" v-bind:class="{'show': index==currentIndex}">
|
||||
<img class="slider-item" :alt="image.title" :src="image.path"/>
|
||||
<div class="show-content" v-bind:class="{'show': index==currentIndex}" :key="index" v-html="content[index]"></div>
|
||||
<a :href="image.slider_path">
|
||||
<img class="slider-item" :alt="image.title" :src="image.path" />
|
||||
<div class="show-content" v-bind:class="{'show': index==currentIndex}" :key="index" v-html="content[index]"></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -13,7 +15,6 @@
|
|||
<span class="icon dark-left-icon slider-left" @click="changeIndexLeft"></span>
|
||||
<span class="icon light-right-icon slider-right" @click="changeIndexRight"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
|
@ -65,7 +66,8 @@ export default {
|
|||
this.slides.forEach(function(slider) {
|
||||
self.images.push({
|
||||
'path': self.public_path + '/storage/' + slider.path,
|
||||
'title' : slider.title
|
||||
'title' : slider.title,
|
||||
'slider_path': slider.slider_path ? slider.slider_path : null
|
||||
});
|
||||
|
||||
self.content.push(slider.content);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@if (app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts())
|
||||
@if (count(app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts()))
|
||||
<section class="featured-products">
|
||||
|
||||
<div class="featured-heading">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@if (app('Webkul\Product\Repositories\ProductRepository')->getNewProducts())
|
||||
@if (count(app('Webkul\Product\Repositories\ProductRepository')->getNewProducts()))
|
||||
<section class="featured-products">
|
||||
|
||||
<div class="featured-heading">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
if (isset($category)) {
|
||||
$products = $productRepository->getAll($category->id);
|
||||
|
||||
$filterAttributes = $productFlatRepository->getFilterableAttributes($category, $products);
|
||||
$filterAttributes = $productFlatRepository->getProductsRelatedFilterableAttributes($category);
|
||||
|
||||
$maxPrice = core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@
|
|||
var wishlist = " <?php echo $wishListHelper->getWishlistProduct($product); ?> ";
|
||||
|
||||
$(document).mousemove(function(event) {
|
||||
if ($('.add-to-wishlist').length && wishlist != 1) {
|
||||
if ($('.add-to-wishlist').length || wishlist != 1) {
|
||||
if (event.pageX > $('.add-to-wishlist').offset().left && event.pageX < $('.add-to-wishlist').offset().left+32 && event.pageY > $('.add-to-wishlist').offset().top && event.pageY < $('.add-to-wishlist').offset().top+32) {
|
||||
|
||||
$(".zoomContainer").addClass("show-wishlist");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
@php
|
||||
$locale = request()->get('locale') ?: app()->getLocale();
|
||||
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
|
||||
$customer_group = request()->get('customer_group');
|
||||
@endphp
|
||||
|
||||
<div class="table">
|
||||
|
|
@ -27,7 +28,7 @@
|
|||
@foreach ($results['extraFilters']['channels'] as $channelModel)
|
||||
<option
|
||||
value="{{ $channelModel->id }}"
|
||||
{{ (isset($channel) && ($channelModel->code) == $channel) ? 'selected' : '' }}>
|
||||
{{ (isset($channel) && ($channelModel->id) == $channel) ? 'selected' : '' }}>
|
||||
{{ $channelModel->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=46abb4f85cbb52473cec",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
|
||||
"/css/velocity.css": "/css/velocity.css?id=87778b5fe0e9caa84092"
|
||||
"/css/velocity.css": "/css/velocity.css?id=a37ae1fb6f34223126b8"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,25 @@
|
|||
<template>
|
||||
<form method="POST" @submit.prevent="addToCart">
|
||||
<!-- for move to cart from wishlist -->
|
||||
<a
|
||||
:href="wishlistMoveRoute"
|
||||
:disabled="isButtonEnable == 'false' || isButtonEnable == false"
|
||||
:class="`btn btn-add-to-cart ${addClassToBtn}`"
|
||||
v-if="moveToCart"
|
||||
>
|
||||
|
||||
<i class="material-icons text-down-3" v-if="showCartIcon">shopping_cart</i>
|
||||
|
||||
<span class="fs14 fw6 text-uppercase text-up-4" v-text="btnText"></span>
|
||||
</a>
|
||||
|
||||
<!-- for add to cart -->
|
||||
<button
|
||||
type="submit"
|
||||
:disabled="isButtonEnable == 'false' || isButtonEnable == false"
|
||||
:class="`btn btn-add-to-cart ${addClassToBtn}`">
|
||||
:class="`btn btn-add-to-cart ${addClassToBtn}`"
|
||||
v-else
|
||||
>
|
||||
|
||||
<i class="material-icons text-down-3" v-if="showCartIcon">shopping_cart</i>
|
||||
|
||||
|
|
@ -22,6 +38,7 @@
|
|||
'productId',
|
||||
'reloadPage',
|
||||
'moveToCart',
|
||||
'wishlistMoveRoute',
|
||||
'showCartIcon',
|
||||
'addClassToBtn',
|
||||
'productFlatId',
|
||||
|
|
|
|||
|
|
@ -1672,6 +1672,7 @@
|
|||
font-weight: 500;
|
||||
margin-right: 10px;
|
||||
text-decoration: line-through;
|
||||
display: block;
|
||||
}
|
||||
|
||||
span {
|
||||
|
|
@ -1860,6 +1861,7 @@
|
|||
background: $light-color;
|
||||
border-left: 1px solid $border-common;
|
||||
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
|
||||
overflow-y: auto;
|
||||
|
||||
li:nth-last-of-type(1) {
|
||||
margin-bottom: 10px;
|
||||
|
|
|
|||
|
|
@ -721,6 +721,7 @@ body::after {
|
|||
|
||||
.description-text {
|
||||
word-break: break-word;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
class="form-control"
|
||||
placeholder="{{ __('velocity::app.header.search-text') }}"
|
||||
aria-label="Search"
|
||||
:value="searchedQuery.term ? searchedQuery.term.split('+').join(' ') : ''" />
|
||||
:value="searchedQuery.term ? decodeURIComponent(searchedQuery.term.split('+').join(' ')) : ''" />
|
||||
|
||||
<image-search-component></image-search-component>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.before', ['wishlist' => $items]) !!}
|
||||
|
||||
<div class="account-items-list row wishlist-container">
|
||||
<div class="wishlist-container">
|
||||
|
||||
@if ($items->count())
|
||||
@foreach ($items as $item)
|
||||
|
|
@ -33,19 +33,22 @@
|
|||
@endphp
|
||||
|
||||
@include ('shop::products.list.card', [
|
||||
'checkmode' => true,
|
||||
'moveToCart' => true,
|
||||
'addToCartForm' => true,
|
||||
'removeWishlist' => true,
|
||||
'reloadPage' => true,
|
||||
'itemId' => $item->id,
|
||||
'product' => $item->product,
|
||||
'btnText' => $moveToCartText,
|
||||
'addToCartBtnClass' => 'small-padding',
|
||||
'list' => true,
|
||||
'checkmode' => true,
|
||||
'moveToCart' => true,
|
||||
'wishlistMoveRoute' => route('customer.wishlist.move', $item->id),
|
||||
'addToCartForm' => true,
|
||||
'removeWishlist' => true,
|
||||
'reloadPage' => true,
|
||||
'itemId' => $item->id,
|
||||
'product' => $item->product,
|
||||
'additionalAttributes' => true,
|
||||
'btnText' => $moveToCartText,
|
||||
'addToCartBtnClass' => 'small-padding',
|
||||
])
|
||||
@endforeach
|
||||
|
||||
<div class="bottom-toolbar">
|
||||
<div>
|
||||
{{ $items->links() }}
|
||||
</div>
|
||||
@else
|
||||
|
|
|
|||
|
|
@ -67,10 +67,11 @@
|
|||
product-id="{{ $product->product_id }}"
|
||||
reload-page="{{ $reloadPage ?? false }}"
|
||||
move-to-cart="{{ $moveToCart ?? false }}"
|
||||
wishlist-move-route="{{ $wishlistMoveRoute ?? false }}"
|
||||
add-class-to-btn="{{ $addToCartBtnClass ?? '' }}"
|
||||
is-enable={{ ! $product->isSaleable() ? 'false' : 'true' }}
|
||||
show-cart-icon={{ !(isset($showCartIcon) && !$showCartIcon) }}
|
||||
btn-text="{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : $btnText ?? __('shop::app.products.add-to-cart') }}">
|
||||
show-cart-icon={{ ! (isset($showCartIcon) && ! $showCartIcon) }}
|
||||
btn-text="{{ (! isset($moveToCart) && $product->type == 'booking') ? __('shop::app.products.book-now') : $btnText ?? __('shop::app.products.add-to-cart') }}">
|
||||
</add-to-cart>
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
$galleryImages = $productImageHelper->getGalleryImages($product);
|
||||
$priceHTML = view('shop::products.price', ['product' => $product])->render();
|
||||
|
||||
|
||||
$product->__set('priceHTML', $priceHTML);
|
||||
$product->__set('avgRating', $avgRatings);
|
||||
$product->__set('totalReviews', $totalReviews);
|
||||
|
|
@ -73,6 +73,18 @@
|
|||
|
||||
<span class="fs16">{{ $product->name }}</span>
|
||||
</a>
|
||||
|
||||
@if (isset($additionalAttributes) && $additionalAttributes)
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="product-price">
|
||||
|
|
@ -115,7 +127,7 @@
|
|||
{{-- <product-quick-view-btn :quick-view-details="product"></product-quick-view-btn> --}}
|
||||
<product-quick-view-btn :quick-view-details="{{ json_encode($product) }}"></product-quick-view-btn>
|
||||
</a>
|
||||
|
||||
|
||||
@if ($product->new)
|
||||
<div class="sticker new">
|
||||
{{ __('shop::app.products.new') }}
|
||||
|
|
@ -130,6 +142,18 @@
|
|||
class="unset">
|
||||
|
||||
<span class="fs16">{{ $product->name }}</span>
|
||||
|
||||
@if (isset($additionalAttributes) && $additionalAttributes)
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
@ -155,6 +179,7 @@
|
|||
'product' => $product,
|
||||
'btnText' => $btnText ?? null,
|
||||
'moveToCart' => $moveToCart ?? null,
|
||||
'wishlistMoveRoute' => $wishlistMoveRoute ?? null,
|
||||
'reloadPage' => $reloadPage ?? null,
|
||||
'addToCartForm' => $addToCartForm ?? false,
|
||||
'addToCartBtnClass' => $addToCartBtnClass ?? '',
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
if (isset($category)) {
|
||||
$products = $productRepository->getAll($category->id);
|
||||
|
||||
$filterAttributes = $productFlatRepository->getFilterableAttributes($category, $products);
|
||||
$filterAttributes = $productFlatRepository->getProductsRelatedFilterableAttributes($category);
|
||||
|
||||
$maxPrice = core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue