Post by katalin » Thu Aug 17, 2023 1:28 am

Hi guys,
I am using OC 3.0.3.8 with Journal3 theme (I know it's not supported here) but I have a small small thing I want to modify and that is to make the coupon codes uppercase everywhere on frontpage. Can anyone help me with this small thing? Thank you!
LE: Also everywhere in backend if possible!

https://prnt.sc/LhmWqBw72uBj

Active Member

Posts

Joined
Wed May 05, 2010 2:28 am

Post by by mona » Thu Aug 17, 2023 1:44 am

We can not help because we do not have the css class for the coupon code "everywhere" as there is no "everywhere" in Opencart.

However to answer your question so you can do it yourself this would be the way to do it in the shopping cart of checkout

Code: Select all

#input-coupon {
	text-transform:uppercase;
}

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by katalin » Thu Aug 17, 2023 6:06 am

by mona wrote:
Thu Aug 17, 2023 1:44 am
We can not help because we do not have the css class for the coupon code "everywhere" as there is no "everywhere" in Opencart.

However to answer your question so you can do it yourself this would be the way to do it in the shopping cart of checkout

Code: Select all

#input-coupon {
	text-transform:uppercase;
}
Thanks for the suggestion but that won't do the job, I think I need to modify somewhere in a variable in controller or model, not sure because I can't seem to find the one responsible...

Active Member

Posts

Joined
Wed May 05, 2010 2:28 am

Post by SohBH » Thu Aug 17, 2023 1:40 pm

Coupon code is generated by ___?
ae4add4f

View all extensions | Request custom work | Pricing | Contact Me


User avatar
Active Member

Posts

Joined
Mon Nov 02, 2020 12:01 am
Location - Malaysia

Post by thekrotek » Thu Aug 17, 2023 1:50 pm

katalin wrote:
Thu Aug 17, 2023 6:06 am
Thanks for the suggestion but that won't do the job, I think I need to modify somewhere in a variable in controller or model, not sure because I can't seem to find the one responsible...
In total/coupon controller add mb_uppercase() function where it assigns submitted coupon to session variable. Might have to do the same for theme's controller if it has its own.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by katalin » Thu Aug 17, 2023 9:30 pm

thekrotek wrote:
Thu Aug 17, 2023 1:50 pm
katalin wrote:
Thu Aug 17, 2023 6:06 am
Thanks for the suggestion but that won't do the job, I think I need to modify somewhere in a variable in controller or model, not sure because I can't seem to find the one responsible...
In total/coupon controller add mb_uppercase() function where it assigns submitted coupon to session variable. Might have to do the same for theme's controller if it has its own.
I’m not that experienced with PHP. Can you please help me with the code?

Thanks!

Active Member

Posts

Joined
Wed May 05, 2010 2:28 am

Post by by mona » Thu Aug 17, 2023 9:43 pm

katalin wrote:
Thu Aug 17, 2023 6:06 am
by mona wrote:
Thu Aug 17, 2023 1:44 am
We can not help because we do not have the css class for the coupon code "everywhere" as there is no "everywhere" in Opencart.

However to answer your question so you can do it yourself this would be the way to do it in the shopping cart of checkout

Code: Select all

#input-coupon {
	text-transform:uppercase;
}
Thanks for the suggestion but that won't do the job, I think I need to modify somewhere in a variable in controller or model, not sure because I can't seem to find the one responsible...
Default is not case sensitive so the cosmetic solution works fine.
Have you tried it? I just tested it and it works on 3.0.3.8 maintenance default theme
Real code aaa222
Code entered aAa222
Code appears to customer end entry AAA222
Code appears in cart aAa222 - which can also be changed via css for cosmetic reasons

code accepted and discount applied to cart

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by katalin » Sat Aug 19, 2023 12:42 am

by mona wrote:
Thu Aug 17, 2023 9:43 pm
katalin wrote:
Thu Aug 17, 2023 6:06 am
by mona wrote:
Thu Aug 17, 2023 1:44 am
We can not help because we do not have the css class for the coupon code "everywhere" as there is no "everywhere" in Opencart.

However to answer your question so you can do it yourself this would be the way to do it in the shopping cart of checkout

Code: Select all

#input-coupon {
	text-transform:uppercase;
}
Thanks for the suggestion but that won't do the job, I think I need to modify somewhere in a variable in controller or model, not sure because I can't seem to find the one responsible...
Default is not case sensitive so the cosmetic solution works fine.
Have you tried it? I just tested it and it works on 3.0.3.8 maintenance default theme
Real code aaa222
Code entered aAa222
Code appears to customer end entry AAA222
Code appears in cart aAa222 - which can also be changed via css for cosmetic reasons

code accepted and discount applied to cart
I tried it but it only applies to the input, not under cart subtotal. I would like to see it uppercase there also and also in admin view order if possible.

Thanks!

Active Member

Posts

Joined
Wed May 05, 2010 2:28 am

Post by katalin » Wed Aug 23, 2023 5:40 pm

by mona wrote:
Thu Aug 17, 2023 9:43 pm
katalin wrote:
Thu Aug 17, 2023 6:06 am
by mona wrote:
Thu Aug 17, 2023 1:44 am
We can not help because we do not have the css class for the coupon code "everywhere" as there is no "everywhere" in Opencart.

However to answer your question so you can do it yourself this would be the way to do it in the shopping cart of checkout

Code: Select all

#input-coupon {
	text-transform:uppercase;
}
Thanks for the suggestion but that won't do the job, I think I need to modify somewhere in a variable in controller or model, not sure because I can't seem to find the one responsible...
Default is not case sensitive so the cosmetic solution works fine.
Have you tried it? I just tested it and it works on 3.0.3.8 maintenance default theme
Real code aaa222
Code entered aAa222
Code appears to customer end entry AAA222
Code appears in cart aAa222 - which can also be changed via css for cosmetic reasons

code accepted and discount applied to cart
How can I make it uppercase in cart also?

Active Member

Posts

Joined
Wed May 05, 2010 2:28 am

Post by katalin » Tue Aug 29, 2023 4:12 am

by mona wrote:
Thu Aug 17, 2023 1:44 am
We can not help because we do not have the css class for the coupon code "everywhere" as there is no "everywhere" in Opencart.

However to answer your question so you can do it yourself this would be the way to do it in the shopping cart of checkout

Code: Select all

#input-coupon {
	text-transform:uppercase;
}
Can you please answear to my last post?

Active Member

Posts

Joined
Wed May 05, 2010 2:28 am
Who is online

Users browsing this forum: No registered users and 35 guests