Copied to clipboard

Flag this post as spam?

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


  • Graham Carr 277 posts 389 karma points
    Apr 17, 2015 @ 14:11
    Graham Carr
    0

    Issue with adding discount via HTML method

    I am using the following code to add discount codes:

                <form method="post" action="/base/TC/FormPost.aspx" class="form-inline form-autoValidate">
                    <input name="AddDiscountCode" value="code" type="hidden" />
                    <input name="storeId" value="1" type="hidden" />
                    <div class="form-group">
                        <input name="code" value="" type="text" placeholder="@Umbraco.Field("#Enter your discount code")" class="form-control" required="" />
                    </div>
                    <input value="@Umbraco.Field("#Add discount code")" class="btn btn-default" type="submit" />
                </form>

    When I click submit with a valid code nothing happens and in fact nothing happens no matter what value I put in. The other forms on the page work fine such as increasing quantities of line items, etc.

    Does anyone have any idea what the issue might be. I am using TeaCommerce V4.0.1

  • Anders Burla 2560 posts 8256 karma points
    Apr 20, 2015 @ 08:09
    Anders Burla
    0

    Hi Graham

    Is the discount code added to the order? Does the discount code you try to add exists and isn't used to many times?

    Kind regards
    Anders

  • Graham Carr 277 posts 389 karma points
    Apr 22, 2015 @ 11:34
    Graham Carr
    0

    How do I check if the discount has been added to the order? I have some code looping through the applied discounts and this is not showing any applied discounts. As for the discount code, they do indeed exist and haven't been used as it was a completely new discount that was added.

  • Graham Carr 277 posts 389 karma points
    Apr 22, 2015 @ 12:13
    Graham Carr
    0

    Hi Anders,

    Found the issue, nothing to do with the code was my own silly mistake.

    Graham

Please Sign in or register to post replies

Write your reply to:

Draft