Magento Product Grid 'Стоимость цен на 3 десятичное время

magento.stackexchange https://magento.stackexchange.com/questions/104322

  •  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',
    ));
.

 MAGENTO Стоимость цена

Если кто-то может помочь мне в этом ...

Это было полезно?

Решение

Пожалуйста, используйте ниже код для добавления колонны

$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',
        ));
.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top