Jump to content
Sign in to follow this  
FWR Media

auctionTastic

Recommended Posts

A play on the word fanTastic

 

ahhh Ok some of us believed that TASTIC was some kind of 3 party or turnkey service.. for that reason at the beginning the module was not very attractive for us...

hehe

Share this post


Link to post
Share on other sites

I have a problem with Auction price & Bid Price.

 

1) Auction price: 0,00€ (has always shown 0,00)

2) bid price

For example.

Starting Price = 5

Overbid Amount = 2, so Bidding increments must be at least 2 (that means Bid Price will be 5 + 2, or is wrong?)

In my case custumer can always Bid Price same to Bidding increments minimum.

Which means that he can offer a price which does not depend on the previous offer.

Share this post


Link to post
Share on other sites
I have a problem with Auction price & Bid Price.

 

1) Auction price: 0,00€ (has always shown 0,00)

2) bid price

For example.

Starting Price = 5

Overbid Amount = 2, so Bidding increments must be at least 2 (that means Bid Price will be 5 + 2, or is wrong?)

In my case custumer can always Bid Price same to Bidding increments minimum.

Which means that he can offer a price which does not depend on the previous offer.

 

Which version are you using, that's not an issue with the current release (or any others to my knowledge).

Share this post


Link to post
Share on other sites
Which version are you using, that's not an issue with the current release (or any others to my knowledge).

 

1.0_RC1_r116

Share this post


Link to post
Share on other sites
1.0_RC1_r116

 

It is probably not related but r116 had a little missing from the manual install instructions .. you beed to apply the two changes in documentation/core_file_changes.txt.

 

In the mean time I'll have a check on what you've said.

Share this post


Link to post
Share on other sites
I have a problem with Auction price & Bid Price.

 

1) Auction price: 0,00€ (has always shown 0,00)

2) bid price

For example.

Starting Price = 5

Overbid Amount = 2, so Bidding increments must be at least 2 (that means Bid Price will be 5 + 2, or is wrong?)

In my case custumer can always Bid Price same to Bidding increments minimum.

Which means that he can offer a price which does not depend on the previous offer.

 

javascript is not working for you on that page .. you should get a pop up stopping you from bidding.

 

However .. it has highlighted an issue .. with javascript off I can replicate this .. the code should reject the bid without javascript so I'll fix this.

 

Rob

Share this post


Link to post
Share on other sites
javascript is not working for you on that page .. you should get a pop up stopping you from bidding.

 

However .. it has highlighted an issue .. with javascript off I can replicate this .. the code should reject the bid without javascript so I'll fix this.

 

Rob

 

I think javascript is working, because I get a pop up stopping me from overbid myself.

 

My opinion is that problem is something in relation to this part of the code:

 

$this->auctions_price_array['raw'] ... but i do not know what.

 

BR

Andrej

Share this post


Link to post
Share on other sites
I have a problem with Auction price & Bid Price.

 

1) Auction price: 0,00€ (has always shown 0,00)

2) bid price

For example.

Starting Price = 5

Overbid Amount = 2, so Bidding increments must be at least 2 (that means Bid Price will be 5 + 2, or is wrong?)

In my case custumer can always Bid Price same to Bidding increments minimum.

Which means that he can offer a price which does not depend on the previous offer.

 

A fix below: -

 

includes/modules/auctions/classes/oscAuctions.php

 

Find ...

 

  function setPlaceBid(){
$keys = array('products_id','bid_price','auction_id','products_model','tax_rate','currency_modifier');
if( isset($_POST['products_id'], $_POST['bid_price'], $_POST['tax_rate'], $_POST['auction_id'], $_POST['products_model'], $_POST['currency_modifier'])
&& ($this->array_keys_exist($keys, $_POST)) ){

 

replace with ...

 

 

  function setPlaceBid(){
global $messageStack;
$keys = array('products_id','bid_price','auction_id','products_model','tax_rate','currency_modifier', 'validnewbid');
if( $this->array_keys_exist($keys, $_POST) ){
  // Reject bids if less than the required validnewbid
  if ( $_POST['bid_price'] < $_POST['validnewbid'] ){
	$messageStack->add_session('header', 'A bid must meet the minimum required value', 'warning');
	session_write_close();
	tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . tep_sanitize_string($_POST['products_id']) . '&page=' . $this->pageNum . '&auction_show=1'));
	exit;
  }

 

 

includes/modules/auctions/auction_bids.php

 

Find ...

 

					'					' . tep_draw_hidden_field("currency_modifier", $currency_modifier, '') . "\n";

 

Replace with ...

 

					'					' . tep_draw_hidden_field("currency_modifier", $currency_modifier, '') . tep_draw_hidden_field('validnewbid', $validNewBid) . "\n";

Share this post


Link to post
Share on other sites
I think javascript is working, because I get a pop up stopping me from overbid myself.

 

My opinion is that problem is something in relation to this part of the code:

 

$this->auctions_price_array['raw'] ... but i do not know what.

 

BR

Andrej

 

No the javascript code is not working .. if you view source you would have something like ..

 

<!-- FWR START AUCTIONS CODE //-->
<script language="javascript" type="text/javascript">
function validate(form) {
 // Check to see if terms and conditions is agreed to
 if(!document.auction_bid.agree.checked){
alert("Please Read the guidelines and check the box below");
return false; 
 }
 // Check to see if bbid_price has any data
 if(document.auction_bid.bid_price.value==''){
  //a few PHP language definitions here would be good
	alert('Please enter a valid bid before submitting');
	return false;
}
 if(2 == 3){
alert('Probably not a great idea to outbid yourself!');
return false;
 }
// Check to see if bid_price is higher than the current bid
 if(document.auction_bid.bid_price.value<40.00){
  //as above, a few PHP language definitions here would be good
	alert('Your bid must be at least $40.00');
	return false;
} else {
return true;
 }
}
</script>

 

See this bit ...

 

  if(document.auction_bid.bid_price.value<40.00){
  //as above, a few PHP language definitions here would be good
	alert('Your bid must be at least $40.00');
	return false;

 

It is not working on your site.

Share this post


Link to post
Share on other sites

... same thing

 

I check things and found that the function

 

  function productInfoPriceArray($auctionkey, $products_id, $products_tax_class_id){
global $currencies;

$databid = tep_db_query("
SELECT MAX(bid_price) AS max_bid_price
FROM " . TABLE_AUCTIONS_BIDS . " ab, " . TABLE_AUCTIONS . " ap
WHERE ab.auctions_id = ap.auctions_id
AND ab.auctions_id = '" . (int)$this->auctions['auctions'][$auctionkey]->auctions_id . "'") or die(mysql_error());
$highbid = tep_db_fetch_array( $databid );
tep_db_free_result($databid);
  if ($highbid['max_bid_price'] > $this->auctions['auctions'][$auctionkey]->auctions_starting_price){
	$this->auctions_price_array['osc']  = '<span style="color: orange; font-size: 10pt; font-weight: bold;">' . MY_AUCTIONS_MAX_BID . ':</span> ' . $currencies->display_price($highbid['max_bid_price'], tep_get_tax_rate($products_tax_class_id));
	$this->auctions_price_array['raw'] = $highbid['max_bid_price'];
	$this->auctions_price_array['text'] = MY_AUCTIONS_MAX_BID . ':';  
  } else {
	$this->auctions_price_array['osc']  = $currencies->display_price($this->auctions['auctions'][$auctionkey]->auctions_starting_price, tep_get_tax_rate($products_tax_class_id));
	$this->auctions_price_array['raw'] = $this->auctions['auctions'][$auctionkey]->auctions_starting_price;
	$this->auctions_price_array['text'] = false;
  }
 }

 

does not work in my case.

Share this post


Link to post
Share on other sites
... same thing

 

I check things and found that the function

 

  function productInfoPriceArray($auctionkey, $products_id, $products_tax_class_id){
global $currencies;

$databid = tep_db_query("
SELECT MAX(bid_price) AS max_bid_price
FROM " . TABLE_AUCTIONS_BIDS . " ab, " . TABLE_AUCTIONS . " ap
WHERE ab.auctions_id = ap.auctions_id
AND ab.auctions_id = '" . (int)$this->auctions['auctions'][$auctionkey]->auctions_id . "'") or die(mysql_error());
$highbid = tep_db_fetch_array( $databid );
tep_db_free_result($databid);
  if ($highbid['max_bid_price'] > $this->auctions['auctions'][$auctionkey]->auctions_starting_price){
	$this->auctions_price_array['osc']  = '<span style="color: orange; font-size: 10pt; font-weight: bold;">' . MY_AUCTIONS_MAX_BID . ':</span> ' . $currencies->display_price($highbid['max_bid_price'], tep_get_tax_rate($products_tax_class_id));
	$this->auctions_price_array['raw'] = $highbid['max_bid_price'];
	$this->auctions_price_array['text'] = MY_AUCTIONS_MAX_BID . ':';  
  } else {
	$this->auctions_price_array['osc']  = $currencies->display_price($this->auctions['auctions'][$auctionkey]->auctions_starting_price, tep_get_tax_rate($products_tax_class_id));
	$this->auctions_price_array['raw'] = $this->auctions['auctions'][$auctionkey]->auctions_starting_price;
	$this->auctions_price_array['text'] = false;
  }
 }

 

does not work in my case.

 

No .. "does not work in my case" is not good enough. The current script has been reported as working fine and has undergone significant "away from developer" testing.

 

If you have an issue you need to load auctionTastic on to a fresh osCommerce RC2a and give me information that allows me to REPLICATE the problem so I can solve it for all the other users.

 

"does not work in my case" is really unhelpful.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Sorry for inconvenience, an error has been made in the file product_info.php.

Greate Contrbution!

Share this post


Link to post
Share on other sites
Sorry for inconvenience, an error has been made in the file product_info.php.

Greate Contrbution!

 

Thanks for taking the time to point out that it wasn't an auctionTastic issue .. a lot of users wouldn't trouble themselves to feed back.

 

Having said that .. your report DID highlight an issue where javascript may be disabled which allowed me to fix it and for that I thank you.

 

Hope it works well for you.

Edited by FWR Media

Share this post


Link to post
Share on other sites

During testing I noticed one more error. I do not know if the error occurs only in my case or anyone else has a problem.

The erro occor in shopping_cart.php. After I implement code :

 

// BOF AUCTIONS
  if( isset($cart->contents[ $products[$i]['id']]['auction_id']) && $cart->contents[ $products[$i]['id']]['auction_id'] > '0' ){
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => 'Predmet dražbe');
  } else {
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));
  }
  if( $products[$i]['auctions_price'] != 'false' ){
	$display_price = '<b>' . $currencies->display_price($products[$i]['auctions_price'], tep_get_tax_rate($products[$i]['tax_class_id']), '1') . '</b>';
  } else {
	$display_price = '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>';
  }
  // EOF AUCTIONS
  $info_box_contents[$cur_row][] = array('align' => 'right',
										 'params' => 'class="productListing-data" valign="top"',
										 // BOF AUCTIONS
										 'text' => $display_price);
						   // EOF AUCTIONS

 

 

Price for product is always 0 and the total amount is always ful price for product.

Share this post


Link to post
Share on other sites
During testing I noticed one more error. I do not know if the error occurs only in my case or anyone else has a problem.

The erro occor in shopping_cart.php. After I implement code :

 

// BOF AUCTIONS
  if( isset($cart->contents[ $products[$i]['id']]['auction_id']) && $cart->contents[ $products[$i]['id']]['auction_id'] > '0' ){
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => 'Predmet dražbe');
  } else {
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));
  }
  if( $products[$i]['auctions_price'] != 'false' ){
	$display_price = '<b>' . $currencies->display_price($products[$i]['auctions_price'], tep_get_tax_rate($products[$i]['tax_class_id']), '1') . '</b>';
  } else {
	$display_price = '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>';
  }
  // EOF AUCTIONS
  $info_box_contents[$cur_row][] = array('align' => 'right',
										 'params' => 'class="productListing-data" valign="top"',
										 // BOF AUCTIONS
										 'text' => $display_price);
						   // EOF AUCTIONS

 

 

Price for product is always 0 and the total amount is always ful price for product.

 

You seem to have edited incorrectly the whole for loop should look like ..

 

	for ($i=0, $n=sizeof($products); $i<$n; $i++) {
  if (($i/2) == floor($i/2)) {
	$info_box_contents[] = array('params' => 'class="productListing-even"');
  } else {
	$info_box_contents[] = array('params' => 'class="productListing-odd"');
  }

  $cur_row = sizeof($info_box_contents) - 1;
  // BOF AUCTIONS
  if( isset($cart->contents[ $products[$i]['id']]['auction_id']) && $cart->contents[ $products[$i]['id']]['auction_id'] > '0' ){
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => TEXT_AUCTION_CART_WON);
  } else {
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));
  }
  // EOF AUCTIONS

  $products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
				   '  <tr>' .
				   '	<td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
				   '	<td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

  if (STOCK_CHECK == 'true') {
	$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
	if (tep_not_null($stock_check)) {
	  $any_out_of_stock = 1;

	  $products_name .= $stock_check;
	}
  }

  if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
	reset($products[$i]['attributes']);
	while (list($option, $value) = each($products[$i]['attributes'])) {
	  $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
	}
  }

  $products_name .= '	</td>' .
					'  </tr>' .
					'</table>';

  $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
										 'text' => $products_name);

  // BOF AUCTIONS
  if( isset($cart->contents[ $products[$i]['id']]['auction_id']) && $cart->contents[ $products[$i]['id']]['auction_id'] > '0' ){
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => TEXT_AUCTION_CART_WON2);
  } else {
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));
  }
  if( $products[$i]['auctions_price'] != 'false' ){
	$display_price = '<b>' . $currencies->display_price($products[$i]['auctions_price'], tep_get_tax_rate($products[$i]['tax_class_id']), '1') . '</b>';
  } else {
	$display_price = '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>';
  }
  // EOF AUCTIONS
  $info_box_contents[$cur_row][] = array('align' => 'right',
										 'params' => 'class="productListing-data" valign="top"',
										 // BOF AUCTIONS
										 'text' => $display_price);
										 // EOF AUCTIONS
}

Share this post


Link to post
Share on other sites

Checked. All correct.

 

It is something with this part:

if( $products[$i]['auctions_price'] != 'false' ){

	 $display_price = '<b>' . $currencies->display_price($products[$i]['auctions_price'], tep_get_tax_rate($products[$i]['tax_class_id']), '1') . '</b>';
  } else {
	$display_price = '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>';

 

If I change the code in the

 

if( $products[$i]['auctions_price'] != '' ){

 

The price for auction product is shown = standard product price - auction final price.

In checkout confirmation total amount is corect.

Share this post


Link to post
Share on other sites
Checked. All correct.

 

It is something with this part:

if( $products[$i]['auctions_price'] != 'false' ){

	 $display_price = '<b>' . $currencies->display_price($products[$i]['auctions_price'], tep_get_tax_rate($products[$i]['tax_class_id']), '1') . '</b>';
  } else {
	$display_price = '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>';

 

If I change the code in the

 

if( $products[$i]['auctions_price'] != '' ){

 

The price for auction product is shown = standard product price - auction final price.

In checkout confirmation total amount is corect.

 

Looks like you have perhaps modified the code wrongly in classes/shopping_cart.php

Share this post


Link to post
Share on other sites
Looks like you have perhaps modified the code wrongly in classes/shopping_cart.php

... You were righ about that.

 

 

Are you sure that the sub total amount in shopping cart is showing the correct amount with auction product in it?

<?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?>

Because for me, the amount is standard product price + auction final price. When in the shopping cart is non of the product in the auction, the amount is correct.

Share this post


Link to post
Share on other sites
Okee Dokee! I am back. I didn't want to post my live auction that is working until I addressed one major issue which might be a simple fix for you. Once this error is fixed, I will post my site as a live working model so people can see how this works.

 

My issue is, in Internet Explorer. You can see the auction products but once you click to make a bid (view the auction product) an error message comes up saying the page can't be found. It works in all other browsers except IE.

 

My site is:

http://www.yadaauctions.com

 

Any suggestions?

 

Thank you in advance!

 

Jim

I had the same problem as you Jim and the problem is indeed an IE issue. It seems that as soon as it take more than a couple of seconds to connect to the site the error occures. I have a modified product_info.php with lightbox and some own code also, and I could see on your site that at least lightbox was added. I tried in auction_bids.php to remove this function:

function Redirect()

{

window.location="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . $this->auctions['auctions'][$this->auctionKey]->products_id . '&page=' . (int)$_GET['page'] . '&auction_show=1'); ?>";

}

and it helped a lot it seems at least.

I cant see why the Redirect should be there maybe FWR Media can explain this. None of the functions of the addon was affected as far as I can see. An really good addon it is FWR and the plan is to go live with this addon in a few days, I will post the link to the site then if I am requested. Good luck to you Jim and to all oscommerce workers here. Great job FWR Media!

Share this post


Link to post
Share on other sites

Still the same bug?

 

1.one product in stock

2.customer one bided on it

3.customer two bought it (buy now)

4.auction ended

5.product out of stock ***

6.customer one won the auction but he can't buy it – out of stock

7.customer one bought another product

8.customer one cant checkout because his card contents OUT OF STOCK AUCTION PRODUCT

9.CUSTOMER ONE IS NOT ABBLE TO BUY ANYTHING ELSE !!!

Share this post


Link to post
Share on other sites
Still the same bug?

 

1.one product in stock

2.customer one bided on it

3.customer two bought it (buy now)

4.auction ended

5.product out of stock ***

6.customer one won the auction but he can't buy it – out of stock

7.customer one bought another product

8.customer one cant checkout because his card contents OUT OF STOCK AUCTION PRODUCT

9.CUSTOMER ONE IS NOT ABBLE TO BUY ANYTHING ELSE !!!

 

Ok Idon :) it's a bit late now but I'll take a look over the next few days. I still think that the shop owner should not be auctioning items he has only one of .. but .. I take the point.

 

If I was to do this on my own shops I would state.

 

ONE ONLY!! if someone buys at full price the auction is ended! .. in fact .. maybe that is the solution .. a check on stock .. if stock is gone auction auto ends with no winner!! your thoughts?

Edited by FWR Media

Share this post


Link to post
Share on other sites

Ok Idon :) it's a bit late now but I'll take a look over the next few days. I still think that the shop owner should not be auctioning items he has only one of .. but .. I take the point.

 

You can have actually 10 products in stock and one in auction but customers can still buy all of them as “buy now” and it's gonna be the same story with a blocked customer card with won but out of stock product.

 

ONE ONLY!! if someone buys at full price the auction is ended! .. in fact .. maybe that is the solution .. a check on stock .. if stock is gone auction auto ends with no winner!! your thoughts?

 

Yes. This is one of the solutions.

Another one can be if customer would be able to remove won but out of stock product from his shopping card.

Share this post


Link to post
Share on other sites
Still the same bug?

 

1.one product in stock

2.customer one bided on it

3.customer two bought it (buy now)

4.auction ended

5.product out of stock ***

6.customer one won the auction but he can't buy it – out of stock

7.customer one bought another product

8.customer one cant checkout because his card contents OUT OF STOCK AUCTION PRODUCT

9.CUSTOMER ONE IS NOT ABBLE TO BUY ANYTHING ELSE !!!

 

No having thought about this I am not viewing this as a bug.

 

1) If you are auctioning a product and you know you are low on stock you wouldn't set osCommerce to "stop checkout when out of stock"

 

2) If you e.g. new you only had one of an item you would no doubt keep an eye on the auction and take it down before the winning bid if someone bought it outright. You do have the ability to delete auctions you know.

Share this post


Link to post
Share on other sites
Another one can be if customer would be able to remove won but out of stock product from his shopping card.[/b]

 

No . .there is a reason for the customer not being able to remove the item from the cart .. they won the auction they therefore have to buy.

Share this post


Link to post
Share on other sites
No . .there is a reason for the customer not being able to remove the item from the cart .. they won the auction they therefore have to buy.

 

I ment they can remove a product in case the product is out of stock.

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  

×