Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what xml format to use? update stock and price? #36

Open
legend-goat opened this issue Nov 21, 2017 · 8 comments
Open

what xml format to use? update stock and price? #36

legend-goat opened this issue Nov 21, 2017 · 8 comments

Comments

@legend-goat
Copy link

legend-goat commented Nov 21, 2017

I used the API, but i have no idea what xml format to used?
I read the API document, but always listing failure. and the API is difficulty to use.

the last:
Offers\SubmitOfferPackage how to get the offer.zip format

@gregz1
Copy link

gregz1 commented Feb 12, 2018

Hello,
You can find samples and a full description of the offer package here : https://dev.cdiscount.com/marketplace/?page_id=1198.

regards

@lexo13
Copy link

lexo13 commented Feb 28, 2018

Hi,

i'm the same problem :

  • i'm downloading https://dev.cdiscount.com/marketplace/wp-content/uploads/APIMPCdiscount_Sample_Offers_StockAndPrice.zip
  • i'm extracting this zip
  • i'm ONLY modify the "Offer" xml tag with my own values like. Just this value, nothing else
    <Offer SellerProductId="101123774" ProductEan="6954521603455" Price="549.00" Stock="25" />
  • i'm creating toto.zip with ONLY Offers.xml inside
  • i'm calling :
    $offerPoint = $client->getOfferPoint(); $submitOfferPackageResponse = $offerPoint->submitOfferPackage("toto.zip");
  • Webservice return a PackageId
  • report in cdiscount backoffice is
    KO 2123 Specified part does not exist in the package.

@gregz1
Copy link

gregz1 commented Mar 1, 2018

Hi,
the problem comes from the fact you did not include other folders/files of the sample in your package.
Your package must be exactly the same than the sample except the Offers.xml content.

@blini1
Copy link

blini1 commented Mar 20, 2018

HI,

I am doing with other folder/files but same problem KO 2123 Specified part does not exist in the package

Attach My zip

test.zip

Do you have any idea ?

@andreigache
Copy link

yes is tree structure of your zip
if you look more close at your zip you will see in your zip you have one folder and in it you have your two folders..that no good, you just have to zip the _ref folder and content Content and Content.xml
$zip = new ZipArchive;
$zip->open("your_path_folder_for save/that_zip.zip", ZipArchive::CREATE|ZipArchive::OVERWRITE);
$zip->addFile('[Content_Types].xml', '[Content_Types].xml');
$zip->addFile('Offers.xml', 'Content/Offers.xml');
$zip->addFile('.rels', '_rels/.rels');
$zip->close();

@amarknit
Copy link

Hello
I am trying to update stock but getting the below error:
"log_message": "347219|873333333670||KO|3628|Offre : Cette offre n'existe pas et ne peut donc pas être mise à jour. Vous devez d'abord la créer.|Cdiscount",
Can you please tell me what is exact error from my end?

testStockAndPrice.zip

@andreigache
Copy link

Well i think the message is pretty obvious; Creating an offer its suppose tohave already that product on cds database or your ean and internal id have changed. Cheers

@amarknit
Copy link

Well i think the message is pretty obvious; Creating an offer its suppose tohave already that product on cds database or your ean and internal id have changed. Cheers
Hello
Yes, Offer is already exist. I am just try to update stock of that product using offer-integration-packages request.
can u pls check offer.txt and my testStockAndPrice.zip and let me know what i had mistake to update stock of the product.
Thanks
offer.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants