Jump to content
Sign in to follow this  
deathgod

[Contribution] Auction Module

Recommended Posts

Hi there, great contrib, is the one i was searching for!!!

I was just curious to know if there is some way to show the bid list in the admin section, for each product?

Is possible or is still in the TODO list?

Thanks a lot, you are gr8!

Share this post


Link to post
Share on other sites
Hello, I have used this script before on another site but with the one that I am working on now it has mySQL 5 and I believe this is a mySQL 5 error. Does anyone know how to fix this? This appears in the admin/auctions.php file

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

This has nothing to do with MySQL 5 specifically, but is a generic SQL error.

 

I believe the correct syntax for 'limit' is: limit <starting record>, <number of records>, and as such, sql would return a syntax error as in the case above when trying to start at record -20, which will never exist.

Share this post


Link to post
Share on other sites

Hi,

 

Is there someone who has already found a solution for the problem that you can place bids below the start price and with overbid amount that is lower than the amount set in the admin panel?

 

I've seen this issue been discussed a few times but i can't find the solution in hte forum.

 

 

Help would be appreciated!

Share this post


Link to post
Share on other sites

auction_v1.4.4_1

First of all thanx to everyone spending time on this great contribution.

I've inserted it in my Oscommerce merchant 2.2 rc1. I didn't have much problems to have the aution up and running, but the terms and conditions page wasn't showing up at first. I found that it was situated as an update in the installation file from Contrib 1.3 -> Auction Contrib 1.4 so at first didn't understand, since I was doing a new install, I left it out at first.

 

Anyway at administration site I don't see any monitoring at all, I understand that I have to take the winner from the catalog site and make a manual order in Admin.

Therefor I need manual order maker (is this correct?) in the installation file of manual order maker, it says it wil only work if also order editor is installed.......

So from one comes another is this correct? Do I need to install two contributions?

 

Second thing emails are not sent, I have seen some info on this forum from Juerg Schumacher almost at the bottom of the page I wil definitaly try this out.

Unfortunately the bug if a known bidder makes another bid the timestamp says 0000000000000 instead of the real time still exist.

This is a bit strange to customers bidding on an auction, still no cure for this??

 

And last but not least I've seen on the site from Beltespenner that he displays the winner at the site, I was wondering how that has been done.

 

If anyone of you can answer it would be mucht appreciated.

Thanx :lol:

Share this post


Link to post
Share on other sites

Changed the code as Juerg Shumacher did before, (this was only a slight change) so now the email function when a higher bid has been made works fine.

Remains the question on the admin site, en the timestamp.

Share this post


Link to post
Share on other sites

Noticed this: Limor01 at this page wrote:

it has SQL injection risks.

you need to make sure you clean the data from the URL before you insert it into your database as a query.

 

$mfo_auction_query = mysql_fetch_object(tep_db_query('select auctions_starting_price, expires_date, overbid_amount from ' . TABLE_AUCTIONS_PRODUCTS . ' where products_id = ' . $_GET['products_id'] . ' and status'));

 

In the downloaded package you will find this slightly different in the file catalog/includes/modules/auction_bids.php

 

$mfo_auction_query = mysql_fetch_object(tep_db_query("select auctions_starting_price, expires_date, overbid_amount from " . TABLE_AUCTIONS_PRODUCTS . " where products_id = '" . $product_info['products_id']. "' and status = '1' "));

 

Which one should we use?

Share this post


Link to post
Share on other sites

Hey everyone,

 

First off, thanks to all who are working on this fabulous contibution, it's exactly what we need when you sell 1`of a kind products!! :)

 

But I really need some help here, cause I've installed it twice and still have the same problem.

My admin is fine, I can list auctions and and find "Auction Listings" under Configuration.

 

BUT: When I finnish the installation my catalog side goes blank. :(

I suppose it would have something to do with either my database connection settings or other configure.php settings in catalog??

I've tried every to my knowledge imaginable setting, but still a blank catalog. :(

I'm still quite new to osc sooo, I could most certainly use a hand here...

What am I doing wrong? Could someone pls help me out? PRETTY PLS? I really want this contribution in my shop, I mean I want it BAD! :D

 

I'm running Osc version 2.2-MS2, PHP version 4.4.7 and MSQL 4.1.21 (checked with server info in admin).

I don't have a lot of other contributions running in the shop that might conflict with this one...

Oh and my site is not in the root, so perhaps have to change that configure.php??? So many questions..... :rolleyes:

Share this post


Link to post
Share on other sites

OK Never mind my previous question, I figured it out. It was indeed due to my configure.php settings in catalog/includes....! :mellow: :-"

Share this post


Link to post
Share on other sites

Hi!

 

Iæm trying to get this auction thing working, and I can't wait, because it is a fantastic addition to oscommerce. But I am having difficulties.

 

1146 - Table 'db102096.TABLE_AUCTIONS' doesn't exist

 

select auctions_starting_price, expires_date, overbid_amount from TABLE_AUCTIONS where products_id = 8 and status

 

[TEP STOP]

 

What to do?!

I do see in the phpmyadmin that a table with the name auctions does excist. but in small letters, not big... :-s HELP!?!

Share this post


Link to post
Share on other sites

And now I got this error:

 

Fatal error: Call to undefined function: tep_end_auction_invalid() in /home/csoren/www/auksjon/product_info.php on line 18

 

And on line 18 in this file, is says:

 

tep_end_auction_invalid($products_auction_id);

 

 

HELP?

Share this post


Link to post
Share on other sites

Hi all,

 

Just thought you might like to know, I've picked up where marcusdesign left off and addressed many of the issues with this Contribution.

 

The following has been fixed. :

 

• Auction price now displays the current bid, instead of the start price. <--Did anyone else notice this or was it just me?

• Countdown timer is now in PHP instead of javascript. This allows for better time synchronization with server and works much the same way as with ebay (Auto refresh). It also allows me to use variables from within the script to trigger events. Not so important now, but may be later on.

• Auto email can now be sent to winning bidder once auction is complete: Here was the problem : PHP will only trigger events when a PHP page is loaded (hence the use of so much javascript to compensate these days). As such, I needed a way of the server testing conditions and sending emails when no-one was looking at or loading a page. For this, I have created a simple php script which is executed by a CRON every 5 mins to test if any auctions have been won, send and email to the winner and finally change the Auction status to completed so that multiple emails are not sent out. No doubt this will later involve automatic order generation; however I have not done this yet.

 

If you don't know what CRON is, google CRON and find out.

 

• I'm currently working on the admin side to this contrib to display Auction status, Bidders, etc. This is in infancy at this stage and should be completed in around 2-3 weeks.

 

I'll post the polished contrib for your scrutiny once the admin side is done, as I don't yet know what impact the admin side will have on the rest of the script I've written.

 

 

Dan

Share this post


Link to post
Share on other sites

That's very great work psylencer! I hope to see this contribution functional in the soon-future. ;)

Share this post


Link to post
Share on other sites

Just an update on the status of my contribution to this contribution: Successful auctions are now sent directly to the shopping cart where the user does not have the ability to modify number of units or remove the unit from their shopping cart. An email is sent as a reminder to the customer Automatically when the auction is complete. Still a week or so before I release anything as Im stuck documenting my changes. However initial signs are very very good.

 

As I originally decided to do this for myself, It's going to be pretty difficult for me to say exactly what needs to be changed. However I can show you guys comparisons of what I had before and after installing this contrib.

 

I'd appreciate any help on this front.

 

Dan

Share this post


Link to post
Share on other sites

Well I don't know exactly what kind of changes you made Dan, but they sound extensive. From my standpoint I would suggest you call it version 2.0, and instead of listing all the changes and improvements you have done, list;

 

- Current Features

- Comparison of Before and After

- Known/Remaining Bugs

- (To-Do (for any future updates you might have planned after release, if any))

 

EDIT: As for installation, I wouldn't mind helping documenting changes and/or testing it.

 

Just a suggestion :)

Edited by JangoF

Share this post


Link to post
Share on other sites
Well I don't know exactly what kind of changes you made Dan, but they sound extensive. From my standpoint I would suggest you call it version 2.0, and instead of listing all the changes and improvements you have done, list;

 

- Current Features

- Comparison of Before and After

- Known/Remaining Bugs

- (To-Do (for any future updates you might have planned after release, if any))

 

EDIT: As for installation, I wouldn't mind helping documenting changes and/or testing it.

 

Just a suggestion :)

 

This is scary, now you're all going to see what a sloppy job I've done on this.

 

The code is very close to finished as far as I can tell (for the moment anyway) Sure, I will need all the help I can get documenting the changes. My problem is I don't have a "raw" site to install this on. Any help would be greatly appreciated. Im using this currently on a PHP V5 server.

 

Here's the bugs I've fixed from the previous version

 

• Overbid ammount :Fixed

• Starting Bid lower than starting price :Fixed

• Won Product added to winning bidders shopping cart (remove product and qty update disabled) (Basically the next person to load the page will trigger the PHP to add product to the winners shopping cart and update the winners sessions (if the winner is logged in and triggers the update), If the winner is not logged in and the page has not been loaded by anyone else, CRON will execute every X mins to update shopping carts and send winners emails etc.

 

One problem here is that if both a winner and looser is logged in at the same time (a pretty common occurence Im sure) and the looser loads the page before the winner does, the winners sessions will not be updated - meaning they will have to log out and log back in- in order to see the product in their shopping cart. <--Im working on this, -I think I'll dissable the ability for the looser to trigger the update to the winners shopping cart/seassions/send email. Thoughts anyone?

 

• email sent to winning bidder.

• Product_info page now displays "Highest Bid" instead of starting price.

• Countdown now works for both Date AND TIME- written in PHP with auto refresh to update time (if any) remaining.

• Countdown can be set to ANY time not just 12:00 with changes to the admin side to facilitate this.

 

I've got to go now. Im sure there's more. I'll get back to you when I remember.

 

PS I could do with some help to convert some of the sloppy programming into language definition files etc.

 

Dan

Share this post


Link to post
Share on other sites

While I haven't seen your work yet, I don't think it's sloppy. I think it sounds like a much needed improvement ;)

 

The language definition files isn't so hard to do:

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_AUCTONS); (must be in includes\filenames.php)

 

Then instead of the actual text you use ' . TEXT_WHATEVER . ' in the files.

 

In includes\languages\english\auctions.php, add definition for each text: define('TEXT_WHATEVER', 'Auctions Whatever');

 

That's basically it.

Share this post


Link to post
Share on other sites

Lol. I know how to do it, I just can't be stuffed, my mind is boggling on other more important things. Language files can easily be sorted later on Thanks for the help though :)

Share this post


Link to post
Share on other sites

OK, I've set things now so that when the winner views a finished auction of which he/she has won, the auction status is updated, an email is sent to the winner, their sessions are updated (shopping cart) and subsequent views of the page from other users will result in a normal product page (with buy now). If the winner does NOT view the product page, the CRON job will still update the database every X mins, however the winner will not have the product added to their cart (sessions) untill they log off and log back on again.

 

Basically, this will only affect users who are logged on and don't know/care if they've won an auction. Sounds a little crap to me, personally, I'd like the product added to the winners cart wether they've looked to see if they've won or not, however something has to trigger this event, and with my limited knowledge of the OSC system, I don't know how to have a users' sessions updated if THEY are not the ones updating them. Does anyone understand what im talking about?

 

Suggestions would be really helpful. I'm thinking a script which would update ALL users sessions from data within the database would help, triggerd in the cron file- sort of a "refresh all sessions" script, however I've got ABSOLUTLY no idea how to do this. Help? Ideas?

 

Secondly, A bug I've just noticed is that IF the admin re-lists an auction before it is added to the winners cart (through the database), the winner will never get the product they've won because when a product is re-listed, the status must change to "current" or boolean "1" in the databse. This means the CRON file or user viewing the page (and hence executing the script/databse updates themselves) will not know the auction is finished - assuming that its' status is "current" and continuing the already won auction untill the end of the newly re-listed auction. - A possible fix here is to have the admin section automatically create/copy the product and create a unique product_id for each auction. This would have the added bonus of enabling the admin to list multiples of the same product at once and will be greatly beneficial im sure for record keeping and statistics (something i don't want to think about too much right now, but am sure will come in handy when creating product auction history prices etc.), however will extend the time it takes me to release this contrib for at least another week at best. As a consequence, I'll have to remove the current "feature" of having products with finished auction status automatically revert to "Buy now" status once an auction is finished. Any thoughts?

 

Dan

Edited by psylencer

Share this post


Link to post
Share on other sites

Ok homies,

 

Trash the last idea, this is what i've got happening, if everyone's happy with it, Ill install it, document it and post it. ...

Sessions are now automatically updated every time any winning bidder looks at their shopping cart, or - another client looks at an auction which is finished, or the cron file (executed every X mins) updates the shopping cart - which ever comes first. Only the winner can update their sessions containing won products. This is done in the shopping cart itself.

 

At the admin side - An auctions "folder" must be created in which auction products are to be copied from the main products/categories list. Basically, if you want to list an auction, copy it to the auctions folder , then go to the auction products link in your admin -categories list and enter details of the product for auction, auction exp. date/time , starting price, overbid price etc. When the auction expires, the product does NOT become available again. In order to relist the item, admin must copy the product they wish to auction to the auctions "folder" and then select the product for auction from the admin-categories auction products section of your admin console.

 

This seems to work for statistics gathering because a trail of all auctions will always exisit in the database. Someone else will have to impliment stats for this though.

 

All I need now is a few people with "vanilla" installs to help me document the changes as my own site is heavily modded.

 

For the moment, the catalog/auctions.php file has been dis-used as this is not necessary.

 

Dan

Edited by psylencer

Share this post


Link to post
Share on other sites

This is a beta release. I have not tested this on a vanilla install. Any help or feedback from those installing on a vanilla OSC would be greatly appreciated.

 

The purpose of this contribution is to allow one to run their own auctions.

 

Current features include :

Ability to run many auctions of one product at a time,

"Won Auctions automatically added to shopping cart with "remove" and Qty changing disabled.

Email automatically sent to winning bidder,

 

etc etc. Please see the original "Auctions" contribution txts. for a full list of features.

 

Auction 2.0 Beta

===============

New features/Bug Fixes

_____________

- PHP Countdown with auto-refresh

- "Won" auctions automatically added to shopping cart

- Countdown to any time and date you wish (instead of 12:00)

- Auction price now displays highest bid instead of starting price

- You can no longer bid lower than starting price

- You can no longer bid less than current bid +overbid ammount

____________________________________

Known bugs

 

-Possible multiple "higher bid" notification emails sent to everyone with lower bids when higher bid entered

-"higher bid" notification emails are converted into SMTP Logs on some email servers <--This does not affect winning bid emails

-Poor use of language definitions

-Old obsolete code to be deleted

-Terms and conditions link does not work

 

This contribution in tested on a heavily modded OSC. I have documented this install for a New installation only (not upgrade), however changes made from Version 1.4.4 have been commented with "Dans Auction Contribution". Saying that 100% credit must go to the original Author Celdish and MarcusDesign. This is simply a few minor fixes and patches to make the contribution functional.

 

Forgive me if I've left some files or Mods out. It is very difficult for me to keep track of all the changes made. No doubt, with some valuable help from the community, we'll be able to get a solid working version of this truly excellent contrib. -Saying that, this is working great on my own site. I hope it works for you guys too.

 

Here's the link :

 

http://addons.oscommerce.com/info/5843

 

Dan

Share this post


Link to post
Share on other sites
Auctions 2.1 Released. This is a final version. Completely re-documented.

 

http://addons.oscommerce.com/info/5890

 

Thanks everyone for the help.

 

Dan

 

 

hi Dan:

 

I had a problem when clicking on add to cart whether or not you are log in:

 

 

Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\auction\includes\classes\shopping_cart.php on line 345

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 90 in C:\wamp\www\auction\includes\classes\shopping_cart.php on line 352

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 90 in C:\wamp\www\auction\includes\classes\shopping_cart.php on line 353

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 90 in C:\wamp\www\auction\includes\classes\shopping_cart.php on line 354

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 93 in C:\wamp\www\auction\shopping_cart.php on line 195

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 93 in C:\wamp\www\auction\shopping_cart.php on line 196

 

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 93 in C:\wamp\www\auction\shopping_cart.php on line 197

 

 

thanks for your help.

Share this post


Link to post
Share on other sites

Hey....great to see some changes with this mod. It actually forced me to upgrade the entire OSC...not an entirely easy experience from an ancient version to the latest...

 

I installed then this new version of the mod as well....and everything seems fine....a number of 'headers already sent'-errors...but managed to hide them for now...

 

but the biggest prob I have at the moment is the following:

 

Overbid works....so it prevents you from bidding lower than the previous bid...however, no matter what the overbid amount is...(it actually does show the "Bidding increments must be at least: $xxxx" text) it accepts any bet higher than the previous.

 

I also had time-issues. The counter shows the "Auction expires on (EST): 2008-05-14 12:00:00

(Time Remaining : Countdown complete)" but still accepts bids.

 

cheers,

Kimmo

Share this post


Link to post
Share on other sites

It is the time of the year again where I have to run our annual auction.

 

Everything works....except the timer...

 

Timer shows first everything fine.....then 1h1min before the end....the counter jumps to 1min left....does the countdown to 0....and stops showing the bid-box....but the timer goes back to 59min left....

I have implemented the alternate countdown script suggested in the forums....so I have a feeling that the product-info-page is still referring to a different countdown?

 

Can anyone help?

 

best regards,

Kimmo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×