Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

[РЕШЕНО] Знак рубля - поиск решения


Recommended Posts

Может ли кто-то внятно обяснить, как проделать подобный опыт: http://joomla-support.ru/thread35741.html, только для opencart, используя данное решение http://love-media.net/starhome/docs#ruble .

post-19215-0-33469900-1334937014_thumb.png

Надіслати
Поділитися на інших сайтах


Качаем шрифты.

В админке в поле описание валюты ставим "а"

Заливаем шрифты на сервер, куда будет удобно (я обычно в напке шаблона создаю папку font и заливаю туда).

Открываем файл стилей

добавляем:

@font-face {
       font-family: 'ALSRublRegular';
       src: url('../font/rouble.eot');
       src: local('ALS Rubl'), local('ALSRubl'), url('../font/rouble.woff') format('woff'), url('../font/rouble.ttf') format('truetype'),   url('../font/rouble.svg#ALSRubl') format('svg');
}
Затем для блока в котором выводятся цены добавляем

font-family: 'ALSRublRegular', sans-serif;
  • +1 2
Надіслати
Поділитися на інших сайтах


Не получается, всякая бяка вылезает, а того что хочется тютю :wacko:

Попробуйте сделать, как описано здесь. В данном случае в базу вставляйте
<span class="price">999 ⃏</span>
, увеличив размер поля до длины этой строки.
  • +1 1
Надіслати
Поділитися на інших сайтах


Попробуйте сделать, как описано здесь. В данном случае в базу вставляйте

<span class="price">999 ⃏</span>
, увеличив размер поля до длины этой строки.
Получился, вариант но все равно криво и через ..опу. Метод отпадает.

Друзья, у кото-то получился рабочий метод? Нужно сконцентрировать мануал. ;)

ОЧЕНЬ ПРОСИМ РАБОЧИЙ МЕТОД.
  • +1 1
Надіслати
Поділитися на інших сайтах


Всем еще раз доброго времени суток.

Вот вроде хороший метод с увеличением строчки в бд

<del><span style="font-family: Arial;">P</span></del>

Но есть проблема она на прикрепленном скрине.

Добавляется еще одна бяка и убрать ее не получается.

post-19093-0-93514900-1335294080_thumb.jpg

  • +1 1
Надіслати
Поділитися на інших сайтах


Всем еще раз доброго времени суток.

Вот вроде хороший метод с увеличением строчки в бд

<del><span style="font-family: Arial;">P</span></del>

Но есть проблема она на прикрепленном скрине.

Добавляется еще одна бяка и убрать ее не получается.

Что это? Покажите код? Разберемся что исправлять.
  • +1 1
Надіслати
Поділитися на інших сайтах


Что это? Покажите код? Разберемся что исправлять.

В БД добавляю <del><span style="font-family: Arial;">P</span></del>

Получается

post-19093-0-93514900-1335294080_thumb.jpg

И где оно находится, найти не могу. Но когда вместо <del><span style="font-family: Arial;">P</span></del> пишу в бд просто Руб. все становится отлично.

Видимо где-то косяк.

  • +1 1
Надіслати
Поділитися на інших сайтах


В БД добавляю <del><span style="font-family: Arial;">P</span></del>

Получается

И где оно находится, найти не могу. Но когда вместо <del><span style="font-family: Arial;">P</span></del> пишу в бд просто Руб. все становится отлично.

Видимо где-то косяк.

Покажите код страницы, где показываются две стрелочки, на которые вы жалуетесь. Что вы добавляете в базу я уже понял по предыдущему вашему сообщению.
  • +1 1
Надіслати
Поділитися на інших сайтах


Покажите код страницы, где показываются две стрелочки, на которые вы жалуетесь. Что вы добавляете в базу я уже понял по предыдущему вашему сообщению.

Файл header.tpl
<div id="cart"><div class="heading"><h4><?php echo $text_cart; ?></h4><a><span id="cart_total"><?php echo $text_items; ?></span></a></div><div class="content"></div></div>
Файл stylesheet.css
#header #cart .heading a span {background: #FFFFFF url('../image/arrow-down.png') 100% 50% no-repeat;padding-right: 15px;}
Файл cart.php 

<?phpclass ControllerCheckoutCart extends Controller {public function index() {$this->language->load('checkout/cart');if ($this->request->server['REQUEST_METHOD'] == 'POST') {if (isset($this->request->post['quantity'])) {if (!is_array($this->request->post['quantity'])) {if (isset($this->request->post['option'])) {$option = $this->request->post['option'];} else {$option = array();}$this->cart->add($this->request->post['product_id'], $this->request->post['quantity'], $option);} else {foreach ($this->request->post['quantity'] as $key => $value) {$this->cart->update($key, $value);}}}if (isset($this->request->post['remove'])) {foreach ($this->request->post['remove'] as $key) {$this->cart->remove($key);}}if (isset($this->request->post['voucher']) && $this->request->post['voucher']) {foreach ($this->request->post['voucher'] as $key) {if (isset($this->session->data['vouchers'][$key])) {unset($this->session->data['vouchers'][$key]);}}}if (isset($this->request->post['redirect'])) {$this->session->data['redirect'] = $this->request->post['redirect'];}if (isset($this->request->post['quantity']) || isset($this->request->post['remove']) || isset($this->request->post['voucher'])) {unset($this->session->data['shipping_methods']);unset($this->session->data['shipping_method']);unset($this->session->data['payment_methods']);unset($this->session->data['payment_method']);unset($this->session->data['reward']);$this->redirect($this->url->link('checkout/cart'));}}$this->document->setTitle($this->language->get('heading_title'));$this->data['breadcrumbs'] = array();$this->data['breadcrumbs'][] = array('href' => $this->url->link('common/home'),'text' => $this->language->get('text_home'),'separator' => false);$this->data['breadcrumbs'][] = array('href' => $this->url->link('checkout/cart'),'text' => $this->language->get('heading_title'),'separator' => $this->language->get('text_separator'));if ($this->cart->hasProducts() || (isset($this->session->data['vouchers']) && $this->session->data['vouchers'])) {$this->data['heading_title'] = $this->language->get('heading_title');$this->data['text_select'] = $this->language->get('text_select');$this->data['text_weight'] = $this->language->get('text_weight');$this->data['column_remove'] = $this->language->get('column_remove');$this->data['column_image'] = $this->language->get('column_image');$this->data['column_name'] = $this->language->get('column_name');$this->data['column_model'] = $this->language->get('column_model');$this->data['column_quantity'] = $this->language->get('column_quantity');$this->data['column_price'] = $this->language->get('column_price');$this->data['column_total'] = $this->language->get('column_total');$this->data['button_update'] = $this->language->get('button_update');$this->data['button_shopping'] = $this->language->get('button_shopping');$this->data['button_checkout'] = $this->language->get('button_checkout');if ($this->config->get('config_customer_price') && !$this->customer->isLogged()) {$this->data['attention'] = sprintf($this->language->get('text_login'), $this->url->link('account/login'), $this->url->link('account/register'));} else {$this->data['attention'] = '';}if (!$this->cart->hasStock() && (!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning'))) {$this->data['error_warning'] = $this->language->get('error_stock');} elseif (isset($this->session->data['error'])) {$this->data['error_warning'] = $this->session->data['error'];unset($this->session->data['error']);} else {$this->data['error_warning'] = '';}if (isset($this->session->data['success'])) {$this->data['success'] = $this->session->data['success'];unset($this->session->data['success']);} else {$this->data['success'] = '';}$this->data['action'] = $this->url->link('checkout/cart');if ($this->config->get('config_cart_weight')) {$this->data['weight'] = $this->weight->format($this->cart->getWeight(), $this->config->get('config_weight_class_id'), $this->language->get('decimal_point'), $this->language->get('thousand_point'));} else {$this->data['weight'] = false;}$this->load->model('tool/image');$this->data['products'] = array();$products = $this->cart->getProducts();foreach ($products as $product) {$product_total = 0;foreach ($products as $product_2) {if ($product_2['product_id'] == $product['product_id']) {$product_total += $product_2['quantity'];}}if ($product['minimum'] > $product_total) {$this->data['error_warning'] = sprintf($this->language->get('error_minimum'), $product['name'], $product['minimum']);}if ($product['image']) {$image = $this->model_tool_image->resize($product['image'], $this->config->get('config_image_cart_width'), $this->config->get('config_image_cart_height'));} else {$image = '';}$option_data = array();foreach ($product['option'] as $option) {if ($option['type'] != 'file') {$option_data[] = array('name' => $option['name'],'value' => utf8_truncate($option['option_value']));} else {$this->load->library('encryption');$encryption = new Encryption($this->config->get('config_encryption'));$file = substr($encryption->decrypt($option['option_value']), 0, strrpos($encryption->decrypt($option['option_value']), '.'));$option_data[] = array('name' => $option['name'],'value' => utf8_truncate($file));}}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$total = $this->currency->format($this->tax->calculate($product['total'], $product['tax_class_id'], $this->config->get('config_tax')));} else {$total = false;}$this->data['products'][] = array('key' => $product['key'],'thumb' => $image,'name' => $product['name'],'model' => $product['model'],'option' => $option_data,'quantity' => $product['quantity'],'stock' => $product['stock'],'reward' => ($product['reward'] ? sprintf($this->language->get('text_reward'), $product['reward']) : ''),'price' => $price,'total' => $total,'href' => $this->url->link('product/product', 'product_id=' . $product['product_id']));}// Gift Voucher$this->data['vouchers'] = array();if (isset($this->session->data['vouchers']) && $this->session->data['vouchers']) {foreach ($this->session->data['vouchers'] as $key => $voucher) {$this->data['vouchers'][] = array('key' => $key,'description' => $voucher['description'],'amount' => $this->currency->format($voucher['amount']));}}$total_data = array();$total = 0;$taxes = $this->cart->getTaxes();if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->load->model('setting/extension');$sort_order = array();$results = $this->model_setting_extension->getExtensions('total');foreach ($results as $key => $value) {$sort_order[$key] = $this->config->get($value['code'] . '_sort_order');}array_multisort($sort_order, SORT_ASC, $results);foreach ($results as $result) {if ($this->config->get($result['code'] . '_status')) {$this->load->model('total/' . $result['code']);$this->{'model_total_' . $result['code']}->getTotal($total_data, $total, $taxes);}}$sort_order = array();foreach ($total_data as $key => $value) {$sort_order[$key] = $value['sort_order'];}array_multisort($sort_order, SORT_ASC, $total_data);}$this->data['totals'] = $total_data;// Modules$this->data['modules'] = array();if (isset($results)) {foreach ($results as $result) {if ($this->config->get($result['code'] . '_status') && file_exists(DIR_APPLICATION . 'controller/total/' . $result['code'] . '.php')) {$this->data['modules'][] = $this->getChild('total/' . $result['code']);}}}if (isset($this->session->data['redirect'])) {$this->data['continue'] = $this->session->data['redirect'];unset($this->session->data['redirect']);} else {$this->data['continue'] = $this->url->link('common/home');}$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/cart.tpl')) {$this->template = $this->config->get('config_template') . '/template/checkout/cart.tpl';} else {$this->template = 'default/template/checkout/cart.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());} else {$this->data['heading_title'] = $this->language->get('heading_title');$this->data['text_error'] = $this->language->get('text_empty');$this->data['button_continue'] = $this->language->get('button_continue');$this->data['continue'] = $this->url->link('common/home');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';} else {$this->template = 'default/template/error/not_found.tpl';}$this->children = array('common/column_left','common/column_right','common/content_top','common/content_bottom','common/footer','common/header');$this->response->setOutput($this->render());}}public function update() {$this->language->load('checkout/cart');$json = array();if (isset($this->request->post['product_id'])) {$this->load->model('catalog/product');$product_info = $this->model_catalog_product->getProduct($this->request->post['product_id']);if ($product_info) {if (isset($this->request->post['quantity'])) {$quantity = $this->request->post['quantity'];} else {$quantity = 1;}$product_total = 0;$products = $this->cart->getProducts();foreach ($products as $product_2) {if ($product_2['product_id'] == $this->request->post['product_id']) {$product_total += $product_2['quantity'];}}if ($product_info['minimum'] > ($product_total + $quantity)) {$json['error']['warning'] = sprintf($this->language->get('error_minimum'), $product_info['name'], $product_info['minimum']);}if (isset($this->request->post['option'])) {$option = array_filter($this->request->post['option']);} else {$option = array();}$product_options = $this->model_catalog_product->getProductOptions($this->request->post['product_id']);foreach ($product_options as $product_option) {if ($product_option['required'] && (!isset($this->request->post['option'][$product_option['product_option_id']]) || !$this->request->post['option'][$product_option['product_option_id']])) {$json['error'][$product_option['product_option_id']] = sprintf($this->language->get('error_required'), $product_option['name']);}}}if (!isset($json['error'])) {$this->cart->add($this->request->post['product_id'], $quantity, $option);$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'));unset($this->session->data['shipping_methods']);unset($this->session->data['shipping_method']);unset($this->session->data['payment_methods']);unset($this->session->data['payment_method']);} else {$json['redirect'] = str_replace('&', '&', $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']));}}if (isset($this->request->post['remove'])) {$this->cart->remove($this->request->post['remove']);unset($this->session->data['shipping_methods']);unset($this->session->data['shipping_method']);unset($this->session->data['payment_methods']);unset($this->session->data['payment_method']);}if (isset($this->request->post['voucher'])) {if ($this->session->data['vouchers'][$this->request->post['voucher']]) {unset($this->session->data['vouchers'][$this->request->post['voucher']]);}}$this->load->model('tool/image');$this->data['text_empty'] = $this->language->get('text_empty');$this->data['button_checkout'] = $this->language->get('button_checkout');$this->data['button_remove'] = $this->language->get('button_remove');$this->data['products'] = array();foreach ($this->cart->getProducts() as $result) {if ($result['image']) {$image = $this->model_tool_image->resize($result['image'], 40, 40);} else {$image = '';}$option_data = array();foreach ($result['option'] as $option) {if ($option['type'] != 'file') {$option_data[] = array('name' => $option['name'],'value' => utf8_truncate($option['option_value']));} else {$this->load->library('encryption');$encryption = new Encryption($this->config->get('config_encryption'));$file = substr($encryption->decrypt($option['option_value']), 0, strrpos($encryption->decrypt($option['option_value']), '.'));$option_data[] = array('name' => $option['name'],'value' => utf8_truncate($file));}}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$price = false;}if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$total = $this->currency->format($this->tax->calculate($result['total'], $result['tax_class_id'], $this->config->get('config_tax')));} else {$total = false;}$this->data['products'][] = array('key' => $result['key'],'product_id' => $result['product_id'],'thumb' => $image,'name' => $result['name'],'model' => $result['model'],'option' => $option_data,'quantity' => $result['quantity'],'stock' => $result['stock'],'price' => $price,'total' => $total,'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']));}// Gift Voucher$this->data['vouchers'] = array();if (isset($this->session->data['vouchers']) && $this->session->data['vouchers']) {foreach ($this->session->data['vouchers'] as $key => $voucher) {$this->data['vouchers'][] = array('key' => $key,'description' => $voucher['description'],'amount' => $this->currency->format($voucher['amount']));}}// Calculate Totals$total_data = array();$total = 0;$taxes = $this->cart->getTaxes();if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {$this->load->model('setting/extension');$sort_order = array();$results = $this->model_setting_extension->getExtensions('total');foreach ($results as $key => $value) {$sort_order[$key] = $this->config->get($value['code'] . '_sort_order');}array_multisort($sort_order, SORT_ASC, $results);foreach ($results as $result) {if ($this->config->get($result['code'] . '_status')) {$this->load->model('total/' . $result['code']);$this->{'model_total_' . $result['code']}->getTotal($total_data, $total, $taxes);}}$sort_order = array();foreach ($total_data as $key => $value) {$sort_order[$key] = $value['sort_order'];}array_multisort($sort_order, SORT_ASC, $total_data);}$json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));$this->data['totals'] = $total_data;$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/cart.tpl')) {$this->template = $this->config->get('config_template') . '/template/common/cart.tpl';} else {$this->template = 'default/template/common/cart.tpl';}$json['output'] = $this->render();$this->response->setOutput(json_encode($json));}}?>

Змінено користувачем tim21701
используйте тег [SPOILER] для вставки большого кода...
  • +1 1
Надіслати
Поділитися на інших сайтах


Да чёрт побери %) Нажмите правой кнопочкой по второй (лишней) стрелочке, выберите Просмотр кода элемента, скопируйте ближайшие строчки сюда или выложите скриншот.

  • +1 1
Надіслати
Поділитися на інших сайтах


В исходном коде ничего нет.

post-19093-0-52856500-1335386252_thumb.jpg

<body>
<div id="container">
<div id="header">
 
	  <div id="cart">
    <div class="heading">
	  <h4>Корзина</h4>
	  <a><span id="cart_total">0 шт. - 0,00<del><span style="font-family: Arial;">P</span></del></span></a></div>
    <div class="content"></div>
  </div>
И все...
  • +1 1
Надіслати
Поділитися на інших сайтах


  • 2 weeks later...

Есть ли успехи? Комрадэ !!!!! 8-)

В БД добавляю <del><span style="font-family: Arial;">P</span></del>

Получается

И где оно находится, найти не могу. Но когда вместо <del><span style="font-family: Arial;">P</span></del> пишу в бд просто Руб. все становится отлично.

Видимо где-то косяк.

Собственно, успехи пока такие.
Надіслати
Поділитися на інших сайтах


  • 1 year later...

Качаем шрифты.

В админке в поле описание валюты ставим "а"

Заливаем шрифты на сервер, куда будет удобно (я обычно в напке шаблона создаю папку font и заливаю туда).

Открываем файл стилей

добавляем:

 

@font-face {
       font-family: 'ALSRublRegular';
       src: url('../font/rouble.eot');
       src: local('ALS Rubl'), local('ALSRubl'), url('../font/rouble.woff') format('woff'), url('../font/rouble.ttf') format('truetype'),   url('../font/rouble.svg#ALSRubl') format('svg');
}
Затем для блока в котором выводятся цены добавляем

font-family: 'ALSRublRegular', sans-serif;

 

В Хроме так и выдает "а".

Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.