mattstein / snipcart-craft-plugin

A Craft plugin for browsing Snipcart API information from the Craft control panel.
MIT License
29 stars 5 forks source link

Multi locale date handling, devMode twig error #6

Closed mark-adigital closed 5 years ago

mark-adigital commented 5 years ago

Hi,

I hit a couple of issues using this plugin on a British site. The main issue was around the date search which I realised was due to the different date format not being accepted by strtotime, so I used Craft's createFromString() helper function to create a DateTime object and standardise the format.

The second was just a twig error while trying to view an order in devMode which seemed to be missing a is defined check.

Thanks,

Mark

mattstein commented 5 years ago

Thanks for submitting this, @mark-adigital!