Developer forum

Forum » Ecommerce - Standard features » eCom Order field

eCom Order field

Morten Christensen
Reply
In the basket I need a custom field where you can enter "CVR nr."
In the backend, I have created an order line field and called it "<!--@CVRnr-->" but I can't see it in the template.

How can I display it? or how do order line fields work?


Replies

 
Merethe Nielsen
Reply
This post has been marked as an answer

Hi

Is it an order line field or order field?

You can use Order line fields, which is custom product fields, that can save values to the order all the way through the ordering (from product list/detail to checkout). The field values are saved on the order in ecom when the order is completed.
 http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Management-Center/eCommerce-settings/Orders/Order-line-fields/How-to-use-order-line-fields.aspx

The orderline fields are only rendered with the Order.OrderLineFields loop in the product page or the cart.

Example:
 

<!--@LoopStart(Order.OrderLineFields)--><!--DwTemplateTags-->
      <table cellpadding=2>
        <tr>
          <td>
          <!--@Ecom:Order:OrderLine.OrderLineField.Name-->:
          </td>
          
          <td>
          <!--@Ecom:Order:OrderLine.OrderLineField.InputTextField--><br />
          </td>
        </tr>
        </table>
 <!--@LoopEnd(Order.OrderLineFields)-->
      

 You can use Order fields if you just want to add a custom field to the order. Order fields are only used in the cart for the order steps.
This can be useful for your "CVR" field if it should only be applied to the order during the ordering process, e.g. together with the customer information fields.
 http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Management-Center/eCommerce-settings/Orders/Order-fields.aspx
 
The order fields are added to the template outside the orderline loop (like the name field in the Information step).
Example:
 
<dt>
          <label for="Voucher">Voucher</label>
        </dt>
        <dd>
          <!--@Voucher-->
        </dd>
</dl>

 




Can you see the tag in your DwTemplateTag list?
 

Votes for this answer: 0
 
Morten Christensen
Reply
Hi
Thanks for quick respons and good answer.

The problem was (perhaps) Dw. I tryed to delete the ordre field in backend and make a new one and it did the trick.

 

You must be logged in to post in the forum