Jump to content

Problem with the product package content after updating prestashop from 1.6.0.9 to 1.6.0.14


Recommended Posts

Hello,

I am confronting with the following problem, after updating to Prestashop 1.6.0.14 the package products are showing only the first product in the "Package Content" tab

Ex here:

http://www.alternative-naturiste.ro/home/180-tratament-naturist-pachet-complet-pentru-miopie.html

In this package in the "Package Content" tab (in my site the tab is called "Continutul pachetului") there should be 3 products showing but in stead now all my packages are showing in the "Package Content" tab only the first product.

In the back-end the products from the package are showing ok, I can add or remove any of them but in the front-end is showing only the first product from the package.

Thank you in advance for your answers

Link to comment
Share on other sites

  • 1 month later...

I saw you didn't solve the issue yet.

 

In classes/Pack.php, on line 170 (function getItemPack), just replace GROUP BY a.id_product_attribute_item with GROUP BY product_shop.id_product

Thank you very much for the answer Diana. It works perfectly.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I saw you didn't solve the issue yet.

 

In classes/Pack.php, on line 170 (function getItemPack), just replace GROUP BY a.id_product_attribute_item with GROUP BY product_shop.id_product

 

I have the same issue and and it works for me too, but now i have another issue. And i badly need your help because i tryed to fix without any success :(

 

The image in the product package content are missing, the first one is here but the 3 other are missing.

it's strange because all 4 product in the package are working as individual product, with all images correctly showing.

 

If i look deeper in the code with fire bug i can see this :

for the correct first package image :

img class="replace-2x img-responsive" height="250" width="250" itemprop="image" title="bague ajustable goutte argent" alt="bague ajustable goutte argent" src="mysite/1329-home_default/bague-ajustable-goutte-argent.jpg"

and for the product with image missing this :

img class="replace-2x img-responsive" height="250" width="250" itemprop="image" title="Boucles d'oreilles Goutte" alt="Boucles d'oreilles Goutte" src="mysite/img/p/fr-default-home_default.jpg"

so i can see the src="http... is wrong, and that's the same for other product coming after... but i don't understand why not the first one 

i suppose it can't be a problem with my product-list.tpl because evrything would be missing.

 

i can make the second image to appear if i swap to another image as default picture when editing the individual product, but still i can't understand what is wrong there.

 

you can see the package here : http://boutique-sochic.com/2003-parure-goutte-4-bijoux.html

 

Please, if someone can help me.

Edited by creatix974 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Same problem here too.

Have edited the php file as suggested but to no avail.

 

In notepad my file now looks like this:

 

WHERE product_shop.`id_shop` = '.(int)$context->shop->id.'
GROUP BY product_shop.id_product, a.`id_product_attribute_item`';
 
Some fix here but don't know how current it is:
 
Edited by Amber123 (see edit history)
Link to comment
Share on other sites

I had a similar issue, for the first product the image was missing, so I change the code of the class Pack.php :

 

line 162 in the method  "getItemTable($id_product, $id_lang, $full = false)" , replace :

 

Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'

by

Shop::addSqlAssociation('image', 'i', false).'

 

I hope it will help.

Cheers !

  • Like 3
Link to comment
Share on other sites

class Pack.php :

 

line 162 in the method  "getItemTable($id_product, $id_lang, $full = false)" , replace :

 

Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'

by

Shop::addSqlAssociation('image', 'i', false).'

 

I hope it will help.

Cheers !

 

it really help and it works very fine :D

 

Thank you so much !!!!

:)

Link to comment
Share on other sites

I had a similar issue, for the first product the image was missing, so I change the code of the class Pack.php :

 

line 162 in the method  "getItemTable($id_product, $id_lang, $full = false)" , replace :

 

Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'

by

Shop::addSqlAssociation('image', 'i', false).'

 

I hope it will help.

Cheers !

 

A partial success!

 

The products in my product pack displayed images after applying your fix, but they were not the products' 'cover' (main) images...

 

...so I deleted all additional images from individual products and now the product pack page displays the 'cover' images correctly. :)

 

Edit: 

 

Another problem... The fix has merged two different product packs. Even if I delete one of the product packs, the products from that pack appear in the other product pack.  :(

Edited by Amber123 (see edit history)
Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

hello guys please fix the issue of cover photos as bellow

in classes/pack.php edit the getItemTable function:

change:

 

$sql = 'SELECT p.*, product_shop.*, pl.*, image_shop.`id_image`, 

 

 

to

 

$sql = 'SELECT p.*, product_shop.*, pl.*, MAX(image_shop.`id_image`) id_image,

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...