From c0e87949473421475d3557c0e778b0febf8564b8 Mon Sep 17 00:00:00 2001 From: Kevin Granger Date: Thu, 5 Dec 2013 14:42:22 +0100 Subject: [PATCH] // make product.tpl human readable ;) --- themes/default-bootstrap/product.tpl | 1510 ++++++++++++++------------ 1 file changed, 807 insertions(+), 703 deletions(-) diff --git a/themes/default-bootstrap/product.tpl b/themes/default-bootstrap/product.tpl index 650a51947..fc118839d 100644 --- a/themes/default-bootstrap/product.tpl +++ b/themes/default-bootstrap/product.tpl @@ -25,273 +25,335 @@ {include file="$tpl_dir./errors.tpl"} {if $errors|@count == 0} - -
- - -{if !$content_only}
{/if} - - {if isset($adminActionDisplay) && $adminActionDisplay} -
-

{l s='This product is not visible to your customers.'} - - - -

-

-

-
- {/if} - - {if isset($confirmation) && $confirmation} -

- {$confirmation} -

- {/if} - - - -
- - -
- - - {if $product->on_sale} - {l s='Sale!'} - {elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutReduction > $productPrice} - {l s='Reduced price!'} - {/if} - - {if $have_image} - - {if $jqZoomEnabled && $have_image && !$content_only} - - {if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if} - - {else} - {if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if} - {if !$content_only}{l s='View larger'}{/if} - {/if} - - {else} - - - {if !$content_only}{l s='View larger'}{/if} - + {if !isset($priceDisplayPrecision)} + {assign var='priceDisplayPrecision' value=2} {/if} -
- {if isset($images) && count($images) > 0} - -
- {if isset($images) && count($images) > 3}{l s='Previous'}{/if} -
-
    - {if isset($images)} - {foreach from=$images item=image name=thumbnails} - {assign var=imageIds value="`$product->id`-`$image.id_image`"} - {if !empty($image.legend)} - {assign var=imageTitlte value=$image.legend|escape:'html'} - {else} - {assign var=imageTitlte value=$product->name|escape:'html'} - {/if} -
  • - - {$imageTitlte} - -
  • + + {if !$priceDisplay || $priceDisplay == 2} + {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} + {elseif $priceDisplay == 1} + {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} + {/if} + + var productPriceWithoutReduction = '{$productPriceWithoutReduction}'; + var productPrice = '{$productPrice}'; + // Customizable field + var img_ps_dir = '{$img_ps_dir}'; + var customizationFields = new Array(); + {assign var='imgIndex' value=0} + {assign var='textFieldIndex' value=0} + {foreach from=$customizationFields item='field' name='customizationFields'} + {assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"} + customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array(); + customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}'; + customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 && isset($pictures.$key) && $pictures.$key}2{else}{$field.required|intval}{/if}; + {/foreach} + // Images + var img_prod_dir = '{$img_prod_dir}'; + var combinationImages = new Array(); + + {if isset($combinationImages)} + {foreach from=$combinationImages item='combination' key='combinationId' name='f_combinationImages'} + combinationImages[{$combinationId}] = new Array(); + {foreach from=$combination item='image' name='f_combinationImage'} + combinationImages[{$combinationId}][{$smarty.foreach.f_combinationImage.index}] = {$image.id_image|intval}; {/foreach} - {/if} -
-
- {if isset($images) && count($images) > 3}{l s='Next'}{/if} -
+ {/foreach} {/if} - {if isset($images) && count($images) > 1}

{/if} -
- + combinationImages[0] = new Array(); - -
- - {if $product->online_only} -

{l s='Online only'}

+ {if isset($images)} + {foreach from=$images item='image' name='f_defaultImages'} + combinationImages[0][{$smarty.foreach.f_defaultImages.index}] = {$image.id_image}; + {/foreach} + {/if} + // Translations + var doesntExist = '{l s='This combination does not exist for this product. Please select another combination.' js=1}'; + var doesntExistNoMore = '{l s='This product is no longer in stock' js=1}'; + var doesntExistNoMoreBut = '{l s='with those attributes but is available with others.' js=1}'; + var uploading_in_progress = '{l s='Uploading in progress, please be patient.' js=1}'; + var fieldRequired = '{l s='Please fill in all the required fields before saving your customization.' js=1}'; + + {if isset($groups)} + // Combinations + {foreach from=$combinations key=idCombination item=combination} + var specific_price_combination = new Array(); + var available_date = new Array(); + specific_price_combination['reduction_percent'] = {if $combination.specific_price AND $combination.specific_price.reduction AND $combination.specific_price.reduction_type == 'percentage'}{$combination.specific_price.reduction*100}{else}0{/if}; + specific_price_combination['reduction_price'] = {if $combination.specific_price AND $combination.specific_price.reduction AND $combination.specific_price.reduction_type == 'amount'}{$combination.specific_price.reduction}{else}0{/if}; + specific_price_combination['price'] = {if $combination.specific_price AND $combination.specific_price.price}{$combination.specific_price.price}{else}0{/if}; + specific_price_combination['reduction_type'] = '{if $combination.specific_price}{$combination.specific_price.reduction_type}{/if}'; + specific_price_combination['id_product_attribute'] = {if $combination.specific_price}{$combination.specific_price.id_product_attribute|intval}{else}0{/if}; + available_date['date'] = '{$combination.available_date}'; + available_date['date_formatted'] = '{dateFormat date=$combination.available_date full=false}'; + addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity}, available_date, specific_price_combination); + {/foreach} + {/if} + + {if isset($attributesCombinations)} + // Combinations attributes informations + var attributesCombinations = new Array(); + {foreach from=$attributesCombinations key=id item=aC} + tabInfos = new Array(); + tabInfos['id_attribute'] = '{$aC.id_attribute|intval}'; + tabInfos['attribute'] = '{$aC.attribute}'; + tabInfos['group'] = '{$aC.group}'; + tabInfos['id_attribute_group'] = '{$aC.id_attribute_group|intval}'; + attributesCombinations.push(tabInfos); + {/foreach} + {/if} + + var isLoggedWishlist = {if $logged}true{else}false{/if}; + var contentOnly = {if $content_only}true{else}false{/if} + //]]> + + +
+ {if !$content_only} +
+
+
+ {/if} + + {if isset($adminActionDisplay) && $adminActionDisplay} +
+

{l s='This product is not visible to your customers.'} + + + +

+

+
+ {/if} + + {if isset($confirmation) && $confirmation} +

+ {$confirmation} +

+ {/if} + +
+ +
+ {if $product->on_sale} + + {l s='Sale!'} + + {elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutReduction > $productPrice} + {l s='Reduced price!'} + {/if} + + {if $have_image} + + {if $jqZoomEnabled && $have_image && !$content_only} + + {if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if} + + {else} + {if !empty($cover.legend)}{$cover.legend|escape:'html'}{else}{$product->name|escape:'html'}{/if} + {if !$content_only} + {l s='View larger'} + {/if} + {/if} + + {else} + + + {if !$content_only} + + {l s='View larger'} + + {/if} + + {/if} +
+ + {if isset($images) && count($images) > 0} + +
+ {if isset($images) && count($images) > 3} + + + {l s='Previous'} + + + {/if} +
+
    + {if isset($images)} + {foreach from=$images item=image name=thumbnails} + {assign var=imageIds value="`$product->id`-`$image.id_image`"} + {if !empty($image.legend)} + {assign var=imageTitlte value=$image.legend|escape:'html'} + {else} + {assign var=imageTitlte value=$product->name|escape:'html'} + {/if} +
  • + + {$imageTitlte} + +
  • + {/foreach} + {/if} +
+
+ {if isset($images) && count($images) > 3} + + {l s='Next'} + + {/if} +
+ + {/if} + + {if isset($images) && count($images) > 1} +

+ +

+ {/if} +
+ + + +
+ {if $product->online_only} +

{l s='Online only'}

{/if} -

{$product->name|escape:'html':'UTF-8'}

+

{$product->name|escape:'html':'UTF-8'}

reference}style="display: none;"{/if}> {$product->reference|escape:'html':'UTF-8'}

- {if $product->description_short OR $packItems|@count > 0} -
- {if $product->description_short} -
{$product->description_short}
- {/if} - {if $product->description} -

{l s='More details'}

- {/if} - -
- {/if} + {if $product->description_short OR $packItems|@count > 0} +
+ {if $product->description_short} +
{$product->description_short}
+ {/if} - + {if $product->description} +

+ + {l s='More details'} + +

+ {/if} + +
+ {/if} + + {if ($display_qties == 1 && !$PS_CATALOG_MODE && $product->available_for_order)} -

quantity <= 0} style="display: none;"{/if}> - {$product->quantity|intval} - quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'} - quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'} -

+ +

quantity <= 0} style="display: none;"{/if}> + {$product->quantity|intval} + quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'} + quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'} +

{/if} -

quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> {*{l s='Availability:'}*} @@ -305,478 +367,520 @@ var contentOnly = {if $content_only}true{else}false{/if} {dateFormat date=$product->available_date full=false}

- -
quantity > 0} style="display: none;"{/if}> {$HOOK_PRODUCT_OOS}
- {*{if isset($colors) && $colors} - -
-

{l s='Pick a color:' js=1}

-
- -
-
- {/if}*} - - - {if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} - -
quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart')|escape:'html'}" method="post"> - - -
- {/if} - {if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if} - {if !$content_only} - - - {/if} -
- - - - - -
-
-
- - {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} - -
-

- quantity <= 0}href="http://schema.org/OutOfStock"{else}href="http://schema.org/InStock"{/if}> - {if $priceDisplay >= 0 && $priceDisplay <= 2} - {convertPrice price=$productPrice} - - - {/if} -

- -

specificPrice OR $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}>{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}

- - -

specificPrice || !$product->specificPrice.reduction} class="hidden"{/if}> - {if $priceDisplay >= 0 && $priceDisplay <= 2} - {if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if} - - {/if} -

- {if $priceDisplay == 2} -
- {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} - {/if} -
- -

specificPrice OR $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|intval ==0} style="display:none"{/if}> - - {if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' AND $product->specificPrice.reduction|intval !=0} - -{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval} - {/if} - -

- - {if $packItems|@count && $productPrice < $product->getNoPackPrice()} -

{l s='Instead of'} {convertPrice price=$product->getNoPackPrice()}

- - {/if} - {if $product->ecotax != 0} -

{l s='Include'} {if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if} {l s='For green tax'} - {if $product->specificPrice AND $product->specificPrice.reduction} -
{l s='(not impacted by the discount)'} - {/if} -

- {/if} - {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} - {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price} -

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

- {/if} - {*close if for show price*} - {/if} - -
-
- -
- - -

quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> - - - - minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> - - - - -

- - - -

minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> - {l s='This product is not sold individually. You must select at least'} {$product->minimal_quantity} {l s='quantity for this product.'} -

- {if $product->minimal_quantity > 1} - - {/if} - - {if isset($groups)} - -
-
- {foreach from=$groups key=id_attribute_group item=group} - {if $group.attributes|@count} -
- - {assign var="groupName" value="group_$id_attribute_group"} -
- {if ($group.group_type == 'select')} - - {elseif ($group.group_type == 'color')} - - - {elseif ($group.group_type == 'radio')} -
    - {foreach from=$group.attributes key=id_attribute item=group_attribute} -
  • - - {$group_attribute|escape:'html':'UTF-8'} -
  • - {/foreach} -
- {/if} -
-
- {/if} - {/foreach} + {* {if isset($colors) && $colors} + +
+

{l s='Pick a color:' js=1}

+
+ +
+ {/if} *} + + {if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} + +
quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart')|escape:'html'}" method="post"> + + +
{/if} - - -
- -
- -

quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}style="display:none"{/if} class="buttons_bottom_block"> - -

- {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} + {if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if} - -
- -
- -
- - -
- -{if !$content_only} - -{if $product->description} -
-

{l s='More info'}

{/if} - {if isset($product) && $product->description} - -
{$product->description}
-
-{/if} - - - - -{if $features} -
-

{l s='Data sheet'}

{/if} -{if isset($features) && $features} - - {foreach from=$features item=feature} - - {if isset($feature.value)} - + {if !$content_only} + + {/if} - - {/foreach} -
{$feature.name|escape:'html':'UTF-8'} {$feature.value|escape:'html':'UTF-8'}
-
-{/if} - +
+ + + +
+
+
+ {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} + +
+

+ quantity <= 0}href="http://schema.org/OutOfStock"{else}href="http://schema.org/InStock"{/if}> + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {convertPrice price=$productPrice} + + + {/if} +

- -
- {$HOOK_PRODUCT_TAB} - {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if} -
- +

specificPrice OR $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}> + + {if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if} + +

- +

specificPrice || !$product->specificPrice.reduction} class="hidden"{/if}> + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if} + + {/if} +

-{if isset($accessories) AND $accessories} -
-

{l s='Accessories'}

- -
-
-
    - {foreach from=$accessories item=accessory name=accessories_list} - {if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0 || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode)} - {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} -
  • + {if $priceDisplay == 2} +
    + + {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} + {l s='tax excl.'} + + {/if} +
- - -
-
{$accessory.name|truncate:20:'...':true|escape:'html':'UTF-8'}
- - {if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} - {if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}{/if} -
- -
- {if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0)} - - - - {/if} -
- - - {/if} - {/foreach} - -
-
- -{/if} - - -{if (isset($quantity_discounts) && count($quantity_discounts) > 0)} - - -
-

{l s='Volume discounts'}

-
- - - - - - - - - - {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} - - - - - - - {/foreach} - -
{l s='Quantity'}{l s='Discount'}{l s='You Save'}
{$quantity_discount.quantity|intval} - {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'} - {convertPrice price=$quantity_discount.real_value|floatval} - {else} - {$quantity_discount.real_value|floatval}% - {/if} - - {l s='Up to'} - {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'} - {$discountPrice=$productPrice-$quantity_discount.real_value|floatval} - {else} - {$discountPrice=$productPrice-($productPrice*$quantity_discount.reduction)|floatval} - {/if} - {$discountPrice=$discountPrice*$quantity_discount.quantity} - {$qtyProductPrice = $productPrice*$quantity_discount.quantity} - {convertPrice price=$qtyProductPrice-$discountPrice} -
-
-{/if} - -
-{if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if} - - - -{if (isset($product) && $product->description) || (isset($features) && $features) || (isset($accessories) && $accessories) || (isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB) || (isset($attachments) && $attachments) || isset($product) && $product->customizable} - - - - {if isset($attachments) && $attachments} -
-

{l s='Download'}

- {foreach from=$attachments item=attachment} - {$attachment.name|escape:'html':'UTF-8'}
{$attachment.description|escape:'html':'UTF-8'} - {/foreach} - -
- {/if} - - - - - -{if isset($product) && $product->customizable} -
- -

{l s='Product customization'}

- - - -
-

- {l s='After saving your customized product, remember to add it to your cart.'} - {if $product->uploadable_files}
{l s='Allowed file formats are: GIF, JPG, PNG'}{/if} -

- {if $product->uploadable_files|intval} -
-
{l s='Pictures'}
-
    - {counter start=0 assign='customizationField'} - {foreach from=$customizationFields item='field' name='customizationFields'} - {if $field.type == 0} -
  • {assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} - {if isset($pictures.$key)} -
    - - - {l s='Delete'} - -
    - {/if} -
    - - -
    -
  • - {counter} +

    specificPrice OR $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|intval ==0} style="display:none"{/if}> + + {if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' AND $product->specificPrice.reduction|intval !=0} + -{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval} {/if} - {/foreach} -

-
- {/if} - {if $product->text_fields|intval} -
-
{l s='Text'}
-
    - {counter start=0 assign='customizationField'} - {foreach from=$customizationFields item='field' name='customizationFields'} - {if $field.type == 1} -
  • - - -
  • - {counter} + +

    + + {if $packItems|@count && $productPrice < $product->getNoPackPrice()} +

    {l s='Instead of'} {convertPrice price=$product->getNoPackPrice()}

    {/if} + + {if $product->ecotax != 0} +

    {l s='Include'} {if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if} {l s='For green tax'} + {if $product->specificPrice AND $product->specificPrice.reduction} +
    {l s='(not impacted by the discount)'} + {/if} +

    + {/if} + + {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} + {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price} +

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

    + {/if} + {/if} {*close if for show price*} +
    +
+ +
+ +

quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> + + minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> + + + + + + + +

+ +

minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> + {l s='This product is not sold individually. You must select at least'} {$product->minimal_quantity} {l s='quantity for this product.'} +

+ {if $product->minimal_quantity > 1} + + {/if} + + {if isset($groups)} + +
+
+ {foreach from=$groups key=id_attribute_group item=group} + {if $group.attributes|@count} +
+ + {assign var="groupName" value="group_$id_attribute_group"} +
+ {if ($group.group_type == 'select')} + + {elseif ($group.group_type == 'color')} + + + {elseif ($group.group_type == 'radio')} +
    + {foreach from=$group.attributes key=id_attribute item=group_attribute} +
  • + + {$group_attribute|escape:'html':'UTF-8'} +
  • + {/foreach} +
+ {/if} +
+
+ {/if} + {/foreach} +
+ {/if} +
+
+

quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}style="display:none"{/if} class="buttons_bottom_block"> + +

+ {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} +
+
+
+
+ + {if !$content_only} + + {if $product->description} + +
+

{l s='More info'}

{/if} + {if isset($product) && $product->description} + +
{$product->description}
+
+ + {/if} + + + {if $features} + +
+

{l s='Data sheet'}

+ {/if} + {if isset($features) && $features} + + {foreach from=$features item=feature} + + {if isset($feature.value)} + + + {/if} + {/foreach} - +
{$feature.name|escape:'html':'UTF-8'}{$feature.value|escape:'html':'UTF-8'}
+
+ + {/if} + + +
+ {$HOOK_PRODUCT_TAB} + {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if} +
+ + + {if isset($accessories) AND $accessories} + +
+

{l s='Accessories'}

+
+
+
    + {foreach from=$accessories item=accessory name=accessories_list} + {if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0 || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode)} + {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} +
  • + +
    +
    + + {$accessory.name|truncate:20:'...':true|escape:'html':'UTF-8'} + +
    + {if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} + + {if $priceDisplay != 1} + {displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc} + {/if} + + {/if} +
    +
    + {if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0)} + + {/if} +
    +
  • + {/if} + {/foreach} +
+
+
+
+ + {/if} + + + {if (isset($quantity_discounts) && count($quantity_discounts) > 0)} + +
+

{l s='Volume discounts'}

+
+ + + + + + + + + + {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} + + + + + + + {/foreach} + +
{l s='Quantity'}{l s='Discount'}{l s='You Save'}
{$quantity_discount.quantity|intval} + {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'} + {convertPrice price=$quantity_discount.real_value|floatval} + {else} + {$quantity_discount.real_value|floatval}% + {/if} + + {l s='Up to'} + {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'} + {$discountPrice=$productPrice-$quantity_discount.real_value|floatval} + {else} + {$discountPrice=$productPrice-($productPrice*$quantity_discount.reduction)|floatval} + {/if} + {$discountPrice=$discountPrice*$quantity_discount.quantity} + {$qtyProductPrice = $productPrice*$quantity_discount.quantity} + {convertPrice price=$qtyProductPrice-$discountPrice} +
- {/if} -

- - - - - -

- -

* {l s='required fields'}

-
+ + {/if} + + {if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if} + + + {if (isset($product) && $product->description) || (isset($features) && $features) || (isset($accessories) && $accessories) || (isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB) || (isset($attachments) && $attachments) || isset($product) && $product->customizable} + + {if isset($attachments) && $attachments} + +
+

{l s='Download'}

+ {foreach from=$attachments item=attachment} + + {$attachment.name|escape:'html':'UTF-8'} + +
+ {$attachment.description|escape:'html':'UTF-8'} + {/foreach} +
+ + {/if} + + {if isset($product) && $product->customizable} + +
+

{l s='Product customization'}

+ +
+

+ {l s='After saving your customized product, remember to add it to your cart.'} + {if $product->uploadable_files} +
+ {l s='Allowed file formats are: GIF, JPG, PNG'}{/if} +

+ {if $product->uploadable_files|intval} +
+
{l s='Pictures'}
+
    + {counter start=0 assign='customizationField'} + {foreach from=$customizationFields item='field' name='customizationFields'} + {if $field.type == 0} +
  • {assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} + {if isset($pictures.$key)} +
    + + + {l s='Delete'} + +
    + {/if} +
    + + +
    +
  • + {counter} + {/if} + {/foreach} +
+
+ {/if} + + {if $product->text_fields|intval} +
+
{l s='Text'}
+
    + {counter start=0 assign='customizationField'} + {foreach from=$customizationFields item='field' name='customizationFields'} + {if $field.type == 1} +
  • + + +
  • + {counter} + {/if} + {/foreach} +
+
+ {/if} + +

+ + + + + +

+
+

* {l s='required fields'}

+
+ + {/if} + {/if} + + {if isset($packItems) && $packItems|@count > 0} +
+

{l s='Pack content'}

+ {include file="$tpl_dir./product-list.tpl" products=$packItems} +
+ {/if} + {/if} - - - - -{/if} -{if isset($packItems) && $packItems|@count > 0} -
-

{l s='Pack content'}

- {include file="$tpl_dir./product-list.tpl" products=$packItems} -
-{/if} -{/if} - - - - -{/if} +{/if} \ No newline at end of file