Announcement

Collapse
No announcement yet.

MIVA API Order lookup

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

    MIVA API Order lookup

    HI,

    Just beginning to play with the MIVA API to display previous order information on the Account overview page. These 2 functions look very useful, but I'm unclear as to what the "order var" parameter is:

    <mvt:do file="g.Module_Root $ '/modules/component/cmp-cssui-vieworder.mvc'" name="l.success" value="Order_Load_Lookup(bill_email, bill_zip, order_id, order var)" />

    <mvt:do file="g.Module_Library_DB" name="l.success" value="Order_Load_Last(order var)" />

    Also, to display the results of these calls, do I mvt out the order:value? Then if I wanted to display information of the products (url, thumbnail, etc) in that order, would i need to look that up separately, or can that be done from the return results directly? many thanks for any help.

    best,
    Paul
    Last edited by paul.oreilly; 11-16-16, 03:39 PM.

    #2
    order is a structure containing data about a Miva Merchant order.
    var is a parameter modifier indicating that the order variable passed in can be altered by the function.

    The function takes an order ID (order_id) and loads all related data of that Miva Merchant order into the order structure variable, where you can now reference and use the related data.
    Gordon Currie
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit Any Document Easily | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Thanks for clarifying Gordon.

      It looks like those functions are for orders across the store, so Order_Load_Last() returns everything about the latest oder placed, not the latest order for a given customer.

      So, my misunderstanding, unless that function accepts a customer ID that would return that customers last order, but I could not get that to work.

      thanks for your help though,
      Paul

      Comment


        #4
        You could use OrderList_Load_Customer( cust_id, orders var)

        You would need to select the LAST order (pretty easy since it is sorted by ascending order ID).
        Gordon Currie
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit Any Document Easily | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment

        Working...
        X