Created
March 18, 2016 20:02
-
-
Save rxnlabs/e2cbfd0bcd9de8e7c1a0 to your computer and use it in GitHub Desktop.
SalsaScript - Get stock of items in Salsa storefront using SalsaScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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