// Smarty 3 standardize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11427 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -37,9 +37,9 @@ $(function () {ldelim}
|
||||
<script type="text/javascript" src="{$js_dir}scenes.js"></script>
|
||||
<div id="scenes">
|
||||
<div>
|
||||
{foreach from=$scenes key='scene_key' item='scene' name='scenes'}
|
||||
<div class="screen_scene" id="screen_scene_{$scene->id}" style="background:transparent url({$base_dir}img/scenes/{$scene->id}-large_scene.jpg); height:{$largeSceneImageType.height}px; width:{$largeSceneImageType.width}px; {if !$smarty.foreach.scenes.first} display:none;{/if}">
|
||||
{foreach from=$scene->products key='product_key' item='product'}
|
||||
{foreach $scenes as $scene_key=>$scene}
|
||||
<div class="screen_scene" id="screen_scene_{$scene->id}" style="background:transparent url({$base_dir}img/scenes/{$scene->id}-large_scene.jpg); height:{$largeSceneImageType.height}px; width:{$largeSceneImageType.width}px; {if !$scene@first} display:none;{/if}">
|
||||
{foreach $scene->products as $product_key=>$product}
|
||||
{assign var=imageIds value="`$product.id_product`-`$product.id_image`"}
|
||||
<a href="{$product.link|escape:'htmlall':'UTF-8'}" accesskey="#scene_products_cluetip_{$scene_key}_{$product_key}_{$product.id_product}" class="cluetip" style="width:{$product.zone_width}px; height:{$product.zone_height}px; margin-left:{$product.x_axis}px ;margin-top:{$product.y_axis}px;">
|
||||
<span style="margin-top:{math equation='a/2 -10' a=$product.zone_height}px; margin-left:{math equation='a/2 -10' a=$product.zone_width}px;"> </span>
|
||||
@@ -71,8 +71,8 @@ $(function () {ldelim}
|
||||
</span>
|
||||
<div id="scenes_list">
|
||||
<ul style="width:{math equation='(a*b + (a-1)*10)' a=$scenes|@count b=$thumbSceneImageType.width}px; height:{$thumbSceneImageType.height}px;">
|
||||
{foreach from=$scenes item='scene' name='scenes_list'}
|
||||
<li id="scene_thumb_{$scene->id}" style="{if !$smarty.foreach.scenes_list.last} padding-right:10px;{/if}">
|
||||
{foreach $scenes as $scene}
|
||||
<li id="scene_thumb_{$scene->id}" style="{if !$scene@last} padding-right:10px;{/if}">
|
||||
<a style="width:{$thumbSceneImageType.width}px; height:{$thumbSceneImageType.height}px" title="{$scene->name|escape:'htmlall':'UTF-8'}" href="#" rel="{$scene->id}" onclick="{ldelim}loadScene({$scene->id});return false;{rdelim}">
|
||||
<img alt="{$scene->name|escape:'htmlall':'UTF-8'}" src="{$content_dir}img/scenes/thumbs/{$scene->id}-thumb_scene.jpg" width="{$thumbSceneSize.width}" height="{$thumbSceneSize.height}" />
|
||||
</a>
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
{if $voucherAllowed}
|
||||
{if isset($errors_discount) && $errors_discount}
|
||||
<ul class="error">
|
||||
{foreach from=$errors_discount key=k item=error}
|
||||
{foreach $errors_discount as $k=>$error}
|
||||
<li>{$error|escape:'htmlall':'UTF-8'}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
@@ -195,7 +195,7 @@
|
||||
{if $displayVouchers}
|
||||
<h4 class="title_offers">{l s='Take advantage of our offers:'}</h4>
|
||||
<div id="display_cart_vouchers">
|
||||
{foreach from=$displayVouchers item=voucher}
|
||||
{foreach $displayVouchers as $voucher}
|
||||
<span onclick="$('#discount_name').val('{$voucher.name}');return false;" class="voucher_name">{$voucher.name}</span> - {$voucher.description} <br />
|
||||
{/foreach}
|
||||
</div>
|
||||
@@ -218,33 +218,33 @@
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
{foreach from=$products item=product name=productLoop}
|
||||
{foreach $products as $product}
|
||||
{assign var='productId' value=$product.id_product}
|
||||
{assign var='productAttributeId' value=$product.id_product_attribute}
|
||||
{assign var='quantityDisplayed' value=0}
|
||||
{* Display the product line *}
|
||||
{include file="./shopping-cart-product-line.tpl" productLast=$smarty.foreach.productLoop.last productFirst=$smarty.foreach.productLoop.first}
|
||||
{include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}
|
||||
{* Then the customized datas ones*}
|
||||
{if isset($customizedDatas.$productId.$productAttributeId)}
|
||||
{foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key=id_customization item=customization}
|
||||
{foreach $customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] as $id_customization=>$customization}
|
||||
<tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="alternate_item cart_item">
|
||||
<td colspan="5">
|
||||
{foreach from=$customization.datas key=type item=custom_data}
|
||||
{foreach $customization.datas as $type=>$custom_data}
|
||||
|
||||
{if $type == $CUSTOMIZE_FILE}
|
||||
<div class="customizationUploaded">
|
||||
<ul class="customizationUploaded">
|
||||
{foreach from=$datas item=picture}<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>{/foreach}
|
||||
{foreach $datas as $picture}<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{elseif $type == $CUSTOMIZE_TEXTFIELD}
|
||||
<ul class="typedText">
|
||||
{foreach from=$custom_data item=textField name=typedText}
|
||||
{foreach $custom_data as $textField}
|
||||
<li>
|
||||
{if $textField.name}
|
||||
{$textField.name}
|
||||
{else}
|
||||
{l s='Text #'}{$smarty.foreach.typedText.index+1}
|
||||
{l s='Text #'}{$textField@index+1}
|
||||
{/if}
|
||||
{l s=':'} {$textField.value}
|
||||
</li>
|
||||
@@ -283,14 +283,14 @@
|
||||
{assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
|
||||
{/foreach}
|
||||
{* If it exists also some uncustomized products *}
|
||||
{if $product.quantity-$quantityDisplayed > 0}{include file="./shopping-cart-product-line.tpl" productLast=$smarty.foreach.productLoop.last productFirst=$smarty.foreach.productLoop.first}{/if}
|
||||
{if $product.quantity-$quantityDisplayed > 0}{include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
{if sizeof($discounts)}
|
||||
<tbody>
|
||||
{foreach from=$discounts item=discount name=discountLoop}
|
||||
<tr class="cart_discount {if $smarty.foreach.discountLoop.last}last_item{elseif $smarty.foreach.discountLoop.first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}">
|
||||
{foreach $discounts as $discount}
|
||||
<tr class="cart_discount {if $discount@last}last_item{elseif $discount@first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}">
|
||||
<td class="cart_discount_name" colspan="3">{$discount.name}</td>
|
||||
<td class="cart_discount_price"><span class="price-discount">
|
||||
{if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}
|
||||
@@ -368,13 +368,13 @@
|
||||
</ul>
|
||||
{/if}
|
||||
{else}
|
||||
{foreach from=$formattedAddresses item=address name=myLoop}
|
||||
<ul class="address {if $smarty.foreach.myLoop.last}last_item{elseif $smarty.foreach.myLoop.first}first_item{/if} {if $smarty.foreach.myLoop.index % 2}alternate_item{else}item{/if}">
|
||||
{foreach $formattedAddresses as $address}
|
||||
<ul class="address {if $address@last}last_item{elseif $address@first}first_item{/if} {if $address@index % 2}alternate_item{else}item{/if}">
|
||||
<li class="address_title">{$address.object.alias}</li>
|
||||
{foreach from=$address.ordered name=adr_loop item=pattern}
|
||||
{foreach $address.ordered as $pattern}
|
||||
{assign var=addressKey value=" "|explode:$pattern}
|
||||
<li>
|
||||
{foreach from=$addressKey item=key name="word_loop"}
|
||||
{foreach $addressKey as $key}
|
||||
<span class="{if isset($addresses_style[$key])}{$addresses_style[$key]}{/if}">
|
||||
{$address.formated[$key]|escape:'htmlall':'UTF-8'}
|
||||
</span>
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
<div class="tree_top"><a href="{$base_dir_ssl}">{$categoriesTree.name|escape:'htmlall':'UTF-8'}</a></div>
|
||||
<ul class="tree">
|
||||
{if isset($categoriesTree.children)}
|
||||
{foreach from=$categoriesTree.children item=child name=sitemapTree}
|
||||
{if $smarty.foreach.sitemapTree.last}
|
||||
{foreach $categoriesTree.children as $child}
|
||||
{if $child@last}
|
||||
{include file="$tpl_dir./category-tree-branch.tpl" node=$child last='true'}
|
||||
{else}
|
||||
{include file="$tpl_dir./category-tree-branch.tpl" node=$child}
|
||||
@@ -74,7 +74,7 @@
|
||||
<div class="tree_top"><a href="{$categoriescmsTree.link}">{$categoriescmsTree.name|escape:'htmlall':'UTF-8'}</a></div>
|
||||
<ul class="tree">
|
||||
{if isset($categoriescmsTree.children)}
|
||||
{foreach from=$categoriescmsTree.children item=child name=sitemapCmsTree}
|
||||
{foreach $categoriescmsTree.children as $child}
|
||||
{if (isset($child.children) && $child.children|@count > 0) || $child.cms|@count > 0}
|
||||
{include file="$tpl_dir./category-cms-tree-branch.tpl" node=$child}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user