Post by Siroun » Wed Dec 01, 2021 10:11 pm

Hey guys,

First time here, sorry if i haven't posted in the right category, we are a couple days away from launching our new e-commerce store built 100% with this awesome Open Cart solution, we have a custom theme that uses SO Onepage Checkout, but this is not 100% relevant, because the behaviour is the same in the custom function of OC.

We have the following issue:

We create Gift Vouchers (test purposes only at the moment) in the backend here "Home > Gift Vouchers > +" we fill everything (value included) but when we apply it in the Frontend it shows the value up to 25, even if the voucher is 100. The voucher value display is correct up to 25 (1-25) but for anything else above 25 is shows 25 still, like it's capped.

Ex:

voucher 1 = 5 (fine, displays correctly, and diminishes the total cart value)
voucher 2 = 15 (fine, displays correctly, and diminishes the total cart value)
voucher 3 = 50 (capped at 25 still, doesn't diminishes the cart with 50, but still with 25)
voucher 4 = 100 (capped at 25 still, doesn't diminishes the cart with 50, but still with 25)

Any ideea what's wrong guys ?

Maybe replace the voucher file with the default one, see what happens ?
we don't know where to do that, no ideea what we can do further, we tried a couple of things, nothing worked.

Kind regards and thank you very much for your future input !

Newbie

Posts

Joined
Wed Dec 01, 2021 9:59 pm

Post by Gergely » Wed Dec 01, 2021 11:21 pm

Hi Siroun,

Two things:
  1. Gift Vouchers can be added under Admin > Sales > Gift Vouchers > Gift Vouchers > + if it's under a different path, you're likely using a modification, and not the default system.
  2. What is Admin > System > Settings > {Store} > Option > Vouchers > Voucher Max set to? Try increasing the value there!
Hope this helps,
Gergely

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by Siroun » Thu Dec 02, 2021 3:10 am

Hey Gergely,

1. There is where i've added the voucher, correct.
if it's under a different path, you're likely using a modification, and not the default system. - it's not, it's right there where it should be
2. Voucher max limit is 5.000

Under this circumstances, isn't it very weird that the voucher is basically CAPPED at 25 ? :choke:
Honestly i googled the issue a lot before opening a topic here, no one encountered this issue before :/
It's really frustrating because we can't figure it out it's behaviour and why it does this :(

Newbie

Posts

Joined
Wed Dec 01, 2021 9:59 pm

Post by straightlight » Thu Dec 02, 2021 3:57 am

Siroun wrote:
Thu Dec 02, 2021 3:10 am
Hey Gergely,

1. There is where i've added the voucher, correct.
if it's under a different path, you're likely using a modification, and not the default system. - it's not, it's right there where it should be
2. Voucher max limit is 5.000

Under this circumstances, isn't it very weird that the voucher is basically CAPPED at 25 ? :choke:
Honestly i googled the issue a lot before opening a topic here, no one encountered this issue before :/
It's really frustrating because we can't figure it out it's behaviour and why it does this :(
It's not because the issue hasn't been encountered before. It's simply because during earlier times where it used to be reported the solution may have been found and the right keywords needs to be used when looking up for something specific on Google at times.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Siroun » Thu Dec 02, 2021 4:26 am

straightlight wrote:
Thu Dec 02, 2021 3:57 am
Siroun wrote:
Thu Dec 02, 2021 3:10 am
Hey Gergely,

1. There is where i've added the voucher, correct.
if it's under a different path, you're likely using a modification, and not the default system. - it's not, it's right there where it should be
2. Voucher max limit is 5.000

Under this circumstances, isn't it very weird that the voucher is basically CAPPED at 25 ? :choke:
Honestly i googled the issue a lot before opening a topic here, no one encountered this issue before :/
It's really frustrating because we can't figure it out it's behaviour and why it does this :(
It's not because the issue hasn't been encountered before. It's simply because during earlier times where it used to be reported the solution may have been found and the right keywords needs to be used when looking up for something specific on Google at times.
Well, enlighten me please then, how do i fix this ?
Because i've googled it for more then 3 days, i found nothing, not even related or close + it doesn't help me if the fix is from 2013, when it was 2.0.X i need it for my current, modern version of OC.

So any practical ideeas ?
Thanks.

Newbie

Posts

Joined
Wed Dec 01, 2021 9:59 pm

Post by Gergely » Thu Dec 02, 2021 5:57 am

Hi Siroun,

In vanilla opencart gift vouchers can be applied on the checkout/cart page, is this where you observe this behaviour?
I don't have much familiarity with SO one page checkout, so I can't advise you on how that might influence the logic of your vouchers. Have you tried turning this extension off to test whether it causes the issue?

For more advanced debugging you could check what controller is being called when you apply a gift voucher, and try to follow the logic in there. Please let me know if you need more detailed help on how to do this.

Looking forward to your updates!

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by Siroun » Thu Dec 02, 2021 6:13 am

Gergely wrote:
Thu Dec 02, 2021 5:57 am
Hi Siroun,

In vanilla opencart gift vouchers can be applied on the checkout/cart page, is this where you observe this behaviour?
I don't have much familiarity with SO one page checkout, so I can't advise you on how that might influence the logic of your vouchers. Have you tried turning this extension off to test whether it causes the issue?

For more advanced debugging you could check what controller is being called when you apply a gift voucher, and try to follow the logic in there. Please let me know if you need more detailed help on how to do this.

Looking forward to your updates!
Hey man,

vanilla opencart ? what is that ?
i'm only aware about vanilla world of warcraft, lol
on topic: yes, i apply the voucher on checkout page of this module BUT also on the OC standard form, it's the same result (files attached)
yes, turned it on/off a couple of times, also replaced the files of "coupon" and "voucher" from a fresh install to our installation, still nothing.

currency is local, RON for the Romanian Leu, but it's set to 1, so it's default and i have no other currencies.

For more advanced debugging you could check what controller is being called when you apply a gift voucher, and try to follow the logic in there. Please let me know if you need more detailed help on how to do this.
how do i do this ?

files also here - https://imgur.com/a/3lYvaXS
Hopefully it's a lot more clear now, i honestly have no ideea where the value of 25 is coming from (as i said in the 1st post, anything below 25 shows fine, anything above stuck at 25, even if the voucher is 10 or 20 times bigger, so up until some point the system sees the real value, then it doesn't)

Attachments

Untitled-5.png

Untitled-5.png (153.72 KiB) Viewed 1152 times

Untitled-4.png

Untitled-4.png (212.15 KiB) Viewed 1152 times

Untitled-2.png

Untitled-2.png (71.72 KiB) Viewed 1152 times


Newbie

Posts

Joined
Wed Dec 01, 2021 9:59 pm

Post by mikeinterserv » Thu Dec 02, 2021 6:24 am

In admin - go to
system > settings > option tab
You will see fields that says voucher min and voucher max
What do you have in voucher max.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Gergely » Thu Dec 02, 2021 6:43 am

Hi Siroun,

Fair enough! By vanilla I mean an unmodded, bare-bones opencart instance. It's what you get when you download, unzip, install and voilà: you got vanilla opencart!

I do understand your problem, and it's probably the case that you have a modification installed that modifies the totals. To start debugging, open your browser's developer tools (usually F12 or Ctrl + Shift + I), and find the Network tab. Then try to apply a voucher, and find the new request on the network tab. (See screenshot attached.) Then find the .php file under the path after ?route= in the catalog/controller folder and also try to look for a file under the same path in your modifications folder. For example, if your request goes to index.php?route=x/y/z, then check catalog/controller/x/y/z.php and storage/modification/catalog/controller/x/y/z.php

I will advise you further when you share your findings!

Attachments

Get controller from network tab.png

Get controller from network tab.png (365.65 KiB) Viewed 1129 times


Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by ADD Creative » Thu Dec 02, 2021 8:09 am

The issue is with your total sort orders. You can't have the voucher before the sub-total.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Gergely » Thu Dec 02, 2021 8:57 am

ADD Creative wrote:
Thu Dec 02, 2021 8:09 am
The issue is with your total sort orders. You can't have the voucher before the sub-total.
Of course that's it, I completely missed that on the pictures, thanks!

@Siroun:
As the sort order for the totals is not set up correctly, the gift card will only be applied against the delivery fee, and the handling fee, and not against any items that are actually in the cart. As ADD Creative says, you should apply the Gift Vouchers after the Sub-Total. You can change the sort order at Admin > Extesnions > Extensions > Order Totals

Hope this will resolve your issue!

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by Siroun » Thu Dec 02, 2021 4:45 pm

ADD Creative wrote:
Thu Dec 02, 2021 8:09 am
The issue is with your total sort orders. You can't have the voucher before the sub-total.
OMG, i've spent days debugging, almost went insane :(
THANK YOU so much man.

Newbie

Posts

Joined
Wed Dec 01, 2021 9:59 pm

Post by Siroun » Thu Dec 02, 2021 4:45 pm

Gergely wrote:
Thu Dec 02, 2021 8:57 am
ADD Creative wrote:
Thu Dec 02, 2021 8:09 am
The issue is with your total sort orders. You can't have the voucher before the sub-total.
Of course that's it, I completely missed that on the pictures, thanks!

@Siroun:
As the sort order for the totals is not set up correctly, the gift card will only be applied against the delivery fee, and the handling fee, and not against any items that are actually in the cart. As ADD Creative says, you should apply the Gift Vouchers after the Sub-Total. You can change the sort order at Admin > Extesnions > Extensions > Order Totals

Hope this will resolve your issue!
Thank you mister, may all the Good forces and powers bless your heart.
kind regards :)

Newbie

Posts

Joined
Wed Dec 01, 2021 9:59 pm
Who is online

Users browsing this forum: No registered users and 89 guests