Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

auctionTastic


FWR Media

Recommended Posts

Hi FWR,

 

It is working perfectly as I mentioned in my post. Thanks a lot !!!!!!

 

During the testing i got one piece of info i thought to take your openion on this......

 

Scenario

 

Step 1-I added one new product in my shop from admin

Step-2-I make one auction listing for same product which ends say on 31st jan and bidding price is 1000 $

Step-3-I make one more auction listing for same product (using same product which i added in my shop from admin) which ends say 28th Feb and bidding price is 500 $

Step-4-I then go to my shop see the listing, on auction.php page.......It is showing two listing one with 500 and other with 1000 $

Step-5-Choose any of these is going to one same page (either both going to 500 or both going to 1000$ on product_info page)

Step-6-See the details(price and Expire Date etc) of both listing on product info page are same.........

 

This is the total explanation.

 

 

Question is

 

1.Is this working as it should work idealy or some thing is wrong?

2.Should we add same type of product from shop admin as many times as many auction we need? This should solve the problem, Is this fine?

Link to comment
Share on other sites

Hi FWR,

 

It is working perfectly as I mentioned in my post. Thanks a lot !!!!!!

 

During the testing i got one piece of info i thought to take your openion on this......

 

Scenario

 

Step 1-I added one new product in my shop from admin

Step-2-I make one auction listing for same product which ends say on 31st jan and bidding price is 1000 $

Step-3-I make one more auction listing for same product (using same product which i added in my shop from admin) which ends say 28th Feb and bidding price is 500 $

Step-4-I then go to my shop see the listing, on auction.php page.......It is showing two listing one with 500 and other with 1000 $

Step-5-Choose any of these is going to one same page (either both going to 500 or both going to 1000$ on product_info page)

Step-6-See the details(price and Expire Date etc) of both listing on product info page are same.........

 

This is the total explanation.

 

 

Question is

 

1.Is this working as it should work idealy or some thing is wrong?

2.Should we add same type of product from shop admin as many times as many auction we need? This should solve the problem, Is this fine?

 

Well putting the same product up for auction at different prices would be extremely stupid and as much as I can see that it "could" be added in admin as a javascript "don't do" I'm not going to add it. If someone wants to post the code .. then fine .. but I'm not going to.

Link to comment
Share on other sites

Well putting the same product up for auction at different prices would be extremely stupid

 

I agree with you that different price for same product do not make sence......but different end time for two same product listing make sence....as, admin can have five product in quantity of same type which admin can offer one on jan one on feb & like wise.....

 

and as much as I can see that it "could" be added in admin as a javascript "don't do" I'm not going to add it. If someone wants to post the code .. then fine .. but I'm not going to.

 

If you guide me i will try to code this or if you say I can drop this here itself as per your guidelines and wish........

 

Regards,

AnkurDhoom

Link to comment
Share on other sites

Thanks for spotting this, I think it identifies a raw figure processing problem . .

 

catalog/includes/modules/auctions/auction_bids.php

 

Find ..

 

$bid_unformatted = ($this->auctions_price_array['raw'] + $this->auctions['auctions'][$this->auctionKey]->overbid_amount);
$with_tax = $currencies->calculate_price($bid_unformatted, tep_get_tax_rate($product_info['products_tax_class_id']));
$no_tax = number_format(tep_round(($bid_unformatted * $currencies->currencies[$currency]['value']), $currencies->currencies[$currency]['decimal_places']), $currencies->currencies[$currency]['decimal_places'], $currencies->currencies[$currency]['decimal_point'], $currencies->currencies[$currency]['thousands_point']);
$validNewBid =  number_format(tep_round(($with_tax * $currencies->currencies[$currency]['value']), $currencies->currencies[$currency]['decimal_places']), $currencies->currencies[$currency]['decimal_places'], $currencies->currencies[$currency]['decimal_point'], $currencies->currencies[$currency]['thousands_point']);
$validNewBidDisplay = $currencies->display_price($bid_unformatted, tep_get_tax_rate($product_info['products_tax_class_id']));

 

Change to ..

$bid_unformatted = ($this->auctions_price_array['raw'] + $this->auctions['auctions'][$this->auctionKey]->overbid_amount);
$with_tax = $currencies->calculate_price($bid_unformatted, tep_get_tax_rate($product_info['products_tax_class_id']));
$no_tax	  = number_format(tep_round(($bid_unformatted * $currencies->currencies[$currency]['value']), $currencies->currencies[$currency]['decimal_places']), $currencies->currencies[$currency]['decimal_places'], '.', '');
$validNewBid =  number_format(tep_round($with_tax * $currencies->currencies[$currency]['value'], $currencies->currencies[$currency]['decimal_places']), $currencies->currencies[$currency]['decimal_places'], '.', '');
$validNewBidDisplay = $currencies->display_price($bid_unformatted, tep_get_tax_rate($product_info['products_tax_class_id']));

 

Let me know how it works for you.

 

OK

This Problem is solved! THANKS!!!!

My other, BIGGER problem is the Vat. problem! If there is a product with vat 20% and i am bidding on it eg. 11700. Then the bidding price that comes out is 11700,62€ ????

Why?? I don´t understand...

greets

Sascha

Link to comment
Share on other sites

OK

This Problem is solved! THANKS!!!!

My other, BIGGER problem is the Vat. problem! If there is a product with vat 20% and i am bidding on it eg. 11700. Then the bidding price that comes out is 11700,62€ ????

Why?? I don´t understand...

greets

Sascha

 

I'm not understanding the question.

 

With VAT on (e.g. 20%)

 

Let's say we have a product at 11000 (including tax)

 

Let's also say that we set an overbid amount in admin of 50 (60 including tax)

 

My first bid would be 11060

 

A new bid after that would be 11120

 

Can you put the problem in similarly easy calculations please.

Link to comment
Share on other sites

I'm not understanding the question.

 

With VAT on (e.g. 20%)

 

Let's say we have a product at 11000 (including tax)

 

Let's also say that we set an overbid amount in admin of 50 (60 including tax)

 

My first bid would be 11060

 

A new bid after that would be 11120

 

Can you put the problem in similarly easy calculations please.

 

ok lets say we have a product at 11000€ incl vat. 20%

 

overbid amount is not relevant because i wont use it. eg. 500€

 

my bid will be 11700€ manually written in the bid entry field.

 

then the outcome is 11700,62€

 

clear now?

 

greets

Sascha

Link to comment
Share on other sites

Hallo, hallo,

 

Is it just me who has got this problem, or anybody else?

 

1. I’ve got in stock just one item

2. The item is on categories sell

3. The same one is on auction sell

4. After auction was ended, stock should be reduced by one and costumer shouldn’t be able to buy the product from categories, but there is still one product to buy even it was sell on auction.

 

???

 

ldon

Link to comment
Share on other sites

ok lets say we have a product at 11000€ incl vat. 20%

 

overbid amount is not relevant because i wont use it. eg. 500€

 

my bid will be 11700€ manually written in the bid entry field.

 

then the outcome is 11700,62€

 

clear now?

 

greets

Sascha

 

Thanks again Sascha, with that info I could replicate the issue. Mods to rectify below: -

catalog/includes/modules/auctions/auction_bids.php

 

Find (At the very top) ...

 

global $currencies, $currency, $navigation;

$bid_unformatted = ($this->auctions_price_array['raw'] + $this->auctions['auctions'][$this->auctionKey]->overbid_amount);
$with_tax = $currencies->calculate_price($bid_unformatted, tep_get_tax_rate($product_info['products_tax_class_id']));
$no_tax = number_format(tep_round(($bid_unformatted * $currencies->currencies[$currency]['value']), $currencies->currencies[$currency]['decimal_places']), $currencies->currencies[$currency]['decimal_places'], $currencies->currencies[$currency]['decimal_point'], $currencies->currencies[$currency]['thousands_point']);
$validNewBid =  number_format(tep_round(($with_tax * $currencies->currencies[$currency]['value']), $currencies->currencies[$currency]['decimal_places']), $currencies->currencies[$currency]['decimal_places'], $currencies->currencies[$currency]['decimal_point'], $currencies->currencies[$currency]['thousands_point']);
$validNewBidDisplay = $currencies->display_price($bid_unformatted, tep_get_tax_rate($product_info['products_tax_class_id']));
?>
<!-- FWR START AUCTIONS CODE //-->

 

Replace with ..

 

global $currencies, $currency, $navigation;
$tax_rate = tep_get_tax_rate($product_info['products_tax_class_id']);
$currency_modifier = $currencies->currencies[$currency]['value'];
$bid_unformatted = ($this->auctions_price_array['raw'] + $this->auctions['auctions'][$this->auctionKey]->overbid_amount);
$with_tax = $currencies->calculate_price($bid_unformatted, $tax_rate);
$validNewBid =  number_format(tep_round($with_tax * $currency_modifier, $currencies->currencies[$currency]['decimal_places']), $currencies->currencies[$currency]['decimal_places'], '.', '');
$validNewBidDisplay = $currencies->display_price($bid_unformatted, $tax_rate);
?>
<!-- FWR START AUCTIONS CODE //-->

 

Find (About line 141) ...

 

<?php 
				echo 
				tep_draw_hidden_field("placebid", "true", 'id="placebid"') . "\n" .
				tep_draw_hidden_field("auction_id", $this->auctions['auctions'][$this->auctionKey]->auctions_id, 'id="auction_id"') . "\n" .
				tep_draw_hidden_field("products_model", $product_info['products_model'], 'id="products_model"') . "\n" .
				tep_draw_hidden_field("products_name", $product_info['products_name'], 'id="products_name"') . "\n" .
				tep_draw_hidden_field("products_id", $_GET['products_id'], 'id="products_id"') . "\n" .
				tep_draw_hidden_field("tax", ($validNewBid - $no_tax), $parameters = '') . "\n";
?>

 

Replace with ...

 

<?php 
				echo 
				'					' . tep_draw_hidden_field("placebid", "true", 'id="placebid"') . "\n" .
				'					' . tep_draw_hidden_field("auction_id", $this->auctions['auctions'][$this->auctionKey]->auctions_id, 'id="auction_id"') . "\n" .
				'					' . tep_draw_hidden_field("products_model", $product_info['products_model'], 'id="products_model"') . "\n" .
				'					' . tep_draw_hidden_field("products_name", $product_info['products_name'], 'id="products_name"') . "\n" .
				'					' . tep_draw_hidden_field("products_id", $_GET['products_id'], 'id="products_id"') . "\n" .
				'					' . tep_draw_hidden_field("tax_rate", $tax_rate, '') . "\n" .
				'					' . tep_draw_hidden_field("currency_modifier", $currency_modifier, '') . "\n";
?>

 

catalog/includes/modules/auctions/classes/oscAuctions.php

 

Find (about line 517) ...

 

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

 

Replace with ..

 

	$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)) ){

 

Find (about line 527) ...

 

	  if( is_numeric(str_replace(array(',', '.'), '', (float)$_POST['bid_price'])) ){
	$this->bidPrice = (float)($_POST['bid_price'] - $_POST['tax']);
  } else {

 

Replace with ...

 

	  if( is_numeric(str_replace(array(',', '.'), '', (float)$_POST['bid_price'])) ){
	$bid_notax = $_POST['bid_price'] - ($_POST['bid_price'] - ( $_POST['bid_price'] / (100 + $_POST['tax_rate']) * 100));
	$bid_less_currency_conversion = $bid_notax / $_POST['currency_modifier'];
	$this->bidPrice = (float)$bid_less_currency_conversion;
  } else {

Edited by FWR Media
Link to comment
Share on other sites

Hi FWR,

 

I found this within auction_show.php

<tr class="moduleRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $oscAuctions->auctions['auctions'][$i]->products_id. '&page=' . $oscAuctions->pageNum . '&auction_show=1', 'SSL'); ?>'">

<td style="cursor: pointer; padding-left: 0.5em;" class="productListing-data"><?php echo $oscAuctions->auctions['auctions'][$i]->products_name; ?></td>

<td style="cursor: pointer;" class="productListing-data"><?php echo tep_image(DIR_WS_IMAGES . $oscAuctions->auctions['auctions'][$i]->products_image, HEADING_TITLE, 50, HEADING_IMAGE_HEIGHT); ?></td>

<td style="cursor: pointer;" class="productListing-data" align=center><?php echo $currencies->display_price($oscAuctions->auctions['auctions'][$i]->auctions_starting_price, tep_get_tax_rate($oscAuctions->auctions['auctions'][$i]->products_tax_class_id)); ?></td>

<td style="cursor: pointer;" class="productListing-data" align=center><?php echo $currencies->display_price($oscAuctions->auctions['auctions'][$i]->auctions_max, tep_get_tax_rate($oscAuctions->auctions['auctions'][$i]->products_tax_class_id)) . $myBestBid; ?></td>

<td style="cursor: pointer;" class="productListing-data" align=center><?php echo number_format($oscAuctions->auctions['auctions'][$i]->auctions_nb); ?></td>

<td style="cursor: pointer;" class="productListing-data" align=center>

 

this shows that you are listing on auction.php your auction items by product id not by combination of product id and auction id.....

 

due to this your auction list is showing more then one listing of same product_id but your product_info is getting call with only one product_id.......

 

plz tell me how to pass the info from auction.php page to call a product based on combination of auction id and product id...............

 

hope this time you will reply......... :(

Link to comment
Share on other sites

Hi FWR,

 

I found this within auction_show.php

 

 

this shows that you are listing on auction.php your auction items by product id not by combination of product id and auction id.....

 

due to this your auction list is showing more then one listing of same product_id but your product_info is getting call with only one product_id.......

 

plz tell me how to pass the info from auction.php page to call a product based on combination of auction id and product id...............

 

hope this time you will reply......... :(

 

I always reply.

 

In this case though I'm not clear what you mean.

Link to comment
Share on other sites

I always reply.

 

In this case though I'm not clear what you mean.

 

Thank you sir for your reply. :D

 

I have simple question....

 

I found in auction_show.php that you are using only products_id to list on Product_info.php

 

Due to this the problem problem is

 

1. If their is two auctions corrosponding to same product with different end time (or may be different price after few bids), then at the time when i am clicking either of the entry for these two listed auction(for same products) from auction.php page the output is going to only first auction entry.

 

Regards,

AnkurDhoom

Edited by ankurdhoom
Link to comment
Share on other sites

This contribution seems just want I have been looking for.

 

I have an error though and cant seem to find where I went wrong. Everything seems to work great until I select one of the categories, then I get the following error.

 

Notice: Undefined variable: oscAuctions in /home/xxx/public_html/xxx/includes/boxes/categories.php on line 134

 

Fatal error: Call to a member function categoriesAdd() on a non-object in /home/xxx/public_html/xxx/includes/boxes/categories.php on line 134

 

What I did find when modifying includes/classes/shopping_cart.php, change 21

 

Find (this comes up twice in this file and I have added just at the first one and then also at the second one but no changes showed)

 

if (tep_db_num_rows($specials_query)) {

$specials = tep_db_fetch_array($specials_query);

$products_price = $specials['specials_new_products_price'];

}

 

Add immediately below

 

// BOF AUCTIONS

if( isset($this->contents[$products_id]['auction_id']) && $this->contents[$products_id]['auction_id'] > '0' ){

$auction_price = $this->contents[$products_id]['auction_price'];

} else $auction_price = 'false';

//EOF AUCTIONS

 

 

Hope you can help.

Link to comment
Share on other sites

This contribution seems just want I have been looking for.

 

I have an error though and cant seem to find where I went wrong. Everything seems to work great until I select one of the categories, then I get the following error.

 

Notice: Undefined variable: oscAuctions in /home/xxx/public_html/xxx/includes/boxes/categories.php on line 134

 

Fatal error: Call to a member function categoriesAdd() on a non-object in /home/xxx/public_html/xxx/includes/boxes/categories.php on line 134

 

includes/application_top.php is included before any other file.

 

In the instructions the following lines have to be put in application_top.php

 

 // BOF: FWR Auctions
 require_once(DIR_WS_MODULES . 'auctions/classes/' . FILENAME_OSCAUCTIONS);
 $oscAuctions = new auctions($languages_id, $language);
// BOF: FWR Auctions

 

Your error suggest that the class has not been instantiated and therefore the error.

 

What I did find when modifying includes/classes/shopping_cart.php, change 21

 

Find (this comes up twice in this file and I have added just at the first one and then also at the second one but no changes showed)

 

if (tep_db_num_rows($specials_query)) {

$specials = tep_db_fetch_array($specials_query);

$products_price = $specials['specials_new_products_price'];

}

 

Add immediately below

 

// BOF AUCTIONS

if( isset($this->contents[$products_id]['auction_id']) && $this->contents[$products_id]['auction_id'] > '0' ){

$auction_price = $this->contents[$products_id]['auction_price'];

} else $auction_price = 'false';

//EOF AUCTIONS

 

 

Hope you can help.

 

Try the application_top.php mod then come back.

Link to comment
Share on other sites

Thank you sir for your reply. :D

 

I have simple question....

 

I found in auction_show.php that you are using only products_id to list on Product_info.php

 

Due to this the problem problem is

 

1. If their is two auctions corrosponding to same product with different end time (or may be different price after few bids), then at the time when i am clicking either of the entry for these two listed auction(for same products) from auction.php page the output is going to only first auction entry.

 

Regards,

AnkurDhoom

 

At the moment Ankur only one product can be auctioned based on product_id (except for different attributes which can be auctioned seperately).

 

This is necessary because the product_info view/bids is based on the product id. To change this would require a totally different page to product_info.php.

Link to comment
Share on other sites

At the moment Ankur only one product can be auctioned based on product_id (except for different attributes which can be auctioned seperately).

 

This is necessary because the product_info view/bids is based on the product id. To change this would require a totally different page to product_info.php.

 

OK FWR...

Link to comment
Share on other sites

Shame that I haven't heard back from Dasch .. I'm close to putting up a revised version but wanted to hear about how my updates affected his problem.

Link to comment
Share on other sites

Shame that I haven't heard back from Dasch .. I'm close to putting up a revised version but wanted to hear about how my updates affected his problem.

 

Sorry FWR i haven´t got time at the moment to test it. I hope i can do this next week...

Dasch

Link to comment
Share on other sites

includes/application_top.php is included before any other file.

 

In the instructions the following lines have to be put in application_top.php

 

 // BOF: FWR Auctions
 require_once(DIR_WS_MODULES . 'auctions/classes/' . FILENAME_OSCAUCTIONS);
 $oscAuctions = new auctions($languages_id, $language);
// BOF: FWR Auctions

 

Your error suggest that the class has not been instantiated and therefore the error.

 

 

 

Try the application_top.php mod then come back.

 

That code was added to start off with. Anything else I can look at?

 

Thanks for helping :)

Link to comment
Share on other sites

That code was added to start off with. Anything else I can look at?

 

Thanks for helping :)

 

No what I'm saying is ..

 

Notice: Undefined variable: oscAuctions in /home/xxx/public_html/xxx/includes/boxes/categories.php on line 134

Fatal error: Call to a member function categoriesAdd() on a non-object in /home/xxx/public_html/xxx/includes/boxes/categories.php on line 134

 

ONLY can happen if the class is not instantiated in application_top.php.

Link to comment
Share on other sites

Hi FWR,

 

On auction.php page,

 

The listing is on some order( may in descending order of time left) , can you tell me how to set the soting order so that auction which has minimum time left list at the top and with maximun time left list at the last.....

 

In other words, i want to sort the ( auction_show.php where i =1 to number of count code ) in ascending order of time......

 

Regards,

AnkurDhoom

Link to comment
Share on other sites

Hi FWR,

 

On auction.php page,

 

The listing is on some order( may in descending order of time left) , can you tell me how to set the soting order so that auction which has minimum time left list at the top and with maximun time left list at the last.....

 

In other words, i want to sort the ( auction_show.php where i =1 to number of count code ) in ascending order of time......

 

Regards,

AnkurDhoom

 

I changed this code to acheive this

 

$auctions_query = tep_db_query("

SELECT DISTINCT a.auctions_id, a.products_id, a.auctions_starting_price, a.expires_date, a.status, a.overbid_amount, a.auction_paid, a.auctions_nb, a.auctions_max,

a.auctions_high_cust, p.products_image, p.products_tax_class_id, pd.products_name, pd.products_id

FROM " . TABLE_AUCTIONS . " a," . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd

WHERE a.products_id = p.products_id

AND a.status = '1'

AND pd.products_id = a.products_id

AND pd.language_id = '" . (int)$this->languagesId . "'

" . $added_for_customer_account . "

ORDER BY a.expires_date ASC LIMIT " . (int)$this->offSet . "," . (int)$this->rowsPerPage . "");

 

is this fine or it will effect some where?

Link to comment
Share on other sites

FWR do you have your new package lined up but need it tested before release?

 

I have some time on my hands over the next couple of days so I don't mind taking a look at it before you release it. I found the French auction script and was going to use that for a site but then found yours and realised you modified it and added features.

 

Let me know if you need me. Thanks

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

FWR do you have your new package lined up but need it tested before release?

 

I have some time on my hands over the next couple of days so I don't mind taking a look at it before you release it. I found the French auction script and was going to use that for a site but then found yours and realised you modified it and added features.

 

Let me know if you need me. Thanks

 

Hi Chooch

 

I'd very much appreciate it .. I am reticent to upload a new version only to find it needing further mods to be in an acceptable condition.

 

Send me a personal email at admin(at)myforum name(dot)co(dot)uk and I'll arrange a download straight away.

 

Rob

Link to comment
Share on other sites

Hi Chooch

 

I'd very much appreciate it .. I am reticent to upload a new version only to find it needing further mods to be in an acceptable condition.

 

Send me a personal email at admin(at)myforum name(dot)co(dot)uk and I'll arrange a download straight away.

 

Rob

 

Done!!

 

Sorry for using a strange sounding email addy but due to lack of storage space I had to use hotmail and the name is not relevant to me in any way :lol:

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...