Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreUpdating the product quantity programaticallyUpdating the product quantity programatically
Previous
 
Next
New Post
9/29/2009 5:47 PM
 

I am implementing a basic e-commerce site using DNN 5.1.2 and the Store 2.1.0 modules.

I also have a separate (non DNN) asp.net website which controls all the stock control for the company.  I can easily retrieve via a .net webservice call the current quantity of a product from the stock system (which changes in real time as people purchase items from the bricks and mortar store) and am wondering if it is possible to then automatically update the product quantity in the DNN store?

Fairly new to DNN, but proficient at asp.net websites / services - any suggestions to

a) whether this is possible

b) how to go about it

would be very welcome.

Thanks.

 
New Post
9/30/2009 7:35 PM
 

Hi David,

First, you should use the last beta 02.01.20 with dnn 5.1.2, please read this post.

To create your own version, you should install the source version, please read this post (translate version numbers as needed, the process remaining the same). PLEASE follow my advices, because the Store module is NOT the more simple module to begin with dnn! The VS solution contains 21 projects in C#, I hope you have a strong knowledge about ASP.NET, C# AND the WAP programming model.

a) Yes, you can do it easily.

b) There are several ways to do this. May be the simple way is to modify ProductController.cs inside the DotNetNuke.Store.Catalog project. You will find several functions related to the catalog products like: GetPortalProducts, GetPortalFeaturedProducts, GetCategoryProducts and so on. Each function call the corresponding function in the SqlDataProvider to retrieve a DataReader, then call the standard CBO.FillCollection. This method return an ArrayList of ProductInfo class filled with data from the DataReader. You should  parse the collection and call your webservice to retreive the real stock quantity from the second store and update the ProductInfo..StockQuantity property.

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreUpdating the product quantity programaticallyUpdating the product quantity programatically


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out