"Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
"Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
Hi,
We have one store on “AbleCommerce 7.0” and we have one other application from where we receive orders’ details in form of CSV file, now we don’t want to enter our other application’s orders in to our store on “AbleCommerce 7.0” manually using “Data Port”, then do “AbleCommerce 7.0” has any other option, like exposed web services or any API or something, by calling methods of which we can send and thus save our other application orders data in our “AbleCommerce 7.0” store?
Ultimately we want to automate this data entry task (“Uploading (Importing) AC7 CSV data”) by some windows service application or something like that, so what shall we do?
Has it anything to do with “CommerceBuilder API”?, means does it mean for/match with our this requiremnet?
Any help will be highly appreciated.
Thanks,
Best Regards,
Niraj Parikh (Project Lead)
Cygnet Infotech Pvt. Ltd. - http://www.cygnet-infotech.com
Phone: +91 79 4022 6400
Direct: +91 79 4022 6413
Skype: niraj.parikh
MSN: niraj.parikh AT live.com
Yahoo: niraj.parikh AT yahoo.com
"If you change the way you look at things, things you look at change."
"It's never crowded along the extra mile."
Dr. Wayne Dyer.
We have one store on “AbleCommerce 7.0” and we have one other application from where we receive orders’ details in form of CSV file, now we don’t want to enter our other application’s orders in to our store on “AbleCommerce 7.0” manually using “Data Port”, then do “AbleCommerce 7.0” has any other option, like exposed web services or any API or something, by calling methods of which we can send and thus save our other application orders data in our “AbleCommerce 7.0” store?
Ultimately we want to automate this data entry task (“Uploading (Importing) AC7 CSV data”) by some windows service application or something like that, so what shall we do?
Has it anything to do with “CommerceBuilder API”?, means does it mean for/match with our this requiremnet?
Any help will be highly appreciated.
Thanks,
Best Regards,
Niraj Parikh (Project Lead)
Cygnet Infotech Pvt. Ltd. - http://www.cygnet-infotech.com
Phone: +91 79 4022 6400
Direct: +91 79 4022 6413
Skype: niraj.parikh
MSN: niraj.parikh AT live.com
Yahoo: niraj.parikh AT yahoo.com
"If you change the way you look at things, things you look at change."
"It's never crowded along the extra mile."
Dr. Wayne Dyer.
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
AbleCommerce doesn't expose no such functionality out of the box. I have posted some samples about writing custom CSV import routines and manipulating CSV in AbleCommerce. You can write some of your custom import routine for order CSV and then expose it through some of your custom web service. Please check the following threads
viewtopic.php?f=61&t=9828
viewtopic.php?f=61&t=9829
viewtopic.php?f=61&t=9828
viewtopic.php?f=61&t=9829
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
Hi Mazhar thanks for your reply, I have gone through threads you referred, but I think that still needs user interaction, we want to automate the process of data entry in store on Able Commerce.
Thanks,
Niraj.
Thanks,
Niraj.
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
Those samples are just to provide you the guide line how you can carry out that job. Obviously you will need to write web services and other necessary components to automate your custom order CSV import process.
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
from where to get using CommerceBuilder.Utilit? I am new with integration with AbleCommerece so no idea from where to get this? can you please help me out? if you can upload a small but complete sample including AC references it uses, then that will help us lot.
Thanks,
Niraj
Thanks,
Niraj
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
These classes are defined in CommerceBuilder dll which can be found in AbleCommerce installation's bin directory.
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
thanks, finally I am able to use these dlls and able to run the website I created including your page, however need one more favor, any idea how to upload Credit Card information related to orders?
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
Here is the modified import sample for importing credit card data.
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
Thanks lot for this. I have created one website and have given reference to all required dlls, but dont know what I need to give in web config to access CommerceBuilder database? can you please give me connection string format and all details what I need to specify in web.config file to support this code or say to access the db?
thanks,
niraj.
thanks,
niraj.
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
You can provide a connection string in following way in App_Data/database.config
Code: Select all
<connectionStrings>
<add name="AbleCommerce"
connectionString="server=yourserver;database=yourdatabase;Integrated Security=true;"
providerName="System.Data.SqlClient" />
</connectionStrings>
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
hey database.config or web.config doesnt matter where I give this connection string right?
moreover this server and database details means details of our store on AbleCommerce right?
moreover this server and database details means details of our store on AbleCommerce right?
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
If you want to execute your custom queries within AbleCommerce pages or boundary then you need not to worry about the connection string. All you need is to access the Database object from Token and makes use of it.
Code: Select all
Microsoft.Practices.EnterpriseLibrary.Data.Database database = Token.Instance.Database;
string sql = ("SELECT COUNT(*) As RecordCount FROM ac_Affiliates WHERE StoreId = @storeId");
using (System.Data.Common.DbCommand selectCommand = database.GetSqlStringCommand(sql))
{
database.AddInParameter(selectCommand, "@storeId", System.Data.DbType.Int32, Token.Instance.StoreId);
int affiliateCount = (int)database.ExecuteScalar(selectCommand);
}
Re: "Uploading (Importing) AC7 CSV data" & “CommerceBuilder API"
I have attached one page where we try to upload data from CSV to database using AC ddl's, we are able to save all other information but Payment, when we try to save payment information, it gives us error that "Object reference not set to an instance of an object" if you can please go through this page and let us know what is missing or are we in wrong direction then we we will be very thankful to you.
Thanks,
Best Regards,
Niraj
Thanks,
Best Regards,
Niraj