Hi all,
I have same kind of issue after magento upgrade on 1.6.
It seems that there are difference to get product id on magento side according to some web_service.
I modify magento core to test for tierce_price.update and product.update and it works. It seems that it works around product by Id or sku ??
../app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php /* Magento 1.6 source protected function _initProduct($productId, $identifierType = null) { $product = Mage::helper('catalog/product')->getProduct($productId, $this->_getStoreId($store), $identifierType); if (!$product->getId()) { $this->_fault('product_not_exists'); }
return $product; } */ /* My modif */ protected function _initProduct($productId, $identifierType = null) { $product = Mage::helper('catalog/product')->getProduct($productId, $this->_getStoreId($store), $identifierType);
if (!$product->getId()) { if ($identifierType === null) { $identifierType = 'sku'; $idBySku = $product->getIdBySku($productId); if ($idBySku) { $productId = $idBySku; $product->load($productId); } } if (!$product->getId()) { $this->_fault('product_not_exists'); } }
return $product; } /**/
../app/code/core/Mage/Catalog/Model/Product/Api.php
/* Magento 1.6 source public function update($productId, $productData, $store = null, $identifierType = null) {
$product = $this->_getProduct($productId, $store, $identifierType); if (!$product->getId()) { $this->_fault('not_exists'); } */ /* My modif */ public function update($productId, $productData, $store = null, $identifierType = null) {
$product = $this->_getProduct($productId, $store, $identifierType); if (!$product->getId()) {
if ($identifierType === null) { $identifierType = 'sku'; $idBySku = $product->getIdBySku($productId); if ($idBySku) { $productId = $idBySku; $product->load($productId); } } if (!$product->getId()) { $this->_fault('product_not_exists'); } /**/
Regards.
Hi all,
I have same kind of issue after magento upgrade on 1.6.
It seems that there are difference to get product id on magento side according to some web_service.
I modify magento core to test for tierce_price.update and product.update and it works.
It seems that it works around product by Id or sku ??
../app/ code/core/ Mage/Catalog/ Model/Product/ Attribute/ Tierprice/ Api.php $productId, $identifierType = null) 'catalog/ product' )->getProduct( $productId, $this-> _getStoreId( $store) , $identifierType); >getId( )) {
$this- >_fault( 'product_ not_exists' );
/* Magento 1.6 source
protected function _initProduct(
{
$product = Mage::helper(
if (!$product-
}
return $product; $productId, $identifierType = null) 'catalog/ product' )->getProduct( $productId, $this-> _getStoreId( $store) , $identifierType);
}
*/
/* My modif */
protected function _initProduct(
{
$product = Mage::helper(
if (!$product- >getId( )) {
$identifierTy pe = 'sku';
$idBySku = $product- >getIdBySku( $productId) ;
$ productId = $idBySku;
$ product- >load($ productId) ; >getId( )) {
$this- >_fault( 'product_ not_exists' );
if ($identifierType === null) {
if ($idBySku) {
}
}
if (!$product-
}
}
return $product;
}
/**/
../app/ code/core/ Mage/Catalog/ Model/Product/ Api.php
/* Magento 1.6 source
public function update($productId, $productData, $store = null, $identifierType = null)
{
$product = $this-> _getProduct( $productId, $store, $identifierType); >getId( )) {
$this- >_fault( 'not_exists' );
if (!$product-
}
*/
/* My modif */
public function update($productId, $productData, $store = null, $identifierType = null)
{
$product = $this-> _getProduct( $productId, $store, $identifierType); >getId( )) {
if (!$product-
if ($identifierType === null) {
$identifierTy pe = 'sku';
$idBySku = $product- >getIdBySku( $productId) ;
$ productId = $idBySku;
$ product- >load($ productId) ; >getId( )) {
$this- >_fault( 'product_ not_exists' );
if ($idBySku) {
}
}
if (!$product-
}
/**/
Regards.