Products

Solutions

Resources

Partners

Community

About

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 ForumsStoreStoreDNN Store SQL helpDNN Store SQL help
Previous
 
Next
New Post
12/4/2007 11:20 PM
 

 

I don't want to modify anything existing.  I just want to add a sql statement that would select the current users CartID so that I can update the shopping cart with a product from a form.

I think I have an understanding of the tables at this point.  I just need to figure out how to get the current user CartID.  I don't know how to retrieve a cookie, and have tried some other things but can't seem to make it work.  Here is the simple code that I want to run to update the tables.. I just need the CartID.  Any Ideas...

Insert

 

into dbo.dotnuke_store_CartItems (CartID, ProductID, Quantity) ('e9743b16-b42b-43b0-8cc6-11681734dd2a','7','1')

 

values

 

 
New Post
12/5/2007 9:55 AM
 

Hi,

I understood that you want to use an sql statement, that's not the point. For security reason, the cart id is auto-generated, then you can't predict it. You tell me that you want to use a form, ok. But how do you build this form? Is it a module created with VS? Do you use a form/module generator like XMod? Please give me more detail on HOW, not on what you want to do. If you can add an sql statement in your form, probably you can add a reference and call a method no? I need this details for give you an accurate help.

If you use VS, add a reference to DotNetNuke.Modules.Store.Cart.dll in your module project, then call CurrentCart.AddItem(PortalId, productID, Quantity);.

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.
 
New Post
12/5/2007 1:52 PM
 

The form is built using datasprings.com dynamic registration.  It allows events to run sql statements, at user input and completion events.

 
New Post
12/7/2007 10:27 AM
 

Hi,

I do not have this module. Could you post in the DataSpring  forum? It would have to be asked whether it is possible to add a reference to a DLL and to call a method of this DLL.

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.
 
New Post
4/4/2008 6:33 PM
 

I am doing something similar. Since I need to add some specific functionality that the basic store module doesn't have, I am having to add some new code.

Where do I find the code for the ProductDetails.ascx.cs ? I did a search on the directory and came up with nothing.

How do I generate a new cartID to be able to enter a new row into the Store_Cart table? Also how do I get the current UserID of the person that is logged in?

Also, I suspect that if the user isn't logged in and tries to add something to the Store_CartItems table it would give an error since there is no entry in the Store_Cart table. How do you treat this?

I've looked for the code, but I'm unable to find it. All the code seems to be all compiled into the DLLs.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreDNN Store SQL helpDNN Store SQL help


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