Kamil K Posted September 3, 2022 Share Posted September 3, 2022 Hi, I have recently started to work with the display of the missing amount to give a discount. This information displays above the basket in the form: " You are missing xxx.xx EUR for the -10% discount". I have added a simple piece of code in the cart.tpl file, while I would like this information to be displayed using AJAX. I'll make no secret of the fact that I'm green in this subject and I don't really know what variables I need, and whether it's necessary to define additional variables or simply call the cart refresh again. Below I add a snippet of HTML code with the Smarty Variables addon as it works now. The shop is based on the IQIT Warehouse theme. Quote {if $currency.iso_code == PLN && $language.iso_code == pl} {if $cart.totals.total.amount < 1000} <h4 style="font-weight:400; text-align: center; width: 100%; height: 95px; background-color: #aeaeae; padding-top: 20px;"> <span style="color: white;">Brakuje Ci {1000-$cart.totals.total.amount} PLN netto aby otrzymać 10% rabatu na całe zamówienie</span><br><br> <span style="color: white;">Brakuje Ci {2000-$cart.totals.total.amount} PLN netto aby otrzymać 13% rabatu na całe zamówienie </span> </h4> {elseif $cart.totals.total.amount > 1000 && $cart.totals.total.amount < 2000} <h4 style="font-weight:400; text-align: center; width: 100%; height: 95px; background-color: #aeaeae; padding-top: 20px;"> <span style="color: white;">Brakuje Ci {2000-$cart.totals.total.amount} PLN netto aby otrzymać 13% rabatu na całe zamówienie </span> </h4> {elseif $cart.totals.total.amount > 2000} {/if} Thanks in advance for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now