From 92541b8aca47dda1ce22cb798c146b254b325ede Mon Sep 17 00:00:00 2001 From: Sarah Lorenzini Date: Thu, 22 Nov 2012 18:42:56 +0100 Subject: [PATCH] [-] FO : fixed bug #PSCFV-5649 - Product comparison error when Features are not set --- themes/default/products-comparison.tpl | 288 ++++++++++++------------- 1 file changed, 144 insertions(+), 144 deletions(-) diff --git a/themes/default/products-comparison.tpl b/themes/default/products-comparison.tpl index fd5467a61..0cf88b0de 100644 --- a/themes/default/products-comparison.tpl +++ b/themes/default/products-comparison.tpl @@ -1,144 +1,144 @@ -{* -* 2007-2012 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2012 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - -{capture name=path}{l s='Product Comparison'}{/capture} - -{include file="$tpl_dir./breadcrumb.tpl"} -

{l s='Product Comparison'}

- -{if $hasProduct} -
- - - {assign var='taxes_behavior' value=false} - {if $use_taxes && (!$priceDisplay || $priceDisplay == 2)} - {assign var='taxes_behavior' value=true} - {/if} - {foreach from=$products item=product name=for_products} - {assign var='replace_id' value=$product->id|cat:'|'} - - - {/foreach} - - - - - {section loop=$products|count step=1 start=0 name=td} - - {/section} - - - {if $ordered_features} - {foreach from=$ordered_features item=feature} - - {cycle values='comparison_feature_odd,comparison_feature_even' assign='classname'} - - - {foreach from=$products item=product name=for_products} - {assign var='product_id' value=$product->id} - {assign var='feature_id' value=$feature.id_feature} - {if isset($product_features[$product_id])} - {assign var='tab' value=$product_features[$product_id]} - - {else} - - {/if} - {/foreach} - - {/foreach} - {else} - - - - - {/if} - - {$HOOK_EXTRA_PRODUCT_COMPARISON} -
- - {$product->name|escape:html:'UTF-8'} - -
{$product->name|truncate:27:'...'|escape:'htmlall':'UTF-8'}
- - {l s='View'} - -
-
- {if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} -

{convertPrice price=$product->getPrice($taxes_behavior)}

-
- {if $product->on_sale} - {l s='On sale!'} - {elseif $product->specificPrice AND $product->specificPrice.reduction} - {l s='Reduced price!'} - {/if} -
- - {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} - {math equation="pprice / punit_price" pprice=$product->getPrice($taxes_behavior) punit_price=$product->unit_price_ratio assign=unit_price} -

{convertPrice price=$unit_price} {l s='per %s' sprintf=$product->unity|escape:'htmlall':'UTF-8'}

- {else} -   - {/if} - {/if} -
- -

- {if !(($product->quantity <= 0 && !$product->available_later) OR ($product->quantity != 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE)} - {l s='Availability:'} - quantity <= 0} class="warning-inline"{/if}> - {if $product->quantity <= 0} - {if $allow_oosp} - {$product->available_later|escape:'htmlall':'UTF-8'} - {else} - {l s='This product is no longer in stock'} - {/if} - {else} - {$product->available_now|escape:'htmlall':'UTF-8'} - {/if} - - {/if} -

- {l s='Remove'} - {if (!$product->hasAttributes() OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product->minimal_quantity == 1 AND $product->customizable != 2 AND !$PS_CATALOG_MODE} - {if ($product->quantity > 0 OR $product->allow_oosp)} - id}&token={$static_token}&add")}" title="{l s='Add to cart'}">{l s='Add to cart'} - {else} - {l s='Add to cart'} - {/if} - {else} -
- {/if} -
-
- {l s='Features'} -
- {$feature.name|escape:'htmlall':'UTF-8'} - {$tab[$feature_id]|escape:'htmlall':'UTF-8'}
{l s='No features to compare'}
-
-{else} -

{l s='There are no products selected for comparison'}

-{/if} - +{* +* 2007-2012 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2012 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Product Comparison'}{/capture} + +{include file="$tpl_dir./breadcrumb.tpl"} +

{l s='Product Comparison'}

+ +{if $hasProduct} +
+ + + {assign var='taxes_behavior' value=false} + {if $use_taxes && (!$priceDisplay || $priceDisplay == 2)} + {assign var='taxes_behavior' value=true} + {/if} + {foreach from=$products item=product name=for_products} + {assign var='replace_id' value=$product->id|cat:'|'} + + + {/foreach} + + + + + {section loop=$products|count step=1 start=0 name=td} + + {/section} + + + {if $ordered_features} + {foreach from=$ordered_features item=feature} + + {cycle values='comparison_feature_odd,comparison_feature_even' assign='classname'} + + + {foreach from=$products item=product name=for_products} + {assign var='product_id' value=$product->id} + {assign var='feature_id' value=$feature.id_feature} + {if isset($product_features[$product_id])} + {assign var='tab' value=$product_features[$product_id]} + + {else} + + {/if} + {/foreach} + + {/foreach} + {else} + + + + + {/if} + + {$HOOK_EXTRA_PRODUCT_COMPARISON} +
+ + {$product->name|escape:html:'UTF-8'} + +
{$product->name|truncate:27:'...'|escape:'htmlall':'UTF-8'}
+ + {l s='View'} + +
+
+ {if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} +

{convertPrice price=$product->getPrice($taxes_behavior)}

+
+ {if $product->on_sale} + {l s='On sale!'} + {elseif $product->specificPrice AND $product->specificPrice.reduction} + {l s='Reduced price!'} + {/if} +
+ + {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} + {math equation="pprice / punit_price" pprice=$product->getPrice($taxes_behavior) punit_price=$product->unit_price_ratio assign=unit_price} +

{convertPrice price=$unit_price} {l s='per %s' sprintf=$product->unity|escape:'htmlall':'UTF-8'}

+ {else} +   + {/if} + {/if} +
+ +

+ {if !(($product->quantity <= 0 && !$product->available_later) OR ($product->quantity != 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE)} + {l s='Availability:'} + quantity <= 0} class="warning-inline"{/if}> + {if $product->quantity <= 0} + {if $allow_oosp} + {$product->available_later|escape:'htmlall':'UTF-8'} + {else} + {l s='This product is no longer in stock'} + {/if} + {else} + {$product->available_now|escape:'htmlall':'UTF-8'} + {/if} + + {/if} +

+ {l s='Remove'} + {if (!$product->hasAttributes() OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product->minimal_quantity == 1 AND $product->customizable != 2 AND !$PS_CATALOG_MODE} + {if ($product->quantity > 0 OR $product->allow_oosp)} + id}&token={$static_token}&add")}" title="{l s='Add to cart'}">{l s='Add to cart'} + {else} + {l s='Add to cart'} + {/if} + {else} +
+ {/if} +
+
+ {l s='Features'} +
+ {$feature.name|escape:'htmlall':'UTF-8'} + {if (isset($tab[$feature_id]))}{$tab[$feature_id]|escape:'htmlall':'UTF-8'}{/if}
{l s='No features to compare'}
+
+{else} +

{l s='There are no products selected for comparison'}

+{/if} +