Announcement

Collapse
No announcement yet.

Multiple "Free product" offers / Add to basket automatically

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

    Multiple "Free product" offers / Add to basket automatically

    Is there a way to have a product added to the basket automatically when a qualifying product is purchased?

    I like upsale, but there's that screen during checkout where the customer has to choose yes/no. This is great for other purposes, but for a free product, I'd rather the free product just get added to the cart automatically.

    Also, I already have a free product offer for every order on our site. I set up a product (item# Free-Sample or something like that) with attribute choices for five different samples. But when I add another promotion (buy x, get y free), the Upsell screen switches to Multiple Upsell, and I don't think that screen is easy to understand for customers.

    Thank you for any suggestions.
    Last edited by VisHorizons; 06-16-14, 06:39 AM.
    Doug
    Using Miva Merchant since 2004
    StoreSMART.com

    #2
    Re: Multiple "Free product" offers / Add to basket automatically

    This is something we've built into Version 9, but I'll ask Brennan to chime in about how to do it in PR8.
    Thanks,

    Rick Wilson
    CEO
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Multiple "Free product" offers / Add to basket automatically

      There a few different ways to do this. You can use JavaScript to do an AJAX add to cart where you add both products to the cart at the same time.

      The other way is to built a separate Miva page which does this multiple add for you. Instead of having the Add to cart button just add a single product, you take it to a new page which loops though the products submitted and adds each of them individually to the cart.

      It it probably 4 to 6 hours to get either on setup depending on your needs.

      Here is a JS snippet we use internally to do multi product adds:

      Code:
      $(document).ready(function() {
          var siteURL = "http://YOURSTOREDOMAIN/mm5/merchant.mvc";
          $("#multiple-add").bind("submit", function() {
            $("#multiple-add input[name='Product_Code']").each(function(index) {
              if ($(this).val() != "") {
                var qty = parseInt($("#multiple-add input[name='Quantity']").eq(index).val());
                if (!isNaN(qty) && qty > 0) {
                  var parameters = {};
                  parameters["Action"] = "ADPR";
                  parameters["Product_code"] = $(this).val();
                  parameters["Quantity"] = qty;
                  $(".product-attributes:eq("+index+") input[name*='Product_Attributes[']").each(function(ind) {
                    parameters["Product_Attributes["+(ind+1)+"]:code"] = $(this).val();
                    parameters["Product_Attributes["+(ind+1)+"]:value"] = $(".product-attributes:eq("+index+") select[name*='Product_Attributes[']").eq(ind).val();
                  });
                  $.ajax({
                    'type': "GET",
                    'url': siteURL,
                    'data': parameters,
                    'async': false
                  });
               }
             }
           });
         });
      });
      Brennan Heyde
      VP Product
      Miva, Inc.
      [email protected]
      https://www.miva.com

      Comment


        #4
        Re: Multiple "Free product" offers / Add to basket automatically

        Thanks for the input. That's all a bit beyond my skill level, though lol. For right now, I'm just going to say "Free product included in the product description. No basket shenanigans.
        Doug
        Using Miva Merchant since 2004
        StoreSMART.com

        Comment


          #5
          Re: Multiple "Free product" offers / Add to basket automatically

          This module can do what you're looking for:

          http://www.vikingcoders.com/store/me...ory_Code=MAGIC

          I also have several similar modules that were written as custom projects for other users; one of those may be a better fit for your store. Feel free to contact me by email to discuss the details.

          Thanks --
          Kent Multer
          Magic Metal Productions
          http://TheMagicM.com
          * Web developer/designer
          * E-commerce and Miva
          * Author, The Official Miva Web Scripting Book -- available on-line:
          http://www.amazon.com/exec/obidos/IS...icmetalproducA

          Comment

          Working...
          X