Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rxnlabs/e2cbfd0bcd9de8e7c1a0 to your computer and use it in GitHub Desktop.
Save rxnlabs/e2cbfd0bcd9de8e7c1a0 to your computer and use it in GitHub Desktop.
SalsaScript - Get stock of items in Salsa storefront using SalsaScript
<script type="text/javascript">
var storefront_items_stock = {};
<?
var storefront = DB.getObjects('store_item');
for each (item in storefront) {
print('storefront_items_stock[');
print( item.store_item_KEY );
print( '] = ' );
print( item.Number_in_Stock );
print( ';\n');
}
?>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment