Jump to content
Sign in to follow this  
deathgod

[Contribution] Auction Module

Recommended Posts

When a person bids less than or equal to the current bid price I'm getting this error:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/herohost/public_html/product_info.php:57) in /home/herohost/public_html/includes/functions/general.php

 

Anybody fixed this yet?

 

Thanks!

Share this post


Link to post
Share on other sites

Question?

 

can a user enter a item? or are the items only entered by administrators?

Share this post


Link to post
Share on other sites
I have been slow with version 1.5 because i am always busy, I haven't even begun yet, I'll post here when i start working on it and it will only be a few days after that that you will get version 1.5.

Nick

Just wondering if this magnificent contribution is still in development/being updated? Maybe some donations will help speed up things?

 

Anyway I just want to say this is one of the greatest contributions (and there are no alternatives to it), so I really hope to see some updates to it.

 

It makes me wish I wash a php guru so I could help fix it. :D

Share this post


Link to post
Share on other sites

Is nothing supposed to happen when the auction ends? When testing it, I get no mail about it, no order is created and the item is not added to the shopping cart. Nothing. What is wrong?

Share this post


Link to post
Share on other sites
Is nothing supposed to happen when the auction ends? When testing it, I get no mail about it, no order is created and the item is not added to the shopping cart. Nothing. What is wrong?

Hi! JangoF

This appears to be an abandoned contribution. That's what's wrong...

You need the manual order maker to type in the auction winner's order yourself.

More than that the overbid amount feaure does not work and the auctions always end at midnight.

If some talented coder could spare like three hours to fix these features, this would be a top ten contrib for sure...

//Micke

Share this post


Link to post
Share on other sites

That's really bad news. :(

 

Well, the overtime bid seems to work to me, although I get an error when typing in a too low amount:

 

New price of bid must be more than your last bidding price!!

Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/c/p/scpinferis4321/html/testsite/product_info.php:45) in /home/content/s/c/p/scpinferis4321/html/testsite/includes/functions/general.php on line 33

I really wonder why it doesn't add the item to the winner's cart, even though I have added the code to the shopping cart class?

 

Also it would be great if I could change the time the auction ends somehow.

 

That's really all I need, honestly. I would so love to see this contribution being updated, just a tiny bit is needed.

 

I guess there are no alternatives to this module either? :'(

Share this post


Link to post
Share on other sites

Hello all.

 

I'm quite amazed with this module but I have some questions to make:

 

1st: When a costumer tries to make a bid here's what he gets:

 

1264 - Out of range value adjusted for column 'auctions_bids_id' at row 1

 

insert into auctions_bids (auctions_bids_id, auctions_id, customers_id, bid_price, bid_status, bid_date_added ) values ('', '1', '2', '17', '', now())

 

[TEP STOP]

 

I've checked the data base and the field auctions_bids_id is set to Auto Increment so I really can't tell why this is happening.

 

2nd: About the time countdown issue. It should really be set using the server time. I've searched the net and found some scripts on how to get a server time. Thing is I'm no programmer and I can't mix things so it works how we want. Maybe this won't help a thing but here's a code I found at javascriptsource.com:

 

 

<!-- THREE STEPS TO INSTALL SERVERDATE TO java script:

 1.  Save the code in a file called "servertime.php"
 2.  Copy the coding into the HEAD of your HTML document
 3.  Add the last code into the BODY of your HTML document  -->

<!-- STEP ONE:  Paste this code in a file called "servertime.php"
(without the quotes) and place it in the main directory of your site.
Change mode to executable - chmod 755  -->


<?php

/* Copyright 2005 Emery Wooten - www.mresoftware.com
This script is called from Javascript. It should be called before any
JavaScripts that use the date.
Place the statement below in the <head> section of your HTML page:
<script type="text/javascript" src="servertime.php"></script>
*/

// Supress errors
error_reporting(0);

/* If your server is not in your time zone, adjust it here.  Mine is 1 hour East of me.
To use this variable, you will need to remove the "//".
// $myServerOffset = (+1) * 3600;

// Get server date
$mydate = date("U");

// Get Timezone offset
$myoffs = date("Z") - $myServerOffset;

// Adjust offsets for local machine
print "var tzoffset = $myoffs + (new Date().getTimezoneOffset()*60);";

// Set JavaScript variable to your server time as seen from client machine's location.
print "var servertimeOBJ=new Date(($mydate+tzoffset)*1000);";
?>


<!-- STEP TWO: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<script language="JavaScript" src="servertime.php"></script>

<script type="text/javascript">
<!-- Begin
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Emery Wooten :: www.mresoftware.com */

// First thing, reference the variable.
var servertimeOBJ;

// Now check that it is set
if (servertimeOBJ != null){
var myscriptTime = servertimeOBJ;
}

// If server time not passed, use client's time
else{
var myscriptTime = new Date();
}

/* "myscriptTime" is a variable local to this script. Name it as you wish.
After the above code is executed, this local variable is used for all date/time
calculations performed by the script. If all works, this variable
contains the server date as a proper JavaScript date object. */

// End -->
</script>

</HEAD>


<!-- STEP THREE: Copy this code into the BODY of your HTML document  -->


<BODY>

<script type="text/javascript">
<!-- Begin
 document.write(myscriptTime)
// End -->
</script>

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

 

 

It only uses JavaScript and PHP so I believe it's a good thing to be used, no?

 

3rd: When I first installed the mod (v. 1.42) I noticed the countdown time bug but after browsing this topic I somehow managed to fix it a bit (I had set the expire time to the next day and it was counting 11 days till end of bidding but after messing a bit I managed to put the number of days to 0, but then I don't know what I did it was all wrong again and I tried to do the same steps as before but this time I can't put it right)

 

I'm so loving this module and I do wish you keep up the good work! I just wish I could be more of assistance!!

Edited by Haerith

Share this post


Link to post
Share on other sites

Silly me.. Nevermind bout my 3rd observation... I remembered about the contribution "auctions_countdown_patch_1.tar" that I had used previously that had done the trick ;)

Share this post


Link to post
Share on other sites

Yeah, there is a timerfix posted in this thread too Haerith.

 

Me and Marcusdesign have just started working on a new version. Sorry, no ETA, but we are hoping to fix most of the problems relating to this contribution. Because right now it isn't really usable, starting price doesn't even work properly.

Share this post


Link to post
Share on other sites

Anyone reading these posts ...

 

I have installed the auctions system .. GREAT IDEA BUT OUCH . so many programming erros and deficiencies:

 

[1] E-mail set up does not work

 

[2] Multi currency bidding doea not work

 

[3] We the auctin is over is the item supposed to add itself to the client shopping cart? If so that does not work either

 

 

ANy help you can offer would be great as this is fundamentally a great idea that needs to follow the protocols of os Commerce.. multi language, multi currency etc

 

Anyone who has some time ? ieas etc we'd gladly pay you to correct these deficiencies.

 

Peter

Share this post


Link to post
Share on other sites

Great contribution and some helpful fixes from many of you. Thanks to everyone!

 

I now have it working on my live site here: WhatCoolKidsWantAuctions

 

The countdown timer is working correctly thanks to a fix from Jan and I've made slight changes to the notification email, the bidding display (instead of just customer ID I have name and ID) and I fudged the bid increments so if you under bid it simply tells you to hit the back button and bid more than the previous bidder.

 

Also I had to add the manual order entry contrib so that when the auction ends I can manually create the order and notify the customer(s) that won.

 

Looking forward to future updates on this contribution. :)

 

Cheers,

Ben.

Share this post


Link to post
Share on other sites

Hi,

 

I tried to install this contrib with seperate pricing per customer but all most of the edit's are also in SPPC.

Will there ever be a auction script for SPPC ???

 

Sucky that i cant edit it myself.

Still learning with other dummies :-"

Share this post


Link to post
Share on other sites

@dpower717: The priority here is to get the script working first, not to make it work with other mods. That can probably as an afterthought, if the script is ever finished first.

Share this post


Link to post
Share on other sites
@dpower717: The priority here is to get the script working first, not to make it work with other mods. That can probably as an afterthought, if the script is ever finished first.

hhmm i had i working first :lol:

 

What's wrong at the moment maybe i can help the others ;) :thumbsup:

Share this post


Link to post
Share on other sites
hhmm i had i working first :lol:

 

What's wrong at the moment maybe i can help the others ;) :thumbsup:

Be my guest. Here is the fixlist that I have worked on so far (as you can see, this contribution is buginfested to say the least):

 

Last Update: 17May 15.36

 

Black = Not Fixed

Blue = Fixed

## = Notes

 

Admin-side:

1. Add an option so that the time offset in hours for when the auction ends can be set in the admin panel.

 

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 ('Auction TimeOffset', 'AUCTION_END_TIMEOFFSET', '0', 'The timeoffset in hours for when your auctions will end.<br>', 1984, 2, '2007-05-17 12:32:00', '2007-05-17 12:32:00', NULL, NULL);

 

2. Bid winner for each auction should be viewable from the Admin Panel (on the same page where you add/modify auctions).

(3). "Status Change" seems to be an unused feature? (what was it originally meant to be used for?)

 

Catalog-side:

1. Auction.php page needs to be sorted by time until auction expires, not in the order the auctions were added.

 

In auctions.php, find:

$auctions_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, a.auctions_starting_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_AUCTIONS_PRODUCTS . " a where p.products_status = '1' and a.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and a.status = '1' order by a.auctions_date_added DESC";

 

Replace With:

$auctions_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, a.auctions_starting_price, a.expires_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_AUCTIONS_PRODUCTS . " a where p.products_status = '1' and a.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and a.status = '1' order by expires_date DESC";

 

2. Overbid Amount does not work.

3. Time when the Auction ends needs to be able to be set (see also Admin-side suggestion). With the little knowledge I have of javascript I was able to change the countdown timer, but not the time the actual auction ends.

 

##I use the timerfix from the forum. This is how to change the countdown timer (not the actual auction end time, just the countdown):

 

In includes\modules\auction_bids.php, add before the first ?>

$thours = AUCTION_END_TIMEOFFSET;

 

Find:

var hours =

 

Below, add:

var thours = hours-"<?= $thours ?>";

 

2 lines below, find document.getElementById(tzcd).innerHTML:

Change +hours+ to +thours+

 

4. Link to Terms & Condition does not work properly at present, neither does the checkbox.

 

In includes\modules\auction_bids.php after the first ?>, insert:

<script language="Javascript">

function termWindow() {

window.open ("auction_terms.php");

 

}

</SCRIPT>

 

Find:

<td class="main"><a href="java script:void(0);" onclick="NewWindow('<?php echo tep_href_link(FILENAME_AUCTION_TERMS); ?>','auction_terms','400','300','yes');return false"><?php echo CONDITIONS; ?>:</a></td>

<td onclick="window.document.auction_bid.agree.checked = !window.document.auction_bid.agree.checked;" align="right" width="20px"><?php echo tep_draw_checkbox_field('agree','true', false, 'onclick="window.document.auction_bid.agree.checked = !window.document.auction_bid.agree.checked;"'); ?></td>

 

Replace with:

<td class="main"><a href="java script:termWindow();">Terms & Conditions</a></td>

 

##I'm not in any way an expert on javascript, so the checkbox function I used does not work properly, but here's the code anyway:

function checkform()

{

if (!document.auction_bid.checked) {

alert('You need to agree to the Terms and Conditions!');

return false;

}

return true;

}

 

On the line below the Terms & Conditions link, insert:

<td class="main"><input type="checkbox" name="auction_bid"></td>

Find:

echo tep_draw_form('auction_bid',tep_href_link(FILENAME_PRODUCT_INFO),'post', 'onsubmit="return check_agree(this);"');

 

Replace with:

echo tep_draw_form('auction_bid',tep_href_link(FILENAME_PRODUCT_INFO),'post', 'onsubmit="return checkform();"');

 

5. When entering a too low bid, the warning needs to be printed on the current page or open up in a new window (the current method writes a new page entirely, which also has a stream error).

6. Auction start price does not work, lets me bid anyway.

 

7. Something needs to happen when the auction ends, either:

 

7.1) The product is added to the customers Shopping Cart with the correct price (I think this is the best method, and it's already halfway implemented in the current Auction version, although it doesn't work).

7.2) An order is created with the auction product, but the customer has to pay manually.

 

And preferably an email should be automatically sent to the winner.

 

8. Infobox (at the moment shows the newest auction, haven't been able to figure out how to show the auction that is closest to ending)

 

-Upload latest_auction.php to includes\boxes

 

-Open column_left.php or column_right.php and add:

require(DIR_WS_BOXES . 'latest_auction.php');

 

-In includes\languages\english.php (or translate to the language of your choice), add:

define('BOX_HEADING_AUCTON_LATEST', 'Latest Auction');

Share this post


Link to post
Share on other sites

As I promised some month ago, here is my showcase of this contribution.

 

I've implemented this contribution here:

http://www.rogerfederershop.com/osc/auctions.php

(official Roger Federer Store)

 

As you can see, there are some more features than in the default contribution. I will implement it in the auctions contribution when I have time...

Share this post


Link to post
Share on other sites

i love it the way you've done this .. when can we expect your contribution?

Share this post


Link to post
Share on other sites

Having used this contribution for a couple of weeks I've found that it needs a few more things to make it more practicle. Just throwing these out there in case the contribution ever gets picked up and worked on:

 

* Ability to cancel/delete bids

* Admin checkbox to turn on/off the ability to receive an email everytime someone bids on your auctions

* Admin notification when an auction ends including list of people who bid or at least a link to the auction so you can review

 

Regards,

Ben.

Share this post


Link to post
Share on other sites

Hello all,

 

I just finished implementation of auction v_1.4.3 on my local test machine.

( http://192.168.0.1:8180/maloum/ )

Admin part is OK

Catalog side:

- I'm able to place a bid

- I see the bidding list

 

but the countdown does not appear on the screen and the content of the table is:

 

Auction price: 10.00EUR

Expired Date: 2007-06-23 00:00:00

(  left)

Overbid Amount: 1.00EUR

 

I had a look to the contribution http://forums.oscommerce.com/index.php?sho...5920&st=140

but didn't succeed getting my stuff working properly.

Looking at auction_bids.php the javascript engine located at the end of this file does not start.

 

? Is there a way to "debug" this part of the javascript code i.e. to echo variables values ?

 

Frustrating because I have no error messages...

 

Thank you much.

Share this post


Link to post
Share on other sites
As you can see, there are some more features than in the default contribution. I will implement it in the auctions contribution when I have time...

Any idea on when you will have tim to do this? ;)

Share this post


Link to post
Share on other sites

Love the contrib... Having installed it now on our non-profit org....just one tiny annoyance....we auction items to collect money for the organization...for some reason the 'buy now' -icon is there for the product as well.... I don't want to sell the product at all, just auction it to highest bidder.

Did I miss something or is there some way to disable the product as a 'purchaseable' (is that even a word) but keep it as an auction-item.

 

cheers,

Kimmo

Share this post


Link to post
Share on other sites

KVallema: Look in your product_info.php and search for: tep_image_submit('button_in_cart.gif

 

There should be two instances of this. The second one you should remove/comment out. You probably also have to comment out the table-cells that it is located in as well.

 

It should look like this:

 

			<!-- eof moved from bellow by jobonline201@yahoo.com for auction product contribution -->

			<?php
			//bof added by jobonline2001@yahoo.com for auction product contribution
							//rewriten by MarcusDesign
				if ($auction_product) {
					include_once(DIR_WS_MODULES.'/auction_bids.php');
									} else {
							?>
								  <!--<tr>
									<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
									  <tr class="infoBoxContents">
										<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
										  <tr>
											<td width="10"><?php //echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
											<td class="main"><?php //echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
											<td class="main" align="right"><?php //echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
											<td width="10"><?php //echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
										  </tr>
										</table></td>
									  </tr>
									</table></td>
								  </tr>
								  <tr>
									<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
								  </tr>-->
							<?php
			  }
							//eof added by jobonline2001@yahoo.com for auction product contribution

 

(note that I have also commented out the review-button, as I do not use it)

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  

×