How to display Image Preview in Admin Form magento

Share
Posted on January 28th, 2012 | Posted by admin

Magento allows us to create custom form in admin panel by creating our own custom module. We can create almost any field in the admin form by creating a class that extends the base class Mage_Adminhtml_Block_Widget_Form. The _prepareForm method allows to define our form elements.
Sometimes we may need to upload a file in the adminform, the default file field doesn’t provide the image preview when we upload an image file. For this purpose we need to use image field type as shown in the below snippet

$fieldset->addField('filename', 'image', array(
'label' => Mage::helper('customform')->__('Image'),
'required' => false,
'name' => 'filename',
));

Product Image Preview, quick view image module in magento

Share
Posted on June 10th, 2011 | Posted by admin

This extension will install a wonderful and ready-to-use product image preview widget in your Magento store. This is an impressive script that allows your visitors to conveniently zoom out an product image that they want to view. Installation is very easy via FTP and no coding experience is required to have module up-and-running.
FEATURES

  1. Allow customers zoom out product images they want to view
  2. Allow admin to configure the following parameters: Image Preview size, Border Image Preview, Border Color for Image Preview, Text Image Preview, Text color

How To Create CSS Image Buttons In Your Magento Themes

Share
Posted on May 24th, 2011 | Posted by admin

Many developers and store owners don’t like to use images as buttons simply because they do not wish their users to wait until the images load. Image buttons gives the flexibility to display images as per store’s requirement but these days lots and lots of stores are opting to create CSS image buttons rather than image buttons. With a very little tweak you can get rid of image buttons in your theme and switch to CSS buttons. If you are willing to change your image buttons to CSS powered buttons then follow the steps given below:

Take a nice background image which is blank and nothing written on it. We will use this background image to generate text over it. Basically, if you follow CSS buttons you don’t have to create separate images for each button. Download the background image given below for an example (you can create your own image background).

In your theme template you will find various instances where you have to change image button to CSS button. For an example we will take “Proceed to Checkout” button code app/design/frontend/default/Your_theme/template/checkout/onepage/link.phtml

By default you will see something like this (if you are using default theme)

Magento: New Extension Idea – Product Image Removal

Share
Posted on April 29th, 2011 | Posted by admin

As you most likely know, when you remove an image from a product, or delete a product, the image file actually stays in it’s place on the server. It is not removed. Rare is the case when I want the image to remain there if I am removing it from a product, or deleting a product. I would much rather it be deleted!

I’m thinking about writing a module that would allow you to easily enable or disable image deletion in these two cases. So, if you have it enabled, when you remove an image from a product, or delete a product, the image would be fully removed. Simple.

Properly remove white image frame upon resizing photos in Magento

Share
Posted on April 6th, 2011 | Posted by admin

Magento has pretty neat image helper you can use to output your product photos. Today one of my coworkers got frustrated with the white frame he kept getting around the resized image he tried to output in sidebar block. As s possible solution he tried resolving the issue with CSS. However, there is a better, more nicer solution to ditch the whit frame around resized images in Magento.

Page 1 of 212»