maxcon Posted March 26, 2014 Share Posted March 26, 2014 Hi everybody, I have a problem on my website www.marvib.com I don't know why, but when I try to put an item in the cart, the cart is empty. I've tried to delete cache, to change more than one configuration in back office, but nothing. I've tried to get the solution of other bugs, but nothing. It's not working. The Prestashop versione is 1.5.4.1 Thanks for your help. Massimo. Link to comment Share on other sites More sharing options...
NemoPS Posted March 26, 2014 Share Posted March 26, 2014 Hi, Can you check if the same error occurs when using the default theme? Link to comment Share on other sites More sharing options...
maxcon Posted March 26, 2014 Author Share Posted March 26, 2014 Hi Nemo1, I've tried but unfortunately it's not working also with the default theme. Link to comment Share on other sites More sharing options...
NemoPS Posted March 26, 2014 Share Posted March 26, 2014 Do you have any cookie/cart related module installed? Does the product stay in the cart if you don't access that page? Link to comment Share on other sites More sharing options...
maxcon Posted March 26, 2014 Author Share Posted March 26, 2014 Hi, I don't have any other modules in addition the default. Only the module payment, but it's not related to the cart. Should be an hosting problem? I've changed host but all is fine except for the cart. Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2014 Share Posted March 26, 2014 uhm...no apparent java errors... can you check that preferences-->seo & urls-> domain name and ssl domain name start with www? also turn on errors and see if anything is displayed http://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information/ Link to comment Share on other sites More sharing options...
maxcon Posted March 26, 2014 Author Share Posted March 26, 2014 Hi, the first was already done. I activate the debug error and seems a SQL error. Could you see it? Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2014 Share Posted March 26, 2014 please post here any errors...thanks Link to comment Share on other sites More sharing options...
maxcon Posted March 26, 2014 Author Share Posted March 26, 2014 *ERROR* 2014/03/26 - 22:08:56: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN `ps_product_attribute_image` `pai` ON pai.`id_product_attribute` = pa.`id_p' at line 33<br /><br /><pre>SELECT cp.`id_product_attribute`, cp.`id_product`, cp.`quantity` AS cart_quantity, cp.id_shop, pl.`name`, p.`is_virtual`, pl.`description_short`, pl.`available_now`, pl.`available_later`, p.`id_product`, product_shop.`id_category_default`, p.`id_supplier`, p.`id_manufacturer`, product_shop.`on_sale`, product_shop.`ecotax`, product_shop.`additional_shipping_cost`, product_shop.`available_for_order`, product_shop.`price`, p.`weight`, stock.`quantity` quantity_available, p.`width`, p.`height`, p.`depth`, stock.`out_of_stock`, product_shop.`active`, p.`date_add`, p.`date_upd`, IFNULL(stock.quantity, 0) as quantity, pl.`link_rewrite`, cl.`link_rewrite` AS category, CONCAT(cp.`id_product`, IFNULL(cp.`id_product_attribute`, 0), IFNULL(cp.`id_address_delivery`, 0)) AS unique_id, cp.id_address_delivery, product_shop.`wholesale_price`, product_shop.advanced_stock_management, ps.product_supplier_reference supplier_reference, NULL AS customization_quantity, NULL AS id_customization, product_attribute_shop.`price` AS price_attribute, product_attribute_shop.`ecotax` AS ecotax_attr, IF (IFNULL(pa.`reference`, '') = '', p.`reference`, pa.`reference`) AS reference, (p.`weight`+ pa.`weight`) weight_attribute, IF (IFNULL(pa.`ean13`, '') = '', p.`ean13`, pa.`ean13`) AS ean13, IF (IFNULL(pa.`upc`, '') = '', p.`upc`, pa.`upc`) AS upc, pai.`id_image` as pai_id_image, il.`legend` as pai_legend, IFNULL(product_attribute_shop.`minimal_quantity`, product_shop.`minimal_quantity`) as minimal_quantity FROM `ps_cart_product` cp LEFT JOIN `ps_product` `p` ON p.`id_product` = cp.`id_product` INNER JOIN `ps_product_shop` product_shop ON (product_shop.id_shop=cp.id_shop AND product_shop.id_product = p.id_product) LEFT JOIN `ps_product_lang` `pl` ON p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = cp.id_shop LEFT JOIN `ps_category_lang` `cl` ON product_shop.`id_category_default` = cl.`id_category` AND cl.`id_lang` = 1 AND cl.id_shop = cp.id_shop LEFT JOIN `ps_product_supplier` `ps` ON ps.id_product=cp.id_product AND ps.id_product_attribute=cp.id_product_attribute AND ps.id_supplier=p.id_supplier LEFT JOIN ps_stock_available stock ON (stock.id_product = cp.id_product AND stock.id_product_attribute = IFNULL(`cp`.id_product_attribute, 0) AND stock.id_shop = 1 ) LEFT JOIN `ps_product_attribute` `pa` ON pa.`id_product_attribute` = cp.`id_product_attribute` LEFT JOIN `ps_product_attribute_shop` `product_attribute_shop` ON product_attribute_shop.id_shop= LEFT JOIN `ps_product_attribute_image` `pai` ON pai.`id_product_attribute` = pa.`id_product_attribute` LEFT JOIN `ps_image_lang` `il` ON il.id_image = pai.id_image AND il.id_lang = 1 WHERE (cp.`id_cart` = 73) AND (p.`id_product` IS NOT NULL) GROUP BY unique_id ORDER BY p.id_product, cp.id_product_attribute, cp.date_add ASC </pre> at line 607 in file classes/db/Db.php *ERROR* 2014/03/26 - 22:11:45: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN `ps_product_attribute_image` `pai` ON pai.`id_product_attribute` = pa.`id_p' at line 33<br /><br /><pre>SELECT cp.`id_product_attribute`, cp.`id_product`, cp.`quantity` AS cart_quantity, cp.id_shop, pl.`name`, p.`is_virtual`, pl.`description_short`, pl.`available_now`, pl.`available_later`, p.`id_product`, product_shop.`id_category_default`, p.`id_supplier`, p.`id_manufacturer`, product_shop.`on_sale`, product_shop.`ecotax`, product_shop.`additional_shipping_cost`, product_shop.`available_for_order`, product_shop.`price`, p.`weight`, stock.`quantity` quantity_available, p.`width`, p.`height`, p.`depth`, stock.`out_of_stock`, product_shop.`active`, p.`date_add`, p.`date_upd`, IFNULL(stock.quantity, 0) as quantity, pl.`link_rewrite`, cl.`link_rewrite` AS category, CONCAT(cp.`id_product`, IFNULL(cp.`id_product_attribute`, 0), IFNULL(cp.`id_address_delivery`, 0)) AS unique_id, cp.id_address_delivery, product_shop.`wholesale_price`, product_shop.advanced_stock_management, ps.product_supplier_reference supplier_reference, NULL AS customization_quantity, NULL AS id_customization, product_attribute_shop.`price` AS price_attribute, product_attribute_shop.`ecotax` AS ecotax_attr, IF (IFNULL(pa.`reference`, '') = '', p.`reference`, pa.`reference`) AS reference, (p.`weight`+ pa.`weight`) weight_attribute, IF (IFNULL(pa.`ean13`, '') = '', p.`ean13`, pa.`ean13`) AS ean13, IF (IFNULL(pa.`upc`, '') = '', p.`upc`, pa.`upc`) AS upc, pai.`id_image` as pai_id_image, il.`legend` as pai_legend, IFNULL(product_attribute_shop.`minimal_quantity`, product_shop.`minimal_quantity`) as minimal_quantity FROM `ps_cart_product` cp LEFT JOIN `ps_product` `p` ON p.`id_product` = cp.`id_product` INNER JOIN `ps_product_shop` product_shop ON (product_shop.id_shop=cp.id_shop AND product_shop.id_product = p.id_product) LEFT JOIN `ps_product_lang` `pl` ON p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = cp.id_shop LEFT JOIN `ps_category_lang` `cl` ON product_shop.`id_category_default` = cl.`id_category` AND cl.`id_lang` = 1 AND cl.id_shop = cp.id_shop LEFT JOIN `ps_product_supplier` `ps` ON ps.id_product=cp.id_product AND ps.id_product_attribute=cp.id_product_attribute AND ps.id_supplier=p.id_supplier LEFT JOIN ps_stock_available stock ON (stock.id_product = cp.id_product AND stock.id_product_attribute = IFNULL(`cp`.id_product_attribute, 0) AND stock.id_shop = 1 ) LEFT JOIN `ps_product_attribute` `pa` ON pa.`id_product_attribute` = cp.`id_product_attribute` LEFT JOIN `ps_product_attribute_shop` `product_attribute_shop` ON product_attribute_shop.id_shop= LEFT JOIN `ps_product_attribute_image` `pai` ON pai.`id_product_attribute` = pa.`id_product_attribute` LEFT JOIN `ps_image_lang` `il` ON il.id_image = pai.id_image AND il.id_lang = 1 WHERE (cp.`id_cart` = 74) AND (p.`id_product` IS NOT NULL) GROUP BY unique_id ORDER BY p.id_product, cp.id_product_attribute, cp.date_add ASC </pre> at line 607 in file classes/db/Db.php Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2014 Share Posted March 26, 2014 turn on define('_PS_DEBUG_PROFILING_', true); so we can see who is calling what.. did this never work? if not when did it start? new theme? Link to comment Share on other sites More sharing options...
maxcon Posted March 26, 2014 Author Share Posted March 26, 2014 I see the error: line 32: LEFT JOIN `ps_product_attribute_shop` `product_attribute_shop` ON product_attribute_shop.id_shop= but where i have to change the query? Link to comment Share on other sites More sharing options...
maxcon Posted March 26, 2014 Author Share Posted March 26, 2014 I've turned on define('_PS_DEBUG_PROFILING_', true);. Now I see in the cart preview, but if I checkout the cart is empty. Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2014 Share Posted March 26, 2014 is ajax cart active? I get this trying to add cart...and the shop is 'very' slow. http://screencast.com/t/Iq7c4GxeNs did this shop ever work properly? or did you install theme and it stop? I think some history lesson will help. Link to comment Share on other sites More sharing options...
maxcon Posted March 26, 2014 Author Share Posted March 26, 2014 I don't know, but now the shop is no more available...But: 1. Yes, ajax cart is active 2. First installation on the old provider worked fine, but was very very slow 3. Change hosting provider it works very very fast, but (for time) i didn't check the cart 4. Now, with the new season, I've loaded the new products and try if all is working fine, but the answer was negative in the meantime 5. I've tried to upgrade to the new prestashop 1.6, but it's not working my template (Autumn) 6. Come back to the previous prestashop 1.5.4.1 (the actual version) Thanks, Massimo. Link to comment Share on other sites More sharing options...
El Patron Posted March 26, 2014 Share Posted March 26, 2014 yes, it is not just timing out ave maria...we have gone from bad to worse... reverse any changes (debut etc)...let's see if you can manage to get it back honestly, I don't know that I am helping that much...it may be time to post in paid section to find someone that can get close look at this and fix it... Link to comment Share on other sites More sharing options...
maxcon Posted March 27, 2014 Author Share Posted March 27, 2014 (edited) It was only a down of the server. Now It's running again. But the problem is still there.. when i put the product in the cart, the cart is empty (in the preview it works fine). Ajax is off. Edited March 27, 2014 by maxcon (see edit history) Link to comment Share on other sites More sharing options...
maxcon Posted March 27, 2014 Author Share Posted March 27, 2014 I don't know why, but now it's working! Finally! I have done two changes: 1. in classes\CART.php LEFT JOIN `ps_product_attribute_shop` `product_attribute_shop` ON product_attribute_shop.id_shop=.(int)$id_shop instead of LEFT JOIN `ps_product_attribute_shop` `product_attribute_shop` ON product_attribute_shop.id_shop=.$id_shop 2. Ajax cart off Thanks all for the help. Massimo. Link to comment Share on other sites More sharing options...
El Patron Posted March 27, 2014 Share Posted March 27, 2014 I don't know why, but now it's working! Finally! I have done two changes: 1. in classes\CART.php LEFT JOIN `ps_product_attribute_shop` `product_attribute_shop` ON product_attribute_shop.id_shop=.(int)$id_shop instead of LEFT JOIN `ps_product_attribute_shop` `product_attribute_shop` ON product_attribute_shop.id_shop=.$id_shop 2. Ajax cart off Thanks all for the help. Massimo. That is awesome news to wake up to for me!... You have a beautiful shop and know how much work you put into it. Happy selling! 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