How to add a block in checkout page in Magento?

Created a shopping cart in a Session ASP.Net how to move it to another page?

  • My professor gave us a code for a shopping cart that he created in a Session but I was wondering how can I make the data of the shopping cart to show on another page called (CheckOut.aspx), I plan the user to click on a button and be directed to this page to complete the purchase. Code on the first page : Server.Transfer("CheckOut.aspx") Code on the CheckOut.aspx page: Response.Write(Request.Form(Session("Car… - but it doesn't work. Shopping cart: Function makeCart() 'make a table in memory that will represent the cart objDT = New System.Data.DataTable("Cart") objDT.Columns.Add("ID", GetType(Integer)) objDT.Columns("ID").AutoIncrement = True objDT.Columns("ID").AutoIncrementSeed = 1 objDT.Columns.Add("Quantity", GetType(Integer)) objDT.Columns.Add("Product", GetType(String)) objDT.Columns.Add("Cost", GeType(Decimal)) 'put the cart in the session object Session("Cart") = objDT

  • Answer:

    DataBind a DataGrid to the DataTable. I.e. drop a DataGrid from the Toolbox on the aspx page in the designer and write the following code in the Page_Load event. Pseudo-code: if not Page.IsPostBack myDataGrid.DataSource = Session("Cart") myDataGrid.DataBind() end if You have to type-cast the Session object to the DataTable, of course. Hope this helps.

Juan at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.