Home > Asp.Net, JQuery > Asp.Net Jquery fly-to-Basket

Asp.Net Jquery fly-to-Basket

Today me and my friends searching for add to basket with Jquery.We found a good working demo of Jquery fly- to- Basket  at www.webresourcesdepot.com/fly-to-basket-effect-with-jquery/.This Jqury Fly-to-Basket developed with Jquery and PHP.I tried to develop the same fly-to-Basket effect to my exisitng e-commerce project.

Jquery Fly-to-Basket

Products List

Jquery Fly to Basket

<%@ WebHandler Language=’C#’ Class=’Handler’ %>
using System;
using System.Web;
public class Handler : IHttpHandler {
public void ProcessRequest (HttpContext context)
{
if (HttpContext.Current.Request.Form[“action”]!=null)
{
string action = HttpContext.Current.Request.Form[“action”].Trim();
if (action.Equals(“addToBasket”))
{
//call add to Basket
this.AddToCart();
//get CartDetails
string res = this.GetCartDetail();
context.Response.Write(res);
}
else if (action.Equals(“deleteFromBasket”))
{
}
}
}
public bool IsReusable
{
get
{
return false;
}
}
public void AddToCart()
{
//Code for inserting Item into Cart
}
public void DeleteFromCart()
{
}
public string GetCartDetail()
{
}
}
<%@ WebHandler Language='C#' Class='Handler' %>

using System;
using System.Web;

public class Handler : IHttpHandler {
    
    public void ProcessRequest (HttpContext context)
    {
        
        if (HttpContext.Current.Request.Form["action"]!=null)
        {
            string action = HttpContext.Current.Request.Form["action"].Trim();
            if (action.Equals("addToBasket"))
            {
                //call add to Basket
                this.AddToCart();
                
                //get CartDetails
                string res = this.GetCartDetail();
                context.Response.Write(res);
                 
              
            }
            else if (action.Equals("deleteFromBasket"))
            {
                
            }
        }
    }
 
    public bool IsReusable 
    {
        get 
        {
            return false;
        }
    }
    public void AddToCart()
    {
       
        //Code for inserting Item into Cart
    }
    public void DeleteFromCart()
    {
        
    }
    public string GetCartDetail()
    {
        return "

";
    }
    
}



Download

Advertisements
Categories: Asp.Net, JQuery
  1. February 16, 2011 at 11:25 am

    hi
    thanx for your valuable post…
    thanx a millions…

  2. October 1, 2011 at 5:05 pm

    hi
    thank you for this article.
    can you convert to dynamic this project.?
    for example: load in datalist.
    thank u

  3. Chanchal singh
    October 4, 2011 at 7:23 am

    Very Good Implement But cart Disaper After Refresh ?

  4. ramin
    November 21, 2011 at 8:03 am

    hi.thanx for post
    please show how we convert it to dynamic

  5. Milad
    February 5, 2012 at 11:10 am

    who can we access to session? is it possible ?

    • February 6, 2012 at 2:44 am

      Hi Milad.
      we can access the session.
      If you need help to implement it i will post it.
      Thanks for your comment. 🙂

      Jignesh
      Software Developer

  6. Milad
    February 6, 2012 at 8:11 am

    i cant access to session from http context , i use a cookie except session,
    but now i have an another problem when i add a product to basket the basket does not fill automatically it needs refresh

  7. smile buddy
    March 15, 2012 at 4:40 pm

    Excellent Work….
    Thank you….

  8. Asif Ghafoor
    May 23, 2012 at 12:38 pm

    Real great work. no doubt you are brilliant programmer. wonderful.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: