Product Import

253 views
Skip to first unread message

PhinHead

unread,
Jul 28, 2011, 10:04:58 AM7/28/11
to SlatwallEcommerce
Hello,

Looking to import products from a CSV. Is this possible? any
direction would be appreciated

Tony G

unread,
Jul 28, 2011, 10:48:09 AM7/28/11
to SlatwallEcommerce
Currently, it's not possible, but it's on our roadmap for version 1.1
(due in late August):

https://github.com/ten24/Slatwall/issues/170

-Tony

Sumit Verma

unread,
Jul 28, 2011, 10:52:45 AM7/28/11
to slatwall...@googlegroups.com
Hi,

We do have product import partially done in the current release. Basically the import method is there but there is no UI for it. Send me an email directly and I can help you with import.

Thanks,
Sumit


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

VoltronXL

unread,
Sep 5, 2011, 7:25:07 PM9/5/11
to SlatwallEcommerce
Hello -
I have a spreadsheet my client created with about 80 products, and I
was planning to make my own import script for this by going over each
row of data and creating a product, set the options, etc. Wondering
if I would be better off using the built in import, and if so, can you
point me in the direction of getting it going?

Thanks!
Andrew

On Jul 28, 8:52 am, Sumit Verma <sumit.ve...@ten24web.com> wrote:
> Hi,
>
> We do have product import partially done in the current release. Basically
> the import method is there but there is no UI for it. Send me an email
> directly and I can help you with import.
>
> Thanks,
> Sumit
>
> Sumit Verma
> Partner / Vice President | ten24, LLC
> office: 877.886.5806 x 103 | mobile: 617.290.8214www.ten24web.com|www.linkedin.com/in/sverma| twitter: blogonria

Sumit Verma

unread,
Sep 5, 2011, 9:48:15 PM9/5/11
to slatwall...@googlegroups.com
Here is the instruction I gave to someone else on import. Let me know how you make out:

For import I would recommend using txt file (tab delimited) instead of csv. Even though we plan support both, txt is better because it will allow you to have "," in your data.

Now for import, basically you will have to do 2 things:

1. Set the header (first row) of your import file to specific name. This will be done automatically when we have the UI in place. Here is the example:

ProductType_productTypeName     (Name of your Product type)

Brand_BrandName                 (Name of your Brand)

productContent_page         (path to the product page, this should be same as the value of "filename" field for that page) 

product_productName         (Name of the product)

product_ProductDescription (Description of the product)

product_ProductCode         (Product code, this should be unique)

attribute_[attributeID]         (if you are importing any data for the custom attribute, this is for that. Use that attributeID)

attribute_[attributeID]

...

option_[optionCode]         (Option code, if you are importing options, e.g. option_size, option_color)

...

sku_Price                       (sku price)

sku_skuCode                        (optional, only if you have predefined sku code)


Once you have the file setup just drop it in the mura root. 

2. Create a file import.cfm in default/includes/display_objects/custom/slatwall/product

In that file add this line of code:

<cfset $.slatwall.getService("ProductService").loadDataFromFile('http://[your_site_url]/products.txt'/>


Now call this file by URL:

http://[your_site_url]/plugins/slatwall/?slatAction=frontend:product.import


As I mentioned, this is obviously a temporary option to importing the product data. We will have this feature fully implemented in version 1.1, so you can just upload your file without any header and import will be processed. 



 
Sumit Verma
Partner / Vice President | ten24, LLC

VoltronXL

unread,
Sep 6, 2011, 2:30:47 PM9/6/11
to SlatwallEcommerce
Hey Sumit -
Thanks for the instructions! I did that with a sample test file and
it worked perfectly!

However, with the CSV file I have from the client I fear it will take
to much time to convert to the format you outlined so I would prefer
to loop over the data and create products on the fly with CF code. I
have the code in place to loop over my CSV file from client all
working, now what I need to do is create a product with CF code - is
this possible? I have done this in Mura before for creating pages
using the content api and creating a new content bean like this:

<cfset contentBean = application.contentManager.getBean()>
<cfset contentBean.setSiteID('default')>
<cfset contentBean.setTitle('My Created Page')>
<cfset contentBean.setType('Page')>
<cfset contentBean.save()>

Is there a similar way to create a product outside of the Slatwall
admin? What I will have is:
sku, product name, price, type (name only, but I can convert to an
ID), description, weight, and 3 extended attributes I have created for
products.

Can you let me know the code I need to create a product, and any
"required" items that I won't have that I will need to assign?

Thanks!
Andrew

Sumit Verma

unread,
Sep 6, 2011, 8:42:36 PM9/6/11
to slatwall...@googlegroups.com
Hi Andrew,

I don't have an example of creating the product using bean. There are lot of related entities for product so, it might be more work than setting up header for you csv file :-) If you want you can take a look at the import logic. It's in productDAO.

Best,
Sumit


Sumit Verma
Partner / Vice President | ten24, LLC

Greg Moser

unread,
Sep 7, 2011, 1:10:12 PM9/7/11
to slatwall...@googlegroups.com
Hi Andrew,

One thing that you could take a look at is this file: /plugins/Slatwall/integrationServices/Quickbooks/controllers/main.cfc

That Quickbooks import/export that I built is currently super customized for a given client, but I intend to make it more abstract for all quickbook users.

Anyway, I would recommend doing these steps:

1) Make a copy of the "Quickbooks" folder in the integration services
2) Rename the new copy "CustomIntegration"
3) Inside of "CustomIntegration" open up Integration.cfc
4) Change "Quckbooks" to "Custom Integration" in the getDisplayName() method
5) Reload Your application
6) Go to "Slatwall Main Menu > Settings Manager > List Integration Services"
7) Click the edit button next to "Custom Integration"
8) Switch "Custom Integration Active" to YES & Save

Now inside of the settings manager menu you will see "Custom Integration" that you can click on, which will have some of the framework for how i did an import of a Quickbooks IIF file (tab delimited text file).

Hopefully that helps.

-Greg

Greg Moser

unread,
Sep 7, 2011, 1:27:21 PM9/7/11
to slatwall...@googlegroups.com
Also, did the excel sheet that you are trying to import come from a different system or was it just manually created?  The reason I ask is because if the data is actually held in a separate system, it might be nice to add that system to the core integration's.

-G

Andrew Jones

unread,
Sep 7, 2011, 2:31:05 PM9/7/11
to slatwall...@googlegroups.com
Hey Greg -
Thanks for the input - the excel was client generated (and I have attached a sample of it to this email - not sure if it will come through in the group). 

It's pretty standard, the only thing I will need to parse is the column for "Product Category(ies)" (which is both the Product Type, and the related page - we have pages that match each type), and the "Promotion Pages" column.  This is for something I haven't quite figured out how to implement, but they want certain products to show up on a page as a "featured item" (they call it "promotion"), but I do not want this to be a Slatwall product listing page - just a regular page with a call out box for the projects they have said to "Promote" on that page.  I have created an extended Product attribute for "Related page" and I think I'll just populate that with the page ID. 

Thanks for the input - I'm going to see if I can get this working now.  I have the script that loops over a CSV version of the file and creates CF structures with all the columns, so just need to loop over each structure and save the product.

Thanks!
Andrew
Master Product Listing Example.xlsx

Ronnie Duke

unread,
Feb 2, 2014, 2:14:49 PM2/2/14
to slatwall...@googlegroups.com
Hey Sumit,

Is this method deprecated? I tried following these steps, but it refers to ?slatAction=frontend:product.import which I am not sure works with the new template structure post 3.0.

Any help would be much appreciated.

Thanks!
-Ronnie

Sumit Verma

unread,
Feb 2, 2014, 11:01:35 PM2/2/14
to SlatwallEcommerce
Those instruction were from version 1.x. I don't think it's will work but, you can follow the old code and write a custom integration for import. 

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


--
You received this message because you are subscribed to the Google Groups "Slatwall eCommerce" 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/groups/opt_out.

Michael Hnat

unread,
Feb 24, 2014, 12:17:47 PM2/24/14
to slatwall...@googlegroups.com
Hi,

I'm in the same situation: I have to import a lot of products in Slatwall.
I'm fine with writing a script for that, but I can't find some API documentation where to start. Any hints where to begin?
I guess it's the same process as adding an product via UI, but extended with reading the data to import.

Every help is welcome.

Best,
Michi
Reply all
Reply to author
Forward
0 new messages