if ($data->is_price_poa)
echo tt('is_price_poa', 'apartments');
else
echo tt('Price from').': '.$data->getPrettyPrice();
if ($data->is_price_poa)
echo tt('is_price_poa', 'apartments');
else
echo tt('Price from').': '.$data->getPrettyPrice(false) . '/' . $data->setPretty(Currency::convert($data->price, Currency::getCurrentCurrencyModel()->char_code, 'UAH')).' грн';
public function getPrettyPrice(){
if ($this->is_price_poa)
return tt('is_price_poa', 'apartments');
$price = $this->getPriceFrom();
$priceTo = $this->getPriceTo();
if($this->isPriceFromTo()){
$priceFromTo = tc('price_from').' '.$this->setPretty($price).' '.$this->getCurrency();
$priceFromTo .= $priceTo ? ' '.tc('price_to').' '.$this->setPretty($priceTo).' '.$this->getCurrency() : '';
return $priceFromTo;
}
return $this->setPretty($price).' '.$this->getCurrency().' '.self::getPriceName($this->price_type);
}
public function getPrettyPrice($showPriceName = true){
if ($this->is_price_poa)
return tt('is_price_poa', 'apartments');
$price = $this->getPriceFrom();
$priceTo = $this->getPriceTo();
if($this->isPriceFromTo()){
$priceFromTo = tc('price_from').' '.$this->setPretty($price).' '.$this->getCurrency();
$priceFromTo .= $priceTo ? ' '.tc('price_to').' '.$this->setPretty($priceTo).' '.$this->getCurrency() : '';
return $priceFromTo;
}
if (!$showPriceName)
return $this->setPretty($price).' '.$this->getCurrency();
return $this->setPretty($price).' '.$this->getCurrency().' '.self::getPriceName($this->price_type);
}
Вернуться в Вопросы и помощь по изменениям
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 39