Tag: delete

Handling cookies in Magento with JavaScript

In order to handle cookies in Magento refer to /js/mage/cookies.js. The functions for getting, settings and clearing cookies are: Mage.Cookies.set Mage.Cookies.get Mage.Cookies.clear Below you find the corresponding JavaScript functions from cookies.js: Generic cookie clear function In case you are searching for a simple, generic function to clear (Magento) session cookies you might want to use […]

Delete/copy directories recursively using PHP

As there currently does not exist a PHP function that allows developers to delete or copy entire (non-empty) directories at once one has to recursively loop through them to manually delete/copy their contents. This post provides you with two easy to use functions for deleting entire (non-empty) directories copying entire (non-empty) directories First, let’s start […]