Announcement

Collapse
No announcement yet.

Save Cart without account: Trigger template based email

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

    Save Cart without account: Trigger template based email

    I'm looking to see if i can emulate the old toolkit savebasket2email function using the built in abandoned basket template based email set up.

    What I am thinking is having a button on BASK "Save Cart to My Email".

    On click it opens a simple form asking for their first name and email with a button to submit.

    When submitted it would send the abandoned basket email with all their cart contents like normal as well as extending the basket timeout accrodingly.

    Then I could setup a chain of reminders in regards to the basket expiring.

    How can I trigger a template based email this way using smt code on page templates?

    It could be even more awesome by adding a dropdown with a couple options for how long to save the cart for that would overwrite the basket timeout settings. Ex: 1 day, 3 days, 1 week, etc. But for now I would be happy being able to do this with whatever we have the basket timeout set to for the abandoned basket emails.

    The ultimate goal is to allow users to save their cart without an account.

    Leveraging the abandoned basket emails just seemed the most efficient way to not have a large database of saved baskets.

    If there are better suggestions to get this done, I am open to any.

    Thanks.
    Nick Harkins
    www.loveisarose.com
    *Web Developer
    *Miva
    *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

    #2
    I don't think its going to be feasible to tie into the abandoned basket email directly.

    How is what you're trying to accomplish different from just setting up the Abandoned basket email itself? Do you want the customer to click a button to opt in to the emails?

    Another alternative would be to leverage the browsers session storage to store the items in their basket. You could then have a "restore basket" link that re-adds the items to the basket. But this won't get you any email notifications, although the built in abandoned basket emails may give you what you want here as well.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Hi Brennan I had a feeling that might be the case.

      I'd like the customer to be able to "Save" their cart and be sent an email with a link they can click to reload it later without having an account. That way they don't have to submit the Bill To/Ship To form on OCST to trigger the Abandoned Basket emails (which we do already have set up).

      The particular items we sell that this would be helpful for are our Personalized Family Trees.

      There is a lot of info the customer has to gather when building their tree in the cart and sometimes they forget a name or birth date so they end up stopping and come back later to finish the tree.

      Problem is, if they go to a different device or sometimes even come back on the same device (depending on device/browser settings) their cart is gone.

      Just trying to help the customer save time and energy by giving them an option to manually "Save" their cart without having to start checkout.

      I think there may be something to work with by leveraging the session storage.

      Could possibly have a "Save Cart to My Email" link on BASK and when clicked, open a form with name and email. On submit store their cart items and send an email with the restore link. I could probably set up the form/email to work similarly to how the CTUS form/email works.

      It would probably have to be a plain text email with no cart summary but I feel it would still be helpful.

      Does this sound feasible?

      Miva Dream Feature:
      Perhaps there could be a new Save Basket Emails that functions similarly to the abandoned basket emails. Only instead of being triggered by inactivity, the email would be triggered by submitting a simple form with name and email. Subseqent basket expiration emails could then be set up on a keep basket alive basis similar to the abandoned basket email chains.

      So the Template Based Emails settings could be:

      Send When Basket is Saved:
      [] Name and Email form subittmed
      [] Saved Basket Email Sent More Than [ 4320 ] Minute(s) prior. (for basket expiration reminders. only selectable if a save basket email/form is set up)
      [] Keep Basket Alive for [ 1440 ] Minute(s)
      Nick Harkins
      www.loveisarose.com
      *Web Developer
      *Miva
      *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

      Comment


        #4
        Using our Dev branch, I tested adding this to our CTUS form (commented out the <textarea>):

        Code:
        <input type="hidden" name="savedCart" value="<&mvte:urls:BASK:auto_sep;Session_ID=&mvte:global:Basket:session_id;&amp;utm_source=miva&amp;utm_medium=email&amp;utm_campaign=saved_cart>">
        And this to the CTFM page (commented out the original):

        Code:
        <mvt:assign name="g.store:baskexp_days" value="g.store:baskexp / 1440" />
        <mvt:assign name="l.visitor_mail:message" value="'Dear ' $ g.contactName $ ',' $ g.eol $ g.eol $ ' We want to thank you for your interest in our gifts!' $ g.eol $ g.eol $ 'Your cart has been saved as you requested!' $ g.eol $ g.eol $ 'It will be saved for ' $ g.store:baskexp_days $ ' Days.' $ g.eol $ g.eol $ 'Click the link below to restore your cart from any device.' $ g.eol $ g.eol $ 'Saved Cart Link:' $ g.eol $ g.savedCart $ g.eol $ g.eol $ 'Thank You,' $ g.eol $ g.store:name $ g.eol $ g.store:phone $ g.eol $ g.eol" />
        For the CTUS hidden input value, I wrapped the basket url in < and > to make it more probable that it will be a clickable link in a plain text email.

        After setting it up and testing the form, the link does indeed restore the cart from different devices/browsers.

        I'll set up the new form as an optional way to save the cart on WLGN and add a page WLFM for processing/sending the email.

        That way if a user does have an account, they can choose to add it to a wish list by logging in. We can then still promote account creation for users without accounts. If a user is logged in, then the normal wish list functionality will be used.

        Brennan could there be any issues with setting it up this way? Any security issues?

        Cheers,

        Nick
        Nick Harkins
        www.loveisarose.com
        *Web Developer
        *Miva
        *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

        Comment


          #5
          Managed to get this working and even was able to set up a Cart Summary in the email.

          I created a version of the CTUS form and put it into a new Content Section (code: save_cart_email_form).

          Then added it to WLGN along with some conditionals to render the new form based on the mini basket being not being empty .

          Copied the CTFM page template into a new page template, WLFM, and then modified it to work with the new form on WLGN.

          For the Cart Summary to be added to the emails I did the following on WLFM:

          Assigned the CSSUI Basket Contents item to the page.

          In the Basket Contents Section I used mvt:capture to capture the contents into a local variable that is plain text email friendly.

          Code:
          <mvt:capture variable="l.settings:cart_summary">
              CART SUMMARY: &mvt:global:eol;
              ______________________________ &mvt:global:eol; &mvt:global:eol;
              <mvt:foreach iterator="group" array="basket:groups">
                  Item: &mvt:group:name; <mvt:if expr="l.settings:group:upsold">(Special Offer)</mvt:if> &mvt:global:eol;
                  Code: &mvt:group:code; &mvt:global:eol;
                  Qty: &mvt:group:quantity; &mvt:global:eol;
                  <mvt:if expr="l.settings:group:base_price GT l.settings:group:price">
                      Normal Price: &mvt:group:formatted_base_price; &mvt:global:eol;
                      SALE Price: &mvt:group:formatted_price; &mvt:global:eol; &mvt:global:eol;
                  <mvt:else>
                      Price: &mvt:group:formatted_price; &mvt:global:eol; &mvt:global:eol;
                  </mvt:if>
                  <mvt:if expr="l.settings:group:option_count">
                      Item Options: &mvt:global:eol; &mvt:global:eol;
                  </mvt:if>
                  <mvt:foreach iterator="option" array="group:options">
                      <mvt:if expr="l.settings:option:option_id">
                          &mvt:option:attr_code;: &mvt:option:opt_code;
                      <mvt:elseif expr="NOT ISNULL l.settings:option:data">
                          &mvt:option:attr_code;: &mvt:option:data;
                      <mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
                          &mvt:option:attr_code;: &mvt:option:data_long;
                      <mvt:else>
                          &mvt:option:attr_code;
                      </mvt:if>
                      <mvt:if expr="l.settings:option:base_price">
                          <mvt:if expr="l.settings:option:base_price GT 0">
                              <mvt:eval expr="'+$' $ rnd(l.settings:option:base_price, 2)" />
                          <mvt:else>
                              <mvt:eval expr="'-$' $ rnd(l.settings:option:base_price, 2)" />
                          </mvt:if>
                      </mvt:if>
                      &mvt:global:eol;
                  </mvt:foreach>
                  &mvt:global:eol;
                  <mvt:if expr="l.settings:group:subterm_id">
                      Subscription: &mvt:group:productsubscriptionterm:descrip; &mvt:global:eol;
                  </mvt:if>
                  Item Subtotal: &mvt:group:formatted_subtotal_comprehensive; &mvt:global:eol;
                  ______________________________ &mvt:global:eol; &mvt:global:eol;
              </mvt:foreach>
              <mvt:foreach iterator="charge" array="basket:charges">
                  &mvt:charge:descrip;: &mvt:charge:formatted_disp_amt; &mvt:global:eol;
              </mvt:foreach>
              &mvt:global:eol;
              Cart Total: &mvt:basket:formatted_total; &mvt:global:eol; &mvt:global:eol;
          </mvt:capture>
          Then in the WLFM Template I added the folowing:

          Above the "l.mail:message" variable:

          Code:
          <mvt:comment>
              <!--
              This will create a list of the basket contents and capture to local variable.
              Edit in the Basket Contents section below.
              -->
          </mvt:comment>
          <mvt:item name="basket" />
          Then added the captured variable in red to the "l.mail:message variable":

          Code:
          <mvt:comment>
              <!--
              This will create the store message from user input.
              -->
          </mvt:comment>
          <mvt:assign name="g.store:baskexp_days" value="g.store:baskexp / 1440" />
          <mvt:assign name="l.mail:message" value="g.eol $ g.eol $ 'A ' $ g.store:name $ ' Cart Was Saved to a Vistor' $ asciichar(39) $ 's Email!' $ g.eol $ g.eol $ 'Visitor' $ asciichar(39) $ 's Name: ' $ g.savedCartName $ g.eol $ g.eol $ 'Visitor' $ asciichar(39) $ 's Email: ' $ g.savedCartEmail $ g.eol $ g.eol $ 'The cart will be saved for ' $ g.store:baskexp_days $ ' Days.' $ g.eol $ g.eol $ 'Cart Total: ' $ l.settings:basket:formatted_total $ g.eol $ g.eol $ l.settings:cart_summary" />
          And added the same captured variable in red to the "l.visitor_mail:message" variable:

          Code:
          <mvt:comment>
              <!--
              This function will send a confirmation email to the visitor.
              If you do not wish to send a confirmation email, you can either `mvt:comment` this section
              out or delete it all together.
              -->
          </mvt:comment>
          <mvt:assign name="l.visitor_mail:from" value="asciichar(34) $ g.store:name $ asciichar(34) $ ' <' $ g.store:email $ '>'" />
          <mvt:assign name="l.visitor_mail:to" value="asciichar(34) $ g.savedCartName $ asciichar(34) $ ' <' $ g.savedCartEmail $ '>'" />
          <mvt:assign name="l.visitor_mail:subject" value="g.savedCartSubject" />
          <mvt:assign name="l.visitor_mail:message" value="g.eol $ g.eol $ 'Dear ' $ g.savedCartName $ ',' $ g.eol $ g.eol $ 'We want to thank you for your interest in our gifts!' $ g.eol $ g.eol $ 'Your cart has been saved as you requested!' $ g.eol $ g.eol $ 'It will be Saved for ' $ g.store:baskexp_days $ ' Days.' $ g.eol $ g.eol $ 'Click the Link Below to View Your Cart from any device.' $ g.eol $ g.eol $ g.savedCart $ g.eol $ g.eol $ 'NOTE: Anytime the link above is clicked, it will Save Your Cart for ' $ g.store:baskexp_days $ ' More Days.' $ g.eol $ g.eol $ 'Thank You,' $ g.eol $ g.store:name $ g.eol $ g.store:phone $ g.eol $ g.eol $ l.settings:cart_summary" />

          Although, its not a pretty email, it is indeed working and allows the users to "Save" their cart without an account.

          Feel free to check it out. Go here: https://www.loveisarose.com/24k-gold-roses.html , add an item to the cart, click "Save Cart For Later" in the Mini Basket or from the BASK page.

          Fill out and submit the Send Cart Email form if you wish to see the email and test the link from a different device.

          Cheers,

          Nick
          Last edited by SidFeyDesigns; 09-28-22, 04:44 PM.
          Nick Harkins
          www.loveisarose.com
          *Web Developer
          *Miva
          *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

          Comment


            #6
            I took things a step further and utilized <mvt:capture variable="g.html_store_message"> and <mvt:capture variable="g.html_visitor_message"> to create html emails for the store and the visitor.

            Feel Free to check it out using the steps outlined in my previous post.

            If anyone has any interest in setting this up for their store, drop me a line.

            Cheers,

            Nick
            Nick Harkins
            www.loveisarose.com
            *Web Developer
            *Miva
            *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

            Comment


              #7
              oh, yea mvt:capture is probably my favorite SMT command.
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment

              Working...
              X