krrt Posted June 30, 2013 Share Posted June 30, 2013 Hola, cuando asocio productos a categorias, y luego pulso en la categoria que es , me sale el error 500. Solo me pasa en categorias que tienen productos asociados. En la version de movil funciona bien. Alguien me puede decir porque puede ser¨? Los errores son: Warning: Function addCSS() is deprecated in /home2/yklbhurx/public_html/CoresCores.es/prestashop/modules/homecategories/homecategories.php on line 34 in /home2/yklbhurx/public_html/CoresCores.es/prestashop/classes/Tools.php on line 1845 Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home2/yklbhurx/public_html/CoresCores.es/prestashop/themes/bluetheme/product-list.tpl" on line 39 "{/if}" unclosed {if} tag' in /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:665 Stack trace: #0 /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_compilebase.php(166): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unclosed {if} t...') #1 /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_compile_foreach.php(224): Smarty_Internal_CompileBase->closeTag(Object(Smarty_Internal_SmartyTemplateCompiler), Array) #2 /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(483): Smarty_Internal_Compile_Foreachclose->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NUL in /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 665 Link to comment Share on other sites More sharing options...
nadie Posted June 30, 2013 Share Posted June 30, 2013 Hola, cuando asocio productos a categorias, y luego pulso en la categoria que es , me sale el error 500. Solo me pasa en categorias que tienen productos asociados. En la version de movil funciona bien. Alguien me puede decir porque puede ser¨? Los errores son: Warning: Function addCSS() is deprecated in /home2/yklbhurx/public_html/CoresCores.es/prestashop/modules/homecategories/homecategories.php on line 34 in /home2/yklbhurx/public_html/CoresCores.es/prestashop/classes/Tools.php on line 1845 Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home2/yklbhurx/public_html/CoresCores.es/prestashop/themes/bluetheme/product-list.tpl" on line 39 "{/if}" unclosed {if} tag' in /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:665 Stack trace: #0 /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_compilebase.php(166): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unclosed {if} t...') #1 /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_compile_foreach.php(224): Smarty_Internal_CompileBase->closeTag(Object(Smarty_Internal_SmartyTemplateCompiler), Array) #2 /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(483): Smarty_Internal_Compile_Foreachclose->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NUL in /home2/yklbhurx/public_html/CoresCores.es/prestashop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 665 Bueno, el warning, se a que es debido, es cambiar simplemente la formar de hacer el import de css, en el modulo homecategories.php, que en Prestashop 1.4, se hace diferente a Prestashop 1.5 (Pero vamos eso no es lo que ahora hace que tu tienda se vaya al otro mundo) El problema lo tienes en que has modificado o tocado algo de mas de forma accidentalmente en el fichero: /themes/bluetheme/product-list.tpl Link to comment Share on other sites More sharing options...
krrt Posted June 30, 2013 Author Share Posted June 30, 2013 Muchas gracias por responder. Pero por que solo me lo hará cuando tiene algun producto la categoria. ? Lo que hize fue , indicarle al precio de producto que se multiplique por 100 porque quiero que se muestre en precio /metro de tela y en el stock lo tengo en cm. Mi product_list es: {if isset($products)} <ul id="product_list" class="bordercolor list"> {foreach from=$products item=product name=products} <li class="ajax_block_product bordercolor{if $smarty.foreach.products.iteration is div by 3} product_list-3{/if}"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a> <div class="center_block"> <div class="product_flags"> {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}!</span>{/if} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Quantity :'} <input type="text" name="ajax_qty_to_add_to_cart[{$product.id_product|intval}]" id="quantity_wanted_{$product.id_product|intval}" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" />{/if} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {if isset($product.online_only) && $product.online_only}<span class="online_only bordercolor">{l s='Online only!'}</span>{/if} </div> <h3><a class="product_link" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> <p class="product_desc"><a class="product_descr" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:30:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:250:'...'|strip_tags:'UTF-8'}</a></p> </div> <div class="right_block bordercolor"> {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span> {/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price">{convertPrice price=$product.price_tax_exc*100}</span>{/if} {/if} {if isset($comparator_max_item) && $comparator_max_item} <p class="compare checkbox"><input type="checkbox" class="comparator" id="comparator_item_list{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked{/if}/> <label for="comparator_item_list{$product.id_product}">{l s='Select to compare'}</label></p> {/if} {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} {/if}<br /> <a class="button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> </div> </li> {/foreach} </ul> {/if} Gracias de antemano Link to comment Share on other sites More sharing options...
krrt Posted June 30, 2013 Author Share Posted June 30, 2013 {if isset($products)} <ul id="product_list" class="bordercolor list"> {foreach from=$products item=product name=products} <li class="ajax_block_product bordercolor{if $smarty.foreach.products.iteration is div by 3} product_list-3{/if}"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a> <div class="center_block"> <div class="product_flags"> {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}!</span>{/if} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Quantity :'} <input type="text" name="ajax_qty_to_add_to_cart[{$product.id_product|intval}]" id="quantity_wanted_{$product.id_product|intval}" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" />{/if} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {if isset($product.online_only) && $product.online_only}<span class="online_only bordercolor">{l s='Online only!'}</span>{/if} </div> <h3><a class="product_link" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> <p class="product_desc"><a class="product_descr" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:30:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:250:'...'|strip_tags:'UTF-8'}</a></p> </div> <div class="right_block bordercolor"> {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span> {/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price">{convertPrice price=[i]$product.price_tax_exc*100[/i]}</span>{/if} {/if} {if isset($comparator_max_item) && $comparator_max_item} <p class="compare checkbox"><input type="checkbox" class="comparator" id="comparator_item_list{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked{/if}/> <label for="comparator_item_list{$product.id_product}">{l s='Select to compare'}</label></p> {/if} {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} {/if}<br /> <a class="button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> </div> </li> {/foreach} </ul> {/if} Link to comment Share on other sites More sharing options...
krrt Posted June 30, 2013 Author Share Posted June 30, 2013 Gracias, nadie, lo e resuelto resubiendo una copia del archivo segun lo traía el tema de serie. Es un placer contar con gente como tu que nos saque las casatañas del fuego. Saludos Link to comment Share on other sites More sharing options...
Recommended Posts