Magento 1.6 and web service evolution

Asked by Nicolas TRUBERT on 2011-10-05

As Magento try to correct issue when they can't differentiate sku or id on release 1.6 (1.5.1 may be ?), they generate a side effect.

1st : product_tier_price.update, product.update and other web service that need identifier detection doesn't work until magento bug fix. By the time you can modify magento core by your self:
edit : app/code/core/Mage/Catalog/Helper/Product.php
find : public function getProduct($productId, $store, $identifierType = null)
and change :
        if ($identifierType == 'sku') {
            $idBySku = $product->getIdBySku($productId);
            if ($idBySku) {
                $productId = $idBySku;
            }
           if ($loadByIdOnFalse) {
                $identifierType = 'id';
            }
        }
by :
        if ($identifierType == 'sku') {
            $idBySku = $product->getIdBySku($productId);
            if ($idBySku) {
                $productId = $idBySku;
                $identifierType = 'id';
            }
        }

2nd : If your sku is purly numeric as me cause is it's an ena13 these web_services will retrun to you <Fault 100: 'Product not exists.'> any more. But now Magento webservice is able to handle one more optional parameter to specify clearly the type of the identifier (id or sku).

--- Delete ---

Question information

Language:
English Edit question
Status:
Answered
For:
Magento OpenERP Connector Edit question
Assignee:
No assignee Edit question
Last query:
2011-10-05
Last reply:
2011-10-14
ntrubert-cobweb (ntrubert) said : #1

I just modify this Description according my last investigation.
So, no effect on this module cause product update is not use yet, and base.external.referential link product by id not by sku.

Regards.

Can you help with this problem?

Provide an answer of your own, or ask Nicolas TRUBERT for more information if necessary.

To post a message you must log in.