fix #1820 - update smarty to version 3.1.40 (reimplement custom modifications & fixes for modified-shop)