Hello, I would like to achieve the exact same objective as explained in the quoted post, i am running blesta 4.9.1. 6 years after this post was written, the code is changed now to:
/plugins/order/views/templates/wizard/config.pdt - Line 39
// Set the pricing text to include or not include renewal pricing
$prices[$price->id] = ($this->Html->ifSet($price->period) == 'onetime' || ($this->Html->ifSet($price->price) == $this->Html->ifSet($price->price_renews))
? $this->_('Config.index.package_price', true, $period, $this->CurrencyFormat->format($this->Html->ifSet($price->price), $this->Html->ifSet($price->currency)))
: $this->_('Config.index.package_price_recurring', true, $period, $this->CurrencyFormat->format($this->Html->ifSet($price->price), $this->Html->ifSet($price->currency)), $this->CurrencyFormat->format($this->Html->ifSet($price->price_renews), $this->Html->ifSet($price->currency)))
);
I tried to rewrite the code for the current version based on your example above, as below:
$amount = $price->price;
if ($price->period == "month" && $price->term > 0)
$amount = ($price->price/$price->term);
// Set the pricing text to include or not include renewal pricing
$prices[$price->id] = ($this->Html->ifSet($price->period) == 'onetime' || ($this->Html->ifSet($price->price) == $this->Html->ifSet($price->price_renews))
? $this->_('Config.index.package_price', true, $period, $this->CurrencyFormat->format($this->Html->ifSet($amount), $this->Html->ifSet($price->currency)))
: $this->_('Config.index.package_price_recurring', true, $period, $this->CurrencyFormat->format($this->Html->ifSet($amount), $this->Html->ifSet($price->currency)), $this->CurrencyFormat->format($this->Html->ifSet($price->price_renews), $this->Html->ifSet($price->currency)))
);
However its not working, can you please help with the same.
Thanks and Best Regards
Santosh