Announcement

Collapse
No announcement yet.

Remove Coupons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lesliekirk
    replied
    Originally posted by Nick View Post
    Yes, essentially it is just a form that is passing data:

    HTML Code:
    <mvt:if expr="g.basket:basket_id">
    <mvt:do file="g.Module_Feature_PGR_DB" name="l.success" value="CouponList_Load_Basket(g.basket:basket_id, l.settings:coupons)" />
    <mvt:if expr="l.settings:coupons">
    <mvt:foreach iterator="coupon" array="coupons">
    <form method="post" action="&mvte:urls:BASK:auto;">
    <fieldset>
    <legend>Remove Promo Code &mvt:coupon:code;</legend>
    <div class="c-form-list">
    <div class="c-form-list__item c-form-list__item--full">
    <input type="hidden" name="Action" value="RCPN"/>
    <input type="hidden" name="Coupon_Code" value="&mvte:coupon:code;"/>
    <button class="c-button c-button--as-link u-color-red" type="submit">&mvt:coupon:code; <span class="u-icon-remove" aria-hidden="true"></span></button>
    </div>
    </div>
    </fieldset>
    </form>
    </mvt:foreach>
    </mvt:if>
    </mvt:if>
    You should be able to add this to any template and it will check if there is a basket id and then if there are coupons. If both are true then it will output the form from each coupon. When selected they will be sent to the BASK page.

    Let me know if you have trouble setting up.
    Thanks Nick, I'll let you know how this works.

    Leave a comment:


  • Nick
    replied
    Yes, essentially it is just a form that is passing data:

    HTML Code:
    <mvt:if expr="g.basket:basket_id">
        <mvt:do file="g.Module_Feature_PGR_DB" name="l.success" value="CouponList_Load_Basket(g.basket:basket_id, l.settings:coupons)" />
        <mvt:if expr="l.settings:coupons">
            <mvt:foreach iterator="coupon" array="coupons">
                <form method="post" action="&mvte:urls:BASK:auto;">
                    <fieldset>
                        <legend>Remove Promo Code &mvt:coupon:code;</legend>
                        <div class="c-form-list">
                            <div class="c-form-list__item c-form-list__item--full">
                                <input type="hidden" name="Action" value="RCPN"/>
                                <input type="hidden" name="Coupon_Code" value="&mvte:coupon:code;"/>
                                <button class="c-button c-button--as-link u-color-red" type="submit">&mvt:coupon:code; <span class="u-icon-remove" aria-hidden="true"></span></button>
                            </div>
                        </div>
                    </fieldset>
                </form>
            </mvt:foreach>
        </mvt:if>
    </mvt:if>
    You should be able to add this to any template and it will check if there is a basket id and then if there are coupons. If both are true then it will output the form from each coupon. When selected they will be sent to the BASK page.

    Let me know if you have trouble setting up.

    Leave a comment:


  • lesliekirk
    started a topic Remove Coupons

    Remove Coupons

    Can the Remove Coupons be used on any other screen besides the BASK? Store owner is concerned that a customer might want to use a different coupon code.
Working...
X