diff --git a/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js b/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js index 63e198425..23c36ec02 100644 --- a/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js +++ b/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js @@ -35,7 +35,7 @@ var ajaxCart = { overrideButtonsInThePage : function(){ //for every 'add' buttons... $('.ajax_add_to_cart_button').unbind('click').click(function(){ - var idProduct = $(this).attr('rel').replace('nofollow', '').replace('ajax_id_product_', ''); + var idProduct = $(this).data('id-product'); if ($(this).attr('disabled') != 'disabled') ajaxCart.add(idProduct, null, false, this); return false; diff --git a/themes/default-bootstrap/mobile/product-desc-features.tpl b/themes/default-bootstrap/mobile/product-desc-features.tpl index deca914b6..902de67e1 100644 --- a/themes/default-bootstrap/mobile/product-desc-features.tpl +++ b/themes/default-bootstrap/mobile/product-desc-features.tpl @@ -72,7 +72,20 @@ {assign var="btn_class" value="disabled"} {capture assign="btn_more"}{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{if !$PS_CATALOG_MODE}{l s='Out of stock'}{/if}{/if}{/capture} {/if} - {l s='Add to cart'} + + {l s='Add to cart'} + {$btn_more} diff --git a/themes/default-bootstrap/modules/blockwishlist/view.tpl b/themes/default-bootstrap/modules/blockwishlist/view.tpl index f66fcf265..4ceaa44c6 100644 --- a/themes/default-bootstrap/modules/blockwishlist/view.tpl +++ b/themes/default-bootstrap/modules/blockwishlist/view.tpl @@ -23,88 +23,100 @@ * International Registered Trademark & Property of PrestaShop SA *}
-

{l s='Wishlist' mod='blockwishlist'}

-{if $wishlists} -

- {l s='Other wishlists of' mod='blockwishlist'} {$current_wishlist.firstname} {$current_wishlist.lastname}: - {foreach from=$wishlists item=wishlist name=i} - {if $wishlist.id_wishlist != $current_wishlist.id_wishlist} - {$wishlist.name} - {if !$smarty.foreach.i.last} - / +

{l s='Wishlist' mod='blockwishlist'}

+ {if $wishlists} +

+ {l s='Other wishlists of' mod='blockwishlist'} {$current_wishlist.firstname} {$current_wishlist.lastname}: + {foreach from=$wishlists item=wishlist name=i} + {if $wishlist.id_wishlist != $current_wishlist.id_wishlist} + {$wishlist.name} + {if !$smarty.foreach.i.last} + / + {/if} {/if} - {/if} - {/foreach} -

-{/if} + {/foreach} +

+ {/if} -
- {assign var='nbItemsPerLine' value=3} - {assign var='nbItemsPerLineTablet' value=2} - {assign var='nbLi' value=$products|@count} - {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} - {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet} - -
- -
+
+ {assign var='nbItemsPerLine' value=3} + {assign var='nbItemsPerLineTablet' value=2} + {assign var='nbLi' value=$products|@count} + {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} + {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet} + +
+ \ No newline at end of file diff --git a/themes/default-bootstrap/product-list.tpl b/themes/default-bootstrap/product-list.tpl index 35dcb8253..ee6152b40 100644 --- a/themes/default-bootstrap/product-list.tpl +++ b/themes/default-bootstrap/product-list.tpl @@ -22,104 +22,119 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} + {if isset($products)} {*define numbers of product per line in other page for desktop*} {if $page_name !='index' && $page_name !='product'} {assign var='nbItemsPerLine' value=3} - {assign var='nbItemsPerLineTablet' value=2} - {assign var='nbItemsPerLineMobile' value=3} - {else} - {assign var='nbItemsPerLine' value=4} - {assign var='nbItemsPerLineTablet' value=3} - {assign var='nbItemsPerLineMobile' value=2} - {/if} - {*define numbers of product per line in other page for tablet*} - {assign var='nbLi' value=$products|@count} - {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} - {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet} + {assign var='nbItemsPerLineTablet' value=2} + {assign var='nbItemsPerLineMobile' value=3} + {else} + {assign var='nbItemsPerLine' value=4} + {assign var='nbItemsPerLineTablet' value=3} + {assign var='nbItemsPerLineMobile' value=2} + {/if} + {*define numbers of product per line in other page for tablet*} + {assign var='nbLi' value=$products|@count} + {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} + {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet} @@ -129,10 +144,10 @@ var comparator_max_item = {$comparator_max_item}; var comparedProductsIds = []; {foreach from=$compared_products key=k item=product}comparedProductsIds.push({$product});{/foreach} - $('document').ready(function(){ - blockHover(); - }); - + $('document').ready(function(){ + blockHover(); + }); + {/if} + {if $page_name !='index' && $page_name !='product'} + //--> {/if} {/if} diff --git a/themes/default-bootstrap/product.tpl b/themes/default-bootstrap/product.tpl index 9899fbdac..650a51947 100644 --- a/themes/default-bootstrap/product.tpl +++ b/themes/default-bootstrap/product.tpl @@ -180,31 +180,31 @@ var contentOnly = {if $content_only}true{else}false{/if} {$confirmation}

{/if} - + - +
- +
- - {if $product->on_sale} + + {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 !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} + {/if} {else} @@ -240,18 +240,18 @@ var contentOnly = {if $content_only}true{else}false{/if}
{/if} {if isset($images) && count($images) > 1}

{/if} + {l s='Display all pictures'}

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

{l s='Online only'}

{/if} - +

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

reference}style="display: none;"{/if}> @@ -266,18 +266,18 @@ var contentOnly = {if $content_only}true{else}false{/if}

{l s='More details'}

{/if}
{/if} @@ -290,22 +290,22 @@ var contentOnly = {if $content_only}true{else}false{/if} 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:'}*} quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}

- +

quantity > $last_qties OR $product->quantity <= 0) OR $allow_oosp OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none"{/if} >{l s='Warning: Last items in stock!'}

- +

quantity > 0) OR !$product->available_for_order OR $PS_CATALOG_MODE OR !isset($product->available_date) OR $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}> {l s='Availability date:'} {dateFormat date=$product->available_date full=false}

- - + +
quantity > 0} style="display: none;"{/if}> @@ -325,7 +325,7 @@ var contentOnly = {if $content_only}true{else}false{/if}
{/if}*} - + {if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} @@ -340,30 +340,30 @@ var contentOnly = {if $content_only}true{else}false{/if} {/if} {if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if} - {if !$content_only} - + {if !$content_only} + - {/if} + {/if} - - - - + + + +
-
+
- {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} + {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}> + quantity <= 0}href="http://schema.org/OutOfStock"{else}href="http://schema.org/InStock"{/if}> {if $priceDisplay >= 0 && $priceDisplay <= 2} {convertPrice price=$productPrice}

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}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> + +

- +

minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> @@ -441,7 +441,7 @@ var contentOnly = {if $content_only}true{else}false{/if} checkMinimalQuantity(); {/if} - + {if isset($groups)}

@@ -491,37 +491,37 @@ var contentOnly = {if $content_only}true{else}false{/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"> - + +

+ +

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}
-
+
+

{l s='More info'}

{/if} + {if isset($product) && $product->description} + +
{$product->description}
+
{/if} @@ -533,12 +533,12 @@ var contentOnly = {if $content_only}true{else}false{/if} {if isset($features) && $features} {foreach from=$features item=feature} - - {if isset($feature.value)} - - {/if} + + {if isset($feature.value)} + + {/if} - {/foreach} + {/foreach}
{$feature.name|escape:'html':'UTF-8'} {$feature.value|escape:'html':'UTF-8'}
{$feature.name|escape:'html':'UTF-8'} {$feature.value|escape:'html':'UTF-8'}
{/if} @@ -568,27 +568,36 @@ var contentOnly = {if $content_only}true{else}false{/if}
{$accessory.legend|escape:'html':'UTF-8'} - -
+ +
-
+
{$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 $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)}
-
-
- - +
+
+ + {l s='Add to cart'} + +
+
+
+ + {/if}
@@ -609,39 +618,39 @@ var contentOnly = {if $content_only}true{else}false{/if}

{l s='Volume discounts'}

- - - - - - - + + + + + + + - {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} - - - - - - - {/foreach} - + {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} + + + + + + + {/foreach} +
{l s='Quantity'}{l s='Discount'}{l s='You Save'}
{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} -
{$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} @@ -656,12 +665,12 @@ var contentOnly = {if $content_only}true{else}false{/if} {if isset($attachments) && $attachments} -
-

{l s='Download'}

+
+

{l s='Download'}

{foreach from=$attachments item=attachment} {$attachment.name|escape:'html':'UTF-8'}
{$attachment.description|escape:'html':'UTF-8'} {/foreach} - +
{/if} @@ -729,7 +738,7 @@ var contentOnly = {if $content_only}true{else}false{/if} - +

diff --git a/themes/default-bootstrap/products-comparison.tpl b/themes/default-bootstrap/products-comparison.tpl index 9ad6999e9..74e576e4e 100644 --- a/themes/default-bootstrap/products-comparison.tpl +++ b/themes/default-bootstrap/products-comparison.tpl @@ -36,10 +36,10 @@
- + + {l s='Features:'} + {assign var='taxes_behavior' value=false} {if $use_taxes && (!$priceDisplay || $priceDisplay == 2)} {assign var='taxes_behavior' value=true} @@ -48,37 +48,37 @@ {assign var='replace_id' value=$product->id|cat:'|'} {/foreach}
- {l s='Features:'} - -
- -
-
- - {$product->name|escape:html:'UTF-8'} - - {if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} - {if $product->on_sale} -
{l s='Sale!'}
- {/if} - {/if} -
+
+ +
+
+ + {$product->name|escape:html:'UTF-8'} + + {if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} + {if $product->on_sale} +
{l s='Sale!'}
+ {/if} + {/if} +
{$product->name|truncate:45:'...'|escape:'html':'UTF-8'}
-
+
{if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} {convertPrice price=$product->getPrice($taxes_behavior)} {if isset($product->specificPrice) && $product->specificPrice} - {if {$product->specificPrice.reduction_type == 'percentage'}} - {displayWtPrice p=$product->getPrice($taxes_behavior)+($product->getPrice($taxes_behavior)* $product->specificPrice.reduction)} - -{$product->specificPrice.reduction*100|floatval}% - {else} - {convertPrice price=($product->getPrice($taxes_behavior) + $product->specificPrice.reduction)} - -{convertPrice price=$product->specificPrice.reduction} - {/if} - {/if} + {if {$product->specificPrice.reduction_type == 'percentage'}} + {displayWtPrice p=$product->getPrice($taxes_behavior)+($product->getPrice($taxes_behavior)* $product->specificPrice.reduction)} + -{$product->specificPrice.reduction*100|floatval}% + {else} + {convertPrice price=($product->getPrice($taxes_behavior) + $product->specificPrice.reduction)} + -{convertPrice price=$product->specificPrice.reduction} + {/if} + {/if} {if $product->on_sale} {elseif $product->specificPrice AND $product->specificPrice.reduction} -
- {l s='Reduced price!'} -
+
+ {l s='Reduced price!'} +
{/if} {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} @@ -108,22 +108,28 @@ {/if}

-
-
- {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")|escape:'html'}" title="{l s='Add to cart'}">{l s='Add to cart'} - {else} - {l s='Add to cart'} - {/if} - {else} - - {/if} - {l s='View'} -
-
- -
+
+
+ {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")|escape:'html'}" + title="{l s='Add to cart'}"> + {l s='Add to cart'} + + {else} + {l s='Add to cart'} + {/if} + {else} + + {/if} + {l s='View'} +
+
+ +