yourgrocer / spree_quick_cart

BSD 3-Clause "New" or "Revised" License
4 stars 10 forks source link

Bug at backend #1

Closed denisboiling closed 10 years ago

denisboiling commented 10 years ago

Ajax requests do not work in the backend after installation gem spree_quick_cart.

Spree.routes.orders_api = "http://localhost:3000/api/orders.json";

must Spree.routes.orders_api = "http://localhost:3000/api/orders";

How can I fix it?

frankmt commented 10 years ago

Thanks for raising it! I can fix it later this week, but feel free to submit a pull request if you can.

frankmt commented 10 years ago

@denisboiling I've tried some ajax requests in the backend for my spree installation and they are still working fine.

Could you send some steps to reproduce the problem you are experiencing?

Thanks!

denisboiling commented 10 years ago

I'm a programmer with little experience and I can not fix the problem.

here are my steps:

  1. Install gem
  2. I go to the backend in one of the orders
  3. html code see: Spree.routes.orders_api = "http://localhost:3000/api/orders.json";
  4. Trying to cancel the order, an error "Failed to load resource: .... 404 ... http://localhost:3000/api/orders.json/R604547803/line_items/52.json?token=ff42d5c6af52b52d876108c483da60b9313c44d2b91e7a59
  5. Trying to add the item to the order, the same error

But when I remove a gem, everything works.

Maybe attach a Gemfile?

frankmt commented 10 years ago

@denisboiling I've updated the gem to version 2.1.3 (moving to the same spree version).

The bug should be fixed now, it seems that assigning an extra route was messing up with the original Spree route.

I will close the issue. Please open it again if you have any problems.

denisboiling commented 10 years ago

Thank you very much! :)