Archive for Prestashop tutorials – webmasters

Prestashop cache – when modification do not see

Some people face problems when they try to update or modify their Prestashops. They update files, install modules, but these actions are not visible in Prestashop. This problem often occurs in new Prestashop version – 1.4, because Prestashop 1.4 uses new cache system, now caching with “Smarty” and “Memcached”. Some information about what is cache: http://en.wikipedia.org/wiki/Cache#Web_cache When you modify your Prestashop, you can disable...

How gets user information using “Prestashop” tools?

We need get global cookie variable: global $cookie; To check if user is logged in: refer to the cookie ”isLogged()”method [php] global $cookie; if(!$cookie->isLogged()) { echo 'Please login'; } else { echo 'Everything good'; } [/php] Get user’s id: $cookie->id_customer Get user’s first name: $cookie->customer_firstname Get user’s surname: $cookie->customer_lastname Get user’s email address: $cookie->email Get a language id: $cookie->id_lang Full sample: [php] global $cookie; if(!$cookie->isLogged()) { echo 'Please login'; exit; } else { echo 'Hi, ' . $cookie->customer_firstname. ' ' .$cookie->customer_lastname . '<br/>'; echo 'We contact to you: '....

How to create a new template in Prestashop?

Follow these simple steps: Go to the Prestashop catalog: “themes”, Copy default Prestashop theme: “prestashop” (or any other if you want), Rename new folder (no spaces nor special chars), Go to Prestashop admin panel and click on the “Preferences” tab and then the “Appearance” tab, Scroll down and change to your new theme. ...