Results 1 to 10 of 10

Thread: Once button clicked disable it or otherwise

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,064
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default Once button clicked disable it or otherwise

    Morning all,

    Here is a page in question http://www.theremotedoctor.co.uk/job...rollto=content

    I would like it to work like the following.

    Customers arrives at this page.
    Select the button Job lot sale etc etc
    The main photo is then loaded.

    Now this is where i need some help / advice please.

    I will email some customers advising this item is for sale & also supply them the link,so my problem is that the item can only be sold the once.

    So after the customer clicks the Add to cart button "they are then taken to a new page to pay" i need this page to either display a image saying sold "which i will make later" or the add to cart button is disabled or otherwise, this will overcome two customers trying to purchase the one item for sale,like a first come first served basis.

    Once this page is working i will then apply it to four pages in total.

    After the customer receives there item i should be then able to enable the same page and start again with a new photo.



    Hope you can assist.

    Have a nice day

  2. #2
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,150
    Thanks
    1
    Thanked 228 Times in 224 Posts

    Default

    Quote Originally Posted by theremotedr View Post
    ...so my problem is that the item can only be sold the once.

    So after the customer clicks the Add to cart button "they are then taken to a new page to pay".
    I need this page to either display a image saying sold "which i will make later" or the add to cart
    button is disabled or otherwise, this will overcome two customers trying to purchase the one item
    for sale, like a first come first served basis.
    Well, that sounds as though it needs to be resolved by Paypal.
    The item is not actually sold until your visitor has clicked this...

    Click image for larger version. 

Name:	agree-and-pay.jpg 
Views:	20 
Size:	13.8 KB 
ID:	6273

    ...here..
    https://www.paypal.com/webapps/herme...heckout/signup

    I would suggest that you find out what options Paypal has for sold items.

    coothead
    ~ the original bald headed old fart ~

  3. #3
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,064
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    I see what you are saying.
    Once they select the correct postage for their country etc the PayPal invoice is already set up.
    They just log into their account & click pay.
    This is quite a recognised way to pay & code supplied from PayPal.
    At present once I put a picture on then it can be selected and paid.

    This I why I just need the image to be changed with a sold image.

    Job then complete.

  4. #4
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,150
    Thanks
    1
    Thanked 228 Times in 224 Posts

    Default

    Hi there theremotedr,

    I am sorry but I do not understand anything in your post.

    When your visitor clicks this...

    Click image for larger version. 

Name:	add-to-cart.jpg 
Views:	17 
Size:	5.0 KB 
ID:	6274

    ...it does not necessarily constitute a sale.

    coothead
    ~ the original bald headed old fart ~

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,486
    Thanks
    79
    Thanked 3,446 Times in 3,407 Posts
    Blog Entries
    12

    Default

    I'm not sure how it's done now. But when I setup a paypal sales thing for tickets, in order to get any meaningful feedback from paypal we needed to have an ssl (https) site or at least the page on our site from which the user interfaced with paypal needed to be ssl. Once we had that, we could get back server side POST information from paypal as to who paid what for which item and what their name and email address was, also their physical address had we required it, which we didn't need, but you do, so that would be available as well. Without an ssl, we couldn't even find out whether or not the person actually bought anything, let alone any information about them, without logging on to our paypal account and looking at the transactions list.

    Once you have it setup so that you can get POST information back from paypal, you can in theory setup server side routines that will make a product that's sold out unavailable, but this also requires that your host, in addition to being ssl, also has a server side language like PHP or asp.

    Well that's the general outline of how it's done if you want to do it yourself. There are packages available for e-commerce, but these have varying degrees of features. For one which provides inventory control of this sort I tend to think that wouldn't be real cheap to buy, but really have no firm idea.

    Without ssl and some server side code you setup for this, or some package that takes care of it all. Without either of those, the best you can do, at least as far as I know, is check on your account on paypal periodically, take down the items manually when they sell, and give anyone who buys something that's unavailable a refund. To facilitate that, there should be a clear notice that items are limited and on a first come first served basis, and that anyone purchasing an item that has already been sold will have their money refunded.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,064
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Reading the above is the way i would go,sorry did not ask you correctly.

    The customer clicks on the add to cart button.
    In a new window customer then logs into paypal & pays me.

    At this point i will receive a email from paypal to say Tom Jones etc has paid you.

    There would no automatic process where once paypal receives the money the item on my site would be sold,need something manual applied.

    Hence why i was thing of add to cart button clicked then at the same time it would trigger a script etc to show a replacement image saying Sold.
    The add to cart button would then be say display:none.

    Example,
    Add to cart button visible & item for sale visible,even if we just load the image for sale without having to click the button Job lot item on the right,might be pointless clicking it anyway ??

    Add to cart button selected item for sale now replaced with Sold image.

    When item for sale image is shown then add to cart button shown.

    At no point can add to cart button & sold image be shown at the same time.


    Thanks.

  7. #7
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    484
    Thanks
    8
    Thanked 52 Times in 50 Posts

    Default

    This will require some php and database stuff if i am following correctly.
    Path =>
    User comes to website => user adds item to cart => user buys item => website displays item is now sold.

    Thus would require at least a database or you can do it in flat files but not a good option >.<
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  8. #8
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,064
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Or just even a basic workaround like so.

    Customer clicks Add to cart.

    At the time of Clicking add to cart replace item for sale image with a sold image.

    Whilst this is happening customer is paying in the new window that just opened.



    Job done i believe,just need to take a look once i try this out.
    So can we edit or add some code so add to cart button changes image A for image B.

  9. #9
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,064
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    My post #8 would do it I believe.
    Using onclick code should work & JavaScript to swap image ?

    If you could advise please I could play with it.

    Thanks.

  10. #10
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,150
    Thanks
    1
    Thanked 228 Times in 224 Posts

    Default

    Hi there theremotedr,

    as has been pointed out, this cannot be done client side with javascript.

    If you don't want to find a server side solution, then you will need to mark
    items sold manually.

    coothead
    ~ the original bald headed old fart ~

Similar Threads

  1. recognizing if submit button is clicked
    By terrys in forum Looking for such a script or service
    Replies: 12
    Last Post: 06-11-2013, 03:29 PM
  2. Screen shows blank after submit button clicked
    By sunilpandya in forum JavaScript
    Replies: 1
    Last Post: 06-02-2013, 04:20 PM
  3. Check a radio button when clicked on input field
    By PHP_Passion in forum JavaScript
    Replies: 1
    Last Post: 03-25-2010, 10:13 AM
  4. Replies: 0
    Last Post: 12-05-2005, 10:46 AM
  5. Which Button was clicked?
    By jdc in forum JavaScript
    Replies: 1
    Last Post: 10-17-2005, 08:28 PM

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
  •