mirakl / sdk-php-shop

Mirakl PHP SDK for sellers
29 stars 16 forks source link

Searching with GetProductsRequest() for Products in Operator Catalog #43

Closed Meister1980 closed 5 months ago

Meister1980 commented 1 year ago

Hello,

i want to search the Operator Products to find the reference for my own Product to create an Offer.

Searching for EAN works perfect:

$request = new GetProductsRequest([new ProductReference('EAN', '4021087032933')]);
$MiraklColl = $client->getProducts($request);

It Returns:

array(1) { [0]=> array(5) { ["id"]=> string(13) "4021087032933" ["id_type"]=> string(3) "EAN" ["sku"]=> string(7) "1404830" ["title"]=> string(40) "Mean Well ELG-75-12B-3W LED-Trafo LED-Tr" ["category"]=> array(2) { ["code"]=> string(7) "1900730" ["label"]=> string(11) "LED-Treiber" } } } 

But when i search for:

$request = new GetProductsRequest([new ProductReference('SKU', '1404830')]);
$request = new GetProductsRequest([new ProductReference('sku', '1404830')]);
$request = new GetProductsRequest([new ProductReference('product_sku', '1404830')]);
$request = new GetProductsRequest([new ProductReference('title', '%ELG-75-12B%')]);
$request = new GetProductsRequest([new ProductReference('product_title', '%ELG-75-12B%')]);
$request = new GetProductsRequest([new ProductReference('title', 'Mean Well ELG-75-12B-3W LED-Trafo LED-Tr')]);
$request = new GetProductsRequest([new ProductReference('product_title', 'Mean Well ELG-75-12B-3W LED-Trafo LED-Tr')]);

There is nothing found, this example is a real product in the database of my Operator, i can only find it with the EAN.

It is very frustrating that there is no real Documentation for the PHP SDK, no List of the Functions and what they are used for and which "variables" can be used with the Functions.

Can anyone help ?

Best Regards, Jan

jreinke commented 1 year ago

Hello,

Did you try to use the SHOP_SKU id type to search by SKU? The product references may depend on the operator platform. If you are still looking for how to retrieve the products, please send us your Mirakl environment name at php@mirakl.com

Thank you.

Meister1980 commented 1 year ago

Hello,

yes i tried SHOP_SKU and many other things, no result. I wrote an Email to php@mirakl.com

Ps.: I would like to Post the answer to my Problem here, please don't close it yet.

Best Regards, Jan

jreinke commented 1 year ago

Sorry I did not receive your email, can you forward it to support-magento-seller@mirakl.com please?

Thanks.

nverver commented 11 months ago

Hi, I have the same problem. Only EAN works. Can you please help me to find products by other identifiers?

Meister1980 commented 11 months ago

Hi,

sorry there was no solution to this Problem, until now i can only search for the EAN. Mirakl Support and Shop Operator Support were not able to give any solution to this Problem. Very frustrating.

I ended up searching my Product MPNs in an EAN Search Database and then searching with the resulting EANs in Mirakl.

Best Regards

nverver commented 11 months ago

Thanks, I will try to make a workaround too.