Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

This page will be extended to cover information around building CommCare Supply mobile applications. For now, we just have a writeup on how to access product data in the phone. 

 

Accessing Product Data

CommCare Supply makes product data available through a fixture. For more details on how to work with fixtures, see: https://help.commcarehq.org/display/commcarepublic/Creating+and+Updating+Fixtures

Configuring Products: In CommCare Supply, there is no need to create a fixture for products. This is done automatically once the user has configured products through Setup -> Manage Products -> Add Product.

Accessing Products: When building a mobile application, product data can be accessed through the auto-created product fixture on the phone. The format for accessing the data is:

 

<fixture id="CommCare Supply:products" user_id="3ce8b1611c38e956d3b3b84dd3a7ac18">
  
<products>
     
<product id="some-guid-here">
              
<name>Coartem</name>
              
<unit>pills</unit>
              
<code>co</code>
              
<description>common antimalarial</description>
              
<category>antimalarials</category>
              
<program_id>some-program-guid</program_id>
              
<cost>1.00</cost>
     
</product>
  
</products>
</fixture>

 

 

  • No labels