Symfony, Doctrine – Manage user timezone

By default when you use entity field DateTimeType the date is saved in default timezone configured in your php configuration. Sometimes we need to show and manage dates from database in different timezones.

Using code placed below, date in the database will be saved in UTC +00:00 and during every insert/update data, dates will be converted into this timezone. Every time when you will load data from database, dates will be converted into user defined timezone.

How to do this:

Continue reading Symfony, Doctrine – Manage user timezone

[Prestashop] Display newest products in ‘New products’ block

Module ‘blocknewproducts’ shows new products by the selected number of days from the addition.

With my modification, the module will display products sorted by date added, despite the time that has passed since the product was added to our store.

Continue reading [Prestashop] Display newest products in ‘New products’ block

[PrestaShop][1.6] Edit the topics of e-mail with informations about order

Target: Edit the topics of e-mail with informations about order in PrestaShop 1.6
File: /classes/order/OrderHistory.php
Class: OrderHistory
Method: addWithemail()
Variable: $topic
Info: This variable contains topic of the e-mail.
Example: Continue reading [PrestaShop][1.6] Edit the topics of e-mail with informations about order