Skip to content

Instantly share code, notes, and snippets.

@herveguetin
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herveguetin/11120233 to your computer and use it in GitHub Desktop.
Save herveguetin/11120233 to your computer and use it in GitHub Desktop.
Remove coupon code in parenthesis from discount total title in Magento
<?php
$title = ($this->getTotal()->getCode() == 'discount') ? preg_replace('@\(.*?\)@', '', $this->getTotal()->getTitle()) : $this->getTotal()->getTitle();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment