steveosoule
10/26/2016 - 12:12 AM

Possible Miva Order Integration

Possible Miva Order Integration

Possible Miva Order Integration

Dynamic Order Export, Feed, Scheduled Task, MVT Call to Third Party

Instructions

  1. Create DOE Modification Key: "3rdParty_Orders", and ensure that "Track Orders" is checked
  2. Create Marketing > Feed > with a code of "3rdParty_Orders". That will create a User Interface > Pages > TEMPLATEFEED_3rdParty_Orders page
  3. Create a Store Settings > Scheduled Tasks > with a drescription of "3rdParty_Orders". Set the Operation to "Standard Scheduled Tasks: Run Feed". Set the Schedule to "Run Once, Then Disable". Set the Feed to "3rdParty_Orders".
  4. Go to the INVC page. Add the following code to the INVC page:
<mvt:assign name="g.xml" value="'
    <Provision>
        <Store code=\"' $ g.Store_Code $ '\">
            <ScheduledTask_Update task=\"3rdParty_Orders\">
                <Enabled>true</Enabled>
                <NextRun>
                    <Year>' $ s.dyn_tm_year $ '</Year>
                    <Month>' $ s.dyn_tm_mon $ '</Month>
                    <Day>' $ s.dyn_tm_mday $ '</Day>
                    <Hour>' $ s.dyn_tm_hour $ '</Hour>
                    <Minute>' $ s.dyn_tm_min $ '</Minute>
                    <Second>' $ s.dyn_tm_sec $ '</Second>
                </NextRun>
            </ScheduledTask_Update>
        </Store>
    </Provision>
'" />

<mvt:do file="g.module_feature_prv_ad" name="g.provision_result" value="PRV_Action_ProvisionStringData( g.xml )" />
  1. Go to the TEMPLATEFEED_3rdParty_Orders page. Assign the doe_modifiedorders item. Set the page's content to:
<mvt:item name="doe_modifiedorders" param="3rdParty_Orders">
    <mvt:assign name="l.fields" value="miva_array_serialize(l.settings:doe_modifiedorders)"/>
</mvt:item>

<mvt:call method="'raw'" action="'https://www.example.com/php/email.php'" fields="'l.fields'">
    <mvt:eval expr= "s.callvalue" />
</mvt:call>

Additional Info:

See this gist for a Sample mvt:call SOAP Request