Created
January 18, 2014 21:53
-
-
Save modmedia/8497175 to your computer and use it in GitHub Desktop.
Slatwall - Create new products programatically
This file contains 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
<!--- Create new Slatwall Object Programatically ---> | |
<cfset newBrand = $.slatwall.newEntity('Brand') /> | |
<cfset newBrand.setBrandName("Hello World") /> | |
<cfset newBrand.setURLTitle("hello-world") /> | |
<cfset newbrand = $.slatwall.saveEntity( newBrand ) /> | |
<!--- Update existing Slatwall Object Programatically ---> | |
<cfset product = $.slatwall.getEntity('Product','productid') /> | |
<cfset roduct.setProductName("Hello World") /> <!--- if you want to change the product name to Hello World ---> | |
<cfset product.setBrand("someBrand") /> | |
<cfset product = $.slatwall.saveEntity( product ) /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment