Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Last active December 20, 2015 16:49
Show Gist options
  • Save xcommerce-gists/6164695 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/6164695 to your computer and use it in GitHub Desktop.
service_calls.xml - Example 1 using path for both data and request
<service_calls>
<service_call name="selectedProduct" class="Mage_Catalog_Model_Product" method="load">
<arg name="id">{{request.params.id}}</arg><!-- ID element from HTTP paraeters substituted during evaluation of the path -->
</service_call>
<service_call name="locateProduct" class="Mage_Warehouse_Model_Locator" method="find">
<arg name="productSku">{{data.selectedProduct.sku}}</arg><!-- substitutes the SKU of the selected product -->
<arg name="zipCode">{{request.params.zip}}</arg><!-- substitutes the zip code from HTTP parameters -->
</service_call>
<service_calls>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment