clerkio / clerk-magento

Other
8 stars 20 forks source link

Fix remove product #89

Closed mmenozzi closed 2 years ago

mmenozzi commented 3 years ago

The current code of the \Clerk_Clerk_Model_Communicator::removeProduct will produce the following request params:

{
  "private_key": "*** redacted ***",
  "products[0]": 52964,
  "key": "*** redacted ***"
}

Which will result in a Missing argument: products ParsingError on Clerk.io.

This PR fix this.

stubbedev commented 2 years ago

This was addressed in a prior update by changing the line to concatenate the id into a json list.

$data['products'] = "[".$productId."]";