Copied to clipboard

Flag this post as spam?

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


  • Lars Matthiassen 3 posts 73 karma points
    Feb 11, 2017 @ 20:33
    Lars Matthiassen
    0

    Incorrect price on bundle with discount

    Hi

    I am trying to make the bundle function in Tea Commerce work, but i ran into some problems.

    I've got 2 products that i have added into a bundle. Product A with a price of 100 and product B also priced at 100. When i do so, the OrderLine adds up to 200, which is as expected.

    But!

    If i add a discount to one of the products (Tea Commerce -> Marketing), lets say 50% off for product A, i would expect the orderline to add up to 150 - but it does not! Actually, it increases in price! :-(

    What could I be doing wrong? I only got this problem with bundle products. Discount rules work fine for non-bundled products and orderlines.

  • Anders Burla 2560 posts 8256 karma points
    Feb 13, 2017 @ 07:43
    Anders Burla
    0

    Hi Lars

    Sounds weird, but could be a bug. Are you running the latest Tea Commerce? If not - be sure to upgrade first, as that could fix the bug.

    Then - if you can replicate the bug on the demo site by sending me some JavaScript of adding the products to the cart and send what is wrong using the demo site, then I can replicate the bug and fix it. https://demo.teacommerce.net/

    Kind regards

    Anders

  • Lars Matthiassen 3 posts 73 karma points
    Feb 14, 2017 @ 13:04
    Lars Matthiassen
    0

    Hi Anders

    Now i have tested it with the demo shop, and it gives me a wrong price on the bundle too :(

    I made a bundle of product 1071 - Summer yact - 600$ and 1072 - Yacht with sails - 72$

    Without a dicsount, the bundle adds up to 672$ - correct. But when i add a Marketing product rule on the Summer yact with 50% discount, the bundle ordreline add up to a price without dicsount of 744$ and a price with discount of 408$ The expected price for the bundle is 372$:

    Summer yact: 600$ minus 50% = 300$

    Yacht with sails: 72$

    Total: 372$

    To create the bundle orderline, i used the HTML API as described in the Tea Commerce docs.

    I removed the form input fields in Product.cshtml and replaced it with the example form from https://docs.teacommerce.net/reference#addorupdateorderline

      <form method="post" action="/base/TC/FormPost.aspx"> @*class="ajaxForm" data-product-id="@productPage.Id">*@
        @*<input name="AddOrUpdateOrderLine" value="productIdentifier, quantity" type="hidden" />*@
    
          <input name="AddOrUpdateOrderLine" value="productIdentifier : productIdentifier_1, quantity : quantity_1, bundleIdentifier : bundleIdentifier" type="hidden" />
          <input name="AddOrUpdateOrderLine" value="productIdentifier : productIdentifier_2, quantity : quantity_2, parentBundleIdentifier : bundleIdentifier" type="hidden" />
          <input name="storeId" value="1" type="hidden" />
          <input name="productIdentifier_1" value="1071" type="hidden" />
          <input name="quantity_1" value="1" type="text" />
          <input name="bundleIdentifier" value="Computer" type="hidden" />
          <input name="productIdentifier_2" value="1072" type="hidden" />
          <input name="quantity_2" value="1" type="text" />
          <input value="Add product bundle" type="submit" />
        @*<input name="storeId" value="@storeId" type="hidden" />*@
    
        <div class="well">
          <h1 class="page-header">@productName</h1>
    
          @Html.Raw( productDescription )
    
          <div class="form-horizontal">
            @if ( attributeGroups.Any() ) {
              foreach ( VariantGroup variantGroup in attributeGroups ) {
                <div class="form-group">
                  <label class="col-sm-3 control-label">@variantGroup.Name</label>
                  <div class="col-sm-9">
                    <select class="form-control" data-attribute-group="@variantGroup.Id">
                      <option value="">Select @variantGroup.Name</option>
                      @foreach ( VariantType variantType in variantGroup.Attributes ) {
                        <option value="@variantType.Id">@variantType.Name</option>
                      }
                    </select>
                  </div>
                </div>
              }
              <input name="productIdentifier" value="" type="hidden" />
            } else {
              @*<input name="productIdentifier" value="@productPage.Id" type="hidden" />*@
            }
            <div class="form-group">
              <label class="col-sm-3 control-label">Quantity</label>
              <div class="col-sm-9">
                @*<input class="form-control" name="quantity" value="1" type="text" />*@
              </div>
            </div>
          </div>
          @*<input class="btn btn-primary btn-block disabled" value="Add to basket" type="submit" />*@
        </div>
      </form>
    

    enter image description here

  • Lars Matthiassen 3 posts 73 karma points
    Feb 17, 2017 @ 13:29
    Lars Matthiassen
    0

    Hi Anders :)

    Anything new on this one? I really need some help :(

  • Anders Burla 2560 posts 8256 karma points
    Feb 20, 2017 @ 10:36
    Anders Burla
    0

    Hi Lars

    I will have a look at it this week or next. We don't have the time right now to make it a high priority as you are the only one that have reported it. If you need bugfix warrenty, you will need Tea Commerce Confidence: https://teacommerce.net/products/confidence/

    Sorry about this, but we are really busy at the moment.

    Kind regards

    Anders

Please Sign in or register to post replies

Write your reply to:

Draft