Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

Всем здравствуйте. Может кто подскажет, как вывести в категории закупочную цену?
Вывожу по аналогии со стандартной ценой в category.php:

$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
// закупочная цена 
$cost = $this->currency->format($this->tax->calculate($result['cost'], $result['tax_class_id'], $this->config->get('config_tax')));

Плюс в этот массив "$data['products'][] = array(" добавляю 
'cost'      => $cost,

На сайте в category.tpl вывожу в нужном месте:

</br><span style="font-size:11px;  color:#888   margin-left: 6%;">(<?php echo $product['cost']; ?>&nbsp;рекомендуемая цена)</span>


В базе данных продукта поле "cost" есть.
В итоге цена 0.00. Что я делаю не так?

Link to post
Share on other sites

Добавьте в sql Запрос поле ваше в модели catalog\model\catalog\product.php в функции public function getProducts(

Link to post
Share on other sites

Был бы вам признателен, если бы вы подробней описали свой ответ

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.