Jump to content

Unable to install override


meccabooks

Recommended Posts

I am getting below error when I am trying to install below module

 

  • - ILLICOPRESTA_P15_StockManagement : 
    Unable to install override: The method getAllProductSupplierPrice in the class ProductSupplier is already overriden.

 

Urgent help will be appreciated..

 

this is my code in the file ProductSupplier.php

<?php

class ProductSupplier extends ProductSupplierCore
{
    public static function getAllProductSupplierPrice($id_product, $id_product_attribute, $with_currency = false)
    {
            // build query
            $query = new DbQuery();
            $query->select('ps.product_supplier_price_te, s.name as supplier_name');
            if ($with_currency)
                            $query->select('ps.id_currency');
            $query->from('product_supplier', 'ps');
            $query->where('ps.id_product = '.(int)$id_product.' AND ps.id_product_attribute = '.(int)$id_product_attribute );
             $query->leftJoin('supplier', 's', 'ps.id_supplier = s.id_supplier');

            if (!$with_currency)
                            return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);

            return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
    }

}
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...