reverbdotcom / reverb-magento

Magento 1.x plugin for syncing with Reverb
Other
7 stars 10 forks source link

Products with SKUs containing special characters are not being synced correctly #238

Closed zztimur closed 8 years ago

zztimur commented 8 years ago

If you have a product with an SKU with a special character it won't sync correctly.

Here's an example. We had a product with a TAB symbol somehow ending up being part of SKU. Say SKU in magento is "product-abcd". Here's what happens to it.

  1. Initial sync goes fine. The products sku is sent to reverb as "product-abcd\t"
  2. Inventory updates -> Queued for re-sync.
  3. On re-sync module checks if the product exists in the reverb via api using url containing the sku that is url encoded. So it checks for "product-abcd%9".
  4. Obviously product with such sku doesn't exist, so module attempts to create a new listing for product with sku "product-abcd\t"
  5. We get an error "SKU already exists in your shop. SKUs must be unique.already exists in your shop. SKUs must be unique." (fix the error message by the way).
zztimur commented 8 years ago

So since we are doing calls via urls, it makes sense to url encode the sku for reverb. I'll post a pull request shortly.

kylecrum commented 8 years ago

Is this fixed by this PR? https://github.com/reverbdotcom/reverb-magento/pull/239 @zztimur ?

zztimur commented 8 years ago

Yes

On Apr 27, 2016, at 3:16 PM, Kyle Crum notifications@github.com wrote:

Is this fixed by this PR? #239 @zztimur ?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

skwp commented 8 years ago

Please see discussion here: https://github.com/reverbdotcom/reverb-magento/pull/242 I don't think your fix did what you think it shoudl do. You only need to urlencode the GET request

zztimur commented 8 years ago

@skwp Any news from your team? Was this tested on API?

skwp commented 8 years ago

We will be fixing the tab problem on our side probably by next week or sooner

kylecrum commented 8 years ago

@zztimur should be fixed on our end.

zztimur commented 8 years ago

awesome thanks

On Apr 28, 2016, at 3:05 PM, Kyle Crum notifications@github.com wrote:

@zztimur https://github.com/zztimur should be fixed on our end.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/reverbdotcom/reverb-magento/issues/238#issuecomment-215545989