Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Aug 24, 2012 @ 14:44
    Rasmus Fjord
    0

    Adding T&T number in backend

    Hey im just trying to create a form for adding to properties to an order in the inside the order. This could be used for track and numbers. 

    but its not quite saving it.

    But shouldnt this be right ? I have this on my "adminorder.xslt" 

         <form method="post" name="addressForm" action="/tcbase/teacommerce/SubmitForm.aspx">
                      <input name="ReturnUrl" type="hidden" value="" />
                      <input name="updateOrderPropertiesAdmin" type="hidden" value="postdkTT,glsTT" />
                      <input name="orderId" type="hidden">
                        <xsl:attribute name="value">
                          <xsl:value-of select="$order/@name"/>
                        </xsl:attribute>
                      </input>
                      <label>PostDanmark: 
                      <input type="text" id="postdkTT" name="postdkTT" class="dontPrint">
                        <xsl:value-of select="$order/properties/postdkTT"/>
                      </input>
                      </label>
                      <br/>
                      <label>
                        GLS:
                        <input id="glsTT" name="glsTT" class="dontPrint">
                          <xsl:value-of select="$order/properties/glsTT"/>
                        </input>
                      </label>
                      <br/>
                      <input type="submit" value="Save"/>
                    </form>

  • Anders Burla 2560 posts 8256 karma points
    Aug 24, 2012 @ 16:12
    Anders Burla
    0

    Hi Rasmus

    Try and check how the comment field is done in the out of the box xslt. You just select it using jQuery and adds it to the list of things to save.

    Here is the code from the starter kit
    <script type="text/javascript">
            <![CDATA[
            onSaving(function(){
              var formObj = {
                "comments": jQuery("#comments").val(),
                "orderNotes": jQuery("#orderNotes").val()
              };
              TeaCommerce.updateOrderPropertiesAdmin(]]><xsl:value-of select="$order/@id"/><![CDATA[,formObj, false);
            });
            ]]>
          </script>

    Kind regards
    Anders

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Aug 27, 2012 @ 08:19
    Rasmus Fjord
    0

    Arh didnt see that snippet in the top. 

    Awesome! and ofc it just works 

     

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft