easy way to create an array and check existing value in smarty template

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. This implies that PHP code is application logic, and is separated from the presentation. very useful in MVC architecture and used by many big cms and frameworks like Prestashop script. so to create an array you can declare it like that

to print

How to change Number of decimals in prestashop 1.7

Prestashop 1.7 come with lot of new features and major change from 1.6 version,this version based on symfony framework one of geat php frameworks. but it come with some bugs too one of these bugs is The decimals feature does not work anymore even if the feature is on the Back Office.price formating not change even you change the number of

How to remove XSS and protect your website

Cross-site scripting (XSS) is a security bug that can affect websites. If present in your website, this bug can allow an attacker to add their own malicious JavaScript code onto the HTML pages displayed to your users. It refers to client-side code injection attack wherein an attacker can execute malicious scripts  into a legitimate website or web application. XSS  is one

Easy method to reset wordpress admin password

an easy way to reset wordpress admin password via FTP follow this steps: 1 – Login to your site via FTP 2 – download your active theme’s functions.php file 3 – Edit the file and add this code to it, after the first <?php:

“1” is the user ID number in the wp_users table, and ‘password’ is your new password