Jump to content

Gross price in Back Ofiice


Recommended Posts

What's the difference between the base price and gross price?

 

You can create override/controllers/admin/AdminProductControllers.php with code like the following to add a column:

<?php

class AdminProductsController extends AdminProductsControllerCore
{
    public function __construct()
    {
        parent::__construct();

        $this->fields_list['ean13'] = array(
            'title' => $this->l('EAN13'),
        );
    }
}

This will add an EAN13 column. If I understand what the gross price is, I can be more specific.

  • Like 1
Link to comment
Share on other sites

Try creating override/controllers/admin/AdminProductsController.php with the following:



<?php

class AdminProductsController extends AdminProductsControllerCore
{
public function __construct()
{
parent::__construct();

$this->_select .= ', a.`id_product` AS `price_gross`';

$this->fields_list['price_gross'] = array(
'title' => $this->l('Gross price'),
'type' => 'price',
'align' => 'text-right',
'callback' => 'calculateGrossPrice'
);
}

public static function calculateGrossPrice($id_product)
{
return Product::getPriceStatic($id_product, true, null, 6, null, false, false);
}
}

Link to comment
Share on other sites

  • 1 month later...

 

"Try creating override/controllers/admin/AdminProductsController.php with the following:..."

 

 

Hi there.

rockys code seems to work on 1.6. Could someone point me to proper solution for 1.7? It would be great.

I'm pulling my hair out after 20 h of investigating. Google search returns nothing helpful.

 

Best regards.

Edited by lucasdee (see edit history)
Link to comment
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
×
×
  • Create New...