Slimshadddyyy
Slimshadddyyy

Reputation: 4071

Magento pass and save additional details from cart page into orders table

I need to pass some additional parameters along eith the products from Cart page and save it to order table whenever an order is being placed.For example the parameterscould be a custom price or anything.

I have created the DB field in the table "sales_flat_order_item".

Which is the best way to accomplish the above requirement ?

1) Save the additional parameters when the order is being placed using "sales_order_place_before" event

2) Save the details in quote before proceeding to checkout

Moreover which event would be used if I save the details before proceeding to checkout ?

I can not think of the best way to achieve this.

Please Help.

Thanks in advance.

Upvotes: 0

Views: 1233

Answers (1)

MagePal Extensions
MagePal Extensions

Reputation: 17656

Take a look @ http://www.magentocommerce.com/boards/viewthread/19344/

In config.xml

...
<global> 
     <fieldsets>
        <sales_convert_quote>                           
            <cs_aoc_webid><to_order>*</to_order></cs_aoc_webid>
        </sales_convert_quote>

        <sales_convert_order>                                              
            <cs_aoc_webid><to_quote>*</to_quote></cs_aoc_webid>
        </sales_convert_order>
    </fieldsets>

 ....
    <events>
        <some add to cart event>
            <observers>
                <adminorderconfirmation>
                    <type>singleton</type>
                    <class>customquotefields/observer</class>
                    <method>saveData</method>
                </adminorderconfirmation>
            </observers>
        </some add to cart event>

Upvotes: 1

Related Questions