It doesn’t happen often, but sometimes I need to wipe all products from a magento database during development. Either an import was written slightly off, or it was just full of test data and it’s cleaner to wipe the products instead of deleting them through the admin. A simple script for this found in a Full Article…
Search the Wiki
Change Timezone in CentOS
You just got your new CentOS dedicated server, and you notice that times in your logs aren’t quite right. You check the time from the command line (run date), and find that the timezone is set to US Eastern or some other timezone. How do you get this changed? Unfortunately, this is not an easy thing Full Article…
Magento PHP 5.4 PDF invoice Zend error
Magento PHP 5.4 PDF invoice Zend error Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in /var/www/vhosts/website/httpdocs/includes/src/Zend_Pdf_FileParserDataSource_File.php on line 41 This an incompatibility issue between PHP Version 5.4.4 and zend Framwork . Fixed it by change in this function lib/Zend/Pdf/FileParserDataSource.php. change abstract public function __construct(); to abstract public function __construct($filePath);
Fixing 500 OOPS: vsftpd: refusing to run with writable root inside chroot ()
Fixing 500 OOPS: vsftpd: refusing to run with writable root inside chroot () Running the following command in command line mode can fix this error: chmod a-w /home/user
Configure max_execution_time in PHP-FPM using Nginx
here are some times when you will need to increase PHP script execution time with Nginx (often lower times can cause a 504 gateway timeout error). In order to configure/increase max_execution_time variable from PHP-FPM using Nginx, you should follow this steps: Edit php.ini, in CentOS it is locatd at pico -w /etc/php.ini Then set: max_execution_time = Full Article…
Setup cronjob for Magento’s server
Here is some popular command when you set a cronjob up for Magento by SSH. 1. Setup cronjob run every 5 minutes: */5 * * * * wget -O /dev/null -q http://www.example.com/cron.php > /dev/null or */5 * * * * /bin/sh /[magento_path]/cron.sh 2. Setup running reindex data every 60 minutes: */60 * * Full Article…
Download Magento extensions directly
Download Magento extensions directly http://freegento.com/ddl-magento-extension.php
Get related product in same category not use Target Rule Extension
<?php $categoryIds = Mage::registry('product')->getCategoryIds(); ?> <div class="block block-related"> <div class="block-title"> <h2><?php echo $this->__('Related Products') ?></h2> </div> <div class="block-content"> <p class="block-subtitle"><?php echo $this->__('Check items to add to the cart or') ?> <a href="#" onclick="selectAllRelated(this); return false;"><?php Full Article…
MySQL Import File / Database Command
The mysqldump command line client is a backup program and it can be used to dump a database (backup database) or a collection of databases for backup or transfer to another SQL server. The dump typically contains SQL statements to create the table, populate it, or both. A common use of mysqldump is for making Full Article…
Fix keo 502 : nginx big header response (Ex. jooix checkout & register)
Thêm vào file magento.conf # 16-sept-2012 parametros para evitar el 502 fastcgi_temp_file_write_size 10m; fastcgi_busy_buffers_size 512k; fastcgi_buffer_size 512k; fastcgi_buffers 16 512k; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_intercept_errors on; fastcgi_next_upstream error invalid_header timeout http_500;