Closed cralls closed 8 years ago
@cralls I'm not sure I understand what you are doing or why, can you explain further? Is there an issue with the library or did you just determine you need unique values for requestId and requestBatchId? Why are you adding them via str_replace
into the XML instead of just passing the values to the bulk()
method as intended?
Take a look at the example at https://github.com/fillup/walmart-partner-api-sdk-php/blob/develop/docs/item.md#bulk-createupdate-items
It is just a function call with your data, so if you need to send multiple calls to bulk you should just pass different values in the array to the function. Unless I am not understanding your issue in which case please reopen this issue and explain it further.
For users sending sequential arrays of products to the bulk() function I had to inject the MPItemFeedHeader into the XML before instantiating PostFile in Item.php. I added a $time variable to make each request unique as well.
`$time = microtime(); $xml = str_replace('<?xml version="1.0" encoding="UTF-8"?>', '<?xml version="1.0" encoding="UTF-8"?>