Announcement

Collapse
No announcement yet.

Pass file name along with product order from external site

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

    Pass file name along with product order from external site

    Hi all,

    I am able to add an item to Miva's cart from an external site without issue by using the following URL:

    http://mysite.mivamerchant.net/mm5/merchant.mvc?Screen=BASK&Store_Code=mysite&Pro duct_Code=RSC&Attributes=Yes&Quantity=1&Action=ADP R

    However, I need to pass in additional information so that when Admins are viewing an order number they can match an ID to a unique item that is created outside of Miva. In my case, users upload a file and I need to pass in the filename to the order so Admins know which file goes to which order. Using the URL method above, does anyone have any ideas?

    Thanks!

    K.

    #2
    Re: Pass file name along with product order from external site

    Add: &filename=whatever-it-is.jpg

    To: http://mysite.mivamerchant.net/mm5/m...ode=mysite&Pro duct_Code=RSC&Attributes=Yes&Quantity=1&Action=ADP R&filename=whatever-it-is.jpg

    Then, on the BASK screen, probably in the header, create a custom basket field like this:

    <mvt:item name="customfields" param="Write_Basket( 'filename', g.filename )" />

    Note, the custom basket field is converted to a custom order field so it can be viewed along with the Order. Assigning the filename to an individual product in the basket would be more difficult, though you could do something like: <mvt:item name="customfields" param="Write_Basket( 'filename', g.product_code$':'$g.filename )" />
    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


      #3
      Re: Pass file name along with product order from external site

      If the product has an attribute, you can pass data directly into that, using a value such as
      Code:
      ... &Product_Attributes[1]:value=MyFileName
      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


        #4
        Re: Pass file name along with product order from external site

        Thanks Bruce,

        I tried that and can see that the basket has my URL in the top with the filename, but I don't see it in the order when I look at the orders screen in Miva Admin. Is there something else I need to configure to show the custom field? Where should this show up?

        Regards,

        Kelly

        Comment


          #5
          Re: Pass file name along with product order from external site

          Thanks Kent, we aren't using attributes since I am dynamically creating products due to 285 million possible configuration options. I may need to look into how to create the product with an attribute dynamically.

          Regards,

          Kelly

          Comment


            #6
            Re: Pass file name along with product order from external site

            Hi all,

            I got it working! I needed to add the matching custom field code in the Miva Admin via Utilities > Custom Fields. Now it is showing the value in the order form!

            Regards,

            Kelly

            Comment


              #7
              Re: Pass file name along with product order from external site

              yea. sorry about that...sometimes we just assume that goes without sayin.
              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


                #8
                Re: Pass file name along with product order from external site

                Originally posted by Bruce - PhosphorMedia View Post
                yea. sorry about that...sometimes we just assume that goes without sayin.
                Are you kidding! You got me 90% of the way and it was an easy track down. Thanks for taking the time to assist.

                Regards,

                Kelly

                Comment

                Working...
                X