Jump to content

Cart empty Prestashop 1.5.4.1


Recommended Posts

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.

post-601116-0-88173700-1395827636_thumb.jpg

Link to comment
Share on other sites

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

*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

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...