View Full Version : Once button clicked disable it or otherwise
theremotedr
02-18-2018, 11:02 AM
Morning all,
Here is a page in question http://www.theremotedoctor.co.uk/job_lots_1.html?scrollto=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
coothead
02-18-2018, 12:01 PM
...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...
6273
...here..
https://www.paypal.com/webapps/hermes?token=1XU64384GH535880V&mfid=1518955087226_CYBG8RTCR9ZQC&useraction=commit&country.x=GB&locale.x=en_GB#/checkout/signup
I would suggest that you find out what options Paypal has for sold items.
coothead
theremotedr
02-18-2018, 12:50 PM
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.
coothead
02-18-2018, 01:07 PM
Hi there theremotedr,
I am sorry but I do not understand anything in your post.
When your visitor clicks this...
6274
...it does not necessarily constitute a sale.
coothead
jscheuer1
02-18-2018, 01:55 PM
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.
theremotedr
02-18-2018, 03:42 PM
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.
Deadweight
02-18-2018, 05:13 PM
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 >.<
theremotedr
02-18-2018, 06:16 PM
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.
theremotedr
02-18-2018, 09:07 PM
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.
coothead
02-18-2018, 09:48 PM
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
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.