LiteCommerce code HowTos
beatnbite edited this page May 7, 2012
·
1 revision
To alter the fields you are to "decorate" getBillingRequiredFields() and getShippingRequiredFields() methods of \XLite\Model\Address class from your module.
You are to create a LiteCommerce module with "substitutional" skin that replaces the skins/default/en/order/invoice/parts/head.logo.tpl file with your one.
You are to "decorate" formatPrice() method of \XLite\View\AView class. Here is an example:
public function formatPrice($value, \XLite\Model\Currency $currency = null)
{
if (!isset($currency)) {
$currency = \XLite::getInstance()->getCurrency();
}
$symbol = $currency->getSymbol() ?: (strtoupper($currency->getCode()) . ' ');
$sign = 0 <= $value ? '' : '− ';
return $sign . $currency->formatValue(abs($value)) . ' ' . $symbol;
}