Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
cart api bug fix & partial invoice credit memo divide by zero warning #327
Sorry i didnt realize committing here would add the change to the pull request. There are two issuses here now. Let me know if you want me to try and sort them apart.
The cart api doesnt properly save a price when shoppingCartProductAdd() is called. The reason is because no addresses are stored for the quote. This fixes that by adding a call to getBillingAddress() and getShippingAddress() in shoppingCartCreate().
If you have an order with multiple items on it and invoice just one of those items. Then, trying to create a credit memo for that order causes a divide by zero warning in two different files. The issue here is that the credit memo assumes all the items have been invoiced. I created a fix by just checking the number of invoiced items.