Copied to clipboard

Flag this post as spam?

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


  • TikTakToe 57 posts 97 karma points
    Nov 22, 2016 @ 21:06
    TikTakToe
    0

    AddOrUpdateOrderProperties - new property not persisting?

    TC V3

    Followed docs here: https://documentation.teacommerce.net/html-api/order- property/addorupdateorderproperties/

    Trying to add a Mobile field like so:

      <form action="/base/TC/FormPost.aspx" method="post" class="form-horizontal form-autoValidate" id="addressForm">
              <input name="storeId" type="hidden" value="@storeId" />
              <input name="returnUrl" type="hidden" value="@nextStep.Url" />
              <input name="AddOrUpdateOrderProperties" type="hidden" value="properties" />
              <input name="SetCurrentPaymentCountry" value="countryId" type="hidden" />
              <input name="SetCurrentShippingCountry" value="countryId : countryIdShipping" type="hidden" />
              <input name="SetCurrentPaymentCountryRegion" type="hidden" value="countryRegionId : countryRegionId" />
              <input name="SetCurrentShippingCountryRegion" type="hidden" value="countryRegionId : countryRegionIdShipping" />
              <input name="properties" type="hidden" value="title, firstName, lastName, streetAddress, streetAddress2, zipCode, city, county, phone, mobile, email, shipping_title, shipping_firstName, shipping_lastName, shipping_streetAddress, shipping_streetAddress2, shipping_zipCode, shipping_city, shipping_county" />
              <div class="cart-order-content-addresses">
    
                  <h2>Your Details</h2>
                  <div class="cart-order-content-address-wrap">
    
                      <div class="col-order-content-address1">
                          <h3>Delivery Address</h3>
                          <div class="">
                              <div class="form-group">
                                  <label for="inputTitle" class="col-cart-form-label">Title</label>
                                  <div class="col-cart-form-control">
                                      <input type="text" class="form-control" id="inputTitleShipping" name="shipping_title" value="@order.Properties[ "shipping_title" ]" />
                                  </div>
                              </div>
    

    other fields here....

                              <div class="form-group">
                                  <label for="inputMobile" class="col-cart-form-label">Mobile</label>
                                  <div class="col-cart-form-control">
                                      <input type="text" class="form-control" id="inputMobile" name="mobile" required="" value="@order.Properties[ "mobile" ]" />
                                  </div>
                              </div>
    

    But nothing happens - on the subsequent pages, this value isn't being shown

    Tried setting the id to jus 'mobile' but not working either

    Any ideas?

    Thanks

  • Anders Burla Johansen 2560 posts 8256 karma points
    Nov 23, 2016 @ 08:26
    Anders Burla Johansen
    0

    So if you reload step 2 where you add these info they are shown there right? Just added the mobile field to the demo site and it works - check it out before 04:00 tonight (CET) as it will reset there. Just add a product to the cart and write mobile number in step 2 and reload step 2 and see the value is there. Then you need to add the same value in e.g. step 4 to show it there. Tea Commerce doesnt know which info you have added so you need to configure your templates.

    Kind regards

    Anders

  • TikTakToe 57 posts 97 karma points
    Nov 23, 2016 @ 12:48
    TikTakToe
    0

    Hi Anders

    I can see it working on the demo and my code matches, but it's still not persisting for some reason.

    I add the field, navigate to the page, add in my mobile number save, but it doesn't appear on the subsequent page (I've added the field there to output) nor does it appear when I reload the initial page.

    Any clues as to the issue?

    Thanks

  • Anders Burla Johansen 2560 posts 8256 karma points
    Nov 23, 2016 @ 13:12
    Anders Burla Johansen
    0

    Is there any javascript errors? Do your DB have the right permissions to save to the DB? Try and check if there is any info in the Chrome debug tool that can tell you about what happens.

    Kind regards

    Anders

  • TikTakToe 57 posts 97 karma points
    Nov 23, 2016 @ 13:23
    TikTakToe
    0

    No js errors I'll check the db user has the correct permissions - its the same as the umbracodsn, and i can create new pages etc, so don't think its that

  • Anders Burla Johansen 2560 posts 8256 karma points
    Nov 28, 2016 @ 07:45
    Anders Burla Johansen
    0

    Try and download the starter kit from Github - hit F5 and see that everything is working. Download the dev branch as that is the most up to date. https://github.com/TeaCommerce/Starter-kit-for-Umbraco/tree/dev

    Then try and add the mobile option and see if you can get that working. If that works, then you know it has something to do with your setup or the code on your site and you can try compare how things are done.

    Kind regards

    Anders

Please Sign in or register to post replies

Write your reply to:

Draft