What's New
You must be logged in to reply to this topic.
hi
I read this topic and try that code.
buy it did’t worked.
can you help me.
Yes’ I clear the smarty cache and I did’t use cache module.
just chage code this:
https://www.sunnytoo.com/forums/topic/how-to-configure-products-default-sorting-to-display-existing-products-first/#post-51402
Hi,
Actually, you don’t need to modify files, just use the free module: https://www.sunnytoo.com/31746/hiding-stock-products-free-prestashop-module
Best regards.
I check it but our out of stock product is important for our customers and we have to show them on cataloge and search.
but this module hide product any where and it’s not good for us.
i’ve a topic here : https://www.sunnytoo.com/forums/topic/out-of-stock-product-on-sliders
about this problem.
and about this ” alredy in cart” , do you have any idea?
Hi,
1. I replied to you on that topic.
2. You need to modify some files: https://www.sunnytoo.com/forums/topic/already-in-cart#post-48726
Best regards.
I put this code:
if (!$this->product[‘availability’] || $this->product[‘availability’] == ‘unavailable’) {
$in_cart = 0;
foreach(Context::getContext()->cart->products as $val) {
if ($val[‘id_product’] == $product[‘id_product’]) {
$in_cart = 1;
break;
}
}
if ($in_cart) {
$this->product[‘availability_message’] = ‘You already have it added to the cart’;
}
}
on this file:
/src/Adapter/Presenter/Product/ProductLazyArray.php
and get error.
I attached the screenshots.
this code did not get error but not working.
try this page:
https://zibama.com/product/3630/%D8%B4%D8%A7%D9%85%D9%BE%D9%88-%D8%B9%D8%B5%D8%A7%D8%B1%D9%87-%D9%87%D9%81%D8%AA-%DA%AF%DB%8C%D8%A7%D9%87-%D9%85%D9%86%D8%A7%D8%B3%D8%A8-%D8%A7%D9%86%D9%88%D8%A7%D8%B9-%D9%85%D9%88%D9%87%D8%A7-%D8%B3%DB%8C-%D8%B1%DB%8C%D9%86-400-%DA%AF%D8%B1%D9%85
Hi,
please check this product.
https://zibama.com/product/337/%D8%B1%DA%98-%D9%84%D8%A8-%D9%88%DB%8C%D8%AA%D8%A7%D9%85%DB%8C%D9%86%D9%87-%D9%85%D8%A7%D8%B1%D8%A7%D9%84
if you ad to cart one of attribute, and select the another one. it’s told you the you already have it on cart.
You must be logged in to reply to this topic.