Skip to content

Commit

Permalink
Missing _DB_PREFIX_ in StockManager.php. "cs_" prefix was hardcoded
Browse files Browse the repository at this point in the history
  • Loading branch information
gandalfthegreydev committed Jan 20, 2015
1 parent 2b5dbaf commit 9ed78bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/stock/StockManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ public static function getStockByCarrier($id_product = 0, $id_product_attribute
$stock_quantity += Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT SUM(s.`usable_quantity`) as quantity
FROM '._DB_PREFIX_.'stock s
LEFT JOIN '._DB_PREFIX_.'warehouse_carrier wc ON wc.`id_warehouse` = s.`id_warehouse`
LEFT JOIN ps_carrier c ON wc.`id_carrier` = c.`id_reference`
LEFT JOIN '._DB_PREFIX_.'carrier c ON wc.`id_carrier` = c.`id_reference`
WHERE s.`id_product` = '.(int)$id_product.' AND s.`id_product_attribute` = '.(int)$id_product_attribute.' AND s.`id_warehouse` = '.$result['id_warehouse'].' AND c.`id_carrier` IN ('.rtrim($delivery_option[(int)Context::getContext()->cart->id_address_delivery], ',').') GROUP BY s.`id_product`');
else
$stock_quantity += Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT SUM(s.`usable_quantity`) as quantity
Expand Down

0 comments on commit 9ed78bd

Please sign in to comment.