function makeVariant(attr1, attr2, attr3){
		console.log(_sku);
		// var prefix_sku = $scope.product.prefix+'-'+_sku;
		//_sku++;
		return {
			supplier_price 		: $scope.product.supplier_price,
			markup 				: $scope.product.markup,
			retail_price 		: $scope.product.retail_price || 0,
			before_discount_price 		: $scope.product.before_discount_price,
			sku 				: '',//( $scope.product.sku_number && !$scope.product.sku_custom ? _sku++ : $scope.getNamedSku() ),
			supplier_code 		: $scope.product.supplier_code,
			custom_loyalty      : $scope.product.custom_loyalty,
			//quantity            : $scope.product.quantity,
			//quantity            : 1,
			outlets 			: [...$scope.outlets.map(item => {
				item.retail_price = 0;
				item.supply_price = 0;
				return {...item}
			})],
			attribute_value_1 	: attr1,
			attribute_value_2 	: attr2,
			attribute_value_3 	: attr3,
			allow_out_of_stock 	: true,
			is_active 	: true,
		}
	}
/*simply create and return new variant object*/
simply create and return new variant object
simply create and return new variant object
function makeVariant(attr1, attr2, attr3){
		console.log(_sku);
		return {
			supplier_price 		: $scope.product.supplier_price,
			markup 				: $scope.product.markup,
			retail_price 		: $scope.product.retail_price || 0,
			before_discount_price 		: $scope.product.before_discount_price,
			sku 				: '',
			supplier_code 		: $scope.product.supplier_code,
			custom_loyalty      : $scope.product.custom_loyalty,
			outlets 			: [...$scope.outlets.map(item => {
				item.retail_price = 0;
				item.supply_price = 0;
				return {...item}
			})],
			attribute_value_1 	: attr1,
			attribute_value_2 	: attr2,
			attribute_value_3 	: attr3,
			allow_out_of_stock 	: true,
			is_active 	: true,
		}
	}
function makeVariant ( attr1 , attr2 , attr3 ) { console . log ( _sku ) ; return { supplier_price : $scope . product . supplier_price , markup : $scope . product . markup , retail_price : $scope . product . retail_price || 0 , before_discount_price : $scope . product . before_discount_price , sku : '' , supplier_code : $scope . product . supplier_code , custom_loyalty : $scope . product . custom_loyalty , outlets : [ ... $scope . outlets . map ( item => { item . retail_price = 0 ; item . supply_price = 0 ; return { ... item } } ) ] , attribute_value_1 : attr1 , attribute_value_2 : attr2 , attribute_value_3 : attr3 , allow_out_of_stock : true , is_active : true , } }
simply create and return new variant object
simply create and return new variant object
// var prefix_sku = $scope.product.prefix+'-'+_sku; //_sku++; //( $scope.product.sku_number && !$scope.product.sku_custom ? _sku++ : $scope.getNamedSku() ), //quantity            : $scope.product.quantity, //quantity            : 1,