If the Magento Connect Manager displays the error Invalid login credentials , your FTP credentials may have changed while the Connect Manager still has the old ones stored. The simplest workaround is to delete or rename the file connect.cfg im…
Deleting all products using SQL (Magento 1)
Want to remove all products from your Magento store directly through the database? The following statement removes the products and their related data:
|
1 |
DELETE FROM catalog_product_entity; |
Thanks to the constraints on this table, product relationships are also removed from the relevant tables.
Password reset page blank after installing SUPEE-6788 (Magento 1)
Is the password reset page blank after installing the SUPEE-6788 patch? The issue is probably in your customer.xml file. Open customer.xml in your theme’s layout directory and replace customer_account_resetpassword with customer_account_changeforgotten. The corresponding block must also be replaced. Replace customer/account_resetpassword…
Finding products with and without custom options using SQL (Magento 1)
To find all products that have keine no custom options, run this query:
|
1 2 3 4 5 6 |
SELECT * FROM catalog_product_entity WHERE entity_id NOT IN (SELECT DISTINCT product_id FROM catalog_product_option); |
To find all products that do have custom options, simply remove “NOT” from the query above.
Where does Magento Connect Manager store version numbers?
The Magento Connect Manager’s version numbers are stored in serialized form in the file /downloaderinside the directory (which should be renamed for security reasons) cache.cfg . You can read that file using the following code:
|
1 2 3 4 5 6 |
$contents = file_get_contents('cache.cfg'); $uncompressed = gzuncompress($contents); $unserializedData = unserialize($uncompressed); var_dump($unserializedData['channels_by_name']['community']['packages']); var_dump($unserializedData); |
Changing the data stored…
What are core hacks? (Magento 1)
When working with Magento, you will occasionally hear the term Magento Core Hacks. But what does it mean? A Magento core hack is a modification made directly to files in Magento’s core, located under /app/core/core , to implement specific functionality.…
Changing the admin password directly in the database using SQL (Magento 1)
Use the following SQL statement to reset an administrator’s password directly in the database:
|
1 |
UPDATE `admin_user` SET `password` = MD5('NEUESPASSWORT') WHERE `username` = 'ADMINUSERNAME'; |
Fixing PayPal gateway has rejected request: Method Specified is not Supported (Magento 1)
Sometimes the message PayPal gateway has rejected request. Method Specified is not Supported appears when a customer attempts to place an order using PayPal. To fix it, set the value to “&” in a PHP script inside your Magento store…
Reading recurring profile data (Magento 1)
Magento stores the recurring profile directly on the customer object. You can read its data using the following code: $collection = Mage::getResourceModel(‘sales/recurring_profile_collection’)->addFieldToFilter(‘customer_id’, $customerId); $profileData = $collection->getData(); $profileData = Mage::getModel(‘sales/recurring_profile’)->load($profileData[0]['profile_id']); $profileShippingAddress = $profileData->getShippingAddressInfo(); // …
Selecting a custom product page template (phtml) (Magento 1)
To use a custom template for your product page, create the template file and then specify the following layout update in the product’s layout section: catalog/product/view-individuell.phtml catalog/product/view/media-individuell.phtml