Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Loads a blank page and displays something like "This customer's store credit balance is $150.25"
- // If you don't already have the Magecredit Magento extension you can get it at www.magecredit.com
- require_once('app/Mage.php'); //Path to Magento
- umask(0);
- Mage::app();
- // The next line loads the magecredit customer balance model.
- $_balance = Mage::getModel('wf_customerbalance/balance')
- ->setCustomerId(136) // change this to whatever your customer ID is.
- ->loadByCustomer();
- // This line formats the amount using the currently loaded store's currency
- $_amount = Mage::app()->getStore()->formatPrice( $_balance->getAmount() );
- // Example Output: This customer's store credit balance is $150.25
- echo Mage::helper('core')->__('This customer\'s store credit balance is %s', $_amount);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement