HomeHomeDotNetNuke Forg...DotNetNuke Forg...Module ForumsModule ForumsStoreStoreDNN Store SQL helpDNN Store SQL help
Previous
 
Next
New Post
12/4/2007 7: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 5: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 3 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 9:52 AM
 

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 6: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 3 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 3: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
HomeHomeDotNetNuke Forg...DotNetNuke Forg...Module ForumsModule ForumsStoreStoreDNN Store SQL helpDNN Store SQL help


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.