Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Got it!</p> <p>Update: Mage/Eav/Model/Resource/Entity/Attribute.php</p> <p>in function: _saveOption(Mage_Core_Model_Abstract $object)</p> <p>change: </p> <pre><code>$sortOrder = !empty($option[’order’][$optionId]) ? $option[’order’][$optionId] : 0; if (!$intOptionId) { $data = array( ‘attribute_id’ =&gt; $object-&gt;getId(), ‘sort_order’ =&gt; $sortOrder, ); $adapter-&gt;insert($optionTable, $data); $intOptionId = $adapter-&gt;lastInsertId($optionTable); } else { $data = array(’sort_order’ =&gt; $sortOrder); $where = array(’option_id =?’ =&gt; $intOptionId); $adapter-&gt;update($optionTable, $data, $where); } </code></pre> <p>for this: </p> <pre><code>$sortOrder = !empty($option[’order’][$optionId]) ? $option[’order’][$optionId] : 0; $yourAttribute = (isset($option[’your_attr_field’]) &amp;&amp; !empty($option[’your_attr_field’][$optionId])) ? $option[’your_attr_field’][$optionId] : ‘’; if (!$intOptionId) { $data = array( ‘attribute_id’ =&gt; $object-&gt;getId(), ‘sort_order’ =&gt; $sortOrder, ‘your_attr_field’ =&gt; $yourAttribute ); $adapter-&gt;insert($optionTable, $data); $intOptionId = $adapter-&gt;lastInsertId($optionTable); } else { $data = array(’sort_order’ =&gt; $sortOrder, ‘your_attr_field’ =&gt; $yourAttribute); $where = array(’option_id =?’ =&gt; $intOptionId); $adapter-&gt;update($optionTable, $data, $where); } </code></pre> <p>I could use some help in making all this changes 'the Magento way'</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload