in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Tips to solve these problems? What could be the source of these problems.

Last post 06-23-2009 6:06 PM by discovertec. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-21-2009 11:56 AM

    Tips to solve these problems? What could be the source of these problems.

    I want to do following things in dashcommerce.(as a beginner).

    Admin can add the products.

    Customers can select these products and them to there cart. 

    After that i'll write a webservice that will get all the latest orders  from the dashcommerce DB and display it in a desktop application

     

    I made following steps:

    1)Add some Products in the Databse using Admin Role (Done).

    2)Now i want to login as a customer so i rgisterd myself as a customer. After login I Choose One of the products that was displayed on the left side of the page. (Done)

    3)Now I want to add this and some other products in my cart for this I clicked on the "Add To Cart" Button on the top right side of the page.(At this point i am unsuccessfull to add this to the cart and cart contains a value of  0.

    also

     I added some of the products there manufatcurers and categories. I set all the attributes for the product. Store_Product_Category_Map,

    Store_Product,  Store_ProductStatusDescriptor, Store_ProductType,Store_Category,Store_Image,Store_Manufacturer, tables are properly filled with the data supplied during the add product cycle.

    Now the problem is that when i login and choose some products and click on the "Add To Cart" button it doesn't add anything to code. Neither the table

    Store_Order nor relted tables are updated. How can i achieve that.

    I modidfied this method in J:\Bilal Haider\Dashcommerce\dc_3.0_Source_B\Store\Controllers\Generated\OrderController.cs which is readonly.

    I undo those changes but still the code is not debugging due to change. How can i rebuild the dll's after change. How can i modify these. I know these are generated through subsonic. I think there should be a way to modify code. As the Following procedure always return 0. (What could be problem?).

    public OrderCollection FetchByQuery(Query qry)
            {
                OrderCollection coll = new OrderCollection();
                coll.LoadAndCloseReader(qry.ExecuteReader());
               
            // I modified here then undo those changes.

                return coll;
            }

     Also i modified following method in the J:\Bilal Haider\Dashcommerce\dc_3.0_Source_B\Store\Controllers\Generated\OrderController.cs which is readonly.

       public Order FetchOrder(string userName) {
          Order order = new Order();
          Query query = new Query(Order.Schema).
            AddWhere(Order.Columns.UserName, userName);
           // AddWhere(Order.Columns.OrderStatusId, (int)OrderStatus.NotProcessed);
          //OrderCollection orderCollection = this.FetchByQuery(query);
          DataSet ds = new DataSet();
          ds = query.ExecuteDataSet();
            if(ds.Tables[0].Rows.Count>1)
            {
          //if(orderCollection.Count > 1){
            throw new InvalidOperationException(EXCEPTION_TOO_MANY_CARTS);
          }
          //if(orderCollection.Count == 1) {
            if(ds.Tables[0].Rows.Count==1)
            {
                DataTable dt = new DataTable();
                dt.Rows.Add(ds.Tables[0].Rows[0]);
                int count = dt.Rows.Count;
            }
          return order;
        }

    Now the problem is that i can't debug the code in these methods. And how can i achive the above mentioned goals?

    Please help me. Confused

  • 01-21-2009 3:56 PM In reply to

    Re: Tips to solve these problems? What could be the source of these problems.

    Edit your product. Go to the SKU tab. See if "allow negative inventory" is checked. If not, then you need to add inventory to enable the add to cart button.

    To debug your code, change your compile option to DEBUG instead of RELEASE and rebuild. Set a break on the method address or somewhere in the method and push buttons until it breaks.

  • 01-22-2009 8:10 AM In reply to

    Re: Tips to solve these problems? What could be the source of these problems.

    I alreday running the application in DEBUG mode. I set break points. Problem is that during debugging it ignore those lines which i modified. Now the Cart is Displaying the item but its all the attributes are 0. I mean price, extended amount subtotal all are returning 0. Only sku item and quantiy is displayed.

    I want to write a webservice that fecth all the data in the cart to the desktop application. Where do i write that function to bring data as soon as the one shopping cycle is completed. I mean all the newly added orders could be downloaded to the desktop application.

    Waiting anxiouly for replies.

     Thanks.

     

     

     

  • 01-22-2009 8:28 AM In reply to

    Re: Tips to solve these problems? What could be the source of these problems.

    Have you set a break point at the click and followed it to see what it is doing and why it is not hitting the methods you think it should hit?

    I have not followed it but there are 2 OrderControllers. One generated by SubSonic and one a level up (in the folder structure). I believe the one not generated by SubSonic has similar methods and is the one likely being called.

    When you added categories, manufacturers, attributes, etc; did you add them through the application or directly to the tables?

  • 01-24-2009 10:26 AM In reply to

    Re: Tips to solve these problems? What could be the source of these problems.

     Have you set a break point at the click and followed it to see what it is doing and why it is not hitting the methods you think it should hit?

    Yeah. I did mark the breakpoint but the IDE simply ignore anything modified or added. Cursor becomes green and the desired result can't be achieved.

    When you added categories, manufacturers, attributes, etc; did you add them through the application or directly to the tables? 

    I added the entries using application.

  • 06-23-2009 6:06 PM In reply to

    Re: Tips to solve these problems? What could be the source of these problems.

    I was not able to go through breakpoints on newly addes lines either. It just ignored the lines.

    In my case, I had set up the site as website, and I was trying to copy the modified dll to bin folder of the website. This did not work.

    So, I newly created a web application and rebuilt again (copied the changes I made to this new web application).

    Now I can go through breakpoints to newly added lines.

Page 1 of 1 (6 items)