Error on file upload: UPLOAD_ERR_PARTIAL

When I was trying to send a file via the HTML form, I saw “error=3” in the $_FILE variable, what means:
UPLOAD_ERR_PARTIAL – The uploaded file was only partially uploaded.

The php_sapi_name() function returned me ‘apache2filter’.
I removed libapache2-mod-php5filter and installed libapache2-mod-php5.
Now php_sapi_name() returns ‘apache2handler’ and files uploading works good now 🙂

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

Automatic product status and visibility – Prestashop module

Module allows to automatically update product status and visibility  based on stock available with multistore and attribute combinations support included.

  • You will save a lot of time. Products will be automatically turned on and off when manually updating product quantities and sales
  • The module automatically turns on or off newly imported or updated products
  • Multistore support. You can configure the module individually for each store
  • Product attribute combinations support
  • Since version 1.1 you can choose what you want to do:
    • change product visibility (show/hide)
    • change product status (enable/disable)
For More details and download go to:

https://addons.prestashop.com/en/order-management/26968-automatic-product-status-and-visibility.html

 

 

FOSUserBundle with ajax authentication

What is required for json response from server?

/AppBundle/Handler/AuthenticationHandler.php

/AppBundle/Resources/config/services.yml

/app/config/security.yml

How to send login request?

You can use jquery for example:

 

 

 

[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] Module for numeric order references

By default reference code contains only random uppercase letters – like this:
ABCDEFGHI, BCDEFGHIJ, CDEFGHIJK etc.

By my module your new order references will be numeric – like this:
000000001, 000000002, … 000000129 etc.

Just upload my module to your PrestaShop and install it – it’s all 🙂

See on github.com

[PrestaShop] Copy product translations from one lang to others

This entry shows how to easily copy product translations from one lang to others by PHP script.

Make a backup of the database before running this script! Continue reading [PrestaShop] Copy product translations from one lang to others