Getting products with or without custom options using SQL (Magento 1)

To get all products that do not have custom options, simply run the following SQL query:

To get all products that do have custom options, remove the “NOT” from the above query.

Solving the “Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct()” error (Magento 1)

Sometimes, when saving an invoice for an order, the following error might come up: 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 To solve that problem, open the lib/Zend/Pdf/FileParserDataSource.php class and change the…

Adding a product image description programmatically (Magento 1)

There is no way to add a product image description using the addImageToMediaGallery function. The following code does the job though:

Increasing speed of store by adding Gzip compression (Magento 1)

You want to increase the speed of your Magento store? One way to achieve that is to add Gzip compression. It can be added easily by modifying your servers .htaccess file. Add the following lines:

When done, check if…

Solving the “Invalid backend model specified: catalog/attribute_backend_customlayoutupdate” problem (Magento 1)

Run the following query:

Remember the attribute_ids from that query and run the following query:

Done!