Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento: Getting own quote-item-field to order-item
    primarykey
    data
    text
    <p>I want to save custom information in order_item-table. These informations where created in cart. So I do it like described in this post: <a href="https://stackoverflow.com/questions/11093017/extending-magento-shopping-cart">Extending Magento Shopping Cart</a></p> <p>I installed the attribute</p> <pre><code>$installer-&gt;addAttribute('quote_item', 'final_delivery_time', $settings); $installer-&gt;addAttribute('order_item', 'final_delivery_time', $settings); </code></pre> <p>declare the fieldset in config.xml</p> <pre><code>&lt;fieldset&gt; &lt;sales_convert_quote_item&gt; &lt;final_delivery_time&gt; &lt;to_order_item&gt;final_delivery_time&lt;/to_order_item&gt; &lt;/final_delivery_time&gt; &lt;/sales_convert_quote_item&gt; &lt;sales_convert_order_item&gt; &lt;final_delivery_time&gt; &lt;to_quote_item&gt;*&lt;/to_quote_item&gt; &lt;to_invoice_item&gt;*&lt;/to_invoice_item&gt; &lt;to_shipment_item&gt;*&lt;/to_shipment_item&gt; &lt;to_cm_item&gt;*&lt;/to_cm_item&gt; &lt;/final_delivery_time&gt; &lt;/sales_convert_order_item&gt; &lt;/fieldset&gt; </code></pre> <p>and some code in cart for example</p> <pre><code>$oQuote = Mage::getSingleton('checkout/session')-&gt;getQuote(); foreach ( $oQuote-&gt;getAllItems() as $_item ) { $orderItemId = $_item-&gt;getId(); $_item-&gt;setFinalDeliveryTime('some Value'); $_item-&gt;save(); } </code></pre> <p>so i got a quote and I have my field final_delivery_time with this value in the sales_flat_quote_item table</p> <p>after I place the order in onepage-review, I should also have this field in the sales_flat_order_item table, but there is nothing. In the column stands 'null'. So I need the value of the field saved in the order</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.
 

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