// Improve Specific prices
This commit is contained in:
@@ -542,8 +542,7 @@
|
|||||||
{
|
{
|
||||||
updateCartProducts(jsonSummary.summary.products);
|
updateCartProducts(jsonSummary.summary.products);
|
||||||
updateCartVouchers(jsonSummary.summary.discounts);
|
updateCartVouchers(jsonSummary.summary.discounts);
|
||||||
|
if (!jsonSummary.summary.products.length || !jsonSummary.addresses.length)
|
||||||
if (jsonSummary.summary.products.length == 0 || !jsonSummary.addresses.length == 0)
|
|
||||||
$('#carriers_part,#summary_part').hide();
|
$('#carriers_part,#summary_part').hide();
|
||||||
else
|
else
|
||||||
$('#carriers_part,#summary_part').show();
|
$('#carriers_part,#summary_part').show();
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ var product_prices = new Array();
|
|||||||
{if $combinations|@count != 0}
|
{if $combinations|@count != 0}
|
||||||
<label>{l s='Combination:'}</label>
|
<label>{l s='Combination:'}</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<select id="id_product_attribute" name="id_product_attribute">
|
<select id="sp_id_product_attribute" name="sp_id_product_attribute">
|
||||||
<option value="0">{l s='Apply to all combinations'}</option>
|
<option value="0">{l s='Apply to all combinations'}</option>
|
||||||
{foreach from=$combinations item='combination'}
|
{foreach from=$combinations item='combination'}
|
||||||
<option value="{$combination.id_product_attribute}">{$combination.attributes}</option>
|
<option value="{$combination.id_product_attribute}">{$combination.attributes}</option>
|
||||||
@@ -81,7 +81,7 @@ var product_prices = new Array();
|
|||||||
<span id="spm_currency_sign_pre_0" style="font-weight:bold; color:#000000; font-size:12px">{$currency->prefix}</span>
|
<span id="spm_currency_sign_pre_0" style="font-weight:bold; color:#000000; font-size:12px">{$currency->prefix}</span>
|
||||||
<input type="text" name="sp_price" value="0" size="11" />
|
<input type="text" name="sp_price" value="0" size="11" />
|
||||||
<span id="spm_currency_sign_post_0" style="font-weight:bold; color:#000000; font-size:12px">{$currency->suffix}</span>
|
<span id="spm_currency_sign_post_0" style="font-weight:bold; color:#000000; font-size:12px">{$currency->suffix}</span>
|
||||||
<span>({l s='Current:'} </span><span id="sp_current_ht_price">'.Tools::displayPrice((float)($product->price), $defaultCurrency).'</span> )</span>
|
<span>({l s='Current:'} </span><span id="sp_current_ht_price">{displayWtPrice p=$product->price}</span> )</span>
|
||||||
<div class="hint clear" style="display:block;">
|
<div class="hint clear" style="display:block;">
|
||||||
{l s='You can set this value at 0 in order to apply the default price'}
|
{l s='You can set this value at 0 in order to apply the default price'}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1136,5 +1136,14 @@ class OrderCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
return OrderDetail::getList($this->id);
|
return OrderDetail::getList($this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function orderContainProduct($id_product)
|
||||||
|
{
|
||||||
|
$product_list = $this->getOrderDetailList();
|
||||||
|
foreach ($product_list as $product)
|
||||||
|
if ($product['product_id'] == (int)$id_product)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
AND
|
AND
|
||||||
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
|
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
|
||||||
)
|
)
|
||||||
ORDER BY `from_quantity` DESC, `score` DESC');
|
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC');
|
||||||
}
|
}
|
||||||
return self::$_specificPriceCache[$key];
|
return self::$_specificPriceCache[$key];
|
||||||
}
|
}
|
||||||
@@ -205,7 +205,7 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
');
|
');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getQuantityDiscounts($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_product_attribute = null)
|
public static function getQuantityDiscounts($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_product_attribute = null, $all_combinations = false)
|
||||||
{
|
{
|
||||||
if (!self::isFeatureActive())
|
if (!self::isFeatureActive())
|
||||||
return array();
|
return array();
|
||||||
@@ -217,7 +217,7 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
FROM `'._DB_PREFIX_.'specific_price`
|
FROM `'._DB_PREFIX_.'specific_price`
|
||||||
WHERE
|
WHERE
|
||||||
`id_product` IN(0, '.(int)$id_product.') AND
|
`id_product` IN(0, '.(int)$id_product.') AND
|
||||||
`id_product_attribute` IN(0, '.(int)$id_product_attribute.') AND
|
'.(!$all_combinations ? '`id_product_attribute` IN(0, '.(int)$id_product_attribute.') AND ' : '').'
|
||||||
`id_shop` IN(0, '.(int)$id_shop.') AND
|
`id_shop` IN(0, '.(int)$id_shop.') AND
|
||||||
`id_currency` IN(0, '.(int)$id_currency.') AND
|
`id_currency` IN(0, '.(int)$id_currency.') AND
|
||||||
`id_country` IN(0, '.(int)$id_country.') AND
|
`id_country` IN(0, '.(int)$id_country.') AND
|
||||||
@@ -228,7 +228,7 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
AND
|
AND
|
||||||
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
|
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
|
||||||
)
|
)
|
||||||
ORDER BY `from_quantity` DESC, `score` DESC
|
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC
|
||||||
');
|
');
|
||||||
|
|
||||||
$targeted_prices = array();
|
$targeted_prices = array();
|
||||||
|
|||||||
@@ -810,7 +810,7 @@ class AdminProductsController extends AdminController
|
|||||||
{
|
{
|
||||||
$specificPrice = new SpecificPrice();
|
$specificPrice = new SpecificPrice();
|
||||||
$specificPrice->id_product = $id_product;
|
$specificPrice->id_product = $id_product;
|
||||||
$specificPrice->id_product_attribute = (int)Tools::getValue('id_product_attribute');
|
$specificPrice->id_product_attribute = (int)Tools::getValue('sp_id_product_attribute');
|
||||||
$specificPrice->id_shop = (int)$id_shop;
|
$specificPrice->id_shop = (int)$id_shop;
|
||||||
$specificPrice->id_currency = (int)($id_currency);
|
$specificPrice->id_currency = (int)($id_currency);
|
||||||
$specificPrice->id_country = (int)($id_country);
|
$specificPrice->id_country = (int)($id_country);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class HistoryControllerCore extends FrontController
|
|||||||
if ($orders = Order::getCustomerOrders($this->context->customer->id))
|
if ($orders = Order::getCustomerOrders($this->context->customer->id))
|
||||||
foreach ($orders as &$order)
|
foreach ($orders as &$order)
|
||||||
{
|
{
|
||||||
$myOrder = new Order((int)($order['id_order']));
|
$myOrder = new Order((int)$order['id_order']);
|
||||||
if (Validate::isLoadedObject($myOrder))
|
if (Validate::isLoadedObject($myOrder))
|
||||||
$order['virtual'] = $myOrder->isVirtual(false);
|
$order['virtual'] = $myOrder->isVirtual(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,20 @@ class IdentityControllerCore extends FrontController
|
|||||||
{
|
{
|
||||||
if (count($_POST))
|
if (count($_POST))
|
||||||
{
|
{
|
||||||
$exclusion = array('secure_key', 'old_passwd', 'passwd', 'active', 'date_add', 'date_upd', 'last_passwd_gen', 'newsletter_date_add', 'id_default_group');
|
$exclusion = array('secure_key',
|
||||||
|
'old_passwd',
|
||||||
|
'passwd',
|
||||||
|
'active',
|
||||||
|
'date_add',
|
||||||
|
'date_upd',
|
||||||
|
'last_passwd_gen',
|
||||||
|
'newsletter_date_add',
|
||||||
|
'id_default_group',
|
||||||
|
'id_shop',
|
||||||
|
'id_group_shop',
|
||||||
|
'ip_registration_newsletter',
|
||||||
|
'note',
|
||||||
|
'is_guest');
|
||||||
$fields = $this->customer->getFields();
|
$fields = $this->customer->getFields();
|
||||||
foreach ($fields as $key => $value)
|
foreach ($fields as $key => $value)
|
||||||
if (!in_array($key, $exclusion))
|
if (!in_array($key, $exclusion))
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class OrderDetailControllerCore extends FrontController
|
|||||||
$ct->id_contact = 0;
|
$ct->id_contact = 0;
|
||||||
$ct->id_customer = (int)$order->id_customer;
|
$ct->id_customer = (int)$order->id_customer;
|
||||||
$ct->id_shop = (int)$this->context->shop->getId(true);
|
$ct->id_shop = (int)$this->context->shop->getId(true);
|
||||||
if ($id_product = (int)Tools::getValue('id_product'))
|
if ($id_product = (int)Tools::getValue('id_product') && $order->orderContainProduct((int)$id_product))
|
||||||
$ct->id_product = $id_product;
|
$ct->id_product = $id_product;
|
||||||
$ct->id_order = (int)$order->id;
|
$ct->id_order = (int)$order->id;
|
||||||
$ct->id_lang = (int)$this->context->language->id;
|
$ct->id_lang = (int)$this->context->language->id;
|
||||||
|
|||||||
@@ -228,10 +228,19 @@ class ProductControllerCore extends FrontController
|
|||||||
$id_currency = (int)$this->context->cookie->id_currency;
|
$id_currency = (int)$this->context->cookie->id_currency;
|
||||||
$id_product = (int)$this->product->id;
|
$id_product = (int)$this->product->id;
|
||||||
$id_shop = $this->context->shop->getID(true);
|
$id_shop = $this->context->shop->getID(true);
|
||||||
$quantity_discounts = SpecificPrice::getQuantityDiscounts($id_product, $id_shop, $id_currency, $id_country, $id_group);
|
|
||||||
|
$quantity_discounts = SpecificPrice::getQuantityDiscounts($id_product, $id_shop, $id_currency, $id_country, $id_group, null, true);
|
||||||
|
foreach($quantity_discounts as &$quantity_discount)
|
||||||
|
if ($quantity_discount['id_product_attribute'])
|
||||||
|
{
|
||||||
|
$combination = new Combination((int)$quantity_discount['id_product_attribute']);
|
||||||
|
$attributes = $combination->getAttributesName((int)$this->context->language->id);
|
||||||
|
foreach ($attributes as $attribute)
|
||||||
|
$quantity_discount['attributes'] = $attribute['name'].' - ';
|
||||||
|
$quantity_discount['attributes'] = rtrim($quantity_discount['attributes'], ' - ');
|
||||||
|
}
|
||||||
|
|
||||||
$product_price = $this->product->getPrice(Product::$_taxCalculationMethod == PS_TAX_INC, false);
|
$product_price = $this->product->getPrice(Product::$_taxCalculationMethod == PS_TAX_INC, false);
|
||||||
|
|
||||||
$address = new Address($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')});
|
$address = new Address($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')});
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'quantity_discounts' => $this->formatQuantityDiscounts($quantity_discounts, $product_price, (float)$tax),
|
'quantity_discounts' => $this->formatQuantityDiscounts($quantity_discounts, $product_price, (float)$tax),
|
||||||
@@ -292,6 +301,7 @@ class ProductControllerCore extends FrontController
|
|||||||
if (is_array($attributes_groups) && $attributes_groups)
|
if (is_array($attributes_groups) && $attributes_groups)
|
||||||
{
|
{
|
||||||
$combination_images = $this->product->getCombinationImages($this->context->language->id);
|
$combination_images = $this->product->getCombinationImages($this->context->language->id);
|
||||||
|
|
||||||
foreach ($attributes_groups as $k => $row)
|
foreach ($attributes_groups as $k => $row)
|
||||||
{
|
{
|
||||||
// Color management
|
// Color management
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ function addCombination(idCombination, arrayOfIdAttributes, quantity, price, eco
|
|||||||
combination['unit_price'] = unit_price;
|
combination['unit_price'] = unit_price;
|
||||||
combination['minimal_quantity'] = minimal_quantity;
|
combination['minimal_quantity'] = minimal_quantity;
|
||||||
combination['available_date'] = available_date;
|
combination['available_date'] = available_date;
|
||||||
combination['specific_price'] = new Array();
|
|
||||||
combination['specific_price'] = combination_specific_price;
|
combination['specific_price'] = combination_specific_price;
|
||||||
combinations.push(combination);
|
combinations.push(combination);
|
||||||
}
|
}
|
||||||
@@ -300,38 +299,32 @@ function updateDisplay()
|
|||||||
var tax = (taxRate / 100) + 1;
|
var tax = (taxRate / 100) + 1;
|
||||||
|
|
||||||
var display_specific_price;
|
var display_specific_price;
|
||||||
if (selectedCombination['specific_price'])
|
if (selectedCombination.specific_price)
|
||||||
{
|
{
|
||||||
display_specific_price = selectedCombination['specific_price'].price;
|
display_specific_price = selectedCombination.specific_price['price'];
|
||||||
if (selectedCombination['specific_price'].reduction_type == 'percentage')
|
if (selectedCombination['specific_price'].reduction_type == 'percentage')
|
||||||
{
|
$('#reduction_percent_display').html(selectedCombination['specific_price'].reduction_percent);
|
||||||
$('#reduction_percent_display').html(selectedCombination['specific_price'].reduction*100);
|
|
||||||
$('#reduction_percent').show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$('#reduction_percent').hide();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
display_specific_price = specific_price;
|
display_specific_price = product_specific_price['price'];
|
||||||
if (display_specific_price)
|
if (product_specific_price['reduction_type'] == 'percentage')
|
||||||
{
|
$('#reduction_percent_display').html(product_specific_price['specific_price'].reduction_percent);
|
||||||
if (product_specific_price.reduction_type == 'percentage')
|
|
||||||
{
|
|
||||||
$('#reduction_percent_display').html(product_specific_price['specific_price'].reduction*100);
|
|
||||||
$('#reduction_percent').show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$('#reduction_percent').hide();
|
|
||||||
if (productPriceWithoutRedution < productPrice)
|
|
||||||
$('#old_price_display,#old_price_display_taxes').show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (display_specific_price)
|
if (product_specific_price['reduction_type'] != '' || selectedCombination['specific_price'].reduction_type != '')
|
||||||
$('#discount_reduced_price,#old_price,#not_impacted_by_discount, #old_price_display, #old_price_display_taxes').show();
|
$('#discount_reduced_price,#old_price').show();
|
||||||
else
|
else
|
||||||
$('#discount_reduced_price,#old_price,#not_impacted_by_discount,#old_price_display,#old_price_display_taxes').hide();
|
$('#discount_reduced_price,#old_price').hide();
|
||||||
|
|
||||||
|
if (product_specific_price['reduction_type'] == 'percentage' || selectedCombination['specific_price'].reduction_type == 'percentage')
|
||||||
|
$('#reduction_percent').show();
|
||||||
|
else
|
||||||
|
$('#reduction_percent').hide();
|
||||||
|
if (display_specific_price)
|
||||||
|
$('#not_impacted_by_discount').show();
|
||||||
|
else
|
||||||
|
$('#not_impacted_by_discount').hide();
|
||||||
|
|
||||||
var taxExclPrice = (display_specific_price ? (specific_currency ? display_specific_price : display_specific_price * currencyRate) : priceTaxExclWithoutGroupReduction) + selectedCombination['price'] * currencyRate;
|
var taxExclPrice = (display_specific_price ? (specific_currency ? display_specific_price : display_specific_price * currencyRate) : priceTaxExclWithoutGroupReduction) + selectedCombination['price'] * currencyRate;
|
||||||
|
|
||||||
@@ -352,10 +345,16 @@ function updateDisplay()
|
|||||||
}
|
}
|
||||||
|
|
||||||
var reduction = 0;
|
var reduction = 0;
|
||||||
if (reduction_price || reduction_percent)
|
if (selectedCombination['specific_price'].reduction_price || selectedCombination['specific_price'].reduction_percent)
|
||||||
{
|
{
|
||||||
reduction = productPrice * (parseFloat(reduction_percent) / 100) + reduction_price;
|
reduction = productPrice * (parseFloat(selectedCombination['specific_price'].reduction_percent) / 100) + selectedCombination['specific_price'].reduction_price;
|
||||||
if (reduction_price && (displayPrice || noTaxForThisProduct))
|
if (selectedCombination['specific_price'].reduction_price && (displayPrice || noTaxForThisProduct))
|
||||||
|
reduction = ps_round(reduction / tax, 6);
|
||||||
|
}
|
||||||
|
else if (product_specific_price.reduction_price || product_specific_price.reduction_percent)
|
||||||
|
{
|
||||||
|
reduction = productPrice * (parseFloat(product_specific_price.reduction_percent) / 100) + product_specific_price.reduction_price;
|
||||||
|
if (product_specific_price.reduction_price && (displayPrice || noTaxForThisProduct))
|
||||||
reduction = ps_round(reduction / tax, 6);
|
reduction = ps_round(reduction / tax, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,7 +377,10 @@ function updateDisplay()
|
|||||||
$('#our_price_display').text(formatCurrency(0, currencyFormat, currencySign, currencyBlank));
|
$('#our_price_display').text(formatCurrency(0, currencyFormat, currencySign, currencyBlank));
|
||||||
|
|
||||||
$('#old_price_display').text(formatCurrency(productPriceWithoutReduction, currencyFormat, currencySign, currencyBlank));
|
$('#old_price_display').text(formatCurrency(productPriceWithoutReduction, currencyFormat, currencySign, currencyBlank));
|
||||||
|
if (productPriceWithoutReduction > productPrice)
|
||||||
|
$('#old_price,#old_price_display,#old_price_display_taxes').show();
|
||||||
|
else
|
||||||
|
$('#old_price,#old_price_display,#old_price_display_taxes').hide();
|
||||||
/* Special feature: "Display product price tax excluded on product page" */
|
/* Special feature: "Display product price tax excluded on product page" */
|
||||||
if (!noTaxForThisProduct)
|
if (!noTaxForThisProduct)
|
||||||
var productPricePretaxed = productPrice / tax;
|
var productPricePretaxed = productPrice / tax;
|
||||||
|
|||||||
@@ -49,13 +49,11 @@ var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if};
|
|||||||
var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';
|
var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';
|
||||||
var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';
|
var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';
|
||||||
var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};
|
var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};
|
||||||
var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};
|
|
||||||
var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction}{else}0{/if};
|
|
||||||
var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};
|
|
||||||
var product_specific_price = new Array();
|
var product_specific_price = new Array();
|
||||||
{foreach from=$product->specificPrice key='key_specific_price' item='specific_price_value'}
|
product_specific_price['reduction_percent'] = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};
|
||||||
product_specific_price['{$key_specific_price}'] = '{$specific_price_value}';
|
product_specific_price['reduction_price'] = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction}{else}0{/if};
|
||||||
{/foreach}
|
product_specific_price['price'] = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};
|
||||||
|
product_specific_price['reduction_type'] = '{if $product->specificPrice}$product->specificPrice.reduction_type{/if}';
|
||||||
var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if};
|
var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if};
|
||||||
var group_reduction = '{$group_reduction}';
|
var group_reduction = '{$group_reduction}';
|
||||||
var default_eco_tax = {$product->ecotax};
|
var default_eco_tax = {$product->ecotax};
|
||||||
@@ -79,7 +77,7 @@ var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
var productPriceWithoutRedution = '{$productPriceWithoutRedution}';
|
var productPriceWithoutRedution = '{$productPriceWithoutRedution}';
|
||||||
var product_price = '{$productPrice}';
|
var productPrice = '{$productPrice}';
|
||||||
|
|
||||||
// Customizable field
|
// Customizable field
|
||||||
var img_ps_dir = '{$img_ps_dir}';
|
var img_ps_dir = '{$img_ps_dir}';
|
||||||
@@ -123,11 +121,10 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
|
|||||||
// Combinations
|
// Combinations
|
||||||
{foreach from=$combinations key=idCombination item=combination}
|
{foreach from=$combinations key=idCombination item=combination}
|
||||||
var specific_price_combination = new Array();
|
var specific_price_combination = new Array();
|
||||||
{if $combination.specific_price}
|
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};
|
||||||
{foreach from=$combination.specific_price key='specific_price_key' item='combination_specific_price'}
|
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['{$specific_price_key}'] = '{$combination_specific_price}';
|
specific_price_combination['price'] = {if $combination.specific_price AND $combination.specific_price.price}{$combination.specific_price.price}{else}0{/if};
|
||||||
{/foreach}
|
specific_price_combination['reduction_type'] = '{if $combination.specific_price}{$combination.specific_price.reduction_type}{/if}';
|
||||||
{/if}
|
|
||||||
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}, '{$combination.available_date}', specific_price_combination);
|
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}, '{$combination.available_date}', specific_price_combination);
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
{/if}
|
||||||
@@ -255,7 +252,7 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
|
|||||||
<img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/>
|
<img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/>
|
||||||
<span class="on_sale">{l s='On sale!'}</span>
|
<span class="on_sale">{l s='On sale!'}</span>
|
||||||
{/if}
|
{/if}
|
||||||
<span style="{if !$product->specificPrice AND !$product->specificPrice.reduction AND $productPriceWithoutRedution < $productPrice}display:none;{/if}" id="discount_reduced_price" class="discount">{l s='Reduced price!'}</span>
|
<span style="{if !$product->specificPrice AND !$product->specificPrice.reduction AND $productPriceWithoutRedution <= $productPrice}display:none;{/if}" id="discount_reduced_price" class="discount">{l s='Reduced price!'}</span>
|
||||||
<br />
|
<br />
|
||||||
<span class="our_price_display">
|
<span class="our_price_display">
|
||||||
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
||||||
@@ -282,7 +279,7 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
|
|||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p style="{if !$product->specificPrice AND !$product->specificPrice.reduction_type == 'percentage'}display:none;{/if}" id="reduction_percent">{l s='(price reduced by'} <span id="reduction_percent_display">{$product->specificPrice.reduction*100}</span> %{l s=')'}</p>
|
<p style="{if !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'}display:none;{/if}" id="reduction_percent">{l s='(price reduced by'} <span id="reduction_percent_display">{$product->specificPrice.reduction*100}</span> %{l s=')'}</p>
|
||||||
{if $packItems|@count}
|
{if $packItems|@count}
|
||||||
<p class="pack_price">{l s='instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p>
|
<p class="pack_price">{l s='instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
@@ -421,6 +418,7 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
|
|||||||
{else}
|
{else}
|
||||||
{l s='quantity'}
|
{l s='quantity'}
|
||||||
{/if}
|
{/if}
|
||||||
|
{if $quantity_discount.attributes}{$quantity_discount.attributes}{/if}
|
||||||
</th>
|
</th>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user