Menu
Product
Showcase
Partners
Community
Resources
Services
Sign Up / Log In
Try It Now
Download
Product
Showcase
Partners
Community
Resources
Services
Sign Up / Log In
Forums
Search Forum
Search
Advanced Search
Topics
Posts
Unanswered
Active Topics
Prev
Go to previous topic
Next
Go to next topic
Last Post 11/14/2018 3:39 PM by
Will Strohl
Coupon issue, Divide by zero Error
7 Replies
1 Subscribed to this topic
1 Subscribed to this forum
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Page 1 of 2
1
2
>
>>
Author
Messages
MooreCreative
Basic Member
Posts:97
9/12/2018 7:22 PM
In a new Hotcakes 3.2.0 + DNN 8 instance, I'm encountering a problem in checkout when attempting to enter a Promotional Coupon Code on a testing order.
At first I thought that it was an error with the AddCoupon being broken or missing as the console shows an error loading
domainname.com/DesktopModules/Hotcakes/API/mvc/cart/addcoupon
but loading it with the proper info passed to it, it's showing a .net error message of
[DivideByZeroException: Attempted to divide by zero.]
System.Decimal.FCallDivide(Decimal& d1, Decimal& d2) +0
System.Decimal.op_Division(Decimal d1, Decimal d2) +17
Hotcakes.Commerce.Orders.OrderCalculator.TaxItems(List`1 items, IAddress billingAddress, IAddress shippingAddress, Decimal totalOrderDiscounts) +428
Hotcakes.Commerce.Orders.OrderCalculator.TaxOrder(Order order) +121
Hotcakes.Commerce.Orders.OrderCalculator.CalculateTaxes(Order order) +112
Hotcakes.Commerce.Orders.OrderCalculator.Calculate(Order order) +188
Hotcakes.Commerce.HotcakesApplication.CalculateOrderAndSave(Order o) +39
Hotcakes.Modules.Core.Controllers.CartController.AddCoupon() +118
... etc in the StackTrace
My first thought is that there must be something missing in the setup of the store such as tax or shipping cost values, but having checked on that (all tax and shipping and setup in the product for tax values were present), I then went in and filled in every field from handling to others and gave all values. No difference, still divide by zero error.
Anyone else run into this issue during setup and testing of a Hotcakes site and coupon?
Any suggestions for what to test/check next?
MooreCreative
Basic Member
Posts:97
9/13/2018 2:46 PM
[quote=MooreCreative;1001]
My first thought is that there must be something missing in the setup of the store such as tax or shipping cost values, but having checked on that (all tax and shipping and setup in the product for tax values were present), I then went in and filled in every field from handling to others and gave all values. No difference, still divide by zero error.
Anyone else run into this issue during setup and testing of a Hotcakes site and coupon?
Any suggestions for what to test/check next?[/quote]
So I made a few more tests and found that with a logged in user who has Price Group/Customer discounts in place, it generates the updated product cost correctly and allows checkout, etc. So I'm not sure that there are missing pieces of information in the store setup that would be used in coupon action that wouldn't also be used in the price group action.
Additionally, I spent some time trying different types of coupons for testing and here's what I found:
- coupon that doesn't exist: responds correctly that "Coupon XYZ doesn't exist"
- coupon that isn't active: responds correctly that "Coupon XYZ is not active"
so it's working correctly for some situations, but coupon actions all fail with the same error
- coupon which has "discount order total by X amount" fails
- coupon which has "discount order total by X percentage" fails
- coupon which has "increase order total by X amount" also fails
Alex Pommier
New Member
Posts:15
9/17/2018 11:03 AM
Hello,
I am also running into this same problem I've tried different versions of DNN 9 and clean installs but I'm always getting the coupon problem. Have you found a way to fix this?
MooreCreative
Basic Member
Posts:97
9/17/2018 11:19 AM
[quote=Alex Pommier;1005]Hello,
I am also running into this same problem I've tried different versions of DNN 9 and clean installs but I'm always getting the coupon problem. Have you found a way to fix this?[/quote]
Not yet... I was working on it last week to just document/test all that I could.
Coupons have certainly worked fine in the past and I have HotCakes versions 1.10 and 2x that work fine with coupons... the 3x that I have are new installs vs upgrades, otherwise that's another thing that I would like to test (an upgraded 3x vs a new/fresh 3x).
I'm glad to hear (unfortunately, of course) that others are seeing the same thing because that helps know that it's not just specific to this instance or store info setup.
I'll continue testing and working ideas this week and will post here if I have progress
Alex Pommier
New Member
Posts:15
9/17/2018 3:28 PM
Thank you for the update. My 2cents are I've deployed the latest version of hotcakes on DNN 9.1.1 and DNN 9.2.1 both fresh installs and they both suffered this coupon error. If I come across anything I'll update here. Hoping a patch gets released for this asap.
You are not authorized to post a reply.
Page 1 of 2
1
2
>
>>
Private
General
--Ask Anything
--Content Management
--Customer Experience
--Marketing
--SEO
Merchants
--Catalog Management
--Marketing/Promotions
--Order Management
--Payments
--Shipping
--Store Administration (General)
Designers
--Themes
--Viewsets
--General Design
Developers
--Extension Points (Store-Relate...
--Implementation
--Installation and Upgrade
--Module Development
--General Development
Forums
Developers
General Development
Sign-up for the Hotcakes Community Newsletter:
E-Mail Address