Exporting Products from Magento – making it quicker

The phrase take only what you need springs to mind when it comes to exporting products in Magento. The lack of a check all button to ignore all field options in the export can lead to a waste of time if you only want 2 or 3 specific columns. Enter developer tools in (some/most modern browsers) Chrome and a little bit of Javascript magic.

Entering this in the console tab in the developer tools (right click and choose inspect from the menu that appears)  and all the checkboxes are checked and you can spend your time selecting which columns it is you need.

Code comes from here

Adding Custom CSS for Print

You may want to setup a custom css file for your magento store – for your order details as an example.

Adding the following code to your custom layout.xml file will add a custom_print.css file from the location of /skin/frontend/base/default/css/custom_print.css

 

Ordering a Category Collection by the Newest to Oldest

Well it sounds simple and it is – but only once you remember that there is no “id” field in the flat catalog tables. Every time you add a new category or product – it is assigned a new incremented entity_id there by ordering by the field in DESCENDING order you will always get the newest ones at the top.

 

Re-indexing Magento 2: Command Line

You can no longer do any re-indexing manually through Magento Dashboard – you can either do it through a cron-job or using a series of commands on the command line.

You can specify an optional reindexer name to re-index a specific index otherwise the above command will re-index all of them one after the other.

Read More Here

Bench Marking for Magento Reindexing

Hopefully this will help someone to figure out roughly how long your reindexing should take for your catalog on Magento:

 

Re-indexing through Shell when Magento doesn’t behave

Sometimes when you have a lot of data, Magento may not always successful index or a server error will leave on of the process set to “processing” in the index panel.

One solution is to run the indexer through shell with the following commands:

 

Clearing All Product Images

This is really quite simple:

Step 1: Flush the database using the following SQL:

Step 2: Remove all the product images from the /media/catalog/product/ directory

Step 3: Refresh your cache.

Is your Import/Export hanging with please wait?

We’ve been working with some large data sets and we noticed that once the number of product SKU’s reached a certain point although the import process was working (items appeared under manage products) the import itself would not complete with a success message.

One potential cause for this the script for monitoring the import progress is running out of memory due to the sheer number of items being imported. Increase your memory (we went for 2GB on our dedicated server) and you should find the import process completing with 100k+ rows in your csv.

Magento 1.9.2 Unknown cipher in list: TLSv1

If you have recently updated your Magento version to 1.9.2 and have then tried to install a new extension via the Magento Connect panel – you will have no doubt come accross the following error:

Unknown cipher in list: TLSv1

Suprised Magento broke something with an update, no me neither? When Magento includes a downloader that’s expecting SSL on a brand new version release when they’ve actually shut it off on the server. DOH!  The solution is as follows:

Locate the following file: downloader/lib/Mage/HTTP/Client/Curl.php, try changing:

to

Hope that helps somebody else!