SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Dec 2001
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    **Javscript Shopping Cart**Doesn't empty

    Hi,

    I have installed a purchased shopping cart and for the price is does most of what I need...the problem is the shopping cart doesn't empty after the order is sent. I have copied all of the various pieces of the script into an RTF if anyone would like to take a look at it. It's too long to post the whole thing here...or should I?
    Kim E.,
    http://www.bird-e-toys.com

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just put it online or attach it

  3. #3
    SitePoint Member
    Join Date
    Dec 2001
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...ask and ye shall receive...I hope you can figure it out...I'm definately NOT a JS programmer...I sure hate that "out of the box" stuff doesn't do the things it should...

    Well, I guess the URL would help

    http://www.itscarvedinstone.com/cart...oppingCart.rtf[/URL]
    Last edited by BirdBrain; Jun 3, 2002 at 00:20.
    Kim E.,
    http://www.bird-e-toys.com

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could i see it in action as it seems theres a lot of unnecessary code in there

  5. #5
    SitePoint Member
    Join Date
    Dec 2001
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You bet...it's "live" at http://www.itscarvedinstone.com/shop/
    Kim E.,
    http://www.bird-e-toys.com

  6. #6
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:

        
    function clearBasket() {
            if (
    confirm('Clear shopping cart?')) {
                
    index document.cookie.indexOf("TheBasket");
                
    document.cookie="TheBasket=.";
                
    self.location "basket_empty.php";
                        
    top.frames[2].location "middle_right.php";
            } 
    that seemed to work before which you dont call when you submit.

    put on the form


    <form .. blah onsubmit=" return clearBasket()">

  7. #7
    SitePoint Member
    Join Date
    Dec 2001
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok...it's after midnight and I'm getting bleary-eyed...I'll give it a go in the A.M.

    Thanks Andrew! I may be back
    Kim E.,
    http://www.bird-e-toys.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •