Copied to clipboard

Flag this post as spam?

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


  • René 327 posts 852 karma points
    Aug 26, 2014 @ 20:21
    René
    0

    Teacommerce - Product property - Color

    Hi 

    I have an product in a TeaCommerce shop. 

    I want to add a dropdownlist to select a color. Ther is no pricechanges or anything.

    I only want to get it to show on the finished order

    Here is "AddOrUpdateOrderLinemy"

    This works

    <input name="AddOrUpdateOrderLine" type="hidden" value="productIdentifier : productIdentifier,  orderLineId : orderLineId, quantity : quantity, propertyKeys : propertyKeys, color : color" />

    The color select - This works

    <option value="@colorItem"
          @if (colorItem == selected)
              {
                    @Html.Raw("selected=\"true\"")
               }>
          @selected
    </option>

    This is from the post, this works. I get the value from the selected color, in this cace  "Red"

    AddOrUpdateOrderLineproductIdentifier : productIdentifier, orderLineId : orderLineId, quantity : quantity, propertyKeys : propertyKeys, color : color
    colorRed
    productIdentifier6283
    quantity1
    storeId1

    My question is how do i get the value "Red" to show up in the finished order.

    René  

     

  • René 327 posts 852 karma points
    Aug 26, 2014 @ 21:28
    René
    0

    Hi 

    I have found out how it should work, but it do not work.

    I use this @orderLine.Properties[ "color" ].

    Is there something i am missing? 

    René 

  • Anders Burla 2560 posts 8256 karma points
    Aug 27, 2014 @ 08:45
    Anders Burla
    100

    Hi Rene

    See example 2 on this page. Properties are added for the order line so you can use orderLine.Properties["color"]
    http://documentation.teacommerce.net/html-api/order-line/addorupdateorderline/

    Kind regards
    Anders

  • René 327 posts 852 karma points
    Aug 27, 2014 @ 09:06
    René
    0

    Hi 

    Tanks. 

    For this to work, is it required to have an input named properties?

    Is it the name "properties" witch gives the option to use orderLine.Properties["color"]

    <input name="properties" value="color" type="hidden" />
    <input name="AddOrUpdateOrderLine" value="productIdentifier, quantity, properties" type="hidden" />

    Tanks for your always quick answer.
    René  

  • Anders Burla 2560 posts 8256 karma points
    Aug 27, 2014 @ 09:10
    Anders Burla
    0

    It is required to have the properties parameter in the AddOrUpdateOrderLine input field

  • René 327 posts 852 karma points
    Aug 27, 2014 @ 12:40
    René
    0

    Hi 

    It is working.

    Tanks a lot, for your answers and guiding.

    René 

Please Sign in or register to post replies

Write your reply to:

Draft