Dashboard Date Ranges

Hi All,

We recently updated to v4.3.6 and now in the dashboard display we don't have 'this week' as a date range in the drop down options, only today, yesterday, this month, last month, this year and last year.

Is there a simple way to add 'this week' as one of the date range options?

Many thanks


Probably more complicated than you would like... It uses a mimified JS script in js/lib/daterangepicker/moment.js. This is where the date calculations occur for startOf('year'), endOf('year'), etc. If there is support for 'week' in there somewhere then you'd just have to add a lne to design/backend/templates/common/daterange_picker.tpl to get a 'this_week' selection I.e.

this_week : '{__("this_week")|escape:"javascript"}',

You can probably get the un-mimified code base off of github which you could then either modify or verify that support for 'week' exists.

But do note, that more than likely, every future upgrade will overwrite your changes.

Also note that lots of the js code in cs-cart is open source (I.e. 3rd party). It's not well documented nor commented and decyphering it can be a very time consuming activity. And cs is very reluctant to make adjustments to open source libraries.