I need to add a tracking script to the success page and that script requires a gran total in cents, so $15.94 should be 1594

How can I get the order grand total in cents?


We can use this:

$cents = $_order->getGrandTotal() * 100;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.