Jump to content
Sign in to follow this  
deathgod

[Contribution] Auction Module

Recommended Posts

OK, in order to speed this along, whom do I make donations to, and for how much in USD is an acceptable donation? I am very new to OSCommerce (don't even have it installed yet) but feel this would be a great addition to what I plan to do.

Edited by wheeloftime

dragonsbait

Share this post


Link to post
Share on other sites
Remove engine=innoDB, engine switching is also mysql5, if that fails, then also remove the DEFAULT, not sure if thats mysql5 or not (probably not, so just remove the engine stuff first)

 

so, would this SQL be

 

CREATE TABLE `auctions` (
 `auctions_id` int(11) NOT NULL auto_increment,
 `products_id` int(11) NOT NULL default '0',
 `auctions_starting_price` decimal(15,4) NOT NULL default '0.0000',
 `auctions_date_added` datetime default NULL,
 `auctions_last_modified` datetime default NULL,
 `expires_date` datetime NOT NULL default '2006-11-01 00:00:00',
 `date_status_change` datetime default NULL,
 `status` int(1) NOT NULL default '1',
 `overbid_amount` float(10,2) NOT NULL default '0.00',
 PRIMARY KEY  (`auctions_id`)
) 

CREATE TABLE `auctions_bids` (
 `auctions_bids_id` int(11) NOT NULL auto_increment,
 `auctions_id` int(11) NOT NULL default '0',
 `customers_id` int(11) NOT NULL default '0',
 `bid_price` float(10,2) NOT NULL default '0.00',
 `bid_status` varchar(10) default NULL,
 `bid_date_added` datetime NOT NULL,
 PRIMARY KEY  (`auctions_bids_id`)
) 

INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('End of Auction  - Options', 'AUCTION_END_OPTIONS', '1', 'How do you want your auctions to end, select an option: <br />0 - Auction goes inactive<br />1 - Auction remains active but can''t be bid on', 1984, 1, '2006-11-13 19:26:24', '2006-11-11 13:23:56', NULL, 'tep_cfg_select_option(array(''0'', ''1''), ');
INSERT INTO `configuration_group` (`configuration_group_id`, `configuration_group_title`, `configuration_group_description`, `sort_order`, `visible`) VALUES (1984, 'Auction Listing', 'All configuration settings for the auctions module should go here', 1984, 1);

 

correct?

Share this post


Link to post
Share on other sites

the code above gives error

 

#1064 - syntax error near 'CREATE TABLE `auctions_bids` (

`auctions_bids_id` int(11) NOT NULL auto_incre' at line 14

Share this post


Link to post
Share on other sites

nevermind .. it worked ... i inserted it separatly and it worked

Share this post


Link to post
Share on other sites

I am getting this error when the Bid ends

 

Fatal error: Call to undefined function: tep_end_auction_valid() in public_html/includes/modules/auction_bids.php on line 49

 

Any body have any ideas?

Share this post


Link to post
Share on other sites
I am getting this error when the Bid ends

 

Fatal error: Call to undefined function: tep_end_auction_valid() in public_html/includes/modules/auction_bids.php on line 49

 

Any body have any ideas?

 

Bump

Share this post


Link to post
Share on other sites
I am getting this error when the Bid ends

 

Fatal error: Call to undefined function: tep_end_auction_valid() in public_html/includes/modules/auction_bids.php on line 49

 

Any body have any ideas?

 

Hi,

 

insert in your catalog/includes/functions/general.php

at the end of the File before the ?>

the folowing function:

 

function tep_end_auction_valid() {

$auction_cfg_end_query = mysql_fetch_object(tep_db_query('select configuration_value from ' . TABLE_CONFIGURATION . ' where configuration_key = \'AUCTION_END_OPTIONS\''));

if ($auction_cfg_end_query->configuration_value == 1) {

$auction_cfg_end = '<table><tr><td class="main">' . MESSAGE_AUCTION_OVER . '</td></tr></table>';

}

 

return $auction_cfg_end;

}

Share this post


Link to post
Share on other sites

yeah that worked thank you ...

 

One more thing am not getting a winning bid. when the auction ends there is no winner gif i put one in the icons folder and the winning bider does not get and e-mail saying that he/she was won the bid... any ideas?

 

Sorry to be a pain!

Edited by Becks78

Share this post


Link to post
Share on other sites

found that i was missing a line of code at the top of my product_info.php the code i was missing was

 

//BOF AUCTION MODULE - If Auction has expired then......
$mfo_auction_query = mysql_fetch_object(tep_db_query('select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = ' . $_GET['products_id'] . ' and status'));
if (strtotime($mfo_auction_query->expires_date)<time()) {
	$products_auction_id = $_GET['products_id'];
	tep_end_auction_invalid($products_auction_id);
}

 

But i have a new prob as soon as i add the code and try to bid i am getting this

 

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 'and status' at line 1

select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = and status

 

any Ideas?

Share this post


Link to post
Share on other sites
found that i was missing a line of code at the top of my product_info.php the code i was missing was

 

//BOF AUCTION MODULE - If Auction has expired then......
$mfo_auction_query = mysql_fetch_object(tep_db_query('select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = ' . $_GET['products_id'] . ' and status'));
if (strtotime($mfo_auction_query->expires_date)<time()) {
	$products_auction_id = $_GET['products_id'];
	tep_end_auction_invalid($products_auction_id);
}

 

But i have a new prob as soon as i add the code and try to bid i am getting this

 

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 'and status' at line 1

select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = and status

 

any Ideas?

 

Can anybody help me ?

Share this post


Link to post
Share on other sites

Hi guys

 

I'm stucked .. i believe accidently :)

 

I have added a product to auction .. selected bid and stuff ...

 

Now when i go to auctions.php in catalog, i receive blank column where products should be listed i.e. here

 

and this is the product that wqas assigned to auction ...

 

dunno, what i'm doing wrong :(

 

thanx for any help in advance!

Share this post


Link to post
Share on other sites

Anyone tell me what I've done wrong here?

 

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 'and status' at line 1

 

select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = and status

 

[TEP STOP]

Share this post


Link to post
Share on other sites
Anyone tell me what I've done wrong here?

 

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 'and status' at line 1

 

select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = and status

 

[TEP STOP]

 

Bump

Share this post


Link to post
Share on other sites

i'm stucked with this error too :(

 

just that, mine says

 

1064 - syntax error near 'and status' at line 1

 

select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = and status

 

[TEP STOP]

Share this post


Link to post
Share on other sites
i'm stucked with this error too :(

 

just that, mine says

 

1064 - syntax error near 'and status' at line 1

 

select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = and status

 

[TEP STOP]

 

I'm having the same problem and I think that our version of phpMyAdmin 2.9.0-beta1 is not compatible... who knows.

Share this post


Link to post
Share on other sites
I'm having the same problem and I think that our version of phpMyAdmin 2.9.0-beta1 is not compatible... who knows.

 

 

did you add the database file already.. usually this is because the database files haven't been loaded.. check your database to see if they are there.

what where you doing to get this error.. where you in the admin or catalog..

I will try to help you the best I can..

I am not expert.. but I have been through a lot of those errors.

noppie


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites
did you add the database file already.. usually this is because the database files haven't been loaded.. check your database to see if they are there.

what where you doing to get this error.. where you in the admin or catalog..

I will try to help you the best I can..

I am not expert.. but I have been through a lot of those errors.

noppie

 

I add the Database code that was in the download file.

 

everything works fine in the admin and show's up in the catalog but

as soon as u try to bid this is the error,

 

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 'and status' at line 1

select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = and status

 

(plus not really sure how i would add the tables to the database, if they are missing in the SQL file that come with the MOD)

Share this post


Link to post
Share on other sites

This is the SQL file that come's with the MOD

 

CREATE TABLE `auctions` (
 `auctions_id` int(11) NOT NULL auto_increment,
 `products_id` int(11) NOT NULL default '0',
 `auctions_starting_price` decimal(15,4) NOT NULL default '0.0000',
 `auctions_date_added` datetime default NULL,
 `auctions_last_modified` datetime default NULL,
 `expires_date` datetime NOT NULL default '2006-11-01 00:00:00',
 `date_status_change` datetime default NULL,
 `status` int(1) NOT NULL default '1',
 `overbid_amount` float(10,2) NOT NULL default '0.00',
 PRIMARY KEY  (`auctions_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

CREATE TABLE `auctions_bids` (
 `auctions_bids_id` int(11) NOT NULL auto_increment,
 `auctions_id` int(11) NOT NULL default '0',
 `customers_id` int(11) NOT NULL default '0',
 `bid_price` float(10,2) NOT NULL default '0.00',
 `bid_status` varchar(10) default NULL,
 `bid_date_added` datetime NOT NULL,
 PRIMARY KEY  (`auctions_bids_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;


INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('End of Auction  - Options', 'AUCTION_END_OPTIONS', '1', 'How do you want your auctions to end, select an option: <br />0 - Auction goes inactive<br />1 - Auction remains active but can''t be bid on', 1984, 1, '2006-11-13 19:26:24', '2006-11-11 13:23:56', NULL, 'tep_cfg_select_option(array(''0'', ''1''), ');
INSERT INTO `configuration_group` (`configuration_group_id`, `configuration_group_title`, `configuration_group_description`, `sort_order`, `visible`) VALUES (1984, 'Auction Listing', 'All configuration settings for the auctions module should go here', 1984, 1);

Share this post


Link to post
Share on other sites

I have just installed this on a very modified shop, and so far it seems good, my kudos to those involved. There are some missing install instructions, but so far I have worked it out in only a few hours.

 

Now for my errors/concerns so far--

 

1.The terms and conditions box does not have to be checked for a bid to be placed.

 

2.The "date bid added" column does not have any info except all zeros

 

3.I would prefer the place bid button take you to a bid confirmation page rather than the products info page, I tried and failed at modding the code for that one.

 

So maybe that is all for now--someone please advise me here--thank you much!

 

Oh, and also not getting email notifications of bids being placed, like ebay's bid confirmed system?? Is this supposed to happen

 

ps--I installed the last version 1.4_1

Edited by rabbitseffort

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Share this post


Link to post
Share on other sites
I have just installed this on a very modified shop, and so far it seems good, my kudos to those involved. There are some missing install instructions, but so far I have worked it out in only a few hours.

 

Now for my errors/concerns so far--

 

1.The terms and conditions box does not have to be checked for a bid to be placed.

 

2.The "date bid added" column does not have any info except all zeros

 

3.I would prefer the place bid button take you to a bid confirmation page rather than the products info page, I tried and failed at modding the code for that one.

 

So maybe that is all for now--someone please advise me here--thank you much!

 

Oh, and also not getting email notifications of bids being placed, like ebay's bid confirmed system?? Is this supposed to happen

 

ps--I installed the last version 1.4_1

Hi Rabbit, I also installed 1.4_1 recently and had the same problems:

1. Go to file installation.txt and perform the upgrade step 4 for file product_info.php

2.a in file product_info.php around line 36/37 you find an insert command:

$sql_auction = 'insert into '.TABLE_AUCTIONS_BIDS." (auctions_bids_id, auctions_id,customers_id,bid_price,bid_status ) values('','$auction_id','$customers_id','$bid_price','') ";

replace it with:

$sql_auction = 'insert into '.TABLE_AUCTIONS_BIDS." (auctions_bids_id, auctions_id, customers_id, bid_price, bid_status, bid_date_added ) values('', '$auction_id', '$customers_id', '$bid_price', '', now()) ";

2.b in product_info.php around line 44 you find:

$sql_auction = 'update '.TABLE_AUCTIONS_BIDS." set auctions_id='$auction_id',bid_price= '$bid_price' where auctions_id='$auction_id' and customers_id='$customers_id'";

replac it with:

$sql_auction = 'update '.TABLE_AUCTIONS_BIDS." set auctions_id='$auction_id',bid_price= '$bid_price', bid_date_added=now() where auctions_id='$auction_id' and customers_id='$customers_id'";

3. I also working on it.

 

Hope it helps.

Share this post


Link to post
Share on other sites

I made the suggested changes to product_info but no help, the date still doesn't show??

I will try the rest now--thanks!

 

ok--the agree to terms works now, thanks!

 

still want the timer to be right, it is way off, and "date bid added" to work---

 

also would be a treat to have an admin page with all bidder info there, nad maybe an option to email them straigt from the admin

Edited by rabbitseffort

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Share this post


Link to post
Share on other sites

Also, no emails are being sent--

 

is there supposed to be an admin page that gives me a list of bidders?

 

thanks


"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Share this post


Link to post
Share on other sites
I add the Database code that was in the download file.

 

everything works fine in the admin and show's up in the catalog but

as soon as u try to bid this is the error,

 

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 'and status' at line 1

select auctions_starting_price, expires_date, overbid_amount from auctions where products_id = and status

 

(plus not really sure how i would add the tables to the database, if they are missing in the SQL file that come with the MOD)

 

bump

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  

×