Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Русский календарь (выбор даты)


CaptainPower
 Share

Recommended Posts

Столкнулся с проблемкой в моем осStore 1.5.2.1 датапикер календарь который не переведен- сунулся переводить. А там много фалов затронуто. Может есть у кого переведенный уже?

Link to comment
Share on other sites

catalog/view/javascript/jquery/ui/i18n/jquery.ui.datepicker-ru.js

подключить в контроллере например в header.php примерно так

   if ( isset($this->session->data['language']) ) {
      if (file_exists(DIR_APPLICATION . 'view/javascript/jquery/ui/i18n/jquery.ui.datepicker-'. $this->session->data['language'] . '.js')) {
            $this->document->addScript('view/javascript/jquery/ui/i18n/jquery.ui.datepicker-'. $this->session->data['language'] . '.js');
      }
   }
  • +1 2
Link to comment
Share on other sites

  • 1 month later...

Столкнулся с проблемкой в моем осStore 1.5.2.1 датапикер календарь который не переведен- сунулся переводить. А там много фалов затронуто. Может есть у кого переведенный уже?

По идее много файлов не нужно менять .Достаточно в одном . Локализации уже есть и находятся в папке jquery/ui/i18n. В файле .tpl , где используется датапикер вписать код :

<script type="text/javascript" src="admin/view/javascript/jquery/ui/i18n/jquery-ui-i18n.js"></script> <!-- подключаем локализацию datepicker --> ( это решение для 1.4.9.х. У вас путь наверное будет другой )

<script type="text/javascript"><!--

$.datepicker.setDefaults(

$.extend($.datepicker.regional["ru"])

);

//--></script>

Link to comment
Share on other sites

админка - просмотр заказов по дате - файл admin/veiw/template/sale/oredr_list.tpl

После

<?php echo $header; ?>

вставляем

<script type="text/javascript" src="view/javascript/jquery/ui/i18n/jquery-ui-i18n.js"></script>

****************Затем находим ****************

<script type="text/javascript"><!--

$(document).ready(function() {

$('.date').datepicker({dateFormat: 'yy-mm-dd'});

});

//--></script>

*********************** и меняем на ********************

<script type="text/javascript"><!--

$(document).ready(function() {

$.datepicker.setDefaults(

$.extend($.datepicker.regional["ru"])

);

$('.date').datepicker({dateFormat: 'yy-mm-dd'});

});

//--></script>

К остальным файлам по аналогии.

Link to comment
Share on other sites

С админкой все без проблем а вот при выборе даты в товаре - не идет.

Файл product.tpl меняю, там скрипт дата и время

<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script>

<script type="text/javascript"><!--

if ($.browser.msie && $.browser.version == 6) {

$('.date, .datetime, .time').bgIframe();

}

$('.date').datepicker({dateFormat: 'yy-mm-dd'});

$('.datetime').datetimepicker({

dateFormat: 'yy-mm-dd',

timeFormat: 'h:m'

});

$('.time').timepicker({timeFormat: 'h:m'});

//--></script>

убирал его полностью, ставил вместо него скрипт даты как в примере - все равно на английском. Подскажите, пожалуйста, в чем может быть проблема и как ее победить?

Link to comment
Share on other sites


<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script>

**************** Добавить ************ <script type="text/javascript" src="catalog/view/javascript/jquery/ui/i18n/jquery-ui-i18n.js"></script>

<script type="text/javascript"><!--

if ($.browser.msie && $.browser.version == 6) {

$('.date, .datetime, .time').bgIframe();

}

**************** Добавить ************

$.datepicker.setDefaults(

$.extend($.datepicker.regional["ru"])

);

**************** Добавить ************

$('.date').datepicker({dateFormat: 'yy-mm-dd'});

$('.datetime').datetimepicker({

dateFormat: 'yy-mm-dd',

timeFormat: 'h:m'

});

$('.time').timepicker({timeFormat: 'h:m'});

//--></script>

По идее так .

Link to comment
Share on other sites

На локалхосте, не показать. Если только на примере демо - http://1531.ocmaster.ru/index.php?route=product/product&product_id=42 . Может выковырять вообще скрипт времени (он не нужен), чтоб оставить только скрипт даты, только как?

Помогите, пожалуйста, в какую сторону копать

Link to comment
Share on other sites


Чтоб заработала попробуйте в /product/product.tpl

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>

<script type="text/javascript" src="catalog/view/javascript/jquery/ui/i18n/jquery.ui.datepicker-ru.js"></script> ---- добавить

<div id="content"><?php echo $content_top; ?>

В скрипт добавлять ничего не надо. ( <script type="text/javascript"><!--

if ($.browser.msie && $.browser.version == 6) { )

Link to comment
Share on other sites

catalog/view/javascript/jquery/ui/i18n/jquery.ui.datepicker-ru.js

подключить в контроллере например в header.php примерно так

   if ( isset($this->session->data['language']) ) {
	  if (file_exists(DIR_APPLICATION . 'view/javascript/jquery/ui/i18n/jquery.ui.datepicker-'. $this->session->data['language'] . '.js')) {
			$this->document->addScript('view/javascript/jquery/ui/i18n/jquery.ui.datepicker-'. $this->session->data['language'] . '.js');
	  }
   }

Таки работает . Спасибо costas. Только нужно путь изменить .

if ( isset($this->session->data['language']) ) {

if (file_exists(DIR_APPLICATION . 'view/javascript/jquery/ui/i18n/jquery.ui.datepicker-'. $this->session->data['language'] . '.js')) {

$this->document->addScript('catalog/view/javascript/jquery/ui/i18n/jquery.ui.datepicker-'. $this->session->data['language'] . '.js');

}

Link to comment
Share on other sites

  • 11 months later...

Добрый день , как подключить этот стандартный календарь ? поиск по гуглу ничего не дал (

В админку в /admin/controller/common/header.php так: https://opencartforum.com/topic/10478-russkii-kalendar-vybor-daty/?do=findComment&comment=68158

На 1.5.3.1 у меня работает.

Link to comment
Share on other sites


  • 2 weeks later...
  • 4 months later...

а никто не заморачивался переводом даты SetDate например +3d ? что то не могу кусок ответственный за это найти ((( у кого нить мысли есть?

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.