I'm trying to tweak the visibility of the OrderTotal lines in the mini-cart, but I really can't find it (I'm no stranger to controller files). I just want a little more control of how/when they display.
For example, I'd like to have JUST the name of the OrderTotal visible whenever there's something in the cart (Spend $20 and get $5 OFF), THEN when the condition for that deal is met, the dollar value shows up as well (-$5.00). Right now, it only shows up when they've got $20 worth of stuff in the cart.
On a similar note, I'm trying to keep the "RewardPoints" box hidden during checkout, but still have the system collect points for customers silently in the background (we're not ready to go public with it yet, but I want customers to be earning in the meantime). I'm referring to Hunters RewardPoints mod, but the issue is the same, I need control over the OrderTotal lines that show up automatically when a condition is met.
Can anyone give me a heads-up on how this part of the system works?
I've been digging into OC for a year now, but I still don't understand this part of the code (or where it is???).
Thanks guys, any insight would be appreciated.
Are you referring to order total on the shopping cart page or checkout page or both?
Donate here to show support if you think I have helped you today!
Opencart Documentation
For the $20 example, the mini-cart.
For the RewardPoints, the main checkout cart.
But I think they're both controlled by the same thing, no?
Either way, if I can just grasp where it's coming from, I can probably figure something out.
EDIT: Alright, so I managed to track down some of it.
The general ballpark files are in: \catalog\model\total\
That's the logic anyway, but I'm still not recognizing the code that actually inserts the OrderTotals lines based on their conditions. For example, if I wanted to offer FreeShipping on orders over $20, yet have that OrderTotal line (FreeShipping on Orders over $20) ALWAYS visible in the cart. It seems almost impossible to control it that way.
For the RewardPoints, the main checkout cart.
But I think they're both controlled by the same thing, no?
Either way, if I can just grasp where it's coming from, I can probably figure something out.
EDIT: Alright, so I managed to track down some of it.
The general ballpark files are in: \catalog\model\total\
That's the logic anyway, but I'm still not recognizing the code that actually inserts the OrderTotals lines based on their conditions. For example, if I wanted to offer FreeShipping on orders over $20, yet have that OrderTotal line (FreeShipping on Orders over $20) ALWAYS visible in the cart. It seems almost impossible to control it that way.
Who is online
Users browsing this forum: No registered users and 28 guests