CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > starter_kits_and_source_projects.commerce_starter_kit Tags:
Item Type: Date Entered: 1/18/2005 9:33:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 41 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
"Shiner452" <>
NewsGroup User
AddToCart.aspx1/18/2005 9:33:22 PM

0

In the following code, copied from the online shopping cart starter kit from the page AddToCart.aspx, there is a line I would like to ask a question about. The code for the line is
 Dim cart As ASPNET.StarterKit.Commerce.ShoppingCartDB = New ASPNET.StarterKit.Commerce.ShoppingCartDB()
I am trying to figure out what that is. To me it looks as though ASPNET.StarterKit.Commerce is the NameSpace of the Public Class and ShoppingCartDB is the Public Class Name. So I tried to substitute my own namespace and class name like this but I get an error. The code I use follows the code copied from the site. Any help would be great. Thanks.



<%@ Page Language="VB" %>
<script runat="server">

'*******************************************************
'
' The Page_Load event on this page is used to add the
' identified product to the user's shopping cart, and then immediately
' redirect to the shoppingcart page (this avoids problems were a user hits
' "refresh" and accidentally adds another product to the cart)
'
' The product to add to the cart is specified using
' a querystring argument to the page.
'
'*******************************************************

Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

If Not Request.Params("ProductID") Is Nothing Then

Dim cart As ASPNET.StarterKit.Commerce.ShoppingCartDB = New ASPNET.StarterKit.Commerce.ShoppingCartDB()

' Obtain current user's shopping cart ID
Dim cartId As String = cart.GetShoppingCartId()

' Add Product Item to Cart
cart.AddItem(cartId, CInt(Request.Params("ProductID")), 1)
End If

Response.Redirect("ShoppingCart.aspx")

End Sub

</script>



MY CODE IS BELOW



<%@ Page Language="VB" %>
<script runat="server">

Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

If Not Request.Params("fldStockNo") Is Nothing Then

Dim SalesSide As SalesSide1.SalesSide2 = New SalesSide1.SalesSide2()

' Obtain current user's shopping cart ID
Dim fldOrderNo As String = SalesSide.GetShoppingCartId()

' Add Product Item to Cart
SalesSide.AddItem(cartId, CInt(Request.Params("ProductID")), 1)
End If

Response.Redirect("ShoppingCart.aspx")

End Sub

</script>
<html>
<head>
</head>
<body>
<pre></pre>
</body>
</html>

-Shiner

"paulssprd" <>
NewsGroup User
Re: AddToCart.aspx1/28/2005 7:00:11 PM

0

The ASPNET.StarterKit.Commerce is a complied namespace. To use your own namespace and class you will need to recomplie the page. To recompile the page go to the command prompt, and cd into the folder which contains the VB page and enter:

vbc /t:library /r:System.dll,System.Web.dll,System.Data.dll ShoppingCartDB.vb

This should recomplie the code for page ShoppingCartDB.vb
You will then need to cut and copy this newly created dll and put it into your /bin folder.
You should then beable to call your new namespace and classes just like they are now in the addtocart.aspx

4GuysfromRolla also has a help page, in which they are compiling a C# page, but the compile command is a little different but does the same thing. So if you need any help you can look here also.

http://www.4guysfromrolla.com/webtech/100500-1.2.shtml

2 Items, 1 Pages 1 |< << Go >> >|


Free Download:













having issues getting csk 2 final to work

checkout form

what happened to http://www.commercestarterkit.org ?

adding product functionality/info

can some one please tell me if im right?

help with left div navigation menu

changing ib store prices from $ to £

ups xmltextreader parsing

commerce starter kit --> commercial website --> help required

getproductdetails() problem in ibuyspy asp starter kit using mysql database

bug mk.bat error

server error in '/commercecssdk' application

error running asp.net

bug: _header.aspx causing error - postback is not working - in storevbvs project

how to modify asp.net commerce kit register file?

migrate the sql express to sql server ??

shopping cart submit problem

can't install!

how to add tooltips in disscuss section icon such as 'not read' in gcn, which is implented in asp.net forum

adding a column in a commerce sk table

found great site

looking for help!

mdse problem with commerce starter kit install

installation of commerce starter kit.

"selection" in menu

eshop-server

httpcontext error

commerce installation

"the name 'sizes' does not exist in the namespace 'asp.net.starterkit.commerce.shoppingcart'"

customer discount system?

portal store by snowcovered

live site - timeout expired!

problem with getting cartid

recommendations for fully featured online shop?

commerce kit for ms visual studio 2005?

dissapointed in lack of support for these starter kits

ibuyspy - really asp example ?! (i can see a dll)

installing ibuyspy store and portal

uninstall problem

configuration error

help, problem when making changes!

download permissions

ambiguous in namespace

from shoppingcart to table orders

bug with login

after new install - ie displays unprocessed html sounce??

cookie question about ibuyspy login page

retrieving orders that have been placed

how to display different categories depending on login?

question of importing & mapping data from excel

   
  Privacy | Contact Us
All Times Are GMT