AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
Customer able to click notifiy when back in stock button with no address filled in
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
On the product page, the customer can click the Notify when this is available button with a blank email and there is no error message displayed to customer. Just another error for the merchant to have to troubleshoot in the error log.
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System Joined: 10/11/2018(UTC) Posts: 110
Thanks: 19 times Was thanked: 18 time(s) in 18 post(s)
|
I am able to reproduce the issue. The NotifyEmailAddress property is missing the Required attribute. To fix this, locate the following line of code inside /Website/Models/ProductModels.cs RestockNotificationSignup model class Code:
[EmailAddress(ErrorMessage = "Email address should be in the format of name@domain.tld.")]
public string NotifyEmailAddress { get; set; }
and replace with Code:
[RequiredIf("ShowRestockNotifications", ErrorMessage = "Notify email address is required.")]
[RegularExpression(@"^ *[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2,63} *$", ErrorMessage = "Email address should be in the format of name@domain.tld.")]
public string NotifyEmailAddress { get; set; }
public bool ShowRestockNotifications { get; set; }
Edited by user Monday, January 9, 2023 5:13:55 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System Joined: 10/11/2018(UTC) Posts: 110
Thanks: 19 times Was thanked: 18 time(s) in 18 post(s)
|
I have reported the issue to be fixed in a future version.
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
Thanks for the quick fix!
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
Well... this didn't work out on products that have kits. I tested this on your build a new pet care package. When you change a selection in the kit options, like Dogs- change to Tennis Ball Red/Yellow. The error message Notify email address is required shows. 2022-10-31_11-32-14.png (41kb) downloaded 1 time(s).
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System Joined: 10/11/2018(UTC) Posts: 110
Thanks: 19 times Was thanked: 18 time(s) in 18 post(s)
|
Judy, Sorry for getting back too late on this. I somehow missed the notification. Any ways, you can fix the Kit issue by updating the code in BuyProductDialog post action method: Locate the following line of code inside Code:int totalReviews = _reviewRepo.SearchCount(product.Id, BitFieldState.True);
and replace with Code:else
{
ModelState.Remove("NotifyEmailAddress");
}
int totalReviews = _reviewRepo.SearchCount(product.Id, BitFieldState.True);
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
Customer able to click notifiy when back in stock button with no address filled in
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close