• Home
  • About
  • Magento
  • Request A Quote
  • Contact Us

Magento – Mass update of custom options

Dec26
2011
Written by admin

Magento Mass Update

Replicate Magento Custom Option : This must be a default feature in magento but somehow it is not exist by default  , we got a lot of request for this problem . We can replicate mass product custom options by custom option template .Here is a sample code by which you can mass replicate your magento custom options

Step 1: change the app/design/adminhtml/default/default/template/page/head.phtml with the attached head.phtml

Step 2: app/design/adminhtml/default/default/template/catalog/product/edit/options.phtml
before:

<div class=”entry-edit-head”>

insert:

<div id="coSamples" style="margin-bottom:15px;"></div>

and

after:

<script type=”text/javascript”>

insert:

initOptionsSamples();

 

Step 3: app/design/adminhtml/default/default/template/catalog/product/edit/options/type/select.phtml
find:

OptionTemplateSelectRow = …

replace with:

OptionTemplateSelectRow = ’<tr id=”product_option_{{id}}_select_{{select_id}}”>’+
‘<td>’+
‘<input type=”hidden” name=”product[options][{{id}}][values][{{select_id}}][option_type_id]“ value=”{{option_type_id}}”>’+
‘<input type=”hidden” id=”product_option_{{id}}_select_{{select_id}}_is_delete” name=”product[options][{{id}}][values][{{select_id}}][is_delete]“ value=”">’+
‘<input type=”text” class=”required-entry input-text select-type-title” id=”product_option_{{id}}_select_{{select_id}}_title” name=”product[options][{{id}}][values][{{select_id}}][title]“ value=”{{title}}”>{{checkboxScopeTitle}}</td>’+
‘<td><input type=”text” class=”input-text validate-number product-option-price” id=”product_option_{{id}}_select_{{select_id}}_price” name=”product[options][{{id}}][values][{{select_id}}][price]“ value=”{{price}}”></td>’+
‘<td><?php echo $this->getPriceTypeSelectHtml() ?>{{checkboxScopePrice}}</td>’+
‘<td><input type=”text” class=”input-text sku” name=”product[options][{{id}}][values][{{select_id}}][sku]“ value=”{{sku}}”></td>’+
‘<td><input type=”text” class=”validate-zero-or-greater input-text sort-order” name=”product[options][{{id}}][values][{{select_id}}][sort_order]“ value=”{{sort_order}}”></td>’+
‘<td class=”last”><span title=”Delete row”><?php echo $this->getDeleteButtonHtml() ?></span></td>’+
‘</tr>’;

 

in the head.phtml, you can find the customOptionsSamples variable where you can set up your own custom options templates

Posted in magento
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
← wysiwyg editor in Magento Custom Module
Magento Slideshow →

Recent Posts

  • Joomla Social Media Panel
  • Magento Image Video Switcher
  • Magento Watch Store
  • Magento CSV Import
  • Facebook Group Joomla

Recent Comments

  • Vipin Sahu on MarketPlace in Magento
  • Matute Monts on MarketPlace in Magento
  • Vipin Sahu on Magento Banner Slideshow Documentation
  • Oscara Karlsruhe on Magento Banner Slideshow Documentation
  • admin on Magento Event Manager

Calendar

May 2012
M T W T F S S
« Mar    
 123456
78910111213
14151617181920
21222324252627
28293031  

Tags

1.4 accordion slideshow commerce e-commerce ecommerce ecommerce platform ecommerce software error_reporting extensions framework general how to image slider index.php ini_set joomla joomla extension joomla module jquery magento magento commerce magento seo magento services magento slider online business open source ecommerce php platform playlist RSS security seo services shopping cart slider slideshow software tip tutorial Video Streaming W3c W3C validation web promotion youtube youtube module youtube playlist

Archives

  • May 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011

Meta

  • Log in

EvoLve theme by Theme4Press  •  Powered by WordPress

Back to Top