/** * Returns substitution strings * * @see cbpaidSomething::substitutionStrings() * * @param boolean $html HTML or TEXT return * @param boolean $runContentPluginsIfAllowedByPlan DEFAULT: TRUE * @return array */ public function substitutionStrings($html, $runContentPluginsIfAllowedByPlan = true) { $strings = parent::substitutionStrings($html, $runContentPluginsIfAllowedByPlan); $plan = $this->getPlan(); // For donations, [PLAN_PRICE] is the amount just donated, as it's user-selectable: $strings['PLAN_PRICE'] = cbpaidMoney::getInstance()->renderPrice($this->amount, $this->currency, $html, false); $strings['PLAN_RATE'] = sprintf('%.2f', cbpaidApp::getCurrenciesConverter()->convertCurrency($this->currency, $plan->currency(), $this->amount)); $strings['PLAN_FIRST_RATE'] = $strings['PLAN_RATE']; return $strings; }
/** * Constructor * * @param CBdatabase $db A database connector object */ public function __construct( &$db = null ) { parent::__construct( '#__cbsubs_merchandises', 'id', $db ); }