Front-end engineering and so on

12 August 2015

The only one thing is configurable: MAILTO.
Content-Type is text/plain. Charset is taken from current locale.
Email subject is built using commanline configured in /etc/crontab or just hostname (in case of anacron)
If you really need different subjects at least with prefixes "ALERT" or "WARNING" - feel free to send mail through your own way.

24 September 2014

Magento started to support new PayPal feature Bill Me Later in version 1.9
Everything would is good, but Magento enables BML automatically on next re-saving of payment methods settings if you're using Payflow Pro.

I didn't find a way of disabling it in Magento's System Configuration admin without disabling Payflow Pro completely. But, as usual there is another way :-) you can change it directly in MySQL.

Here how it looks in database in table core_config_data:

Run following query in MySQL console (or phpMyAdmin, MySQL Workbench or whatever you use):

05 April 2014

Magento media folder grows all the time. It collects many unused files, such as abandoned product images.
I've found that we already reached 100GB of product images on one from our Magento projects and decided to
clean
it.

I looked for magento extensions capable to search for unused / abandoned product images and delete them. For
instance,
following extension works great, but it fails on catalog with more than 100k products: Magento Connect -
Image
Clean
It died in close to infinite loop of 500k files info scanning. After that, it would try to put all it to DB and
only
then render some user interface, which had to allow me to run cleaup procedure. I was limited in time, couldn't wait 10 hours for result and wrote
own script, which is 1000% more efficient and works on any magento installation. In theory it should support all magento
versions starting from CE 1.5

Idea is very simple:

Dump all product image files from database:SELECT `value` FROM catalog_product_entity_media_gallery;

You'll need to change values of constants at start of script and it's ready to be used. I also added different
validations and count-back to be able to cancel dangerous operation at last minute. The script was successfully
used on production environment. It removed more than 140k images; it resulted in freeing 45GB of disk space.

I've tried to improve script by adding different checks like existance of process, separated configuration with list of log files to be listened and white-listed IPs as it's usually done in init scripts in CentOS/RHEL.

The issue is reproducible for HTTP and HTTPS, for local and remote websites. Also you can download the WSDL file and provide it to SoapClient as a string and in this case it works. Something wrong in getting WSDL via HTTP(S).

The issue is linked to DNS stack; code starts to work if you replace DNS name by IP address
(worked for me), but that obviously won't work for name based virtual hosts

There is also information that issue appears for chunked encoding of HTTP response. SoapClient can't deal with it. However there is working workaround (I didn't test) by using HTTP 1.0 via stream contexts (code is given in comments of bug page linked above)