// Fix errors on product combinations edition page
This commit is contained in:
+2
-2
@@ -1180,12 +1180,12 @@ class ProductCore extends ObjectModel
|
||||
* Sets Supplier Reference
|
||||
*
|
||||
* @param int $id_supplier
|
||||
* @param string $supplier_reference
|
||||
* @param int $id_product_attribute
|
||||
* @param string $supplier_reference
|
||||
* @param float $price
|
||||
* @param int $id_currency
|
||||
*/
|
||||
public function addSupplierReference($id_supplier, $supplier_reference, $id_product_attribute = null, $price, $id_currency = null)
|
||||
public function addSupplierReference($id_supplier, $id_product_attribute, $supplier_reference = null, $price = null, $id_currency = null)
|
||||
{
|
||||
//Try to set the default supplier reference
|
||||
if ($id_supplier > 0 && $supplier_reference != null)
|
||||
|
||||
@@ -2482,7 +2482,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
if ($existing_id <= 0)
|
||||
{
|
||||
$product->addSupplierReference($supplier->id_supplier, $reference, (int)$attribute['id_product_attribute'], (float)Tools::convertPrice($price, $id_currency), (int)$id_currency);
|
||||
$product->addSupplierReference($supplier->id_supplier, (int)$attribute['id_product_attribute'], $reference, (float)Tools::convertPrice($price, $id_currency), (int)$id_currency);
|
||||
if ($product->id_supplier == $supplier->id_supplier)
|
||||
{
|
||||
if ((int)$attribute['id_product_attribute'] > 0)
|
||||
|
||||
@@ -610,6 +610,8 @@ product_tabs['Associations'] = new function(){
|
||||
|
||||
this.getAccessoriesIds = function()
|
||||
{
|
||||
if ($('#inputAccessories').val() === undefined)
|
||||
return '';
|
||||
var ids = id_product + ',';
|
||||
ids += $('#inputAccessories').val().replace(/\\-/g,',').replace(/\\,$/,'');
|
||||
ids = ids.replace(/\,$/,'');
|
||||
@@ -1076,6 +1078,8 @@ product_tabs['Pack'] = new function(){
|
||||
|
||||
function getSelectedIds()
|
||||
{
|
||||
if ($('#inputPackItems').val() === undefined)
|
||||
return '';
|
||||
var ids = '';
|
||||
if (typeof(id_product) != 'undefined')
|
||||
ids += id_product + ',';
|
||||
|
||||
Reference in New Issue
Block a user