// Some bugs fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10872 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -166,7 +166,9 @@ class ProductSupplierCore extends ObjectModel
|
||||
{
|
||||
$suppliers = new Collection('ProductSupplier');
|
||||
$suppliers->where('a.id_product = '.(int)$id_product);
|
||||
$suppliers->groupBy('a.id_supplier');
|
||||
|
||||
if ($group_by_supplier)
|
||||
$suppliers->groupBy('a.id_supplier');
|
||||
|
||||
return $suppliers;
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ class StockCore extends ObjectModel
|
||||
public function getFields()
|
||||
{
|
||||
$this->validateFields();
|
||||
|
||||
$fields['id_warehouse'] = (int)$this->id_warehouse;
|
||||
$fields['id_product'] = (int)$this->id_product;
|
||||
$fields['id_product_attribute'] = (int)$this->id_product_attribute;
|
||||
@@ -99,6 +100,7 @@ class StockCore extends ObjectModel
|
||||
$fields['physical_quantity'] = (int)$this->physical_quantity;
|
||||
$fields['usable_quantity'] = (int)$this->usable_quantity;
|
||||
$fields['price_te'] = (float)round($this->price_te, 6);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,8 @@ class StockManagerCore implements StockManagerInterface
|
||||
$products_pack = Pack::getItems($id_product, (int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
foreach ($products_pack as $product_pack)
|
||||
{
|
||||
$pack_id_product_attribute = Product::getDefaultAttribute($id_product_attribute, 1); //@TODO is there a better way to retrieve the product attribute assciated to the pack ?
|
||||
//@TODO is there a better way to retrieve the product attribute assciated to the pack ?
|
||||
$pack_id_product_attribute = Product::getDefaultAttribute($id_product_attribute, 1);
|
||||
$this->removeProduct($product_pack->id, $pack_id_product_attribute, $product_pack->pack_quantity * $quantity, $warehouse, $id_order);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user