Results 1 to 13 of 13
  1. #1
    Web Ho - Design B!tch ~Michelle's Avatar
    Join Date
    January 18th, 2005
    Location
    Michigan
    Posts
    2,040
    Need to reload a page when 'Add to cart" is clicked on - Javascript?
    I am setting up a site and I need to implement the following. I am thinking there is a javascript out there that will do what I need, but I have yet to find it and I am hoping someone here will have a suggestion.

    Here is what I need to happen:

    When a customer clicks on a "Add to Cart" link, instead of the customer being taken to the cart, I want them to stay on the product page itself.

    I do not want them to go to the cart until they click on a link to do so. I just want the product added to their cart.

    Any suggestions?
    ~Michelle
    "All I ask is a chance to prove that money can't make me happy."
    "Work to become, not to acquire." -- Confucius

  2. #2
    2005 Linkshare Golden Link Award Winner  ecomcity's Avatar
    Join Date
    January 18th, 2005
    Location
    St Clair Shores MI.
    Posts
    17,328
    Not very simple,even if it's your own shopping cart. Most have the "add to cart" button tied internally to a preview cart contents screen to set the session cookie and give the customer the warm fuzzy feeling their action wasn't ignored. Most also have the option to return the shopper "continue shopping button" to the last product URL.
    Webmaster's... Mike and Charlie

    "What have you done today to put real value into a referral click...from a shoppers viewpoint!"

  3. #3
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    There's several ways to do it, but a lot depends on what mechanism you're using to add items to the shopping cart.

    - Tim
    Tim
    consultant by day, affiliate by night

  4. #4
    Web Ho - Design B!tch ~Michelle's Avatar
    Join Date
    January 18th, 2005
    Location
    Michigan
    Posts
    2,040
    Quote Originally Posted by infospongellc
    There's several ways to do it, but a lot depends on what mechanism you're using to add items to the shopping cart.

    - Tim
    The store is set up through os Commerce. Do you know of a way to do it with that?
    ~Michelle
    "All I ask is a chance to prove that money can't make me happy."
    "Work to become, not to acquire." -- Confucius

  5. #5
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    Not familiar with that one. Is it a form post to their cart software?
    Tim
    consultant by day, affiliate by night

  6. #6
    Web Ho - Design B!tch ~Michelle's Avatar
    Join Date
    January 18th, 2005
    Location
    Michigan
    Posts
    2,040
    Quote Originally Posted by infospongellc
    Not familiar with that one. Is it a form post to their cart software?
    Yes. It looks like the following example:

    Code:
    <FORM name=cart_quantity action=http://URL_INSTERTED_HERE.COM/store/product_info.phpcPath=21&amp;products_id=28&amp;action=add_product method=post>
    The actual code around the add to cart button image looks like this:

    Code:
    <INPUT type=hidden value=28 name=products_id><INPUT title=" Add to Cart " type=image alt="Add to Cart" src="button_in_cart.gif" border=0>
    ~Michelle
    "All I ask is a chance to prove that money can't make me happy."
    "Work to become, not to acquire." -- Confucius

  7. #7
    Web Ho - Design B!tch ~Michelle's Avatar
    Join Date
    January 18th, 2005
    Location
    Michigan
    Posts
    2,040
    ..
    ~Michelle
    "All I ask is a chance to prove that money can't make me happy."
    "Work to become, not to acquire." -- Confucius

  8. #8
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    Easy to do in PHP, I'll check on a Javascript method when I get a chance.

    - Tim
    Tim
    consultant by day, affiliate by night

  9. #9
    Newbie
    Join Date
    February 7th, 2005
    Location
    Olympia, Washington
    Posts
    2

  10. #10
    Web Ho - Design B!tch ~Michelle's Avatar
    Join Date
    January 18th, 2005
    Location
    Michigan
    Posts
    2,040
    Quote Originally Posted by Melmo
    Thanks, but that doesn't work for me.

    Just like the person who posted last in that thread, I am working with custom page designs. When I click on the link with the cart set to false, it takes me to the product page.

    I need to just stay put on a custom page that has the add to cart link on it.
    ~Michelle
    "All I ask is a chance to prove that money can't make me happy."
    "Work to become, not to acquire." -- Confucius

  11. #11
    Web Ho - Design B!tch ~Michelle's Avatar
    Join Date
    January 18th, 2005
    Location
    Michigan
    Posts
    2,040
    Quote Originally Posted by infospongellc
    Easy to do in PHP, I'll check on a Javascript method when I get a chance.

    - Tim
    Great.. Thanks!!
    ~Michelle
    "All I ask is a chance to prove that money can't make me happy."
    "Work to become, not to acquire." -- Confucius

  12. #12
    Animal Lover
    Join Date
    January 18th, 2005
    Location
    oz
    Posts
    1,210
    Hi Michelle

    I think this place ozbeads.com has that function - I just remember shopping there and they sort of have a javascript that does exactly that - they have a running tally of what you've ordered on top and you get to stay on their page. You might want to ask them about using their javascript.

    Oscar

  13. #13
    Web Ho - Design B!tch ~Michelle's Avatar
    Join Date
    January 18th, 2005
    Location
    Michigan
    Posts
    2,040
    Quote Originally Posted by infospongellc
    Easy to do in PHP, I'll check on a Javascript method when I get a chance.

    - Tim
    Tim,

    Anything on this yet?

    ~Michelle
    "All I ask is a chance to prove that money can't make me happy."
    "Work to become, not to acquire." -- Confucius

  14. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. "Page Banner was Clicked from" is Blank
    By hbhglisi in forum ShareASale - SAS
    Replies: 5
    Last Post: May 22nd, 2013, 11:53 PM
  2. Blank "Page Banner was Clicked From:" - Tracking referrals
    By medicbatteries in forum ShareASale - SAS
    Replies: 7
    Last Post: January 14th, 2010, 09:49 AM
  3. Can I link direct to "add to cart" pages for toy stores?
    By michael7s in forum Newbie Affiliate FAQs & Helpful Articles
    Replies: 2
    Last Post: June 24th, 2008, 07:20 AM
  4. Joann.com "add to cart" not working
    By Arizona Deb in forum Commission Junction - CJ
    Replies: 28
    Last Post: December 14th, 2007, 06:44 PM

Posting Permissions

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