Closed swfredrik closed 12 years ago
what version are you using?
V3 latest
3 maj 2012 kl. 06:46 skrev brettwejrowskireply@reply.github.com:
what version are you using?
Reply to this email directly or view it on GitHub: https://github.com/wojodesign/simplecart-js/issues/234#issuecomment-5480923
Awesome! You can bind your own custom outputs like this:
// run on .ready() so we make sure simpleCart is ready:
simpleCart.ready(function(){
simpleCart.bindOutlets({
// create selector that goes after the "simpleCart_"
"grandTotal_without_tax": {
callback: function () {
// return currency formatted grand total - tax
return simpleCart.toCurrency( simpleCart.grandTotal() - simpleCart.tax() );
}
}
});
});
actually @swfredrik I just just updated the latest v3 to remove the 'callback' keyword for simplicity, so you would instead use:
simpleCart.ready(function(){
simpleCart.bindOutlets({
// create selector that goes after the "simpleCart_"
"grandTotal_without_tax": function () {
// return currency formatted grand total - tax
return simpleCart.toCurrency( simpleCart.grandTotal() - simpleCart.tax() );
}
});
});
Thanks a bunch!! Really simple and flexible shoppingcart, I really love it :)
I want to show item_price including tax in the simpleCart_shelfItem
Then in my cart I need some new variables like:
simpleCart_total_without_tax simpleCart_grandTotal_without_tax
An example with tax_rate= 0.25: item_price = 1000 simpleCart_tax = 200 simpleCart_grandTotal = 1000