cant get discount code input value

Razor989_
Shopify Partner
3 0 1

I have created a shopify app using CLI and have alse added Checkout UI extension to the app. You can see the checkout extension component in the screenshot given below. I would like to access all the input value entered in the discount code input field once i click apply button or before i click the apply button. I used the 

const discountCodes = useDiscountCodes() so as to console all the discount code which have been applied already. Is there any hook like the above mentioned so as to fetch the applied input values?

 Screenshot 2023-05-18 231447.png

Replies 5 (5)

vixnguyen
Shopify Partner
45 4 4

Hi Razor,

Please checkout this.

I guess this can help to solve solve your need.

Regards,

Razor989_
Shopify Partner
3 0 1

Hey, thanks for replying but i was looking to get all the values which are entered in the discount field even if they are not the correct discount code.

vixnguyen
Shopify Partner
45 4 4

Hi Razor,

Have you solved your problem? You can try another one.

Razor989_
Shopify Partner
3 0 1

Hey. I dont want to change the discount code. I just want all the values which are entered in the discount code field even if the entered discount code is incorrect. 

 

elena12355
Shopify Partner
1 0 0

Hi did you find any solutions for this?