Announcement

Collapse
No announcement yet.

Running JSON API inside a Miva module?

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

    Running JSON API inside a Miva module?

    Can I run this JSON from my Miva module?

    Code:
    { Edit_Product: 'shirt', CustomField_Values: { baskinv: { total_inv: 500 } } }
    Would that JSON be wrapped in an:

    Code:
    <MvCAPTURE VARIABLE = "l.json_snippet">
    Code:
    <mvdo file="{ g.Module_JSON }" name="l.json" value="{ JSON_Output( l.json_snippet ) }" />
    Is the first JSON sample missing something? And should there be some header output?

    Code:
    {
       "Store_Code": "{{Store_Code}}",
       "Miva_Request_Timestamp": "{{$timestamp}}",
       "Function": "%%SomeFunctionNameHere%%",
       {
           Edit_Product: 'shirt',
           CustomField_Values: {
              baskinv: {
              total_inv: 500
           }
       }
    }
    Note: wondering if the "{" around Edit_Product are needed or would result in an error?

    And in this case, what would %%SomeFunctionNameHere%% actually be?

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!
Working...
X