Hello,
It is my first post so please forgive me if this question is trivial...
I use OpenCart 2.1.0.2 hosted on Siteground
In Poland we have standard calendars with Sunday as last day of week instead of first. But in my OC shop (even i have set it to polish) my calendar has Sunday as first day of week and it is in english (not translated). I cant find any texts in language directory files to make a translation. But more important issue is with days of week. How can i change week format to make Monday first day and Sunday 7th?
Regards
Przemek
It is my first post so please forgive me if this question is trivial...
I use OpenCart 2.1.0.2 hosted on Siteground
In Poland we have standard calendars with Sunday as last day of week instead of first. But in my OC shop (even i have set it to polish) my calendar has Sunday as first day of week and it is in english (not translated). I cant find any texts in language directory files to make a translation. But more important issue is with days of week. How can i change week format to make Monday first day and Sunday 7th?
Regards
Przemek
Thank you, but this is post about different datapicker - by eternicode.
I have installation of Opencart 2.1.0.2 where is datapicker eonasdan version 3.1.3
https://github.com/Eonasdan/bootstrap-datetimepicker
It doesnt support weekStart option.
It seems i can use code like this:
But i have no idea where I have to add this option - there are many file where .datetimepicker({ exists.
I tried also to change moment.js file and set there:
but id doesnt work too.
Also here is discussion that with this datpicker is very hard or imposible to change week format:
http://stackoverflow.com/questions/2441 ... -at-monday
Is there any chance to switch to another datapicker? And if you be so kind, how can i do it?
I have installation of Opencart 2.1.0.2 where is datapicker eonasdan version 3.1.3
https://github.com/Eonasdan/bootstrap-datetimepicker
It doesnt support weekStart option.
It seems i can use code like this:
Code: Select all
$('#DateTime').datetimepicker({
language: "pl"
});
I tried also to change moment.js file and set there:
Code: Select all
_week : {
dow : 1,
doy : 6
},
Also here is discussion that with this datpicker is very hard or imposible to change week format:
http://stackoverflow.com/questions/2441 ... -at-monday
Is there any chance to switch to another datapicker? And if you be so kind, how can i do it?
well im not sure if this will cause any error, but this do the trick for me. if you want to take the risk simply follow this steps.
admin/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js
search for
change to
catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js
search for
replace with
admin/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js
search for
Code: Select all
if (moment().localeData()._week.dow === 0) {
Code: Select all
if (moment().localeData()._week.dow === 1) {
search for
Code: Select all
0===b().localeData()._week.dow)
Code: Select all
1===b().localeData()._week.dow)
You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
It not exactly what I awant to achieve. Those modifications change daysnames at top of calendar but entire calendar stays as it was before - so daynames dont correspond with proper dates.
I think there is necessity to change language/local of that datapicker. Even when i change week format i still need translated whole calendar.
I think there is necessity to change language/local of that datapicker. Even when i change week format i still need translated whole calendar.
ok, i've found the solution for this after reading their docs file. all you need is pick your locale from https://github.com/moment/moment/tree/develop/locale and save the (.js) file into your "admin/view/javascript/jquery/datetimepicker/" directory. as example my locale file name is "ms-my.js", so..
admin/view/template/common/header.tpl
after
add
please note that you also need to do this for catalog(front end)
admin/view/template/common/header.tpl
after
Code: Select all
<script src="view/javascript/jquery/datetimepicker/moment.js" type="text/javascript">
Code: Select all
<script src="view/javascript/jquery/datetimepicker/ms-my.js" type="text/javascript"></script>
<script type="text/javascript"><!--
moment.locale('ms-my');
//--></script>
You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
Please forgive me but im not sure what i have to do.
I uploaded pl.js file
I cant find
in catalog/view/theme/default/template/common/header.tpl
And in admin - why there are those comments? And should not there be
tag at the end of line after which i have to add rest of your code?
I uploaded pl.js file
I cant find
Code: Select all
<script src="view/javascript/jquery/datetimepicker/moment.js" type="text/javascript">
And in admin - why there are those comments? And should not there be
Code: Select all
</script>
in catalog header.tpl, you can add before "<?php foreach ($analytics as $analytic) { ?>", it isn't showing directly but you still can see them by viewing page source. just make sure that you pointing to the pl.js correctly
You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.
OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE
I dont know what is wrong wuth me... I cant make it working...
I uploaded file pl.js to
/admin/view/javascript/jquery/datetimepicker
and to
/catalog/view/javascript/jquery/datetimepicker
Then as suggested i edited file /admin/view/template/common/header.tpl
After line
i have now
Then i edited file /catalog/view/theme/default/template/common/header.tpl
Before line
I have now
I wonder what for are those comments there. After whole weekend with this im resigned... And it still doesnt work.
I uploaded file pl.js to
/admin/view/javascript/jquery/datetimepicker
and to
/catalog/view/javascript/jquery/datetimepicker
Then as suggested i edited file /admin/view/template/common/header.tpl
After line
Code: Select all
<script type="text/javascript" src="view/javascript/summernote/summernote.js"></script>
Code: Select all
<script src="view/javascript/jquery/datetimepicker/moment.js" type="text/javascript">
<script src="view/javascript/jquery/datetimepicker/pl.js" type="text/javascript"></script>
<script type="text/javascript"><!--moment.locale('pl');//--></script>
</script>
<script src="view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<link href="view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet" media="screen" />
Before line
Code: Select all
<?php foreach ($analytics as $analytic) { ?>
Code: Select all
<script src="view/javascript/jquery/datetimepicker/pl.js" type="text/javascript"></script>
<script type="text/javascript"><!--moment.locale('pl');//--></script>
OK, i tried to rework all modifications again and i have partial success.
In admin/view/template/common/header.tpl i just added:
and in admin it works! - I have polish calendars with monday as first day
Unfortunatelly in front it doesnt work - and i have no idea why...
I added in catalog/view/theme/default/template/common/header.tpl
Line with moment.js is added there earlier bye script in header.tpl.
Looks very similar to admin part - in source links are correct. But it still doesnt work.
In admin/view/template/common/header.tpl i just added:
Code: Select all
<script src="view/javascript/jquery/datetimepicker/moment.js" type="text/javascript"></script>
<script src="view/javascript/jquery/datetimepicker/pl.js" type="text/javascript"></script>
<script>moment.locale('pl');</script>
Unfortunatelly in front it doesnt work - and i have no idea why...
I added in catalog/view/theme/default/template/common/header.tpl
Code: Select all
<script>moment.locale('pl');</script>
Looks very similar to admin part - in source links are correct. But it still doesnt work.
Who is online
Users browsing this forum: No registered users and 16 guests