pamela91 Posted April 13, 2016 Share Posted April 13, 2016 Hi,I have the following error. I'm running PrestaShop 1.6.1.4 with multishop with customers and carts shared. Case 1:When I iniatiate the cart in shop 1 and then go to shop 2, cart confirmation image and cart thumbnails of shop 2 are not available. To "reset" the cart to make the next test I log in and then log off. Case 2:When I iniatiate the cart in shop 2 and then go to shop 1, cart confirmation image and cart thumbnails shop 1 are not available. I have tried regenerating images but it doesn't work. You can look at the pictures to better understand what I'm trying to explain. Example:Shop 1: http://www.ccyv.cl/ngorrosShop 2: http://www.ccyv.cl/extragangas Image of case 1: http://www.ccyv.cl/error/shop1shop2.pngImage of case 2: http://www.ccyv.cl/error/shop2shop1.png Link to comment Share on other sites More sharing options...
dossijeo Posted June 7, 2016 Share Posted June 7, 2016 Hi, I hope this answer can still be useful for you or another else. The solution for this bug is to edit the file /classes/Cart.php In line 579 you must to change the next code: $sql->leftJoin('image_shop', 'image_shop', 'image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop='.(int)$this->id_shop); Into: $sql->leftJoin('image_shop', 'image_shop', 'image_shop.`id_product` = p.`id_product` AND image_shop.cover=1'); This will fix the issue. Greetings. 1 Link to comment Share on other sites More sharing options...
elmoxx Posted October 6, 2016 Share Posted October 6, 2016 (edited) Thanks Dossijeo, At first sight it looks like your solution works flawlesly.. Sadly we found out that this fix causes a new problem: In our multistore-setup, we have several products that are being sold in both shops. (The articles have the same id-numbers, only different product-texts etc). After installing your fix, it becomes impossible for these items, to buy only one. Even when you try to put only one of these items in the cart, there will be 2 separate lines with the same product in the shopping cart. The price is also calculated for two. Removing one of these products will remove both. Perhaps there is someone with a solution for this issue? Thanks! Edited October 7, 2016 by elmoxx (see edit history) Link to comment Share on other sites More sharing options...
TomanDesign Posted September 18, 2017 Share Posted September 18, 2017 (edited) This solution doesn't work on PrestaShop v. 1.7.x. Images cross stores still not showing in cart, links to product cross shops does't works in cart. The problem is that url's links to current visited shop, not shop where produc't came from. Anyone know how to repair this bug ? (sorry for my English) Edited September 18, 2017 by TomanDesign (see edit history) Link to comment Share on other sites More sharing options...
TomanDesign Posted September 19, 2017 Share Posted September 19, 2017 This solution doesn't work on PrestaShop v. 1.7.x. Images cross stores still not showing in cart, links to product cross shops does't works in cart. The problem is that url's links to current visited shop, not shop where produc't came from. Anyone know how to repair this bug ? (sorry for my English) Link to product work in this way: <a href="{$link->getProductLink($product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html'}"> ... <a/> Images still not showing. Link to comment Share on other sites More sharing options...
TomanDesign Posted September 22, 2017 Share Posted September 22, 2017 Link to product work in this way: <a href="{$link->getProductLink($product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html'}"> ... <a/> Images still not showing. Link to image works: <img src="{$link->getImageLink($product.name, $product.id_image, 'cart_default')}" alt="{$product.name|escape:'quotes'}"> Link to comment Share on other sites More sharing options...
Afiliazon Posted January 31, 2018 Share Posted January 31, 2018 Hi here, I have same problem in Prestashop 1.7.2.0 with multistore and all share options in YES. I change in minicart the line for this: <img src="{$link->getImageLink($product.name, $product.id_image, 'cart_default')}" alt="{$product.name|escape:'quotes'}"> but dont work for me, any idea? Thanks so much Link to comment Share on other sites More sharing options...
matesasesinos Posted October 23, 2019 Share Posted October 23, 2019 On 6/7/2016 at 7:19 AM, dossijeo said: Hi, I hope this answer can still be useful for you or another else. The solution for this bug is to edit the file /classes/Cart.php In line 579 you must to change the next code: $sql->leftJoin('image_shop', 'image_shop', 'image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop='.(int)$this->id_shop); Into: $sql->leftJoin('image_shop', 'image_shop', 'image_shop.`id_product` = p.`id_product` AND image_shop.cover=1'); This will fix the issue. Greetings. you are genius!!! PS 1.7.5.2 works... thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now