phpbb-auction.com Forum Index phpbb-auction.com
Download, Support, Documentation
 
Donate to phpbb-auction.com to support the project


phpbb-Auction
  Home
   - News
   - Bug report/Patches
   - Future Features
  Demo
  Downloads
   - Version 1.3m  (Core /Lang /Mods)
   - Version 1.2m  (Core /Lang /Mods)
   - Version 1.0m  (Core /Lang /Mods)
   - All
  Services
  Documentation
   - Features
   - Documents
   - How-Tos
   - About
  Support
   - English
   - German
  Development
   - Changlog
   - Requests
   - Team
   - CVS
  Community
   - Website of the Month
   - Websites
   - Community Forum
   - Member

Navigation
FAQFAQ
SearchSearch
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesLog in to check your private messages
Log inLog in

Forum
Changing start time auctions
Sun Feb 07, 2010 4:33 am FR
Easy: what code to use to update sql table?
Fri Oct 16, 2009 8:39 am guyb
Unlimited products(downloads)
Wed Oct 14, 2009 7:09 pm hoimyr
Seller chooses currency
Sun Oct 11, 2009 8:00 pm hoimyr
Cant select end date without getting error
Sun Oct 11, 2009 6:43 pm hoimyr

About
Author: FR
Credits:
Brookfresh, Brad Lawryk, Crogon, DaMysterious, EklipzeDesigns, ML, musashi, phpBB Group, phpBB-Auction-Team, php-styles, sanman, Tel, Vampy, wGEric

Supported Sites





Statistics
User: 20163
Posts: 18401
Latest User: joyva1

[B1.2m-12a] Properly stop the clock on Direct Sell [FIXED]

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    phpbb-auction.com Forum Index -> Older Version Bug report Patches
View previous topic :: View next topic  
Author Message
ssimon
Mid-Cap Auctioneer
Mid-Cap Auctioneer


Joined: 21 Aug 2004
Posts: 62

PostPosted: Sat Sep 11, 2004 4:49 am    Post subject: [B1.2m-12a] Properly stop the clock on Direct Sell [FIXED] Reply with quote

OK, it seems that in the absence of help I am solving problems myself Laughing

I had recently posted about a bug whereby using Direct Sell will not properly end an offer as the end time was still in the future and a lot of the functions still depended on that.

I came up with a simple time reset MOD that will set the offer end time to the time the Direct Sell was confirmed. Doing the mod vas easy, figuring out how and where to do it was a different problem.

OK, this is really simple, a single insert with no code overwriting.

Open auction_offer.php Around line 1040 look for
Quote:
case 'buy_now_confirm':
In that case statement look for
Code:
                 // Store buy_now and lock offer
                 $sql = "UPDATE " . AUCTION_OFFER_TABLE . "
                         SET auction_offer_state = ". AUCTION_OFFER_DIRECT_SOLD . ",
                             auction_offer_last_bid_price = " . doubleval($HTTP_POST_VARS['auction_your_amount']) . ",
                             FK_auction_offer_last_bid_user_id  =  " . $userdata['user_id'] . "
                         WHERE PK_auction_offer_id = " . $HTTP_GET_VARS[POST_AUCTION_OFFER_URL];


REPLACE WITH
Code:
// MOD BEGIN - ssimon - Stop Clock by setting Auction End Time to Time the Buy Now was confirmed
                 // Store buy_now and lock offer
                 $sql = "UPDATE " . AUCTION_OFFER_TABLE . "
                         SET auction_offer_state = ". AUCTION_OFFER_DIRECT_SOLD . ",
                             auction_offer_last_bid_price = " . doubleval($HTTP_POST_VARS['auction_your_amount']) . ",
                      auction_offer_time_stop = " . time() . ",
                             FK_auction_offer_last_bid_user_id  =  " . $userdata['user_id'] . "
                         WHERE PK_auction_offer_id = " . $HTTP_GET_VARS[POST_AUCTION_OFFER_URL];
// MOD END - ssimon - Stop Clock by setting Auction End Time to Time the Buy Now was confirmed

Only one line of actual code is inserted (auction_offer_time_stop = " . time() . ",) but I included comments to show the mod.
Basicaly I am resetting the end time of the auction to match the current system time when the Direct Sell occured.

Comments, Suggestions?

Steve.

P.S. FR, I hope you find this correct and validate it for inclusion in future versions.
Back to top
View user's profile Send private message
Crogon
Moderator
Moderator


Joined: 17 May 2004
Posts: 574
Location: Anywhere I'm needed.. which is usually everywhere. ;)

PostPosted: Mon Sep 13, 2004 8:32 am    Post subject: Reply with quote

When someone makes a direct sell auction, does it end the auction when they confirm direct sell, of after they actually go through paypal / points / whatever and pay for the item?

Whereever it is actually ending the auction is where you should put this script.

Excellent work btw! Cool
Back to top
View user's profile Send private message
ssimon
Mid-Cap Auctioneer
Mid-Cap Auctioneer


Joined: 21 Aug 2004
Posts: 62

PostPosted: Mon Sep 13, 2004 8:38 am    Post subject: Reply with quote

Crogon wrote:
When someone makes a direct sell auction, does it end the auction when they confirm direct sell, of after they actually go through paypal / points / whatever and pay for the item?

Whereever it is actually ending the auction is where you should put this script.

Excellent work btw! Cool


Well, that is a tough one as you cannot wait untill someone decides to get off their ass to make a payment before you close an auction. eBay closes the auction as soon as you confirm your Buy Now and so do I Laughing

Glad you approve of the code fix.

Steve.
Back to top
View user's profile Send private message
frold
Super Auctioneer
Super Auctioneer


Joined: 16 Feb 2004
Posts: 225

PostPosted: Mon Sep 13, 2004 5:48 pm    Post subject: Reply with quote

can anyone approve that it work....

I have a live auction and dont want to spoil the auction if it's not working Very Happy
Back to top
View user's profile Send private message
ssimon
Mid-Cap Auctioneer
Mid-Cap Auctioneer


Joined: 21 Aug 2004
Posts: 62

PostPosted: Tue Sep 14, 2004 10:35 pm    Post subject: Reply with quote

frold wrote:
can anyone approve that it work....

I have a live auction and dont want to spoil the auction if it's not working Very Happy


How could you spoil it? It simply stops the clock! Isn't that what a buy now is suposed to do? Trust me it's working flawlesly..

Unless of course you like showing your buyers BOTH that the was a winner and that the auction is still runing Laughing
Back to top
View user's profile Send private message
frold
Super Auctioneer
Super Auctioneer


Joined: 16 Feb 2004
Posts: 225

PostPosted: Wed Sep 15, 2004 2:20 pm    Post subject: Reply with quote

I have tested it and it work on my installation...

first I made a test item for sale

then I made 2 bids without the clock was reset
finaly I bought it direct and the clock was reseted

after I ran auction_cron.php both the seller and buyer got a email...

thx for another great mod - looking forward to see more from your hand Very Happy
Back to top
View user's profile Send private message
Crogon
Moderator
Moderator


Joined: 17 May 2004
Posts: 574
Location: Anywhere I'm needed.. which is usually everywhere. ;)

PostPosted: Sun Nov 07, 2004 8:01 pm    Post subject: Reply with quote

As this is the best fix for the bug, I'm going to move this to the bug forum. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    phpbb-auction.com Forum Index -> Older Version Bug report Patches All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


phpbb-auction.com - Developed by www.digital-media-lab.com
Sponsored by: www.globibo.com - www.learn2go.de - www.talentone.org - www.language-school.in - www.ping-ke.cn