prestashop に次のコードがあります。{$combination.price} を 20% 引き下げようとしています。しかし、最後に配列を変更してもうまくいかないようですか?例: {$combination.price/1.2)
誰か助けてくれませんか、どうすれば 20% の割引で価格を返品できますか?
{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}