I am editing /template/checkout/confirm.twig in my theme and need to output the checkout total (subtotal, shipping, taxes) as a numerical value only in a new element for some custom conversion tracking.
If i use {{total.text}} it outputs the value + currency. I have attempted to edit /controller/checkout/confirm.php to make the number itself available but I'm afraid I've just been making mistakes and get a server error.
I've been totally fine pulling {{ product.product_id }} and other variables. It's just the checkout totals numerical value that escapes me.
Is there an easy twig reference for this or does anyone have some code I can add to the controller to construct one which works?
Thank you humans
You could simply strip the currency symbol from the text value with PHP, but somebody decided to use TWIG, so... Short version: every total returns already formatted value, so you need to edit controller, not template file.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com