Announcement

Collapse
No announcement yet.

Add to Basket code

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

    Add to Basket code

    Can anyone tell me the code to add a product to the basket? In miva, but, on the About Us page, for example.
    Thanks!
    Cway
    Trent Studios, LLC
    Graphic Design, Website Design
    TrentStudios.com
    (970) 568-8652

    #2
    Re: Add to Basket code

    You can add a product to cart on any page and even from outside of Miva. All you need is a form (or URL) with these 4 pieces:

    Product_Code - Product Code to be added
    Quantity - Quantity to be added
    Screen - Page to take user after add to cart happens
    Action - Must be ADPR for "Add Product"

    Here is an example:

    Code:
    <form method="post" action="http://domain.com/">
        <input type="hidden" name="Screen" value="BASK">
        <input type="hidden" name="Action" value="ADPR">
        <input type="hidden" name="Quantity" value="1">
        <input type="hidden" name="Product_Code" value="under-armour-huslte-backpack">
    
    
    <input type="submit" value="Add To Basket" class="button">
    </form>

    You can also choose to pass the screen in the URL and not include it as a hidden input:

    Code:
    <form method="post" action="http://domain.com/BASK.html">
      
        <input type="hidden" name="Action" value="ADPR">
        <input type="hidden" name="Quantity" value="1">
        <input type="hidden" name="Product_Code" value="under-armour-huslte-backpack">
    
    
    <input type="submit" value="Add To Basket" class="button">
    </form>
    Or via a url:
    Code:
    http://www.domain.com/mm5/merchant.mvc?Screen=BASK&Product_Code=123abc&Quantity=1&Action=ADPR
    Last edited by Brennan; 10-06-15, 07:43 AM.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Add to Basket code

      Good morning, Brennan! How are you doing so far, today?

      Yes, that URL you sent - how do I make that dynamic? How do I ask for the product code?

      Code:
      http://www.domain.com/mm5/merchant.mvc?Screen=BASK&Product_Code=123abc&Quantity=1&Action=ADPR
      Trent Studios, LLC
      Graphic Design, Website Design
      TrentStudios.com
      (970) 568-8652

      Comment


        #4
        Re: Add to Basket code

        The product code would get hard coded.

        What are you trying to do?
        Brennan Heyde
        VP Product
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          Re: Add to Basket code

          You could use:

          http://www.domain.com/mm5/merchant.m...=1&Action=ADPR


          But, yea...like Brennan said...what are you trying to DO:


          BTW: Whenever asking for assistance, its very important to explain what you WANT to accomplish...not How Do I Do What I Think I Need. They are often very different answers.
          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


            #6
            Re: Add to Basket code

            I thought there was just one answer, but I see now that it depends.
            I had a custom module written that adds samples to ones basket. I want to replace the graphical 'Add Sample to Basket' button with an HTML/CSS one. I was told by the developer that the URL for an add-sample link is the same as for a normal add-product link, except that the prefix "SAMPLE-" should be placed just before the product code. So I'm trying to find out what the normal add-product link is.
            Trent Studios, LLC
            Graphic Design, Website Design
            TrentStudios.com
            (970) 568-8652

            Comment

            Working...
            X