Magento Product Grid 'Стоимость цен на 3 десятичное время
-
29-09-2020 - |
Вопрос
Я хочу 3 десятичных места для «стоимости», как «цена»
Приложение / код / local / mage / adminhtml / блок / каталог / продукт / grid.php
$store = $this->_getStore();
$this->addColumn('cost',
array(
'header'=> Mage::helper('catalog')->__('Cost'),
'width' => '80px',
'currency_code' => $store->getBaseCurrency()->getCode(),
'index' => 'cost',
));
$this->addColumn('price',
array(
'header'=> Mage::helper('catalog')->__('Price'),
'type' => 'price',
'currency_code' => $store->getBaseCurrency()->getCode(),
'index' => 'price',
));
$this->addColumn('special_price',
array(
'header'=> Mage::helper('catalog')->__('Special Price'),
'type' => 'price',
'currency_code' => $store->getBaseCurrency()->getCode(),
'index' => 'special_price',
));
.
Если кто-то может помочь мне в этом ...
Решение
Пожалуйста, используйте ниже код для добавления колонны
$this->addColumn('cost',
array(
'header'=> Mage::helper('catalog')->__('Cost'),
'width' => '80px',
'currency_code' => $store->getBaseCurrency()->getCode(),
'type' => 'price',
'index' => 'cost',
));
. Другие советы
Это работает нормально с этим кодом сейчас
$store = $this->_getStore();
$this->addColumn('cost',
array(
'header'=> Mage::helper('catalog')->__('Cost'),
'width' => '80px',
'type' => 'price',
'currency_code' => $store->getBaseCurrency()->getCode(),
'index' => 'cost',
));
. Не связан с magento.stackexchange