This commit is contained in:
sanjeev 2022-07-07 13:43:03 +05:30
parent a8081c870c
commit 6f0886299d
14 changed files with 34 additions and 12 deletions

View File

@ -116,7 +116,9 @@ class Cart
$product = $this->productRepository->findOneByField('id', $productId);
if ($product->status === 0) {
if($product == null) {
return ['info' => __('customer::app.wishlist.product-removed')];
} elseif ($product->status === 0) {
return ['info' => __('shop::app.checkout.cart.item.inactive-add')];
}

View File

@ -70,7 +70,7 @@ class WishlistController extends Controller
$product = $this->productRepository->findOneByField('id', $itemId);
if ( $product == null ) {
session()->flash('error', trans('customer::app.wishlist.product-removed'));
session()->flash('error', trans('customer::app.product-removed'));
return redirect()->back();
} elseif (! $product->status) {
return redirect()->back();

View File

@ -10,9 +10,10 @@ return [
'empty' => 'ليس لديك أي عناصر في قائمة الامنيات',
'select-options' => 'تحتاج إلى تحديد خيارات قبل إضافة إلى قائمة الأمنيات',
'remove-all-success' => 'تمت إزالة جميع العناصر من قائمة الأمنيات الخاصة بك',
'product-removed' => 'لا يمكن إضافة العنصر إلى قائمة الرغبات حيث تمت إزالة المنتج بواسطة المسؤول',
],
'product-removed' => 'Product Is No More Available As Removed By Admin',
'reviews' => [
'empty' => '.لم تقم بمراجعة أي منتج حتى الآن',
],

View File

@ -10,9 +10,10 @@ return [
'empty' => 'Sie haben keine Artikel auf Ihrer Wunschliste',
'select-options' => 'Vor dem Hinzufügen zur Wunschliste müssen Optionen ausgewählt werden',
'remove-all-success' => 'Alle Elemente von Ihrer Wunschliste wurden entfernt',
'product-removed' => 'Artikel kann nicht zur Wunschliste hinzugefügt werden, da Produkt vom Administrator entfernt wurde',
],
'product-removed' => 'Das Produkt ist nicht mehr verfügbar, da es vom Administrator entfernt wurde',
'reviews' => [
'empty' => 'Sie haben noch kein Produkt bewertet',
],

View File

@ -10,9 +10,10 @@ return [
'empty' => 'You Don\'t Have Any Items In Your Wishlist',
'select-options' => 'Need To Select Options Before Adding To Wishlist',
'remove-all-success' => 'All The Items From Your Wishlist Have Been Removed',
'product-removed' => 'Item Cannot Be Added To Wishlist As Product Has Been Removed by Admin',
],
'product-removed' => 'Product Is No More Available As Removed By Admin',
'reviews' => [
'empty' => 'You have not reviewed any product yet',
],

View File

@ -10,9 +10,10 @@ return [
'empty' => 'No tienes artículos en la lista de deseos',
'select-options' => 'Necesita seleccionar opciones antes de agregar a la lista de deseos',
'remove-all-success' => 'Se han eliminado todos los elementos de su lista de deseos',
'product-removed' => 'El artículo no se puede agregar a la lista de deseos porque el administrador eliminó el producto',
],
'product-removed' => 'El producto ya no está disponible porque lo eliminó el administrador',
'reviews' => [
'empty' => 'Aún no has calificado ningún producto',
],

View File

@ -10,9 +10,10 @@ return [
'empty' => 'Vous n\'avez aucun article dans votre liste de souhaits',
'select-options' => 'Besoin de sélectionner des options avant d\'ajouter à la liste de souhaits',
'remove-all-success' => 'Tous les articles de votre liste de souhaits ont été supprimés',
'product-removed' => 'L article ne peut pas être ajouté à la liste de souhaits car le produit a été supprimé par l administrateur',
],
'product-removed' => 'Le produit n est plus disponible car supprimé par l administrateur',
'reviews' => [
'empty' => 'Vous n\'avez pas encore évalué de produit',
],

View File

@ -10,9 +10,10 @@ return [
'empty' => 'Non hai prodotti nei tuoi Preferiti',
'select-options' => 'Seleziona una opzione del prodotto prima di aggiungerlo ai Preferiti',
'remove-all-success' => 'Tutti i Prodotti presenti nei preferiti sono stati rimossi',
'product-removed' => 'Item Cannot Be Added To Wishlist As Product Has Been Removed by Admin',
],
'product-removed' => 'Il prodotto non è più disponibile in quanto rimosso dall amministratore',
'reviews' => [
'empty' => 'Non hai ancora recensito i nostri prodotti'
],

View File

@ -10,9 +10,10 @@ return [
'empty' => 'U heeft geen items op uw verlanglijst',
'select-options' => 'Moet opties selecteren voordat u aan verlanglijst toevoegt',
'remove-all-success' => 'Alle items van je verlanglijst zijn verwijderd',
'product-removed' => 'Artikel kan niet aan verlanglijst worden toegevoegd omdat het product door de beheerder is verwijderd',
],
'product-removed' => 'Product is niet meer beschikbaar zoals verwijderd door beheerder',
'reviews' => [
'empty' => 'U heeft nog geen product beoordeeld',
],

View File

@ -10,9 +10,10 @@ return [
'empty' => 'Você não tem nenhum item em sua lista de desejos',
'select-options' => 'Precisa selecionar opções antes de adicionar à lista de desejos',
'remove-all-success' => 'Todos os itens da sua lista de desejos foram removidos',
'product-removed' => 'Item Cannot Be Added To Wishlist As Product Has Been Removed by Admin',
],
'product-removed' => 'Product Is No More Available As Removed By Admin',
'reviews' => [
'empty' => 'Você não avaliou nenhum produto ainda',
],

View File

@ -10,9 +10,10 @@ return [
'empty' => 'İstek Listenizde Hiç Ürün Yok',
'select-options' => 'İstek Listesine Eklemeden Önce Seçenekleri Seçmeniz Gerekiyor',
'remove-all-success' => 'İstek Listenizdeki Tüm Öğeler Kaldırıldı',
'product-removed' => 'Item Cannot Be Added To Wishlist As Product Has Been Removed by Admin',
],
'product-removed' => 'Ürün Yönetici Tarafından Kaldırıldığı İçin Artık Mevcut Değil',
'reviews' => [
'empty' => 'Henüz hiçbir ürünü incelemediniz',
],

View File

@ -10,9 +10,10 @@ return [
'empty' => '您的愿望清单中没有任何商品',
'select-options' => '在添加到愿望清单之前需要选择选项',
'remove-all-success' => '您的愿望清单中的所有项目都已被删除',
'product-removed' => 'Item Cannot Be Added To Wishlist As Product Has Been Removed by Admin',
],
'product-removed' => 'لم يعد المنتج متاحًا كما تمت إزالته بواسطة المسؤول',
'reviews' => [
'empty' => '您还没有评论任何产品',
],

View File

@ -85,6 +85,8 @@ class CartController extends Controller
if ($product != null) {
return redirect()->route('shop.productOrCategory.index', $product->url_key);
}
session()->flash('error', trans('customer::app.product-removed'));
}
return redirect()->back();

View File

@ -80,6 +80,14 @@ class ComparisonController extends Controller
->orWhere('id', $productId)
->get()
->first();
if ($productFlat == null) {
return response()->json([
'status' => 'warning',
'message' => trans('customer::app.product-removed'),
'label' => trans('velocity::app.shop.general.alert.warning'),
]);
}
if ($productFlat) {
$productId = $productFlat->id;