Made a few changes to my layout:
The layout is now 'responsive' and the main photo disappears when the screen size is less than 1020 pixels, along with font size reductions. I also added a 'Free Shipping' ribbon that overlays the photo if the shipping price is zero.
Question: How hard would it be to add a bidding system like eBay where the person enters their maximum bid and every time a bid is made, the current highest bidder's bid is compared to the new bid and if it's less, the high bid becomes the new bid; but if it's more, the new bid becomes the highest bid and the current bidder is updated?
I know you store the bids in a table (
smf_class_bids) like this:
ID_BID | | ID_MEMBER | | ID_LISTING | | amount | | private_bid | | bid_rejected | | bid_accepted | | date |
1 | 2 | 1 | 14.95 | 0 | 0 | 1 | 1387222157 |
Would you have to add a column for the current high bid, or would the whole bidding routine need to be changed since you only compare the current bid to last bid? If you store the bidders max bid along with the current bid, you would just need to compare new bids to the current bidders max bid before making the decision if they are the new high bidder, then adjust the new current bid by making it the last bidders max bid - plus the increment.
Then again, maybe the
smf_class_bids table is used only for historical purposes; and not used in the bidding algorithm at all?
I'd like to make the changes myself, but I'm not sure I fully understand how you're storing the bids since it looks like the table lists all of the bids ever made on
every item - and you're using a MySQL call to sort the results by the item number.
Would it be easier to add a column to
smf_class_listing to keep track of the current bidders maximum bid?