Announcement

Collapse
No announcement yet.

How to notify customers that a coupon has already been applied?

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

    How to notify customers that a coupon has already been applied?

    I have a coupon code field on the BASK page. I'd like to show a visual notification to customers when a coupon has already been applied by displaying the coupon code and the coupon description in an alert box. This would be in addition to the line item in the Basket Display. Also, if a coupon can't be applied, I'd like a way to tell the customer the reason it didn't work, such as the minimum amount isn't in the basket, or the item on sale isn't in their basket.

    For displaying the coupon code and description of any coupons already applied, I've looked into the tokens available, but there doesn't seem to be the right combination to display this. For "free shipping" coupons, I see no token that shows if a "free shipping" coupon has been applied. And for a basket discount coupon ($10 off order), it displays in the "basket:charges:descrip", which is not specific to coupons. And I can't see how to display the coupon code applied.

    It's so confusing for customers as you can't always tell if a coupon has been applied and you try again or refresh the page and just get the generic coupon error message.

    Second, if a basket coupon is applied, it shows up as a separate line above the Subtotal and below the items in the basket. Is there a way to show the Subtotal of the items in the basket before the coupon get's applied? Again, I can find no token that controls this.


    #2
    There is an coupon array built into the basket component which allows you to display the coupons applied and lets the customer remove them using this code. Keep in mind this is the default code for a CSSUI store so they table structure may need to be modified for your store:

    Code:
    <mvt:foreach iterator="coupon" array="basket:coupons">
        <tr>
            <td class="item-name">
                <div class="item-name">Coupon -
                <span class="item-code">
                    &mvt:coupon:code;
                </span>
                <mvt:if expr="NOT ISNULL l.settings:coupon:descrip">
                <div class="item-discount">&mvt:coupon:descrip;</div>
                </mvt:if>
                </div>
            </td>
            <td class="item-quantity">&nbsp;</td>
            <td class="item-price">&nbsp;</td>
            <td class="item-total">&nbsp;</td>
        </tr>
        <tr class="item-options">
            <td class="item-name">
                <a href="&mvte:urls:BASK:auto_sep;Action=RCPN&amp;Coupon_Code=&mvte:coupon:code;&amp;Offset=&mvta:global:Offset;&amp;AllOffset=&mvta:global:AllOffset;&amp;CatListingOffset=&mvta:global:CatListingOffset;&amp;RelatedOffset=&mvta:global:RelatedOffset;&amp;SearchOffset=&mvta:global:SearchOffset;">Remove</a>
            </td>
            <td class="item-quantity">&nbsp;</td>
            <td class="item-price">&nbsp;</td>
            <td class="item-total">&nbsp;</td>
        </tr>
        </mvt:foreach>
    For the coupon nofitications for when a coupon is applied, you're most likely missing the messages item on the page. Make sure the messages item is assigned to BASK and make sure you have this code on the page where you want the messages to appear:

    Code:
    <mvt:if expr="l.settings:messages:error_message_count">
                    <div class="error-message">
                    <mvt:foreach iterator="error" array="messages:error_messages">
                        &mvt:error;
                    </mvt:foreach>
                    </div>
                    </mvt:if>
                    <mvt:if expr="l.settings:messages:information_message_count">
                    <div class="information-message">
                    <mvt:foreach iterator="message" array="messages:information_messages">
                        &mvt:message;
                    </mvt:foreach>
                    </div>
                    </mvt:if>
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Ah thanks!! I think that's exactly what I need!! That bit of code wasn't in the default Base ReadyTheme and wasn't in any of the updated Template Changes either.

      As for messages, yes I have that assigned and on the page, but the only error message that handles coupon issues is "Your basket is not eligible for the specified coupon." I've changed the message to tell customers to contact us if they have a problem applying a coupon, but it would be nice to have a customized error message option for each coupon (entered in a field during coupon creation) that could describe the requirements and restrictions if there is a problem. For example, I created a $10 Off coupon that requires a minimum subtotal of $100. If a customer tries to apply the coupon and doesn't meet the coupon requirements, instead of the generic one-size-fits-all error message, it could display that coupon's own message, such as "This coupon requires a minimum purchase of $100. Please continue shopping".

      Thanks,
      Shannon

      Comment

      Working...
      X