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

Issues with updating cart #6

Closed
ps-PKrueger opened this issue May 30, 2018 · 7 comments
Closed

Issues with updating cart #6

ps-PKrueger opened this issue May 30, 2018 · 7 comments

Comments

@ps-PKrueger
Copy link

There is an issue with updating the cart for item quantities before checking out. For some reason, the gateway is not retrieving an updated value for the items in the cart. It is causing something strange to happen in the fastspring checkout window.

Here are some images showing the differences:

ex1

ex2

To replicate:

  1. Add several items to the cart. (subscriptions)
  2. Go to the cart and change the values of the subscriptions up and down.
  3. Update the cart.
  4. Go to checkout.
  5. Checkout, and the value in fastspring will be different than the value in the Woocommerce cart and checkout page.

Thoughts?

@ps-PKrueger
Copy link
Author

I have now verified that this is not just an issue with updating the cart, it has to do with any order that has quantities greater than 1.

If I add more than one of an item to the cart before checking out, I get a weird price value in the Fastspring window.

I am also not using coupons, or other discounting mechanisms.

@ps-PKrueger
Copy link
Author

In a further update to this issue, it looks like the gateway is sending the value = price / number of items, and not price * number of items. At least, that is consistent with what I am getting.

My Price: $25

Fastspring Checkout

Qty 1 - $25.00
Qty 2 - $12.50
Qty 3 - $8.33

@cyberwombat
Copy link
Owner

Thank you. I patched things temporarily - indeed the quantity was applied wrong but I am running into issues with rounding errors. The gist of the problem is that FS doesn't handle discounts so I have to adjust item prices to create a fake discount but this creates issues with rounding (i.e. 3 * $20 with a $10 discount yields $50.01 in FS). I will explore creating a fake discount item if FS lets me do negatives but I am not sure yet. I will leave this issue open to remind me to address that.

@ps-PKrueger
Copy link
Author

I am solving this by not allowing coupons on Woo, only on Fastspring checkout. That way, they have to calculate the discounts, and no rounding error will be produced. It is too bad that fastspring won't let you reference a coupon code on their site, and apply that.

@ps-PKrueger
Copy link
Author

1.1.2 seems to have solved the dividing error, but now there is an error when updating the cart. This happens when I am in the cart, and I have selected multiple items with quantities. When I first go to the checkout page, add my info and click the "Place Order" button, I get a price value in the pop up that is for quantity 1 of each item in the cart. When I cancel and click the "Place Order" button again, it updates to the correct value for all items and quantities in the cart.

If I go back to the cart, it resets with this same behavior, so I think that it may be pulling incorrect quantity information from the cart. I added a picture so that you could see the different prices.

these prices dont match

@ps-PKrueger
Copy link
Author

Moved the above issue to a new issue, as I am not sure that they are related in the plugin.

@cyberwombat
Copy link
Owner

Thanks for update. Closing this issue and addressing the other asap.

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

2 participants