dreamwork.ro Posted November 17, 2015 Share Posted November 17, 2015 Hey guys! I`m looking for a way to display different prices in Base Price and Final Price. I know that Final Price = Base Price + Tax but if you look at the database you will notice that there are 2 separate tables for these prices: Base Price is in ps_product and Final Price (and the price displayed on the frontend) is in the ps_product_shop. I need to make the admin retrieve the Final Price form the ps_product_shop table. Is there any way to do that? I need to mention that in the previous versions of Prestashop this worked without any modification. In PS 1.6, the controller looks like this: $this->_join .= ($join_category ? 'INNER JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = a.`id_product` AND cp.`id_category` = '.(int)$this->_category->id.')' : '').' LEFT JOIN `'._DB_PREFIX_.'stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0 '.StockAvailable::addSqlShopRestriction(null, null, 'sav').') '; $this->_select .= 'cl.name `name_category` '.($join_category ? ', cp.`position`' : '').', '.$alias_image.'.`id_image`, '.$alias.'.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, '.$alias.'.`active`'; $this->_group = 'GROUP BY '.$alias.'.id_product'; Thanks in advance! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now