Home / Magento / How to create custom filed for default attribute value for description and images in manage attribute options in magento

How to create custom filed for default attribute value for description and images in manage attribute options in magento

By default Magneto only provide custom options without any description, if you want to customize with description then you must change in following files:

Step 1:-

In File

app\design\adminhtml\default\default\template\catalog\product\edit\option\type\select.phtml
Find the below code:

'<th class="type-sku"><?php echo Mage::helper('catalog')->__('SKU') ?></th>'+
Add these after just after

'<th class="type-description"><?php echo Mage::helper('catalog')->__('Description') ?></th>'+
Find the below code:

'<td><input type="text" class="input-text" name="product[options][{{id}}][values][{{select_id}}][sku]" value="{{sku}}"></td>'+
Add these after just after

'<td><input type="text" class="input-text" name="product[options][{{id}}][values][{{select_id}}][description]" value="{{description}}"></td>'+
Step 2:-

In File

 app\code\core\Mage\Adminhtml\Block\Catalog\Product\Edit\Tab\Options\Option.php
Find the below code:

$value['sku'] = $this->htmlEscape($option->getSku());
Add these code just after

$value['description'] = $this->htmlEscape($option->getDescription());
Find the below code:

'sku' => $this->htmlEscape($_value->getSku()),
Add these code just after

'description' => $this->htmlEscape($_value->getDescription()),
Step 3:-

Add field in “catalog_product_option_type_value” table description.

Let me know if you have some query.

About Sushil_kumar

Check Also

How to keep your CMS blocks organized Form in Magento2

Head on over to Magento dashboard in your store and take a look at CMS …

Leave a Reply

Your email address will not be published. Required fields are marked *

0

February 23, 2017

Clear all

Warning: Cannot modify header information - headers already sent by (output started at /home/u797196687/public_html/wp-content/themes/sushil/framework/functions/common-scripts.php:549) in /home/u797196687/public_html/wp-content/plugins/wppush-push-notifications/WPPush.php on line 274