Developer forum

Forum » Templates » Using templatetag Ecom:Order.Requisition

Using templatetag Ecom:Order.Requisition

Søren Jakobsen
Reply

Hi,

I'm trying to implement the DW order standardfield Requisition with templatetag Ecom:Order.Requisition at a swift cart checkout template. The field is rendered just nicely at checkout but the value of the field will not be saved on the order after checkout. Please see below codesnippet.

Any ideas? Or isn't it possible to save values to the field from a frontend context? 

 

string orderRequisition = !string.IsNullOrWhiteSpace(GetString("Ecom:Order.Requisition")) ? GetString("Ecom:Order.Requisition") : string.Empty;

    <div class="mt-4">
        <h3 class="fs-6 fw-normal mb-0">@Translate("Add Requisition to order")</h3>
        <p class="fs-8 mb-3">@Translate("Add a Requisition that matches a field in your external system") <span class="small">(@Translate("e.g inventory management, procurement"))</span></p>

        <div class="form-floating">
            <input type="text" class="form-control" name="EcomOrderRequisition" id="EcomOrderRequisition" value="@orderRequisition" placeholder="@Translate("Order Requisition")">
            <label for="EcomOrderRequisition">@Translate("Order Requisition")</label>
        </div>
    </div>


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Try using input name="EcomCartRequisition"

Votes for this answer: 1
 
Søren Jakobsen
Reply

Thanks. Worked

 

You must be logged in to post in the forum