Announcement

Collapse
No announcement yet.

Using the new coupon feature

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

    Using the new coupon feature

    Ok. Dumb question, but I have watched the videos and I can't figure it out.

    I was using Emporium plus coupon module for years.

    Now, I would like to generate single use coupon codes, so I need to use the new miva 9 feature.

    I went through the tutorial and the only thing I get is "Invalid Coupon Code" when I try to enter my new code. My guess is this is happening because I am using the input box for the Emporium coupon module which is currently on the Shipping/Payment section.

    What input box needs to be on the basket page for this to work?

    Can I keep my coupons from Emporium Plus or should I move them all over to the new miva way?
    Last edited by agarvey; 02-25-15, 10:27 AM.

    #2
    Re: Using the new coupon feature

    If you want to use the built in coupon system you will need to replace your Emporium Plus Coupon Box with the built in one:


    Code:
    <mvt:if expr="g.Secure">
    	<form method="post" action="&mvte:global:secure_sessionurl;Screen=&mvta:global:Screen;">
    <mvt:else>
    	<form method="post" action="&mvte:global:sessionurl;Screen=&mvta:global:Screen;">
    </mvt:if>
    		<input type="hidden" name="Action" value="ACPN" />
    		<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" />
    		Coupon: <input type="text" name="Coupon_Code"> <mvt:item name="buttons" param="ApplyCoupon" />
    	</form>
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Using the new coupon feature

      That did it and was exactly what I was looking for. Now, I have moved all the coupons over. Things are working except for 2 little nice to haves.

      1) Is there a way to have a message pop up that says "coupon has been applied" The ones that are a % or $ off the product or basket have a message that pops up, but the ones for free shipping are not seen until the the shipping payment selection.

      2) Can I remove a coupon once it has been applied?

      Comment


        #4
        Re: Using the new coupon feature

        For #1 you need to add this code to the page wherever you want the message to appear (typically the header)

        Code:
        <mvt:if expr="l.settings:messages:error_message_count">
            <div class="alert alert-danger">
                <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="alert alert-info">
                <mvt:foreach iterator="message" array="messages:information_messages">
                    &mvt:message;
                </mvt:foreach>
            </div>
        </mvt:if>
        To Remove a coupon you can add a remove button as a form or add a link:

        Button:

        Code:
        <mvt:foreach iterator="coupon" array="basket:coupons">
        <mvt:if expr="g.Secure">
            <form method="post" action="&mvte:global:secure_sessionurl;Screen=&mvta:global:Screen;">
        <mvt:else>
            <form method="post" action="&mvte:global:sessionurl;Screen=&mvta:global:Screen;">
        </mvt:if>
                <input type="hidden" name="Action" value="RCPN" />
                <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" />
                <input type="hidden" name="Coupon_Code" value="&mvte:coupon:code;" />
                Code: &mvt:coupon:code; <mvt:item name="buttons" param="Remove" />
            </form>
        
        </mvt:foreach>
        Brennan Heyde
        VP Product
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          Re: Using the new coupon feature

          Good stuff Brennan.

          My Coupon Box never appeared on the 5.5 Mobile setup that Bill did for us. When I discovered it I placed a note in the footer asking coupon users to checkout on the desktop site. Now that we are on Version 9 I want to fix this. Is there a mobile version of the Coupon Box code above?

          Thanks.
          Last edited by Keitho; 03-05-15, 06:14 PM.
          Keith Oratz
          PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
          www.preparesmart.com

          Comment


            #6
            Re: Using the new coupon feature

            There is no difference it code for mobile. That same code will work on a Mobile site. You may have to style the button or input to make it more usable on a mobile device though depending on your layout.
            Brennan Heyde
            VP Product
            Miva, Inc.
            [email protected]
            https://www.miva.com

            Comment


              #7
              Re: Using the new coupon feature

              Thanks. I'll give it a go!
              Keith Oratz
              PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
              www.preparesmart.com

              Comment

              Working...
              X