Merge pull request #5327 from devansh-webkul/wishlist-share

Wishlist Share Feature Implemented #1243
This commit is contained in:
Jitendra Singh 2021-11-16 10:37:27 +05:30 committed by GitHub
commit 2dc0eea959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 1175 additions and 514 deletions

View File

@ -350,10 +350,21 @@ return [
'key' => 'customer.settings',
'name' => 'admin::app.admin.system.settings',
'sort' => 1,
], [
'key' => 'customer.settings.wishlist',
'name' => 'admin::app.admin.system.wishlist',
'sort' => 1,
'fields' => [
[
'name' => 'share',
'title' => 'admin::app.admin.system.wishlist-share',
'type' => 'boolean',
],
],
], [
'key' => 'customer.settings.address',
'name' => 'admin::app.admin.system.address',
'sort' => 1,
'sort' => 2,
'fields' => [
[
'name' => 'street_lines',
@ -366,7 +377,7 @@ return [
], [
'key' => 'customer.settings.newsletter',
'name' => 'admin::app.admin.system.newsletter',
'sort' => 2,
'sort' => 3,
'fields' => [
[
'name' => 'subscription',
@ -377,7 +388,7 @@ return [
], [
'key' => 'customer.settings.email',
'name' => 'admin::app.admin.system.email',
'sort' => 3,
'sort' => 4,
'fields' => [
[
'name' => 'verification',
@ -388,7 +399,7 @@ return [
], [
'key' => 'emails',
'name' => 'admin::app.admin.emails.email',
'sort' => 6,
'sort' => 5,
], [
'key' => 'emails.configure',
'name' => 'admin::app.admin.system.email-settings',

View File

@ -1400,6 +1400,8 @@ return [
'stock-options' => 'خيارات الأسهم',
'allow-backorders' => 'السماح بأوامر العودة',
'customer' => 'العملاء',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'الإعدادات',
'address' => 'عنوان',
'street-lines' => 'خطوط في عنوان الشارع',

View File

@ -1409,6 +1409,8 @@ return [
'stock-options' => 'Inventaroptionen',
'allow-backorders' => 'Nachbestellungen zulassen',
'customer' => 'Kunden',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Einstellungen',
'address' => 'Adresse',
'street-lines' => 'Adresszeilen (Standard: 1)',

View File

@ -1417,6 +1417,8 @@ return [
'stock-options' => 'Stock Options',
'allow-backorders' => 'Allow Backorders',
'customer' => 'Customer',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Settings',
'address' => 'Address',
'street-lines' => 'Lines in a Street Address',
@ -1543,15 +1545,15 @@ return [
'show-search-input-field' => 'Show Search Input Field',
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
'width' => 'Width',
'height' => 'Height',
'cache-small-image' => 'Small Image',
'cache-medium-image' => 'Medium Image',
'cache-large-image' => 'Large Image',
'generate-invoice' => 'Automatically generate the invoice after placing an order',
'set-invoice-status' => 'Set the invoice status after creating the invoice to',
'set-order-status' => 'Set the order status after creating the invoice to',
'generate-invoice-applicable' => 'Applicable if automatic generate invoice is enabled'
'width' => 'Width',
'height' => 'Height',
'cache-small-image' => 'Small Image',
'cache-medium-image' => 'Medium Image',
'cache-large-image' => 'Large Image',
'generate-invoice' => 'Automatically generate the invoice after placing an order',
'set-invoice-status' => 'Set the invoice status after creating the invoice to',
'set-order-status' => 'Set the order status after creating the invoice to',
'generate-invoice-applicable' => 'Applicable if automatic generate invoice is enabled'
]
]
];

View File

@ -1412,6 +1412,8 @@ return [
'stock-options' => 'Opciones de stock',
'allow-backorders' => 'Permitir backorders',
'customer' => 'Cliente',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Ajustes',
'address' => 'Dirección',
'street-lines' => 'Líneas en la dirección',

View File

@ -1397,6 +1397,8 @@ return [
'stock-options' => 'گزینه های موجودی',
'allow-backorders' => 'اجازه به دره های پستی',
'customer' => 'مشتری',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'تنظیمات',
'address' => 'آدرس',
'street-lines' => 'تعداد خطوط در خیابان',

View File

@ -1424,6 +1424,8 @@ return [
'stock-options' => 'Les options d\'achat d\'actions',
'allow-backorders' => 'Autoriser les commandes en souffrance',
'customer' => 'Client',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Paramètres',
'address' => 'Adresse',
'street-lines' => 'Lignes dans une adresse postale',

View File

@ -1400,6 +1400,8 @@ return [
'stock-options' => 'Opzioni Stock',
'allow-backorders' => 'Consenti Backorders',
'customer' => 'Cliente',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Impostazioni',
'address' => 'Indirizzo',
'street-lines' => 'Linee nell\'indirizzo',

View File

@ -1394,6 +1394,8 @@ return [
'stock-options' => 'Aandelenopties',
'allow-backorders' => 'Backorders toestaan',
'customer' => 'Klant',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Instellingen',
'address' => 'Adres',
'street-lines' => 'Lijnen in een adres',

View File

@ -1397,6 +1397,8 @@ return [
'stock-options' => 'Opcje zasobu',
'allow-backorders' => 'Zezwalaj na zaległości',
'customer' => 'Klient',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Ustawienia',
'address' => 'Adres',
'street-lines' => 'Linie adresowe',

View File

@ -1396,6 +1396,8 @@ return [
'stock-options' => 'Opções de ações',
'allow-backorders' => 'Permitir Pedidos pelo Admin',
'customer' => 'Cliente',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Definições',
'address' => 'Endereço',
'street-lines' => 'Linhas em um endereço de rua',

View File

@ -1384,6 +1384,8 @@ return [
'stock-options' => 'Stok Seçenekleri',
'allow-backorders' => 'Stok Dışı Siparişe İzin Ver',
'customer' => 'Müşteri',
'wishlist' => 'Wishlist',
'wishlist-share' => 'Enable Sharing',
'settings' => 'Ayarlar',
'address' => 'Adres',
'street-lines' => 'Sokak Adresi Satır Sayısı',

View File

@ -2,10 +2,10 @@
namespace Webkul\Customer\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{

View File

@ -3,8 +3,9 @@
namespace Webkul\Customer\Http\Controllers;
use Cart;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Customer\Repositories\CustomerRepository;
use Webkul\Customer\Repositories\WishlistRepository;
use Webkul\Product\Repositories\ProductRepository;
class WishlistController extends Controller
{
@ -16,17 +17,24 @@ class WishlistController extends Controller
protected $_config;
/**
* ProductRepository object
* Current customer.
*
* @var \Webkul\Customer\Models\Customer
*/
protected $currentCustomer;
/**
* Product repository instance.
*
* @var \Webkul\Customer\Repositories\WishlistRepository
*/
*/
protected $wishlistRepository;
/**
* WishlistRepository object
* Wishlist repository instance.
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
*/
protected $productRepository;
/**
@ -39,15 +47,14 @@ class WishlistController extends Controller
public function __construct(
WishlistRepository $wishlistRepository,
ProductRepository $productRepository
)
{
$this->middleware('customer');
) {
$this->_config = request('_config');
$this->wishlistRepository = $wishlistRepository;
$this->productRepository = $productRepository;
$this->currentCustomer = auth()->guard('customer')->user();
}
/**
@ -57,13 +64,16 @@ class WishlistController extends Controller
*/
public function index()
{
$wishlistItems = $this->wishlistRepository->getCustomerWishlist();
if (! core()->getConfigData('general.content.shop.wishlist_option')) {
abort(404);
}
return view($this->_config['view'])->with('items', $wishlistItems);
return view($this->_config['view'], [
'items' => $this->wishlistRepository->getCustomerWishlist(),
'isSharingEnabled' => $this->isSharingEnabled(),
'isWishlistShared' => $this->currentCustomer->isWishlistShared(),
'wishlistSharedLink' => $this->currentCustomer->getWishlistSharedLink()
]);
}
/**
@ -82,16 +92,18 @@ class WishlistController extends Controller
$data = [
'channel_id' => core()->getCurrentChannel()->id,
'product_id' => $itemId,
'customer_id' => auth()->guard('customer')->user()->id,
'customer_id' => $this->currentCustomer->id,
];
$checked = $this->wishlistRepository->findWhere([
'channel_id' => core()->getCurrentChannel()->id,
'product_id' => $itemId,
'customer_id' => auth()->guard('customer')->user()->id,
'customer_id' => $this->currentCustomer->id,
]);
// accidental case if some one adds id of the product in the anchor tag amd gives id of a variant.
/**
* Accidental case if some one adds id of the product in the anchor tag amd gives id of a variant.
*/
if ($product->parent_id != null) {
$product = $this->productRepository->findOneByField('id', $product->parent_id);
$data['product_id'] = $product->id;
@ -118,6 +130,59 @@ class WishlistController extends Controller
}
}
/**
* Share wishlist.
*
* @return \Illuminate\Http\Response
*/
public function share()
{
if ($this->isSharingEnabled()) {
$data = $this->validate(request(), [
'shared' => 'required|boolean'
]);
$updateCounts = $this->currentCustomer->wishlist_items()->update(['shared' => $data['shared']]);
if ($updateCounts && $updateCounts > 0) {
session()->flash('success', 'Shared wishlist settings updated successfully');
return redirect()->back();
}
}
return redirect()->back();
}
/**
* View of shared wishlist.
*
* @return \Illuminate\Http\Response
*/
public function shared(CustomerRepository $customerRepository)
{
if (
! $this->isSharingEnabled()
|| ! request()->hasValidSignature()
|| ! core()->getConfigData('general.content.shop.wishlist_option')
) {
abort(404);
}
$customer = $customerRepository->find(request()->get('id'));
$items = $customer->wishlist_items()->where('shared', 1)->get();
if ($customer && $items->isNotEmpty()) {
return view($this->_config['view'], compact('customer', 'items'));
}
/**
* All remaining cases should be aborted with 404 page.
*/
abort(404);
}
/**
* Function to remove item to the wishlist.
*
@ -126,7 +191,7 @@ class WishlistController extends Controller
*/
public function remove($itemId)
{
$customerWishlistItems = auth()->guard('customer')->user()->wishlist_items;
$customerWishlistItems = $this->currentCustomer->wishlist_items;
foreach ($customerWishlistItems as $customerWishlistItem) {
if ($itemId == $customerWishlistItem->id) {
@ -153,7 +218,7 @@ class WishlistController extends Controller
{
$wishlistItem = $this->wishlistRepository->findOneWhere([
'id' => $itemId,
'customer_id' => auth()->guard('customer')->user()->id,
'customer_id' => $this->currentCustomer->id,
]);
if (! $wishlistItem) {
@ -188,7 +253,7 @@ class WishlistController extends Controller
*/
public function removeAll()
{
$wishlistItems = auth()->guard('customer')->user()->wishlist_items;
$wishlistItems = $this->currentCustomer->wishlist_items;
if ($wishlistItems->count() > 0) {
foreach ($wishlistItems as $wishlistItem) {
@ -200,4 +265,16 @@ class WishlistController extends Controller
return redirect()->back();
}
/**
* Is sharing enabled.
*
* @return bool
*/
public function isSharingEnabled(): bool
{
return (bool) core()->getConfigData('customer.settings.wishlist.share')
? true
: false;
}
}

View File

@ -2,29 +2,36 @@
namespace Webkul\Customer\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\URL;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Webkul\Checkout\Models\CartProxy;
use Webkul\Sales\Models\OrderProxy;
use Webkul\Core\Models\SubscribersListProxy;
use Webkul\Product\Models\ProductReviewProxy;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Webkul\Customer\Contracts\Customer as CustomerContract;
use Webkul\Customer\Database\Factories\CustomerFactory;
use Webkul\Customer\Notifications\CustomerResetPassword;
use Webkul\Customer\Contracts\Customer as CustomerContract;
use Illuminate\Support\Facades\Storage;
use Webkul\Customer\Database\Factories\CustomerAddressFactory;
use Webkul\Product\Models\ProductReviewProxy;
use Webkul\Sales\Models\OrderProxy;
class Customer extends Authenticatable implements CustomerContract, JWTSubject
{
use Notifiable, HasFactory;
use HasFactory, Notifiable;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'customers';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'first_name',
'last_name',
@ -42,6 +49,11 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject
'status',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array
*/
protected $hidden = [
'password',
'api_token',
@ -49,60 +61,19 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject
];
/**
* Get image url for the customer image.
* Create a new factory instance for the model.
*
* @return \Webkul\Customer\Database\Factories\CustomerFactory
*/
public function image_url()
protected static function newFactory()
{
if (! $this->image) {
return;
}
return Storage::url($this->image);
}
/**
* Get image url for the customer profile.
*/
public function getImageUrlAttribute()
{
return $this->image_url();
}
/**
* Get the customer full name.
*/
public function getNameAttribute(): string
{
return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);
}
/**
* Email exists or not
*/
public function emailExists($email): bool
{
$results = $this->where('email', $email);
if ($results->count() === 0) {
return false;
}
return true;
}
/**
* Get the customer group that owns the customer.
*/
public function group(): BelongsTo
{
return $this->belongsTo(CustomerGroupProxy::modelClass(), 'customer_group_id');
return CustomerFactory::new();
}
/**
* Send the password reset notification.
*
* @param string $token
*
* @return void
*/
public function sendPasswordResetNotification($token): void
@ -110,73 +81,6 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject
$this->notify(new CustomerResetPassword($token));
}
/**
* Get the customer address that owns the customer.
*/
public function addresses(): HasMany
{
return $this->hasMany(CustomerAddressProxy::modelClass(), 'customer_id');
}
/**
* Get default customer address that owns the customer.
*/
public function default_address(): HasOne
{
return $this->hasOne(CustomerAddressProxy::modelClass(), 'customer_id')
->where('default_address', 1);
}
/**
* Customer's relation with wishlist items
*/
public function wishlist_items(): HasMany
{
return $this->hasMany(WishlistProxy::modelClass(), 'customer_id');
}
/**
* get all cart inactive cart instance of a customer
*/
public function all_carts(): HasMany
{
return $this->hasMany(CartProxy::modelClass(), 'customer_id');
}
/**
* get inactive cart instance of a customer
*/
public function inactive_carts(): HasMany
{
return $this->hasMany(CartProxy::modelClass(), 'customer_id')
->where('is_active', 0);
}
/**
* get active cart inactive cart instance of a customer
*/
public function active_carts(): HasMany
{
return $this->hasMany(CartProxy::modelClass(), 'customer_id')
->where('is_active', 1);
}
/**
* get all reviews of a customer
*/
public function all_reviews(): HasMany
{
return $this->hasMany(ProductReviewProxy::modelClass(), 'customer_id');
}
/**
* get all orders of a customer
*/
public function all_orders(): HasMany
{
return $this->hasMany(OrderProxy::modelClass(), 'customer_id');
}
/**
* Get the identifier that will be stored in the subject claim of the JWT.
*
@ -198,20 +102,180 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject
}
/**
* Get the customer's subscription.
* Get image url for the customer profile.
*
* @return string|null
*/
public function subscription(): HasOne
public function getImageUrlAttribute()
{
return $this->hasOne(SubscribersListProxy::modelClass(), 'customer_id');
return $this->image_url();
}
/**
* Create a new factory instance for the model
* Get the customer full name.
*
* @return CustomerFactory
* @return string
*/
protected static function newFactory(): CustomerFactory
public function getNameAttribute(): string
{
return CustomerFactory::new();
return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);
}
/**
* Get image url for the customer image.
*
* @return string|null
*/
public function image_url()
{
if (! $this->image) {
return;
}
return Storage::url($this->image);
}
/**
* Is email exists or not.
*
* @param string $email
* @return bool
*/
public function emailExists($email): bool
{
$results = $this->where('email', $email);
if ($results->count() === 0) {
return false;
}
return true;
}
/**
* Get the customer group that owns the customer.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function group()
{
return $this->belongsTo(CustomerGroupProxy::modelClass(), 'customer_group_id');
}
/**
* Get the customer address that owns the customer.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function addresses()
{
return $this->hasMany(CustomerAddressProxy::modelClass(), 'customer_id');
}
/**
* Get default customer address that owns the customer.
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function default_address()
{
return $this->hasOne(CustomerAddressProxy::modelClass(), 'customer_id')
->where('default_address', 1);
}
/**
* Customer's relation with wishlist items.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function wishlist_items()
{
return $this->hasMany(WishlistProxy::modelClass(), 'customer_id');
}
/**
* Is wishlist shared by the customer.
*
* @return bool
*/
public function isWishlistShared(): bool
{
return $this->wishlist_items()->where('shared', 1)->first()
? true
: false;
}
/**
* Get wishlist shared link.
*
* @return string|null
*/
public function getWishlistSharedLink()
{
return $this->isWishlistShared()
? URL::signedRoute('customer.wishlist.shared', ['id' => $this->id])
: null;
}
/**
* Get all cart inactive cart instance of a customer.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function all_carts()
{
return $this->hasMany(CartProxy::modelClass(), 'customer_id');
}
/**
* Get inactive cart instance of a customer.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function inactive_carts()
{
return $this->hasMany(CartProxy::modelClass(), 'customer_id')
->where('is_active', 0);
}
/**
* Get active cart instance of a customer.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function active_carts()
{
return $this->hasMany(CartProxy::modelClass(), 'customer_id')
->where('is_active', 1);
}
/**
* Get all orders of a customer.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function all_orders()
{
return $this->hasMany(OrderProxy::modelClass(), 'customer_id');
}
/**
* Get all reviews of a customer.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function all_reviews()
{
return $this->hasMany(ProductReviewProxy::modelClass(), 'customer_id');
}
/**
* Get the customer's subscription.
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function subscription()
{
return $this->hasOne(SubscribersListProxy::modelClass(), 'customer_id');
}
}

View File

@ -3,29 +3,42 @@
namespace Webkul\Customer\Models;
use Illuminate\Database\Eloquent\Model;
use Webkul\Product\Models\ProductProxy;
use Webkul\Customer\Contracts\Wishlist as WishlistContract;
use Webkul\Product\Models\ProductProxy;
class Wishlist extends Model implements WishlistContract
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'wishlist';
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'additional' => 'array',
];
protected $fillable = [
'channel_id',
'product_id',
'customer_id',
'additional',
'moved_to_cart',
'shared',
'time_of_moving'
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = [
'id',
'created_at',
'updated_at',
];
/**
* The Product that belong to the wishlist.
* The product that belong to the wishlist.
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function product()
{

View File

@ -6,5 +6,4 @@ use Konekt\Concord\Proxies\ModelProxy;
class WishlistProxy extends ModelProxy
{
}
}

View File

@ -2,26 +2,25 @@
namespace Webkul\Customer\Repositories;
use Webkul\Core\Eloquent\Repository;
use Illuminate\Support\Facades\Storage;
use Webkul\Core\Eloquent\Repository;
class CustomerRepository extends Repository
{
/**
* Specify Model class name
* Specify model class name.
*
* @return mixed
*/
function model()
public function model()
{
return 'Webkul\Customer\Contracts\Customer';
return \Webkul\Customer\Contracts\Customer::class;
}
/**
* Check if customer has order pending or processing.
*
* @param Webkul\Customer\Models\Customer
* @param \Webkul\Customer\Models\Customer
* @return boolean
*/
public function checkIfCustomerHasOrderPendingOrProcessing($customer)
@ -34,7 +33,7 @@ class CustomerRepository extends Repository
/**
* Check if bulk customers, if they have order pending or processing.
*
* @param array
* @param array
* @return boolean
*/
public function checkBulkCustomerIfTheyHaveOrderPendingOrProcessing($customerIds)
@ -54,7 +53,7 @@ class CustomerRepository extends Repository
* Upload customer's images.
*
* @param array $data
* @param \Webkul\Customer\Contracts\Customer $customer
* @param \Webkul\Customer\Models\Customer $customer
* @param string $type
* @return void
*/
@ -85,4 +84,4 @@ class CustomerRepository extends Repository
$customer->save();
}
}
}
}

View File

@ -13,7 +13,7 @@ class WishlistRepository extends Repository
*/
function model()
{
return 'Webkul\Customer\Contracts\Wishlist';
return \Webkul\Customer\Contracts\Wishlist::class;
}
/**
@ -57,6 +57,20 @@ class WishlistRepository extends Repository
return $this->model->find($id)->item_wishlist;
}
/**
* Get shared wishlist by customer's id.
*
* @param int $id
* @return Illuminate\Database\Eloquent\Collection
*/
public function getSharedWishlistByCustomerId($id)
{
return $this
->where('customer_id', $id)
->where('shared', 1)
->get();
}
/**
* Get customer wishlist items.
*
@ -75,7 +89,7 @@ class WishlistRepository extends Repository
->where(function ($qb) {
$qb
->WhereIn('ps.type', ['configurable', 'grouped', 'downloadable', 'bundle', 'booking'])
->orwhereIn('ps.type', ['simple', 'virtual'])->where('pv.qty' , '>' , 0);
->orwhereIn('ps.type', ['simple', 'virtual'])->where('pv.qty', '>', 0);
});
}
@ -85,4 +99,4 @@ class WishlistRepository extends Repository
'customer_id' => auth()->guard('customer')->user()->id,
])->paginate(5);
}
}
}

View File

@ -346,26 +346,38 @@ return [
],
'wishlist' => [
'page-title' => 'العملاء - قائمة الامنيات',
'title' => 'قائمة الأمنيات',
'deleteall' => 'احذف الكل',
'moveall' => 'نقل الكل إلى عربة التوسق',
'move-to-cart' => 'نقل إلى عربة التسوق',
'error' => 'لا يمكن إضافة المنتج إلى قائمة الأمنيات ، الرجاء المحاولة لاحقا',
'add' => 'تم إضافة العنصر بنجاح إلى قائمة الأمنيات',
'remove' => 'تم حذف العنصر بنجاح من قائمة الأمنيات',
'add-wishlist-text' => 'إضافة منتج إلى قائمة الأمنيات',
'page-title' => 'العملاء - قائمة الامنيات',
'title' => 'قائمة الأمنيات',
'deleteall' => 'احذف الكل',
'moveall' => 'نقل الكل إلى عربة التوسق',
'move-to-cart' => 'نقل إلى عربة التسوق',
'error' => 'لا يمكن إضافة المنتج إلى قائمة الأمنيات ، الرجاء المحاولة لاحقا',
'add' => 'تم إضافة العنصر بنجاح إلى قائمة الأمنيات',
'remove' => 'تم حذف العنصر بنجاح من قائمة الأمنيات',
'add-wishlist-text' => 'إضافة منتج إلى قائمة الأمنيات',
'remove-wishlist-text' => 'أزل المنتج من قائمة الأمنيات',
'moved' => 'تم نقل البند بنجاح إلى قائمة الأمنيات',
'option-missing' => 'خيارات المنتج مفقودة ، لذلك لا يمكن نقل العنصر إلى قائمة الرغبات.',
'move-error' => 'لا يمكن نقل العنصر إلى قائمة الأمنيات ، رجاء حاول مرة أخرى لاحقا',
'success' => 'البند مضاف بنجاح إلى قائمة الأمنيات',
'failure' => 'لا يمكن إضافة العنصر إلى قائمة الأمنيات ، رجاء حاول مرة أخرى لاحقا',
'already' => 'العنصر موجود بالفعل في قائمة أمنياتك',
'removed' => 'البند حذف بنجاح من قائمة الأمنيات',
'remove-fail' => 'لا يمكن حذف العنصر من قائمة الأماني ، الرجاء المحاولة لاحقا',
'empty' => 'ليس لديك أي عناصر في قائمة الأمنيات',
'remove-all-success' => 'كل الأشياء من قائمة أمانيك قد أزيلت',
'moved' => 'تم نقل البند بنجاح إلى قائمة الأمنيات',
'option-missing' => 'خيارات المنتج مفقودة ، لذلك لا يمكن نقل العنصر إلى قائمة الرغبات.',
'move-error' => 'لا يمكن نقل العنصر إلى قائمة الأمنيات ، رجاء حاول مرة أخرى لاحقا',
'success' => 'البند مضاف بنجاح إلى قائمة الأمنيات',
'failure' => 'لا يمكن إضافة العنصر إلى قائمة الأمنيات ، رجاء حاول مرة أخرى لاحقا',
'already' => 'العنصر موجود بالفعل في قائمة أمنياتك',
'removed' => 'البند حذف بنجاح من قائمة الأمنيات',
'remove-fail' => 'لا يمكن حذف العنصر من قائمة الأماني ، الرجاء المحاولة لاحقا',
'empty' => 'ليس لديك أي عناصر في قائمة الأمنيات',
'remove-all-success' => 'كل الأشياء من قائمة أمانيك قد أزيلت',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -343,26 +343,38 @@ return [
],
'wishlist' => [
'page-title' => 'Wunschliste',
'title' => 'Wunschliste',
'deleteall' => 'Alles löschen',
'moveall' => 'Alle Produkte zum Warenkorb hinzufügen',
'move-to-cart' => 'In den Warenkorb legen',
'error' => 'Das Produkt kann aufgrund unbekannter Probleme nicht zur Wunschliste hinzugefügt werden. Bitte versuchen Sie es später erneut',
'add' => 'Artikel erfolgreich zur Wunschliste hinzugefügt',
'remove' => 'Artikel erfolgreich von der Wunschliste entfernt',
'add-wishlist-text' => 'Produkt zur Wunschliste hinzufügen',
'remove-wishlist-text' => 'Produkt von der Wunschliste entfernen',
'moved' => 'Artikel erfolgreich in den Warenkorb verschoben',
'option-missing' => 'Produktoptionen fehlen, sodass Artikel nicht auf die Wunschliste verschoben werden können.',
'move-error' => 'Artikel kann nicht auf die Wunschliste verschoben werden. Bitte versuchen Sie es später erneut',
'success' => 'Artikel erfolgreich zur Wunschliste hinzugefügt',
'failure' => 'Artikel kann nicht zur Wunschliste hinzugefügt werden. Bitte versuchen Sie es später erneut',
'already' => 'Artikel bereits in Ihrer Wunschliste vorhanden',
'removed' => 'Artikel erfolgreich von der Wunschliste entfernt',
'remove-fail' => 'Artikel kann nicht von der Wunschliste entfernt werden. Bitte versuchen Sie es später erneut',
'empty' => 'Sie haben keine Artikel auf Ihrer Wunschliste',
'remove-all-success' => 'Alle Artikel von Ihrer Wunschliste wurden entfernt',
'page-title' => 'Wunschliste',
'title' => 'Wunschliste',
'deleteall' => 'Alles löschen',
'moveall' => 'Alle Produkte zum Warenkorb hinzufügen',
'move-to-cart' => 'In den Warenkorb legen',
'error' => 'Das Produkt kann aufgrund unbekannter Probleme nicht zur Wunschliste hinzugefügt werden. Bitte versuchen Sie es später erneut',
'add' => 'Artikel erfolgreich zur Wunschliste hinzugefügt',
'remove' => 'Artikel erfolgreich von der Wunschliste entfernt',
'add-wishlist-text' => 'Produkt zur Wunschliste hinzufügen',
'remove-wishlist-text' => 'Produkt von der Wunschliste entfernen',
'moved' => 'Artikel erfolgreich in den Warenkorb verschoben',
'option-missing' => 'Produktoptionen fehlen, sodass Artikel nicht auf die Wunschliste verschoben werden können.',
'move-error' => 'Artikel kann nicht auf die Wunschliste verschoben werden. Bitte versuchen Sie es später erneut',
'success' => 'Artikel erfolgreich zur Wunschliste hinzugefügt',
'failure' => 'Artikel kann nicht zur Wunschliste hinzugefügt werden. Bitte versuchen Sie es später erneut',
'already' => 'Artikel bereits in Ihrer Wunschliste vorhanden',
'removed' => 'Artikel erfolgreich von der Wunschliste entfernt',
'remove-fail' => 'Artikel kann nicht von der Wunschliste entfernt werden. Bitte versuchen Sie es später erneut',
'empty' => 'Sie haben keine Artikel auf Ihrer Wunschliste',
'remove-all-success' => 'Alle Artikel von Ihrer Wunschliste wurden entfernt',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -347,26 +347,38 @@ return [
],
'wishlist' => [
'page-title' => 'Wishlist',
'title' => 'Wishlist',
'deleteall' => 'Delete All',
'moveall' => 'Move All Products To Cart',
'move-to-cart' => 'Move To Cart',
'error' => 'Cannot add product to wishlist due to unknown problems, please checkback later',
'add' => 'Item successfully added to wishlist',
'remove' => 'Item successfully removed from wishlist',
'add-wishlist-text' => 'Add product to wishlist',
'remove-wishlist-text' => 'Remove product from wishlist',
'moved' => 'Item successfully moved To cart',
'option-missing' => 'Product options are missing, so item can not be moved to the wishlist.',
'move-error' => 'Item cannot be moved to wishlist, Please try again later',
'success' => 'Item successfully added to wishlist',
'failure' => 'Item cannot be added to wishlist, Please try again later',
'already' => 'Item already present in your wishlist',
'removed' => 'Item successfully removed from wishlist',
'remove-fail' => 'Item cannot Be removed from wishlist, Please try again later',
'empty' => 'You do not have any items in your wishlist',
'remove-all-success' => 'All the items from your wishlist have been removed',
'page-title' => 'Wishlist',
'title' => 'Wishlist',
'deleteall' => 'Delete All',
'moveall' => 'Move All Products To Cart',
'move-to-cart' => 'Move To Cart',
'error' => 'Cannot add product to wishlist due to unknown problems, please checkback later',
'add' => 'Item successfully added to wishlist',
'remove' => 'Item successfully removed from wishlist',
'add-wishlist-text' => 'Add product to wishlist',
'remove-wishlist-text' => 'Remove product from wishlist',
'moved' => 'Item successfully moved To cart',
'option-missing' => 'Product options are missing, so item can not be moved to the wishlist.',
'move-error' => 'Item cannot be moved to wishlist, Please try again later',
'success' => 'Item successfully added to wishlist',
'failure' => 'Item cannot be added to wishlist, Please try again later',
'already' => 'Item already present in your wishlist',
'removed' => 'Item successfully removed from wishlist',
'remove-fail' => 'Item cannot Be removed from wishlist, Please try again later',
'empty' => 'You do not have any items in your wishlist',
'remove-all-success' => 'All the items from your wishlist have been removed',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -346,26 +346,38 @@ return [
],
'wishlist' => [
'page-title' => 'Cliente - Lista de deseos',
'title' => 'Lista de deseos',
'deleteall' => 'Eliminar todo',
'moveall' => 'Mover todos los productos al carrito',
'move-to-cart' => 'Mover al carrito',
'error' => 'No se puede agregar el producto a la lista de deseos por problemas desconocidos, inténtelo más tarde.',
'add' => 'Artículo añadido a la lista de deseos',
'remove' => 'Artículo eliminado de la lista de deseos',
'add-wishlist-text' => 'Añadir producto a la lista de deseos',
'remove-wishlist-text' => 'Eliminar producto de la lista de deseos',
'moved' => 'Artículo movido al carrito exitosamente',
'option-missing' => 'Faltan opciones del producto, por lo que el artículo no se puede mover a la lista de deseos.',
'move-error' => 'El artículo no se puede añadir a la lista de deseos, por favor inténtalo más tarde',
'success' => 'Artículo añadido a la lista de deseos',
'failure' => 'El artículo no se puede añadir a la lista de deseos, por favor inténtalo más tarde',
'already' => 'Este artículo ya está en tu lista de deseos.',
'removed' => 'Artículo eliminado de la lista de deseos',
'remove-fail' => 'El artículo no se puede eliminar de la lista de deseos, por favor inténtalo más tarde',
'empty' => 'No tiene ningún producto en su lista de deseos',
'remove-all-success' => 'Todos los artículos de su lista de deseos han sido eliminados',
'page-title' => 'Cliente - Lista de deseos',
'title' => 'Lista de deseos',
'deleteall' => 'Eliminar todo',
'moveall' => 'Mover todos los productos al carrito',
'move-to-cart' => 'Mover al carrito',
'error' => 'No se puede agregar el producto a la lista de deseos por problemas desconocidos, inténtelo más tarde.',
'add' => 'Artículo añadido a la lista de deseos',
'remove' => 'Artículo eliminado de la lista de deseos',
'add-wishlist-text' => 'Añadir producto a la lista de deseos',
'remove-wishlist-text' => 'Eliminar producto de la lista de deseos',
'moved' => 'Artículo movido al carrito exitosamente',
'option-missing' => 'Faltan opciones del producto, por lo que el artículo no se puede mover a la lista de deseos.',
'move-error' => 'El artículo no se puede añadir a la lista de deseos, por favor inténtalo más tarde',
'success' => 'Artículo añadido a la lista de deseos',
'failure' => 'El artículo no se puede añadir a la lista de deseos, por favor inténtalo más tarde',
'already' => 'Este artículo ya está en tu lista de deseos.',
'removed' => 'Artículo eliminado de la lista de deseos',
'remove-fail' => 'El artículo no se puede eliminar de la lista de deseos, por favor inténtalo más tarde',
'empty' => 'No tiene ningún producto en su lista de deseos',
'remove-all-success' => 'Todos los artículos de su lista de deseos han sido eliminados',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -342,26 +342,38 @@ return [
],
'wishlist' => [
'page-title' => 'مشتری - لیست دلخواه',
'title' => 'لیست دلخواه',
'deleteall' => 'حذف همه',
'moveall' => 'انتقال همه محصولات به سبد خرید',
'move-to-cart' => 'انتقال به سبد خرید',
'error' => 'به دلیل مشکلات ناشناخته نمی توان محصول را به لیست دلخواه اضافه کرد ، لطفا بعداً بررسی کنید',
'add' => 'مورد با موفقیت به لیست دلخواه اضافه شد',
'remove' => 'مورد با موفقیت از لیست دلخواه حذف شد',
'add-wishlist-text' => 'محصول را به لیست دلخواه اضافه کنید',
'page-title' => 'مشتری - لیست دلخواه',
'title' => 'لیست دلخواه',
'deleteall' => 'حذف همه',
'moveall' => 'انتقال همه محصولات به سبد خرید',
'move-to-cart' => 'انتقال به سبد خرید',
'error' => 'به دلیل مشکلات ناشناخته نمی توان محصول را به لیست دلخواه اضافه کرد ، لطفا بعداً بررسی کنید',
'add' => 'مورد با موفقیت به لیست دلخواه اضافه شد',
'remove' => 'مورد با موفقیت از لیست دلخواه حذف شد',
'add-wishlist-text' => 'محصول را به لیست دلخواه اضافه کنید',
'remove-wishlist-text' => 'محصول را از لیست دلخواه حذف کنید',
'moved' => 'مورد با موفقیت به سبد خرید منتقل شد',
'option-missing' => 'گزینه های محصول وجود ندارد ، بنابراین مورد را نمی توان به لیست دلخواه منتقل کرد.',
'move-error' => 'مورد را نمی توان به لیست دلخواه منتقل کرد ، لطفا بعداً دوباره امتحان کنید',
'success' => 'مورد با موفقیت به لیست دلخواه اضافه شد',
'failure' => 'مورد را نمی توان به لیست دلخواه اضافه کرد ، لطفا بعداً دوباره امتحان کنید',
'already' => 'مورد موجود در لیست دلخواه شما موجود است',
'removed' => 'مورد با موفقیت از لیست دلخواه حذف شد',
'remove-fail' => 'لطفاً مورد از لیست لیست حذف نشود ، لطفا بعداً دوباره امتحان کنید',
'empty' => 'شما هیچ موردی در لیست دلخواه خود ندارید',
'remove-all-success' => 'همه موارد از لیست دلخواه شما حذف شده است',
'moved' => 'مورد با موفقیت به سبد خرید منتقل شد',
'option-missing' => 'گزینه های محصول وجود ندارد ، بنابراین مورد را نمی توان به لیست دلخواه منتقل کرد.',
'move-error' => 'مورد را نمی توان به لیست دلخواه منتقل کرد ، لطفا بعداً دوباره امتحان کنید',
'success' => 'مورد با موفقیت به لیست دلخواه اضافه شد',
'failure' => 'مورد را نمی توان به لیست دلخواه اضافه کرد ، لطفا بعداً دوباره امتحان کنید',
'already' => 'مورد موجود در لیست دلخواه شما موجود است',
'removed' => 'مورد با موفقیت از لیست دلخواه حذف شد',
'remove-fail' => 'لطفاً مورد از لیست لیست حذف نشود ، لطفا بعداً دوباره امتحان کنید',
'empty' => 'شما هیچ موردی در لیست دلخواه خود ندارید',
'remove-all-success' => 'همه موارد از لیست دلخواه شما حذف شده است',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -344,26 +344,38 @@ return [
],
'wishlist' => [
'page-title' => 'Liste de souhaits',
'title' => 'Liste de souhaits',
'deleteall' => 'Tout supprimer',
'moveall' => 'Déplacer tous les produits vers le panier',
'move-to-cart' => 'Passer au panier',
'error' => 'Impossible d\'ajouter le produit à la liste de souhaits en raison de problèmes inconnus, veuillez vérifier plus tard',
'add' => 'Article ajouté avec succès à la liste de souhaits',
'remove' => 'Article supprimé avec succès de la liste de souhaits',
'add-wishlist-text' => 'Ajouter un produit à la liste de souhaits',
'page-title' => 'Liste de souhaits',
'title' => 'Liste de souhaits',
'deleteall' => 'Tout supprimer',
'moveall' => 'Déplacer tous les produits vers le panier',
'move-to-cart' => 'Passer au panier',
'error' => 'Impossible d\'ajouter le produit à la liste de souhaits en raison de problèmes inconnus, veuillez vérifier plus tard',
'add' => 'Article ajouté avec succès à la liste de souhaits',
'remove' => 'Article supprimé avec succès de la liste de souhaits',
'add-wishlist-text' => 'Ajouter un produit à la liste de souhaits',
'remove-wishlist-text' => 'Supprimer le produit de la liste de souhaits',
'moved' => 'Article déplacé avec succès Vers le panier',
'option-missing' => 'Les options du produit sont manquantes, l\'article ne peut donc pas être déplacé vers la liste de souhaits.',
'move-error' => 'L\'article ne peut pas être déplacé vers la liste de souhaits, veuillez réessayer plus tard',
'success' => 'Article ajouté avec succès à la liste de souhaits',
'failure' => 'L\'article ne peut pas être ajouté à la liste de souhaits, veuillez réessayer plus tard',
'already' => 'Article déjà présent dans votre wishlist',
'removed' => 'Article supprimé avec succès de la liste de souhaits',
'remove-fail' => 'L\'article ne peut pas être supprimé de la liste de souhaits, veuillez réessayer plus tard',
'empty' => 'Vous n\'avez aucun article dans votre liste de souhaits',
'remove-all-success' => 'Tous les articles de votre liste de souhaits ont été supprimés',
'moved' => 'Article déplacé avec succès Vers le panier',
'option-missing' => 'Les options du produit sont manquantes, l\'article ne peut donc pas être déplacé vers la liste de souhaits.',
'move-error' => 'L\'article ne peut pas être déplacé vers la liste de souhaits, veuillez réessayer plus tard',
'success' => 'Article ajouté avec succès à la liste de souhaits',
'failure' => 'L\'article ne peut pas être ajouté à la liste de souhaits, veuillez réessayer plus tard',
'already' => 'Article déjà présent dans votre wishlist',
'removed' => 'Article supprimé avec succès de la liste de souhaits',
'remove-fail' => 'L\'article ne peut pas être supprimé de la liste de souhaits, veuillez réessayer plus tard',
'empty' => 'Vous n\'avez aucun article dans votre liste de souhaits',
'remove-all-success' => 'Tous les articles de votre liste de souhaits ont été supprimés',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -344,26 +344,38 @@ return [
],
'wishlist' => [
'page-title' => 'Preferiti',
'title' => 'Preferiti',
'deleteall' => 'Elimina tutti',
'moveall' => 'Aggiungi tutti i Prodotti al Carrello',
'move-to-cart' => 'Aggiungi al Carrello',
'error' => 'Non è possibile aggiungere il prodotto ai preferiti per un problema sconosciuto, provare nuovamente più tardi',
'add' => 'Il prodotto è stato aggiunto ai preferiti',
'remove' => 'Articolo rimosso dai preferiti',
'add-wishlist-text' => 'Aggiungi prodotto a wishlist',
'page-title' => 'Preferiti',
'title' => 'Preferiti',
'deleteall' => 'Elimina tutti',
'moveall' => 'Aggiungi tutti i Prodotti al Carrello',
'move-to-cart' => 'Aggiungi al Carrello',
'error' => 'Non è possibile aggiungere il prodotto ai preferiti per un problema sconosciuto, provare nuovamente più tardi',
'add' => 'Il prodotto è stato aggiunto ai preferiti',
'remove' => 'Articolo rimosso dai preferiti',
'add-wishlist-text' => 'Aggiungi prodotto a wishlist',
'remove-wishlist-text' => 'Rimuovi prodotti da wishlist',
'moved' => 'Articolo aggiunto al carrello',
'option-missing' => 'Le opzioni del prodotto mancano, per questo il prodotto non può essere aggiunto ai preferiti.',
'move-error' => 'Il prodotto non può essere aggiunto ai preferiti, prova nuovamente più tardi',
'success' => 'Il prodotto è stato aggiunto ai preferiti',
'failure' => 'Il prodotto non può essere aggiunto ai preferiti, prova nuovamente più tardi',
'already' => 'Il prodotto è già presente nei tuoi preferiti',
'removed' => 'Il prodotto è stato rimosso dai preferiti',
'remove-fail' => 'Il prodotto non può essere rimosso dai preferiti, prova nuovamente più tardi',
'empty' => 'Non hai ancora aggiunto prodotti ai tuoi preferiti',
'remove-all-success' => 'Tutti gli articoli sono stati rimossi dai tuoi preferiti',
'moved' => 'Articolo aggiunto al carrello',
'option-missing' => 'Le opzioni del prodotto mancano, per questo il prodotto non può essere aggiunto ai preferiti.',
'move-error' => 'Il prodotto non può essere aggiunto ai preferiti, prova nuovamente più tardi',
'success' => 'Il prodotto è stato aggiunto ai preferiti',
'failure' => 'Il prodotto non può essere aggiunto ai preferiti, prova nuovamente più tardi',
'already' => 'Il prodotto è già presente nei tuoi preferiti',
'removed' => 'Il prodotto è stato rimosso dai preferiti',
'remove-fail' => 'Il prodotto non può essere rimosso dai preferiti, prova nuovamente più tardi',
'empty' => 'Non hai ancora aggiunto prodotti ai tuoi preferiti',
'remove-all-success' => 'Tutti gli articoli sono stati rimossi dai tuoi preferiti',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -325,25 +325,37 @@ return [
],
'wishlist' => [
'page-title' => 'お気に入り',
'title' => 'お気に入り',
'deleteall' => '全て削除',
'moveall' => '全てのアイテムをカートへ移動する',
'move-to-cart' => 'カートへ移動',
'error' => 'アイテムのお気に入り追加に失敗しました。しばらくしてから再度お試し下さい。',
'add' => 'アイテムをお気に入りに追加',
'remove' => 'アイテムをお気に入りから削除',
'add-wishlist-text' => '製品をウィッシュリストに追加',
'remove-wishlist-text' => 'ウィッシュリストから商品を削除',
'moved' => 'アイテムをカートへ移動しました',
'move-error' => 'アイテムのお気に入り追加に失敗しました。しばらくしてから再度お試し下さい。',
'success' => 'アイテムをお気に入りに追加しました',
'failure' => 'アイテムのお気に入り追加に失敗しました。しばらくしてから再度お試し下さい。',
'already' => 'このアイテムは既にお気に入りに追加されています。',
'removed' => 'アイテムはお気に入りから削除されました。',
'remove-fail' => 'アイテムをお気に入りから削除することができませんでした。しばらくしてから再度お試し下さい。',
'empty' => 'お気に入りにアイテムがありません。',
'remove-all-success' => '全てのアイテムがお気に入りから削除されました。',
'page-title' => 'お気に入り',
'title' => 'お気に入り',
'deleteall' => '全て削除',
'moveall' => '全てのアイテムをカートへ移動する',
'move-to-cart' => 'カートへ移動',
'error' => 'アイテムのお気に入り追加に失敗しました。しばらくしてから再度お試し下さい。',
'add' => 'アイテムをお気に入りに追加',
'remove' => 'アイテムをお気に入りから削除',
'add-wishlist-text' => '製品をウィッシュリストに追加',
'remove-wishlist-text' => 'ウィッシュリストから商品を削除',
'moved' => 'アイテムをカートへ移動しました',
'move-error' => 'アイテムのお気に入り追加に失敗しました。しばらくしてから再度お試し下さい。',
'success' => 'アイテムをお気に入りに追加しました',
'failure' => 'アイテムのお気に入り追加に失敗しました。しばらくしてから再度お試し下さい。',
'already' => 'このアイテムは既にお気に入りに追加されています。',
'removed' => 'アイテムはお気に入りから削除されました。',
'remove-fail' => 'アイテムをお気に入りから削除することができませんでした。しばらくしてから再度お試し下さい。',
'empty' => 'お気に入りにアイテムがありません。',
'remove-all-success' => '全てのアイテムがお気に入りから削除されました。',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -350,26 +350,38 @@ return [
],
'wishlist' => [
'page-title' => 'Verlanglijst',
'title' => 'Verlanglijst',
'deleteall' => 'Alles verwijderen',
'moveall' => 'Verplaats alle producten naar winkelwagen',
'move-to-cart' => 'Verplaatsen naar winkelwagen',
'error' => 'Kan product niet toevoegen aan verlanglijstje vanwege onbekende problemen, kom later terug',
'add' => 'Item succesvol toegevoegd aan verlanglijstje',
'remove' => 'Item succesvol verwijderd van verlanglijstje',
'add-wishlist-text' => 'Toevoegen aan verlanglijst',
'page-title' => 'Verlanglijst',
'title' => 'Verlanglijst',
'deleteall' => 'Alles verwijderen',
'moveall' => 'Verplaats alle producten naar winkelwagen',
'move-to-cart' => 'Verplaatsen naar winkelwagen',
'error' => 'Kan product niet toevoegen aan verlanglijstje vanwege onbekende problemen, kom later terug',
'add' => 'Item succesvol toegevoegd aan verlanglijstje',
'remove' => 'Item succesvol verwijderd van verlanglijstje',
'add-wishlist-text' => 'Toevoegen aan verlanglijst',
'remove-wishlist-text' => 'Remove product from wishlist',
'moved' => 'Artikel succesvol verplaatst naar winkelwagen',
'option-missing' => 'Productopties ontbreken, dus item kan niet naar de verlanglijst worden verplaatst.',
'move-error' => 'Item kan niet naar de verlanglijst worden verplaatst. Probeer het later opnieuw',
'success' => 'Item succesvol toegevoegd aan verlanglijstje',
'failure' => 'Item kan niet worden toegevoegd aan verlanglijstje, probeer het later opnieuw',
'already' => 'Item al aanwezig in uw verlanglijstje',
'removed' => 'Item succesvol verwijderd van verlanglijstje',
'remove-fail' => 'Item kan niet van de verlanglijst worden verwijderd. Probeer het later opnieuw',
'empty' => 'U heeft geen artikelen op uw verlanglijstje',
'remove-all-success' => 'Alle items van uw verlanglijst zijn verwijderd',
'moved' => 'Artikel succesvol verplaatst naar winkelwagen',
'option-missing' => 'Productopties ontbreken, dus item kan niet naar de verlanglijst worden verplaatst.',
'move-error' => 'Item kan niet naar de verlanglijst worden verplaatst. Probeer het later opnieuw',
'success' => 'Item succesvol toegevoegd aan verlanglijstje',
'failure' => 'Item kan niet worden toegevoegd aan verlanglijstje, probeer het later opnieuw',
'already' => 'Item al aanwezig in uw verlanglijstje',
'removed' => 'Item succesvol verwijderd van verlanglijstje',
'remove-fail' => 'Item kan niet van de verlanglijst worden verwijderd. Probeer het later opnieuw',
'empty' => 'U heeft geen artikelen op uw verlanglijstje',
'remove-all-success' => 'Alle items van uw verlanglijst zijn verwijderd',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -344,26 +344,38 @@ return [
],
'wishlist' => [
'page-title' => 'Lista wyboru',
'title' => 'Lista wyboru',
'deleteall' => 'Usuń wszystko',
'moveall' => '„Przenieś wszystkie produkty do koszyka',
'move-to-cart' => 'Przenieś do koszyka',
'error' => 'Nie można dodać produktu do listy wyboru z powodu nieznanych problemów, sprawdź później',
'add' => 'Produkt został pomyślnie dodany do listy wyboru',
'remove' => 'Produkt został pomyślnie usunięty z listy wyboru',
'add-wishlist-text' => 'Dodaj produkt do listy wyboru',
'remove-wishlist-text' => 'Usuń produkt z listy wyboru',
'moved' => 'Produkt pomyślnie przeniesiono do koszyka',
'option-missing' => 'Brak opcji produktu, więc produktu nie można dodać na listę wyboru.',
'move-error' => ' „Nie można dodać produktu do listy wyboru. Spróbuj ponownie później',
'success' => 'Produkt został pomyślnie dodany do listy wyboru',
'failure' => 'Nie można dodać produktu do listy wyboru. Spróbuj ponownie później',
'already' => 'Produkt jest już na Twojej liście',
'removed' => 'Produkt pomyślnie usunięto z listy wyboru',
'remove-fail' => 'Nie można usunąć produktu z listy życzeń. Spróbuj ponownie później',
'empty' => 'Nie masz dodanych żadnych przedmiotów do listy wyboru',
'remove-all-success' => 'Wszystkie produkty z Twojej listy życzeń zostały usunięte',
'page-title' => 'Lista wyboru',
'title' => 'Lista wyboru',
'deleteall' => 'Usuń wszystko',
'moveall' => '„Przenieś wszystkie produkty do koszyka',
'move-to-cart' => 'Przenieś do koszyka',
'error' => 'Nie można dodać produktu do listy wyboru z powodu nieznanych problemów, sprawdź później',
'add' => 'Produkt został pomyślnie dodany do listy wyboru',
'remove' => 'Produkt został pomyślnie usunięty z listy wyboru',
'add-wishlist-text' => 'Dodaj produkt do listy wyboru',
'remove-wishlist-text' => 'Usuń produkt z listy wyboru',
'moved' => 'Produkt pomyślnie przeniesiono do koszyka',
'option-missing' => 'Brak opcji produktu, więc produktu nie można dodać na listę wyboru.',
'move-error' => ' „Nie można dodać produktu do listy wyboru. Spróbuj ponownie później',
'success' => 'Produkt został pomyślnie dodany do listy wyboru',
'failure' => 'Nie można dodać produktu do listy wyboru. Spróbuj ponownie później',
'already' => 'Produkt jest już na Twojej liście',
'removed' => 'Produkt pomyślnie usunięto z listy wyboru',
'remove-fail' => 'Nie można usunąć produktu z listy życzeń. Spróbuj ponownie później',
'empty' => 'Nie masz dodanych żadnych przedmiotów do listy wyboru',
'remove-all-success' => 'Wszystkie produkty z Twojej listy życzeń zostały usunięte',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -338,26 +338,38 @@ return [
],
'wishlist' => [
'page-title' => 'Lista de Desejos',
'title' => 'Lista de Desejos',
'deleteall' => 'Excluir Tudo',
'moveall' => 'Adicionar todos ao Carrinho',
'move-to-cart' => 'Adicionar ao Carrinho',
'error' => 'Não é possível adicionar o produto a lista de Desejos devido a problemas desconhecidos, por favor tente mais tarde',
'add' => 'Item adicionado com sucesso a Lista de Desejos',
'remove' => 'Item removido com sucesso da Lista de Desejos',
'add-wishlist-text' => 'Adicionar produto à lista de desejos',
'page-title' => 'Lista de Desejos',
'title' => 'Lista de Desejos',
'deleteall' => 'Excluir Tudo',
'moveall' => 'Adicionar todos ao Carrinho',
'move-to-cart' => 'Adicionar ao Carrinho',
'error' => 'Não é possível adicionar o produto a lista de Desejos devido a problemas desconhecidos, por favor tente mais tarde',
'add' => 'Item adicionado com sucesso a Lista de Desejos',
'remove' => 'Item removido com sucesso da Lista de Desejos',
'add-wishlist-text' => 'Adicionar produto à lista de desejos',
'remove-wishlist-text' => 'Remover produto da lista de desejos',
'moved' => 'Item movido com sucesso para Lista de Desejos',
'option-missing' => 'As opções do produto estão ausentes, portanto, o item não pode ser movido para a lista de desejos.',
'move-error' => 'Item não pode ser movido para Lista de Desejos, por favor, tente novamente mais tarde',
'success' => 'Item adicionado com sucesso a Lista de Desejos',
'failure' => 'Item não pode ser adicionado à Lista de Desejos, por favor, tente novamente mais tarde',
'already' => 'Item já presente em sua lista de desejos',
'removed' => 'Item removido com sucesso da Lista de Desejos',
'remove-fail' => 'Item não pode ser removido da lista de desejos, por favor, tente novamente mais tarde',
'empty' => 'Você não tem nenhum item em sua Lista de Desejos',
'remove-all-success' => 'Todos os itens da sua lista de desejos foram removidos',
'moved' => 'Item movido com sucesso para Lista de Desejos',
'option-missing' => 'As opções do produto estão ausentes, portanto, o item não pode ser movido para a lista de desejos.',
'move-error' => 'Item não pode ser movido para Lista de Desejos, por favor, tente novamente mais tarde',
'success' => 'Item adicionado com sucesso a Lista de Desejos',
'failure' => 'Item não pode ser adicionado à Lista de Desejos, por favor, tente novamente mais tarde',
'already' => 'Item já presente em sua lista de desejos',
'removed' => 'Item removido com sucesso da Lista de Desejos',
'remove-fail' => 'Item não pode ser removido da lista de desejos, por favor, tente novamente mais tarde',
'empty' => 'Você não tem nenhum item em sua Lista de Desejos',
'remove-all-success' => 'Todos os itens da sua lista de desejos foram removidos',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -343,26 +343,38 @@ return [
],
'wishlist' => [
'page-title' => 'Dilek Listesi',
'title' => 'Dilek Listesi',
'deleteall' => 'Tümünü Sil',
'moveall' => 'Tüm Ürünleri Sepete Taşı',
'move-to-cart' => 'Sepete Taşı',
'error' => 'Ürün dilek listesine eklenemiyor, lütfen daha sonra tekrar deneyin.',
'add' => 'Ürün dilek listesine başarıyla eklendi.',
'remove' => 'Ürün dilek listesinden başarıyla kaldırıldı.',
'add-wishlist-text' => 'Ürünü dilek listenize ekleyin',
'remove-wishlist-text' => 'Ürünü dilek listenizden kaldırın',
'moved' => 'Ürün alışveriş sepetine başarıyla taşındı.',
'option-missing' => 'Ürün seçenekleri bulunamadı; bu yüzden dilek listesine taşınamadı.',
'move-error' => 'Ürün dilek listesine taşınamadı, lütfen tekrar deneyin.',
'success' => 'Ürün dilek listesine taşındı.',
'failure' => 'Ürün dilek listesine taşınamadı, lütfen tekrar deneyin.',
'already' => 'Ürün dilek listenizde yer alıyor.',
'removed' => 'Ürün dilek listesinden kaldırıldı.',
'remove-fail' => 'Ürün dilek listesinden kaldırılamadı, lütfen tekrar deneyin.',
'empty' => 'Dilek listenizde ürün bulunmuyor.',
'remove-all-success' => 'Dilek listenizdeki tüm ürünler kaldırıldı.',
'page-title' => 'Dilek Listesi',
'title' => 'Dilek Listesi',
'deleteall' => 'Tümünü Sil',
'moveall' => 'Tüm Ürünleri Sepete Taşı',
'move-to-cart' => 'Sepete Taşı',
'error' => 'Ürün dilek listesine eklenemiyor, lütfen daha sonra tekrar deneyin.',
'add' => 'Ürün dilek listesine başarıyla eklendi.',
'remove' => 'Ürün dilek listesinden başarıyla kaldırıldı.',
'add-wishlist-text' => 'Ürünü dilek listenize ekleyin',
'remove-wishlist-text' => 'Ürünü dilek listenizden kaldırın',
'moved' => 'Ürün alışveriş sepetine başarıyla taşındı.',
'option-missing' => 'Ürün seçenekleri bulunamadı; bu yüzden dilek listesine taşınamadı.',
'move-error' => 'Ürün dilek listesine taşınamadı, lütfen tekrar deneyin.',
'success' => 'Ürün dilek listesine taşındı.',
'failure' => 'Ürün dilek listesine taşınamadı, lütfen tekrar deneyin.',
'already' => 'Ürün dilek listenizde yer alıyor.',
'removed' => 'Ürün dilek listesinden kaldırıldı.',
'remove-fail' => 'Ürün dilek listesinden kaldırılamadı, lütfen tekrar deneyin.',
'empty' => 'Dilek listenizde ürün bulunmuyor.',
'remove-all-success' => 'Dilek listenizdeki tüm ürünler kaldırıldı.',
'save' => 'Save',
'share' => 'Share',
'share-wishlist' => 'Share Wishlist',
'wishlist-sharing' => 'Wishlist Sharing',
'shared-link' => 'Shared Link',
'visibility' => 'Visibility',
'public' => 'Public',
'private' => 'Private',
'enable' => 'Enable',
'disable' => 'Disable',
'customer-name' => ':name\'s Shared Wishlist',
'enable-wishlist-info' => 'Enable wishlist sharing to get the link.',
],
'downloadable_products' => [

View File

@ -0,0 +1,65 @@
<div class="account-item-card mt-15 mb-15">
<div class="media-info">
@php
$image = $item->product->getTypeInstance()->getBaseImage($item);
@endphp
<img class="media" src="{{ $image['small_image_url'] }}" alt="" />
<div class="info">
<div class="product-name">
{{ $item->product->name }}
@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
</div>
@if ($visibility ?? false)
<div class="mb-2">
<span class="fs16">
{{ __('shop::app.customer.account.wishlist.visibility') }} :
<span class="badge badge-sm {{ $item->shared ? 'badge-success' : 'badge-danger' }}">
{{ $item->shared ? __('shop::app.customer.account.wishlist.public') : __('shop::app.customer.account.wishlist.private') }}
</span>
</span>
</div>
@endif
<span class="stars" style="display: inline">
@for ($i = 1; $i <= $reviewHelper->getAverageRating($item->product); $i++)
<span class="icon star-icon"></span>
@endfor
</span>
</div>
</div>
<div class="operations">
<form id="wishlist-{{ $item->id }}" action="{{ route('customer.wishlist.remove', $item->id) }}" method="POST">
@method('DELETE')
@csrf
</form>
@auth('customer')
<a
class="mb-50"
href="javascript:void(0);"
onclick="document.getElementById('wishlist-{{ $item->id }}').submit();">
<span class="icon trash-icon"></span>
</a>
@endauth
<a href="{{ route('customer.wishlist.move', $item->id) }}" class="btn btn-primary btn-md">
{{ __('shop::app.customer.account.wishlist.move-to-cart') }}
</a>
</div>
</div>
<div class="horizontal-rule mb-10 mt-10"></div>

View File

@ -0,0 +1,23 @@
@extends('shop::layouts.master')
@section('page_title')
{{ __('shop::app.customer.account.wishlist.customer-name', ['name' => $customer->name]) }}
@endsection
@section('content-wrapper')
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
<div class="account-layout">
<div class="account-head mb-15">
<span class="account-heading">{{ __('shop::app.customer.account.wishlist.customer-name', ['name' => $customer->name]) }}</span>
<div class="horizontal-rule"></div>
</div>
<div class="account-items-list">
@foreach ($items as $item)
@include('shop::customers.account.wishlist.wishlist-product', ['item' => $item])
@endforeach
</div>
</div>
@endsection

View File

@ -19,6 +19,14 @@
@csrf
</form>
@if ($isSharingEnabled)
<a
href="javascript:void(0);"
onclick="window.showShareWishlistModal();">
{{ __('shop::app.customer.account.wishlist.share') }}
</a>
@endif
<a
href="javascript:void(0);"
onclick="document.getElementById('remove-all-wishlist').submit();">
@ -35,58 +43,10 @@
<div class="account-items-list">
@if ($items->count())
@foreach ($items as $item)
<div class="account-item-card mt-15 mb-15">
<div class="media-info">
@php
$image = $item->product->getTypeInstance()->getBaseImage($item);
@endphp
<img class="media" src="{{ $image['small_image_url'] }}" alt="" />
<div class="info">
<div class="product-name">
{{ $item->product->name }}
@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
</div>
<span class="stars" style="display: inline">
@for ($i = 1; $i <= $reviewHelper->getAverageRating($item->product); $i++)
<span class="icon star-icon"></span>
@endfor
</span>
</div>
</div>
<div class="operations">
<form id="wishlist-{{ $item->id }}" action="{{ route('customer.wishlist.remove', $item->id) }}" method="POST">
@method('DELETE')
@csrf
</form>
<a
class="mb-50"
href="javascript:void(0);"
onclick="document.getElementById('wishlist-{{ $item->id }}').submit();">
<span class="icon trash-icon"></span>
</a>
<a href="{{ route('customer.wishlist.move', $item->id) }}" class="btn btn-primary btn-md">
{{ __('shop::app.customer.account.wishlist.move-to-cart') }}
</a>
</div>
</div>
<div class="horizontal-rule mb-10 mt-10"></div>
@include('shop::customers.account.wishlist.wishlist-product', [
'item' => $item,
'visibility' => $isSharingEnabled
])
@endforeach
<div class="bottom-toolbar">
@ -99,6 +59,78 @@
@endif
</div>
@if ($isSharingEnabled)
<div id="shareWishlistModal" class="d-none">
<modal id="shareWishlist" :is-open="modalIds.shareWishlist">
<h3 slot="header">
{{ __('shop::app.customer.account.wishlist.share-wishlist') }}
</h3>
<i class="rango-close"></i>
<div slot="body">
<form method="POST" action="{{ route('customer.wishlist.share') }}">
@csrf
<div class="control-group">
<label for="shared" class="required">{{ __('shop::app.customer.account.wishlist.wishlist-sharing') }}</label>
<select name="shared" class="control">
<option value="0" {{ $isWishlistShared ? '' : 'selected="selected"' }}>{{ __('shop::app.customer.account.wishlist.disable') }}</option>
<option value="1" {{ $isWishlistShared ? 'selected="selected"' : '' }}>{{ __('shop::app.customer.account.wishlist.enable') }}</option>
</select>
</div>
<div class="control-group">
<label class="required">{{ __('shop::app.customer.account.wishlist.visibility') }}</label>
<div class="mt-5">
@if ($isWishlistShared)
<span class="badge badge-sm badge-success">{{ __('shop::app.customer.account.wishlist.public') }}</span>
@else
<span class="badge badge-sm badge-danger">{{ __('shop::app.customer.account.wishlist.private') }}</span>
@endif
</div>
</div>
<div class="control-group">
<label class="required">{{ __('shop::app.customer.account.wishlist.shared-link') }}</label>
<div>
@if ($isWishlistShared)
<a href="{{ $wishlistSharedLink ?? 'javascript:void(0);' }}" target="_blank">{{ $wishlistSharedLink }}</a>
@else
<p>{{ __('shop::app.customer.account.wishlist.enable-wishlist-info') }}</p>
@endif
</div>
</div>
<div class="page-action">
<button type="submit" class="btn btn-lg btn-primary mt-10 pull-right">
{{ __('shop::app.customer.account.wishlist.save') }}
</button>
</div>
</form>
</div>
</modal>
</div>
@endif
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.after', ['wishlist' => $items]) !!}
</div>
@endsection
@endsection
@push('scripts')
@if ($isSharingEnabled)
<script>
/**
* Show share wishlist modal.
*/
function showShareWishlistModal() {
document.getElementById('shareWishlistModal').classList.remove('d-none');
window.app.showModal('shareWishlist');
}
</script>
@endif
@endpush

View File

@ -87,6 +87,15 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
*/
Route::post('wishlist/add/{id}', [WishlistController::class, 'add'])->name('customer.wishlist.add');
Route::post('wishlist/share', [WishlistController::class, 'share'])->name('customer.wishlist.share');
Route::get('wishlist/shared', [WishlistController::class, 'shared'])
->defaults('_config', [
'view' => 'shop::customers.account.wishlist.wishlist-shared'
])
->withoutMiddleware('customer')
->name('customer.wishlist.shared');
Route::delete('wishlist/remove/{id}', [WishlistController::class, 'remove'])->name('customer.wishlist.remove');
Route::delete('wishlist/removeall', [WishlistController::class, 'removeAll'])->name('customer.wishlist.removeall');

File diff suppressed because one or more lines are too long

View File

@ -2,5 +2,5 @@
"/js/velocity.js": "/js/velocity.js?id=49b29efa452a8942811a",
"/js/velocity-core.js": "/js/velocity-core.js?id=5c0fe2bf195ee94576fd",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
"/css/velocity.css": "/css/velocity.css?id=530290684cc6821c1c87"
"/css/velocity.css": "/css/velocity.css?id=7be53710e05ea176e48a"
}

View File

@ -181,6 +181,19 @@
margin-left: 30px !important;
}
.w-0 {
width: 0px !important;
}
.w-5 {
width: 5px !important;
}
.w-10 {
width: 10px !important;
}
.w-15 {
width: 15px !important;
}
.body-blur {
filter: blur(4px);
-webkit-filter: blur(4px);
@ -411,6 +424,15 @@
&.grid-card,
&.list-card {
.wishlist-icon i {
padding-left: 10px;
}
.product-price span:first-child, .product-price span:last-child {
font-size: 18px;
font-weight: 600;
}
.card-current-price {
font-size: 18px;
}

View File

@ -6,7 +6,6 @@
@section('page-detail-wrapper')
<div class="account-head mb-15">
<span class="back-icon"><a href="{{ route('customer.account.index') }}"><i class="icon icon-menu-back"></i></a></span>
<span class="account-heading">{{ __('shop::app.customer.account.address.edit.title') }}</span>
<span></span>
</div>

View File

@ -0,0 +1,64 @@
<div class="col-12 lg-card-container list-card product-card row">
<div class="product-image">
<a
title="{{ $item->product->name }}"
href="{{ route('shop.productOrCategory.index', $item->product->url_key) }}">
<img
src="{{ productimage()->getProductBaseImage($item->product)['medium_image_url'] }}"
:onerror="`this.src='${this.$root.baseUrl}/vendor/webkul/ui/assets/images/product/large-product-placeholder.png'`" alt="" />
<div class="quick-view-in-list">
</div>
</a>
</div>
<div class="product-information">
<div class="p-2">
<div class="product-name">
<a
href="{{ route('shop.productOrCategory.index', $item->product->url_key) }}"
title="{{ $item->product->name }}" class="unset">
<span class="fs16">{{ $item->product->name }}</span>
</a>
@if (isset($item->product->additional['attributes']))
<div class="item-options">
@foreach ($item->product->additional['attributes'] as $attribute)
<b>{{ $attribute['attribute_name'] }} : </b> {{ $attribute['option_label'] }}
</br>
@endforeach
</div>
@endif
</div>
<div class="product-price">
@include ('shop::products.price', ['product' => $item->product])
</div>
<div class="cart-wish-wrap mt5">
@if ($visibility ?? false)
<div class="mb-2">
<span class="fs16">
{{ __('shop::app.customer.account.wishlist.visibility') }} :
<span class="badge {{ $item->shared ? 'badge-success' : 'badge-danger' }}">
{{ $item->shared ? __('shop::app.customer.account.wishlist.public') : __('shop::app.customer.account.wishlist.private') }}
</span>
</span>
</div>
@endif
<div>
@include('shop::products.add-to-cart', [
'addWishlistClass' => 'pl10',
'product' => $item->product,
'addToCartBtnClass' => 'medium-padding',
'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false,
])
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,23 @@
@extends('shop::layouts.master')
@section('page_title')
{{ __('shop::app.customer.account.wishlist.customer-name', ['name' => $customer->name]) }}
@endsection
@section('content-wrapper')
<div class="container p-5">
<div class="row">
<div class="col-12">
<div class="wishlist-container">
<h2 class="text-center">
{{ __('shop::app.customer.account.wishlist.customer-name', ['name' => $customer->name]) }}
</h2>
@foreach ($items as $item)
@include('shop::customers.account.wishlist.wishlist-product', ['item' => $item])
@endforeach
</div>
</div>
</div>
</div>
@endsection

View File

@ -1,4 +1,4 @@
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
@inject('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
@extends('shop::customers.account.index')
@ -6,53 +6,61 @@
{{ __('shop::app.customer.account.wishlist.page-title') }}
@endsection
@push('css')
{{--
@devansh-webkul
- Handle it from scss when removing back icon.
--}}
<style>
.account-head {
display: flex;
justify-content: space-between;
}
</style>
@endpush
@section('page-detail-wrapper')
<div class="account-head">
<span class="account-heading">{{ __('shop::app.customer.account.wishlist.title') }}</span>
@if (count($items))
<div class="account-action float-right">
<span class="account-action">
<form id="remove-all-wishlist" class="d-none" action="{{ route('customer.wishlist.removeall') }}" method="POST">
@method('DELETE')
@csrf
</form>
@if ($isSharingEnabled)
<a
class="remove-decoration theme-btn light"
href="javascript:void(0);"
@click="window.showShareWishlistModal();">
{{ __('shop::app.customer.account.wishlist.share') }}
</a>
&nbsp;
@endif
<a
class="remove-decoration theme-btn light"
href="javascript:void(0);"
onclick="document.getElementById('remove-all-wishlist').submit();">
{{ __('shop::app.customer.account.wishlist.deleteall') }}
</a>
</div>
</span>
@endif
</div>
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.before', ['wishlist' => $items]) !!}
<div class="wishlist-container">
@if ($items->count())
@foreach ($items as $item)
@php
$currentMode = $toolbarHelper->getCurrentMode();
$moveToCartText = __('shop::app.customer.account.wishlist.move-to-cart');
@endphp
@include ('shop::products.list.card', [
'list' => true,
'checkmode' => true,
'moveToCart' => true,
'wishlistMoveRoute' => route('customer.wishlist.move', $item->id),
'addToCartForm' => true,
'removeWishlist' => true,
'reloadPage' => true,
'itemId' => $item->id,
'item' => $item,
'product' => $item->product,
'additionalAttributes' => true,
'btnText' => $moveToCartText,
'addToCartBtnClass' => 'small-padding',
@include ('shop::customers.account.wishlist.wishlist-product', [
'item' => $item,
'visibility' => $isSharingEnabled
])
@endforeach
@ -66,5 +74,91 @@
@endif
</div>
@if($isSharingEnabled)
<div id="shareWishlistModal" class="d-none">
<modal id="shareWishlist" :is-open="modalIds.shareWishlist">
<h3 slot="header">
{{ __('shop::app.customer.account.wishlist.share-wishlist') }}
</h3>
<i class="rango-close"></i>
<div slot="body">
<form method="POST" action="{{ route('customer.wishlist.share') }}">
@csrf
<div class="row">
<div class="col-12">
<label class="mandatory">
{{ __('shop::app.customer.account.wishlist.wishlist-sharing') }}
</label>
<select name="shared" class="form-control">
<option value="0" {{ $isWishlistShared ? '' : 'selected="selected"' }}>{{ __('shop::app.customer.account.wishlist.disable') }}</option>
<option value="1" {{ $isWishlistShared ? 'selected="selected"' : '' }}>{{ __('shop::app.customer.account.wishlist.enable') }}</option>
</select>
</div>
</div>
<div class="row mt-2">
<div class="col-12">
<label class="mandatory">
{{ __('shop::app.customer.account.wishlist.visibility') }}
</label>
<div>
@if ($isWishlistShared)
<span class="badge badge-success">{{ __('shop::app.customer.account.wishlist.public') }}</span>
@else
<span class="badge badge-danger">{{ __('shop::app.customer.account.wishlist.private') }}</span>
@endif
</div>
</div>
</div>
<div class="row mt-2">
<div class="col-12">
<label class="mandatory">
{{ __('shop::app.customer.account.wishlist.shared-link') }}
</label>
<div>
@if ($isWishlistShared)
<a href="{{ $wishlistSharedLink ?? 'javascript:void(0);' }}" target="_blank">{{ $wishlistSharedLink }}</a>
@else
<p class="alert alert-danger">{{ __('shop::app.customer.account.wishlist.enable-wishlist-info') }}</p>
@endif
</div>
</div>
</div>
<div class="row mt-2">
<div class="col-12">
<button type="submit" class="theme-btn float-right">
{{ __('shop::app.customer.account.wishlist.save') }}
</button>
</div>
</div>
</form>
</div>
</modal>
</div>
@endif
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.after', ['wishlist' => $items]) !!}
@endsection
@push('scripts')
@if($isSharingEnabled)
<script>
/**
* Show share wishlist modal.
*/
function showShareWishlistModal() {
document.getElementById('shareWishlistModal').classList.remove('d-none');
window.app.showModal('shareWishlist');
}
</script>
@endif
@endpush

View File

@ -1,19 +1,6 @@
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
@push('css')
<style type="text/css">
.list-card .wishlist-icon i {
padding-left: 10px;
}
.product-price span:first-child, .product-price span:last-child {
font-size: 18px;
font-weight: 600;
}
</style>
@endpush
@php
if (isset($checkmode) && $checkmode && $toolbarHelper->getCurrentMode() == "list") {
$list = true;