Magento can encounter issues with IPv6 addresses in several places. The correct solution depends on where the problem occurs, so there is no single fix I can sensibly describe here. If IPv6 addresses are causing trouble in your Magento store,…
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…
Fixing the Zend_Pdf_FileParserDataSource_File::__construct() declaration error (Magento 1)
The following error may appear when you attempt to print an invoice: 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 resolve it, open the class lib/Zend/Pdf/FileParserDataSource.php and change the declaration of the…
Importing gallery images using MAGMI (Magento Mass Importer)
To import Magento gallery images using MAGMI (Magento Mass Importer) the following steps are required: Add a new column to your import file. It must be called media_gallery. Now add all your gallery images to that column. The format is:…
Importing gallery images with MAGMI (Magento Mass Importer)
To import gallery images into Magento using MAGMI (Magento Mass Importer), follow these steps: Add a media_gallery column to your import file Then put the gallery images into that column using this format: image1.jpg::label1;/image2.jpg::label2…
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: foreach($product->getData(‘media_gallery’) as $each){ foreach($each as $image){ $attributes = $product->getTypeInstance(true)->getSetAttributes($product); $attributes['media_gallery']->getBackend()->updateImage($product, $image['file'], array(‘label’ => ‘whatever’)); } }
Adding a product image label programmatically (Magento 1)
If you want to add a label to a product image programmatically, you cannot do this with the addImageToMediaGallery method. The following code, however, does the job:
|
1 2 3 4 5 6 |
foreach($product->getData('media_gallery') as $each){ foreach($each as $image){ $attributes = $product->getTypeInstance(true)->getSetAttributes($product); $attributes['media_gallery']->getBackend()->updateImage($product, $image['file'], array('label' => 'whatever')); } } |
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:
|
1 2 3 4 5 |
<IfModule mod_deflate.c> <FilesMatch ".(js|css|html|htm|php)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> |
When done, check if…
Improving page load speed with Gzip compression (Magento 1)
Want to speed up your Magento store? One option is to enable gzip compression. This can be activated relatively easily in your server’s .htaccess file. Add the following lines:
|
1 2 3 4 5 |
<IfModule mod_deflate.c> <FilesMatch ".(js|css|html|htm|php)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> |
You can then check whether the changes work by running…
User not able to login after version update (Magento 1)
If the user is not able to login after a Magento version update, you have most likely overwritten the login.phtml template in your local theme. To fix that problem, open \customer\form\login.phtml in your local theme and add the following code…