Sort order items by SKU (Magento 1)

If you want to change the default sorting of the ordered items on the order detail page, go ahead and override app/design/adminhtml/default/default/template/sales/order/view/items.phtml in your theme and replace

with

Done. If you open the detail page of an order…

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.

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:

Getting the attribute set name of a product (Magento 1)

Use the following code to get a products attribute set name.

Getting a products view count programmatically (Magento 1)

Use the below code to figure out, how often a product was called in between 2 dates: