Originally posted by Nick
View Post
Yes, essentially it is just a form that is passing data:
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.
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>
Let me know if you have trouble setting up.
Leave a comment: