Krikis Posted November 21, 2021 Share Posted November 21, 2021 (edited) 0 As Prestashop 1.7 doesn't support simple product.wholesale_price variable.... Looking for some SQL request to get Wholesale_price in Back Office admin product catalog list to add additional column. Currently I have this code, but it doesn't fetch Wholesale_price according to id_product. Maybe some one could assist where is my mistake? public function hookActionAdminProductsListingFieldsModifier($params) { $params['sql_select']['product'] = [ 'table' => 'm', 'field' => 'wholesale_price', 'filtering' => \PrestaShop\PrestaShop\Adapter\Admin\AbstractAdminQueryBuilder::FILTERING_LIKE_BOTH ]; $params['sql_table']['m'] = [ 'table' => 'product', 'join' => 'LEFT JOIN', 'on' => 'p.`id_product` = m.`id_product`', ]; } Edited November 21, 2021 by Krikis deleted comments (see edit history) Link to comment Share on other sites More sharing options...
Adnan Nahri Posted May 19, 2022 Share Posted May 19, 2022 Where you able to do this by any chance? Link to comment Share on other sites More sharing options...
Adnan Nahri Posted May 19, 2022 Share Posted May 19, 2022 Just now, Adnan Nahri said: Where you able to do this by any chance? I wanted to add a columns for Wholesale price whiting the order details for each order. I was able to do this after a lot of changes while using 1.7.4.2, but I was still missing the quantity so the column will only show the wholesale price of a single unit even if the client got X quantity of that product in the order. I also wasn't able to display the corret wholesale total price, instead I always got the wholesale price of the last product within the order. Unfortunately, After I updated to 1.7.8.6, everything is gone. and the old routes aren't working 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