Bleeding edge Product Import

130 views
Skip to first unread message

John Sieber

unread,
Jun 1, 2012, 4:14:59 PM6/1/12
to slatwall...@googlegroups.com
I'm looking at the older instructions for building a product import tab delimited file and attempting to import products into the bleeding edge version of Slatwall. I have this example for the input file:
ProductType_productTypeName Brand_BrandName productcontent_page product_productName product_ProductDescription     product_ProductCode attribute_[attributeID] attribute_[attributeID] option_Size sku_Price

It appears that the header is tableName_columnName but I'm guessing that some of the these tables and or columns no longer exist in the Bleeding edge version of Slatwall as the database schema was modified. Is this the case, or am I reading into the import file header incorrectly? If this header is no longer valid, is there an example file availabe, possibly with a sample row of data as well? 

Greg Moser

unread,
Jun 2, 2012, 2:46:26 PM6/2/12
to slatwall...@googlegroups.com
Hey John,

Sumit & I plan to spend some time next week (hopefully) on product import.  We may have a better answer for you then.  Realistically, as you have noted the old import is somewhat invalid because of all the scheme changes, so trying to get that to work is almost going to be a bigger hassel than it is worth.

Just my $0.02

-Greg

John Sieber

unread,
Jun 4, 2012, 12:52:27 PM6/4/12
to slatwall...@googlegroups.com
Thanks for the reply Greg! I'll hold off until I hear more about the status of the product import feature. 
-John

Jeff Davis

unread,
Nov 10, 2015, 4:07:05 PM11/10/15
to Slatwall Commerce
Bump!
Or more politely, did Sumit and you ever come to a meeting of the minds on product import?
I can see that there are an infinite number of monkeys, I mean combinations of importable fields, but if you had a base product that could do name, manufacturer, price, as maybe a plugin that could be a base, folks would run with it!

Chris Kent

unread,
Nov 10, 2015, 4:26:36 PM11/10/15
to Slatwall Commerce
Hi Jeff,

I did a very bespoke dynamic product creation integration for a client early this year, products are individually created as required by requesting product details via api call to library system. Creates the product and all associated entities, e.g. skus, images, product type, categories ... etc.

Have a new client project lined up that will require a product import process and I intend to base this import on the work I have already done, but aim to make it more generic to allow import from different sources and data sets. 

When I have completed the client project, will make the integration open source and available for all, but this will be a few months before it is complete.

Happy to discuss ideas with you and others who may be interested in a product import integration.

Chris.

Greg Moser

unread,
Nov 16, 2015, 2:36:43 PM11/16/15
to slatwall...@googlegroups.com
We do have sku/product import code in the application that can be used programmatically over the API.  It is now all based on property identifiers so you just need to name your columns with the correct property identifiers to map to the correct fields.

I'm not actually 100% sure on how it works, but Sumit or someone else from our team can probably give you some more insights.  I know that we use it on our projects, but haven't gotten around to documenting publicly or giving it a UI.

-Greg

--
You received this message because you are subscribed to the Google Groups "Slatwall Commerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slatwallecomme...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg Moser
Slatwall Product Manager | ten24 Digital Solutions

mobile     760.518.5314
office    |  877.886.5806 x107

Sumit Verma

unread,
Nov 16, 2015, 4:24:17 PM11/16/15
to SlatwallEcommerce
We don't have that code in BE yet. It will be available in next version. We can provide some examples once the code is pushed up. 

Sumit Verma
Partner / Vice President | ten24, LLC
office: 877.886.5806 x 103 | mobile: 617.290.8214
www.ten24web.com | www.linkedin.com/in/sverma | twitter: blogonria

Chris Kent

unread,
Feb 1, 2016, 4:00:19 PM2/1/16
to Slatwall Commerce
Hi Sumit,

Any news on the Product Import code getting into the core code?

New client and requirement for product import. I do have some custom code that I can modify, but thought I would ask if the Slatwall product import code is released yet? 

very happy to help test if it is still at testing stage.

Chris.

Bob Dronski

unread,
Mar 27, 2016, 6:17:49 PM3/27/16
to Slatwall Commerce
Bump.

I had written some code to import an existing product database into slatwall 3, but I'm getting foreign constraint errors with a new install. Before I start digging too deeply, I wondered if any progress has occurred on moving the import code into production.

Thanks,
Bob

Chris Kent

unread,
Mar 28, 2016, 4:09:05 AM3/28/16
to Slatwall Commerce
Hi Bob,

I am currently working on a large scale and very time consuming product import process for a client using the Slatwall import code. Time consuming because the source data is a very old legacy system that does not provide a very easy / reliable way to construct the import data for Slatwall.

The Slatwall import process works by using loadDataFromQuery in hibachiDataService passing in a query of data to import and a JSON string defining the import to Slatwall properties mapping. See attached files for examples.

<cfset $.slatwall.getService("hibachiDataService ").loadDataFromQuery(qry,importconfig) />

In the attached product.cfm, the query is loaded from a spreadsheet, but for my import I am creating the import query direct from the legacy system.

The JSON config file defines the mapping between import query columns and properties & related entities.properties.

This process works very well, and can also import related entities, in the product.json you will see that the base entity is set to the sku, but it will also create the products, product types and brands when required. 

By defining the import config and constructing your import query data you can import any Slatwall entities.

I have found that there was an issue when defining boolean properties to be imported and had to temporarily amend https://github.com/ten24/slatwall/blob/master/org/Hibachi/HibachiDataService.cfc#L372-L374 to set dataType to bit for booleans. Replacing 
                                        columnRecord.dataType = thisColumn.dataType;

with 
                                        if(thisColumn.dataType == "boolean") {
                                            columnRecord.dataType = 'bit';
                                        } else {
                                            columnRecord.dataType = thisColumn.dataType;
                                        }

Have not had chance to fully test this or create a pull request to fix the core Slatwall code yet. I believe that loadDataFromQuery is not used anywhere else in Slatwall, so this change should be OK.

If you are using a version of Slatwall before 4.2.000 then you will need to use https://github.com/ten24/slatwall/blob/4.1.018/model/service/DataService.cfc instead of https://github.com/ten24/slatwall/blob/master/org/Hibachi/HibachiDataService.cfc I have not tested this earlier version.

Chris.
product.json
product.cfm

Bob Dronski

unread,
Mar 28, 2016, 12:32:18 PM3/28/16
to slatwall...@googlegroups.com
Chris,

This looks great!  I’ll play with it later today.  Sure a lot better than the brute force method I was using.

Thanks,
Bob

--
You received this message because you are subscribed to a topic in the Google Groups "Slatwall Commerce" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/slatwallecommerce/R4G8wp-tjrc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to slatwallecomme...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
<product.json><product.cfm>

Reply all
Reply to author
Forward
0 new messages