вывод цены с НДС на модуле /posproductcates

Автор naut92, 23 июля 2014, 20:15:47

« назад - далее »

naut92

Прошу помощи, в выводе цены стоит вот такое выражение:
<span class="price">{convertPrice price=$categoryProduct.displayed_price}</span>
эта переменная $categoryProduct.displayed_price выводит цену без НДС.
Как изменить, чтобы отобразила с НДС?

DarinSr

#1
Вывод цены с НДС или без определен в файле:
/modules/productscategory/productscategory.php
if (Configuration::get('PRODUCTSCATEGORY_DISPLAY_PRICE'))
{
foreach ($category_products as $key => $category_product)
{
if ($category_product['id_product'] != $id_product)
{
if ($taxes == 0 || $taxes == 2)
{
$category_products[$key]['displayed_price'] = Product::getPriceStatic(
(int)$category_product['id_product'],
true,
null,
2
);
} elseif ($taxes == 1)
{
$category_products[$key]['displayed_price'] = Product::getPriceStatic(
(int)$category_product['id_product'],
false,
null,
2
);
}
}
}
}

В шаблон передается цена с или без НДС в зависимости от правил установленных в админке.
В самом шаблоне ничего менять не нужно.

Показ цен с/без налога задается с помощью метода getPriceStatic класса Product.

// @param boolean $usetax With taxes or not (optional)
public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null,
$only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = null, $id_cart = null,
$id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null,
$use_customer_price = true)

naut92

Подскажите, где именно в админке? В разделе ценовых правил - правила каталога?
этот раздел я не трогал, он пустой.