luigisalas Posted March 11, 2015 Share Posted March 11, 2015 Con la actualizacion de prestashop 1.6.0.9 a 1.6.0.11, he notado un cambio en el manejo de los pack de producto. Antes el contenido de un pack se listaba, actualmente en mi tienda solo lista 1 unico item, el ultimo agregado. Revisando el tema, al editar el archivo product.tpl de mi plantilla encuentro el siguiente codigo: <!--{if $packItems|@count > 0} <div class="short_description_pack"> <h3>{l s='Pack content'}</h3> {foreach from=$packItems item=packItem} <div class="pack_content"> {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)|escape:'html':'UTF-8'}">{$packItem.name|escape:'html':'UTF-8'}</a> <p>{$packItem.description_short}</p> </div> {/foreach} </div> {/if}--> Que veo esta comentado hasta en la plantilla por defecto de prestashop, pero al descomentarla unicamente muestra 1 item del pack, y no los demas. Entiendo $packItems es un arreglo, pero noto que este arreglo solo contiene un elemento... es por ello que al colocar el siguiente codigo no muestra ningun producto: {if $packItems|@count > 1} ..... Alguien conoce si existe un nuevo array que maneje los contenidos de un paquete? o esto es un bug y este array ya no se genera correctamente? dado que hasta la version 1.6.0.9, no tenia este problema... Gracias por vuestra atencion. Link to comment Share on other sites More sharing options...
snakefd99cb Posted March 17, 2015 Share Posted March 17, 2015 Hola, Otro que se uno a ese bug con la .14, sólo muestra un elemento del pack, en este caso el primero que se agrega. Link to comment Share on other sites More sharing options...
luigisalas Posted March 18, 2015 Author Share Posted March 18, 2015 No he encontrado aun una solucion Solo he notado que la variable $packItems es tratada como un Arreglo, pero lastimosamente contiene un solo elemento. Sabes si este "bug" esta reportado? Link to comment Share on other sites More sharing options...
snakefd99cb Posted March 18, 2015 Share Posted March 18, 2015 Sinceramente, no lo sé. Ayer estuve mirando de solucionarlo y no pude. Link to comment Share on other sites More sharing options...
Santiago38 Posted March 20, 2015 Share Posted March 20, 2015 Tengo el mismo problema con la 1.6.0.14, solamente muestra el primero que se agrega. Link to comment Share on other sites More sharing options...
xinort Posted March 24, 2015 Share Posted March 24, 2015 I'm experiencing this as well. For the time being does anyone know if there is a way to remove the entire "Pack Content" section from the product page? Link to comment Share on other sites More sharing options...
luigisalas Posted March 24, 2015 Author Share Posted March 24, 2015 You can edit the file product.tpl of your theme... try find the var $packItems and comment all the code that you need hidden Link to comment Share on other sites More sharing options...
Guido Gilli Posted March 27, 2015 Share Posted March 27, 2015 the problem is in the script classes/Pack.php in an older version (like 1.6.0.9) you can insert the added function in 1.6.0.14 the should be 'allUsesAdvancedStockManagement' and 'noPackWholesapePrice', and then replace the script Of course you make a backup copies of the originals if this don't work the attached script is what works for me Pack.php Link to comment Share on other sites More sharing options...
luigisalas Posted May 21, 2015 Author Share Posted May 21, 2015 The solution are here: http://forge.prestashop.com/browse/PSCSX-4810 In the file Pack.php find: GROUP BY a.id_product_attribute_item And replace by: GROUP BY a.id_product_item, a.id_product_attribute_item The problems is with SQL query... thats works for me Link to comment Share on other sites More sharing options...
__fito__ Posted July 22, 2015 Share Posted July 22, 2015 Yes! it worked like a charm, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts