Jump to content

Edit History

Krikis

Krikis


deleted comments

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`',
    ];
}

 

wholesale.png

Krikis

Krikis

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)
{
    // Manufacturer
    $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`',
    ];
}

 

wholesale.png

×
×
  • Create New...