I am using a php script to generate an xml from my magento 1.9 to a comparison engine. I have a field in the engine called mpn which need to be filled from my product's SKUs


First line gives the product id and second the mpn field.

Now because of a problem I want to create the sku for my store only and give other SKUs to engine. The code must work only if new attribute is filled. If it not sku will pass to engine. So I created a new attribute with code


And I filled in the code just above this:



if($oProduct->getNewMpn()!=''){$aData['mpn'] = @mb_substr($oProduct->getNewMpn(), 0, 99, 'UTF-8');}

But this don't work. I don't get the products.

Can anyone help?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.