Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Phoca Cart - complex e-commerce extension
User avatar
shibumi
Phoca Enthusiast
Phoca Enthusiast
Posts: 97
Joined: 11 Sep 2016, 22:22

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by shibumi »

Yes, exactly the way I want it to work... but still can not use any coupon code to apply it to the cart
User avatar
shibumi
Phoca Enthusiast
Phoca Enthusiast
Posts: 97
Joined: 11 Sep 2016, 22:22

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by shibumi »

shibumi wrote: 13 Aug 2019, 05:38 Tried adding a second coupon, no valid from date, expiry date set to December 31, 2019 - still no joy... :x
So added a valid from date and other settings as shown below...

General Options set to:

Code: Select all

Title *			Test
Coupon Code *		test
Discount		100 (tried with $10 fixed amount as well)
Calculation Type	Percentage
Access			Public
Customer Group	Default
Rules set to the following (set high available quantities for testing):

Code: Select all

Total Amount			10
Minimum Quantity		0
Available Quantity		1000
Available Quantity (Customer)	1000
Products			(left empty)
Product Filter			include
Categories			Digital Photos (only want applied to one category)
Category Filter			include
Free Shipping			no
Free Payment			no
Publishing Options:

Code: Select all

Valid From		2019-08-11
Valid To		2019-12-31
Published		Published
Language		All
Category settings:

Code: Select all

Title *		Digital Photos
Alias		digital-photos
Image		6dmkii-2-139.jpg <Select Image>
Parent Category	- Select Category - (this is a top category)
Type		Online Shop Only
Ordering	1. Digital Photos
Access		Public
Customer Group	Default
These are my coupon and category settings, and still can not use coupon code
User avatar
shibumi
Phoca Enthusiast
Phoca Enthusiast
Posts: 97
Joined: 11 Sep 2016, 22:22

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by shibumi »

okay, something very strange just happened... I created a 3rd coupon called Test 2 with code TEST2 set to $10 fixed amount, and did not change any other parameters, and it worked... Why now all of a sudden does this one work?
User avatar
shibumi
Phoca Enthusiast
Phoca Enthusiast
Posts: 97
Joined: 11 Sep 2016, 22:22

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by shibumi »

More to note... So, setting to Cash on Delivery does not set order to complete, and once you apply the coupon, no payment method is selected... Changed to POS Cash, and can now set order status to complete to allow download of the file, but still entering coupon code and saving, clears payment method... PayPal is default for orders over $0.99, POS Cash is not default

So, further testing with TEST2 code... added valid from (July 1, 2019) and valid to dates (Dec 31, 2019) and applied a category filter (include) coupon code no longer works - invalid, expired, or reached it's usage limit... even with deleting the valid from and valid to dates, still not working... deleting category filter makes coupon active again...

So, setting an expiry date (even just a valid to date and no valid from date) and/or category filter breaks coupon from being used.

Digging deeper, it appears to be just setting product filters and/or category filters to apply the coupon code to that sets the coupon as invalid, expired or reached it's usage limit... I removed the category filter, leaving a valid to date (Dec 31, 2019) and am able to apply the coupon. Again, applying coupon when default payment is PayPal sets payment method to none... is there any way to set a fallback payment method or ajax method to automatically switch payment method based on cart total?

Maybe entering coupon code should be before selecting the payment method? Like maybe before Login/Register section? That way when you enter coupon code, cart total is updated and payment method would update based amount rule on cart total?

As it is now, if cart value is over $0.99 Paypal shows for payment type, but when you apply the $10 coupon to the $10 total and sets cart to $0.00, payment method shows as set, but as soon as you click confirm/place order, alerts you that no payment method is selected.

Food for thought... still doing more testing and will report more back if I find anything else...

Cheers,

Jeff
User avatar
shibumi
Phoca Enthusiast
Phoca Enthusiast
Posts: 97
Joined: 11 Sep 2016, 22:22

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by shibumi »

Another thing I noticed on the checkout page, the link to the terms and conditions does not work either... I selected my Terms document in the settings, which has an alias of terms-of-use but the link uses terms?tmpl=component and just loads a blank page...

Getting there, slowly but surely :)
User avatar
shibumi
Phoca Enthusiast
Phoca Enthusiast
Posts: 97
Joined: 11 Sep 2016, 22:22

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by shibumi »

More digging and testing... so, applying anything other than default settings [edit] except Available Quantity and Available Quantity (Customer) [/edit] on the rules tab of a coupon breaks it and reports the message Added coupon cannot be used - it is either invalid, expired or reached it's usage limit
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by Jan »

Hi, the shipping and payment (coupon) rules are based on subtotal value. Because if e.g. setting it on total value, there will be a loop (changing e.g. payment method will loop back to shipping method and changing shipping method will again loop to payment method, etc. etc. But yes, you are right, adding coupon code could be before shipping and payment. I will take a look at it and will add parameter for this.

To see the behaviour of the coupon, I will need to debug it on the server, testing on my own, everything is Ok there. :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by Jan »

Testing now, and I can add the coupon to system normally :idea:

Image
If you find Phoca extensions useful, please support the project
User avatar
shibumi
Phoca Enthusiast
Phoca Enthusiast
Posts: 97
Joined: 11 Sep 2016, 22:22

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by shibumi »

Yes, I can do that now too, but did you test changing the Rules options in the Coupon in the back end? If I add a category or set a minimum value or a product, the coupon becomes invalid
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Added coupon cannot be used - it is either invalid, expired or reached it's usage limit

Post by Jan »

Hi, now I see what you mean, confirmed. There were changes regarding checking the coupon which caused this problem. I will take a look at it and will change it so it works ok in next version.

Thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply