开发者

Extra Customer Functionality in Magento

I am building a Magento extension, in which I need to have the following three functionalities:-

  1. Each product in my Magento store will have the option to upload multiple image files, and it differs product-to-product. Some specific products may have 4 & some 3 & some will have 2 image files to be uploaded. But these files can only be uploaded by a registered customer开发者_如何学Go only when he has paid the order first.

  2. After the order has been paid, customer can login into his account & see the order items in his "My Orders" section. In that section, he will be provided with options to upload files based on the product Sku. This is because some product Sku will have 4 file upload options available & some will have 3 & some 2 (as said in the last point).

  3. The admin can view those files in either the Customer's details or the Sales details.

Can anybody please highlight what needs to be done in order to extend the Magento functionality without even touching the core Magento code.

Many many thanks in advance.


  1. Create new attribute for product - like media gallery.
  2. Create model for this attribute, like product media gallery.
  3. Create interface in customer section, where customer can upload images to the product.
  4. Create interface in admin section, where shop manager can approve images.

Create new attribute media gallery like this in sql installer of your module.

$installer = $this;
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */

$installer->startSetup();
$installer->addAttribute('catalog_product', 'media_gallery',  array(
        'group'         => 'Images',
        'label'         => 'Media Gallery',
        'input'         => 'gallery',
        'backend'       => 'catalog/product_attribute_backend_media',
        'class'         => '',
        'global'        => true,
        'visible'       => true,
        'required'      => false,
        'user_defined'  => false,
        'visible_on_front' => false
    )
);

You may use existing model with tables and add new values to the table catalog_product_entity_media_gallery_value and change media gallery model. That may work with new fucntinality or create standalone functionality.

Create new model like : Mage_Catalog_Model_Product_Attribute_Backend_Media, extend it add "approved by", "uploaded by" and other parameters what you need.

Key features. Allow customer to add images to the product. Show images gallery with moderation. Allow shop manager accept or decline new images.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜