Inhalte aufrufen

Profilbild

Discount Code does not work

"\r\n48495

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
12 Antworten zu diesem Thema

#1 Louie Lau

Louie Lau

    Member

  • Members
  • PunktPunkt
  • 15 Beiträge

Geschrieben: 18 November 2023 - 16:14

Dears,

 

I try many times to setup and test the % discount with Coupon but unlucky. Could you advise me how to do it properly?

 

Step:

1. Setup a new 10% off discount by a coupon code 'FPUR10' with effective date range from 1 Nov 2023 t0 22 Nov 2023. 

Use percentage

Discount percentage
10.00
Start date
 
End date
 
Remaining offer time after which a countdown should be displayed
10Hours
Requires coupon code
Coupon code
Discount limitation
Unlimited N times only N times per customer N times only
N times
1times
Requirements
 
  •  

 

2. Go to make new order and put the discount code 'FPUR10'

I have a discount code
Subtotal: HK$138.00 Shipping: HK$40.00 Tax: HK$0.00 Total: HK$178.00

3. it returns as "The coupon code you entered couldn't be applied to your order" after clikc apply coupon

 

 

Please help. Many thanks.



#2 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 462 Beiträge

Geschrieben: 19 November 2023 - 11:41

Hi Louie,

 

works for me. I tried to remake your example. Please see screenshots below. (Smartstore 5.0.5)

 

Greetings, Stefan

 

 

Frontend:

 

Angehängte Datei  hkdiscount-frontend.jpg   76.61K   0 Anzahl Downloads

 

Admin:

 

Angehängte Datei  hkdiscount-admin.jpg   106.13K   0 Anzahl Downloads

 


Stefan


#3 Louie Lau

Louie Lau

    Member

  • Members
  • PunktPunkt
  • 15 Beiträge

Geschrieben: 19 November 2023 - 13:11

Dear Stefan,

 

Thanks for your reply. I am using version 5.0.5.0.

 

My screen looks like as attached.

1. Discount Code setting 1.png (with effective date range, apply the code to order total)

2. Discount Code setting 2.png (with code 'FPUR10', unlimited)

3. Front Input Discount Code.png (input discount code 'FPUR10')

4. Front Input Discount Code Error.png (return invalid message)

 

 

Please help again. My website is online.greenleafhk.com

 

Angehängte Bilder



#4 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 462 Beiträge

Geschrieben: 19 November 2023 - 19:17

Sorry I have no idea at the moment. Do you use the multistore feature?


Stefan


#5 Louie Lau

Louie Lau

    Member

  • Members
  • PunktPunkt
  • 15 Beiträge

Geschrieben: 20 November 2023 - 15:29

Sorry I have no idea at the moment. Do you use the multistore feature?

 

Hi Stafen,

 

I built a multistore but did not apply any area. I have retested after removing multistore. It is still not working.



#6 Louie Lau

Louie Lau

    Member

  • Members
  • PunktPunkt
  • 15 Beiträge

Geschrieben: 20 November 2023 - 16:23

Dear Stafen,

 

Could you help to check the data? My one is as attached. I find there have a column 'DiscountLimitationID' I am not sure do you have the table DiscountLimitation table but I don't have that.

Angehängte Bilder



#7 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 462 Beiträge

Geschrieben: 20 November 2023 - 20:03

Another aspect to consider is checking your coupon code for potential typing errors. There might be a chance that a space was accidentally entered after the code, such as "FPUR10 " instead of "FPUR10".

Obviously space after FPUR10 would also not visible in your database table screenshot.
 

 

I strongly recommend to make shure that your coupon code does not end with a space or any invisible character. Such minor mistakes can often be overlooked, yet they have a significant impact on whether the coupon code works correctly or not. Please carefully review for that.

 

 

(A similar issue with passwords was reported by me and seems to be fixed for upcoming Smartstore 5.2.0. https://github.com/s...tore/issues/855)


Stefan


#8 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3802 Beiträge

Geschrieben: 20 November 2023 - 21:28

The shopping cart must not contain a gift card for a total or subtotal discount to be applied. DiscountLimitationID refers to "Discount limitation" selection. A table or entity "DiscountLimitation" does not exist.


Marcus Gesing

Smartstore AG


#9 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 462 Beiträge

Geschrieben: 21 November 2023 - 09:48

For me it still seems likely that there's an extra space following your Discount Code setup. Could you check this, Louie?

 

In my testing with Smartstore 5.0.5, I found that Discount Codes can be created with spaces following the code. This isn't ideal and should be prevented by the Store Admin.

 

Angehängte Datei  couponcodespaces.jpg   130.4K   0 Anzahl Downloads


Stefan


#10 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 462 Beiträge

Geschrieben: 21 November 2023 - 10:28

see also https://github.com/s...tore/issues/898 and please upvote/comment there


Stefan


#11 Louie Lau

Louie Lau

    Member

  • Members
  • PunktPunkt
  • 15 Beiträge

Geschrieben: 21 November 2023 - 15:27

Dear Stefan,

 

Sorry for the late reply. The discount code does not contain space after '0'. May I know could I get the source code for checking? It is very important feature to get the performance from a promo code.



#12 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3802 Beiträge

Geschrieben: 21 November 2023 - 20:11

This is probably the line of code where the validation fails and returns early.


Marcus Gesing

Smartstore AG


#13 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 462 Beiträge

Geschrieben: 04 December 2023 - 09:24

@louie the source code for this is (and was always) available in our public github at smartstore/smartstore.

 

 

Regarding the extra space issue in coupon codes, this has been fixed:

markwoerdenweber closed this as completed in 088d8c6 5 days ago

 

Angehängte Datei  discountcodetrim.jpg   149.44K   0 Anzahl Downloads


Stefan