Добрый день, валюта и цена на сайте заключены в один тег и стиль у них одинаковый http://joxi.ru/p2776OKS0xEYX2 Смотрится не очень, прямо скажем. Подскажите, пожалуйста, как можно сделать отдельный стиль для отображения наименования валюты?
тема · 2 446 просмотров · 8 ответов
Как прописать отдельные стили для отображения валюты?
Дизайн, оформление и шаблоны
В файле system/library/currency.php
Найти:
Заменить на
Потом назначить стили для класса "currency"
Найти:
php
public function format($number, $currency = '', $value = '', $format = true) {
if ($currency && $this->has($currency)) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = $this->currencies[$currency]['symbol_right'];
$decimal_place = $this->currencies[$currency]['decimal_place'];
} else {
$symbol_left = $this->currencies[$this->code]['symbol_left'];
$symbol_right = $this->currencies[$this->code]['symbol_right'];
$decimal_place = $this->currencies[$this->code]['decimal_place'];
$currency = $this->code;
}Заменить на
php
public function format($number, $currency = '', $value = '', $format = true) {
if ($currency && $this->has($currency)) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = '<span class="currency">'.$this->currencies[$currency]['symbol_right'].'</span>';
$decimal_place = $this->currencies[$currency]['decimal_place'];
} else {
$symbol_left = $this->currencies[$this->code]['symbol_left'];
$symbol_right = '<span class="currency">'.$this->currencies[$this->code]['symbol_right'].'</span>';
$decimal_place = $this->currencies[$this->code]['decimal_place'];
$currency = $this->code;
}Потом назначить стили для класса "currency"
RoS написал(а): ↑В файле system/library/currency.php
Найти:phppublic function format($number, $currency = '', $value = '', $format = true) {
if ($currency && $this->has($currency)) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = $this->currencies[$currency]['symbol_right'];
$decimal_place = $this->currencies[$currency]['decimal_place'];
} else {
$symbol_left = $this->currencies[$this->code]['symbol_left'];
$symbol_right = $this->currencies[$this->code]['symbol_right'];
$decimal_place = $this->currencies[$this->code]['decimal_place'];
$currency = $this->code;
}
Заменить наphppublic function format($number, $currency = '', $value = '', $format = true) {
if ($currency && $this->has($currency)) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = '<span class="currency">'.$this->currencies[$currency]['symbol_right'].'</span>';
$decimal_place = $this->currencies[$currency]['decimal_place'];
} else {
$symbol_left = $this->currencies[$this->code]['symbol_left'];
$symbol_right = '<span class="currency">'.$this->currencies[$this->code]['symbol_right'].'</span>';
$decimal_place = $this->currencies[$this->code]['decimal_place'];
$currency = $this->code;
}
Потом назначить стили для класса "currency"
Спасибо. Все получилось!
RoS написал(а): ↑В файле system/library/currency.php
Найти:phppublic function format($number, $currency = '', $value = '', $format = true) {
if ($currency && $this->has($currency)) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = $this->currencies[$currency]['symbol_right'];
$decimal_place = $this->currencies[$currency]['decimal_place'];
} else {
$symbol_left = $this->currencies[$this->code]['symbol_left'];
$symbol_right = $this->currencies[$this->code]['symbol_right'];
$decimal_place = $this->currencies[$this->code]['decimal_place'];
$currency = $this->code;
}
Заменить наphppublic function format($number, $currency = '', $value = '', $format = true) {
if ($currency && $this->has($currency)) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = '<span class="currency">'.$this->currencies[$currency]['symbol_right'].'</span>';
$decimal_place = $this->currencies[$currency]['decimal_place'];
} else {
$symbol_left = $this->currencies[$this->code]['symbol_left'];
$symbol_right = '<span class="currency">'.$this->currencies[$this->code]['symbol_right'].'</span>';
$decimal_place = $this->currencies[$this->code]['decimal_place'];
$currency = $this->code;
}
Потом назначить стили для класса "currency"
Но теперь заказ приходит в таком виде
Товары:
1x amet dolor sit (Product 5) 100<span class="currency"> руб. </span>
Заказ итого:
Сумма: 100<span class="currency"> руб. </span>
Для заказов до 10000 р.: 490<span class="currency"> руб. </span>
Итого: 590<span class="currency"> руб. </span>
у вас проблема не в отдельном стили, а в шрифте на сайте который не поддерживает кириллицу. Поменяйте шрифт на другой, например Verdana и увидите как все теперь стало ровно.
Поменяла формат письма о заказе админу. Так что, думаю, вопрос закрыт. Все везде выглядит нормально)
Чтобы ответить, войдите или зарегистрируйтесь.