Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

auctionTastic


FWR Media

Recommended Posts

hello,

 

can anybody say me why in class auctions is notice about pagingFunctions()

 

// Only run function pagingFunctions() if the called file is auctions.php or account.php
   if ( false !== (basename($_SERVER['SCRIPT_NAME']) === FILENAME_AUCTIONS || basename($_SERVER['SCRIPT_NAME']) === FILENAME_ACCOUNT) ){
     $this->pagingFunctions();
   }

 

When function pagingFunctions() is called only in auctions.php or account.php file, any auctions for product on the second or next page doesn't work. The auction doesn't show.

 

I would like to remove this condition, but I don't know the source code so deeply.

 

Thanks for you advice.

Zdenek

Link to comment
Share on other sites

  • 2 weeks later...

Hello Guys!

 

I managed to install this contribution in a 2002 osc! GREAT WORK!

 

I think that I have found a Possible bug, I had no time to go through this entire topic in this forum.

If this is a known issue, please ignore.

 

in file

/includes/classes/shopping_cart.php

 

code:

 

// BOF AUCTIONS

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

$this->total += $currencies->calculate_price($this->contents[$products_id]['auction_price'], $products_tax, '1');

}

 

$this->total += tep_add_tax($products_price, $products_tax) * $qty;

 

should be:

 

// BOF AUCTIONS

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

$this->total += $currencies->calculate_price($this->contents[$products_id]['auction_price'], $products_tax, '1');

}

else

$this->total += tep_add_tax($products_price, $products_tax) * $qty;

 

 

Thanks

D

 

 

What changes did you have to make for working on old OSC? I installed AuctionTastic on OSC 2.2MS2 and this is causing problems. Do you have list of the changes you need to do to make it work?

 

Regards

Lars

Link to comment
Share on other sites

I am looking at the latest version.

several lines bellow your new code

 

I marked the line in underline bold italic red :-)

 

 

function calculate() {

global $currencies;

 

$this->total = 0;

$this->weight = 0;

if (!is_array($this->contents)) return 0;

 

reset($this->contents);

while (list($products_id, ) = each($this->contents)) {

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

 

// products price

$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

if ($product = tep_db_fetch_array($product_query)) {

$prid = $product['products_id'];

$products_tax = tep_get_tax_rate($product['products_tax_class_id']);

$products_price = $product['products_price'];

$products_weight = $product['products_weight'];

// BOF AUCTIONS

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

$this->total += $currencies->calculate_price($this->contents[$products_id]['auction_price'], $products_tax, '1');

}

// EOF AUCTIONS

 

$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");

if (tep_db_num_rows ($specials_query)) {

$specials = tep_db_fetch_array($specials_query);

$products_price = $specials['specials_new_products_price'];

}

 

$this->total += $currencies->calculate_price($products_price, $products_tax, $qty);

$this->weight += ($qty * $products_weight);

}

 

// attributes price

if (isset($this->contents[$products_id]['attributes'])) {

reset($this->contents[$products_id]['attributes']);

while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {

$attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");

$attribute_price = tep_db_fetch_array($attribute_price_query);

if ($attribute_price['price_prefix'] == '+') {

$this->total += $currencies->calculate_price($attribute_price['options_values_price'], $products_tax, $qty);

} else {

$this->total -= $currencies->calculate_price($attribute_price['options_values_price'], $products_tax, $qty);

}

}

}

}

}

 

 

Hi,

 

What's the outcome of this issue? What's right and what's wrong??

 

Regards

Lars

Link to comment
Share on other sites

Can someone help me please.

 

Example:

Starting Bid: 4000.00

Overbid Amount: 100

 

The first bid is now $4100.00

I would like the starting bid to be $4000

 

Is there an easy way to edit oscauctions.php to accomplish this ?

 

Please ....

 

Hi,

 

I have same problem - any solution for this?

I'm using Group Discount contribtion as well and this really makes some strage things to AuctionTastic.

If custemer has a speciel discount - lets say 10% - then the starting bid will go below starting price and the overbid amount will be reduced as well.

Don't have the knowledge to solce this.

 

Anyone?

 

Regards

Lars

Link to comment
Share on other sites

Hi,

 

What's the outcome of this issue? What's right and what's wrong??

 

Regards

Lars

 

As stated in the contribution this contribution was built to work with RC2a (although should work with MS2.2 with minor fiddling)

 

$currencies->calculate_price($products_price, $products_tax, $qty);

 

This method does not exist in MS2.2

 

You should just be able to add the method to the currencies class as follows: -

 

    function calculate_price($products_price, $products_tax, $quantity = 1) {
     global $currency;

     return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;
   }

Link to comment
Share on other sites

Hi,

 

I have same problem - any solution for this?

I'm using Group Discount contribtion as well and this really makes some strage things to AuctionTastic.

If custemer has a speciel discount - lets say 10% - then the starting bid will go below starting price and the overbid amount will be reduced as well.

Don't have the knowledge to solce this.

 

Anyone?

 

Regards

Lars

 

I can't comment on other contributions, auctionTastic works fine on a fresh install of RC2a.

Link to comment
Share on other sites

As stated in the contribution this contribution was built to work with RC2a (although should work with MS2.2 with minor fiddling)

 

$currencies->calculate_price($products_price, $products_tax, $qty);

 

This method does not exist in MS2.2

 

You should just be able to add the method to the currencies class as follows: -

 

    function calculate_price($products_price, $products_tax, $quantity = 1) {
     global $currency;

     return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;
   }

 

 

Hi,

 

Could you be more specific, what files and where to change??

 

Regards

Lars

Link to comment
Share on other sites

Hi,

 

Could you be more specific, what files and where to change??

 

Regards

Lars

 

Open the file ..

 

catalog/includes/classes/currencies.php

 

At the very bottom find ..

 

  }
?>

 

Being very careful of the braces {} add immediately above ..

 

    function calculate_price($products_price, $products_tax, $quantity = 1) {
     global $currency;

     return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;
   }

Link to comment
Share on other sites

Open the file ..

 

catalog/includes/classes/currencies.php

 

At the very bottom find ..

 

  }
?>

 

Being very careful of the braces {} add immediately above ..

 

    function calculate_price($products_price, $products_tax, $quantity = 1) {
     global $currency;

     return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;
   }

 

 

Now added this but it makes no change!

 

Regards

Lars

Link to comment
Share on other sites

Now added this but it makes no change!

 

Regards

Lars

 

Makes no change to what Lars?

 

What is the problem you are experiencing? you just gave me an error where that method was missing in MS2.2 so I told you how to add it.

Link to comment
Share on other sites

Yes the old MS2.2 does not have this function .. auctionTastic was written for RC2a (although with a tiny amount of fiddling would work on MS2.2)

 

What kind of "fiddling" will I have to do to make it work in OSC 2.2MS2??

 

Regards

Lars

Link to comment
Share on other sites

What kind of "fiddling" will I have to do to make it work in OSC 2.2MS2??

 

Regards

Lars

 

I'll install it on 2.2 tomorrow and let you know. I haven't had any other reports of it not working on MS2.2 but I'll try nevertheless.

Link to comment
Share on other sites

Hi,

you are right.

 

Find ...

// BOF AUCTIONS
         if( isset($this->contents[$products_id]['auction_id']) && $this->contents[$products_id]['auction_id'] > '0' ){
           $this->total += $currencies->calculate_price($this->contents[$products_id]['auction_price'], $products_tax, '1');
         }
// EOF AUCTIONS

and replace with

// BOF AUCTIONS
         if( isset($this->contents[$products_id]['auction_id']) && $this->contents[$products_id]['auction_id'] > '0' ){
           $products_price = $this->contents[$products_id]['auction_price'];
           $qty = '1';
         }
// EOF AUCTIONS

It will works ...

 

 

What changes will be needed to make to latest AuctionTastic run on a OSC 2.2MS2

 

 

Regards

Lars

Link to comment
Share on other sites

Hello Guys!

 

I managed to install this contribution in a 2002 osc! GREAT WORK!

 

I think that I have found a Possible bug, I had no time to go through this entire topic in this forum.

If this is a known issue, please ignore.

 

in file

/includes/classes/shopping_cart.php

 

code:

 

// BOF AUCTIONS

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

$this->total += $currencies->calculate_price($this->contents[$products_id]['auction_price'], $products_tax, '1');

}

 

$this->total += tep_add_tax($products_price, $products_tax) * $qty;

 

should be:

 

// BOF AUCTIONS

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

$this->total += $currencies->calculate_price($this->contents[$products_id]['auction_price'], $products_tax, '1');

}

else

$this->total += tep_add_tax($products_price, $products_tax) * $qty;

 

 

Thanks

D

 

Hi,

Did you manage to make everything working using the latest AuctionTastic run on a OSC 2.2MS2??

What changes will be needed to make to latest AuctionTastic run on a OSC 2.2MS2??

 

 

Regards

Lars

Link to comment
Share on other sites

Looking at that code it can't be right. The following is untested but should work.

         // BOF AUCTIONS
         $auction_total = false;
         if( isset($this->contents[$products_id]['auction_id']) && $this->contents[$products_id]['auction_id'] > '0' ){
           $this->total += $currencies->calculate_price($this->contents[$products_id]['auction_price'], $products_tax, '1');
           $auction_total = true;
         }
         // EOF AUCTIONS

         $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");
         if (tep_db_num_rows ($specials_query)) {
           $specials = tep_db_fetch_array($specials_query);
           $products_price = $specials['specials_new_products_price'];
         }
         // BOF AUCTIONS
         if ( false === $auction_total ) {
           $this->total += $currencies->calculate_price($products_price, $products_tax, $qty);
         }
         // EOF AUCTIONS

Link to comment
Share on other sites

Hi,

 

Installed AuctionTastic on OSC 2.2MS2 (with lots of changes).

The bidding works strage. Take a look here:

 

auctiontastic_fail1.jpg

 

From the start of the auction I would exspect the numbers in the red, green and blue circle to be tha same, but they are not!

The startprice (red circle) is added with the minimum overbid value - and this number is put to the next minimum bid (green circle)

The bidding-value-field (in the blue circle) will be the value from the red circle minus local tax (in denmark tax is 25%).

Anyone able to help with this issue??

I made as well a testbid - this could be made as low as 519.20 - but the minimum startprice was set to 599 (red circle)

 

Regards

Lars

Link to comment
Share on other sites

Hi,

 

Installed AuctionTastic on OSC 2.2MS2 (with lots of changes).

The bidding works strage. Take a look here:

 

auctiontastic_fail1.jpg

 

From the start of the auction I would exspect the numbers in the red, green and blue circle to be tha same, but they are not!

The startprice (red circle) is added with the minimum overbid value - and this number is put to the next minimum bid (green circle)

The bidding-value-field (in the blue circle) will be the value from the red circle minus local tax (in denmark tax is 25%).

Anyone able to help with this issue??

I made as well a testbid - this could be made as low as 519.20 - but the minimum startprice was set to 599 (red circle)

 

Regards

Lars

 

 

Hi,

 

I manege to make AuctionTastic work on OSC 2.2MS2 with small changes in the files - found in this forum, but maybe it's not all correct. But still the funny looking bidding figures is not correct calculated. Looks like it's something with tax not correctly added to the bidding input field. Hope someone could help, because I don't know where to look in the files.

Would be nice with a instruction for people using OSC 2.2MS2 because most OSC shop owners that had there shops for some time is not using the latest OSC version. For me is a GIGANTIC piece of work to upgrade from 2.2MS2 to 2.2RC2a - I don't think it's worth the effort to do it.

 

I really tested the AuctionTastic a lot, and beside from the wrong bidding figures I did not find major errors, just some cosmetic issues.

 

Regards

Lars

Edited by dinmc
Link to comment
Share on other sites

Hi,

 

This line can't be used on a OSC 2.2MS2 installation:

 

$with_tax = $currencies->calculate_price($bid_unformatted, $tax_rate);

 

...how should it look like to work on a OSC 2.2MS2 installation??

 

Regards

Lars

 

Hi,

 

I would answer this question myself!!

The "calculate_price" is not working in OSC 2.2MS2.

To make it work i added this piece of code:

 

function calculate_price($products_price, $products_tax, $quantity = 1) {
global $currency;
$currency = $_SESSION['currency'];

return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;
}

 

...to end of /includes/classes/currencies.php just before:

 

  }
?>

 

Voila! Then it works.

Now I only have a few small problems left to make AuctionTastic work on OSC 2.2MS2.

 

One problem will be the fact that the first bid will be startprice + minimum overbid - that's wrong and this will be wrong for all OSC version.

 

First bid should be equel to the startprice!!!

 

Another change I want to make (this is NOT an error in the code). Lets say I have 10 parts on auction. The auction page only show 4 at a time without having to go to next page. Where do I change this setting??

 

Could someone help on these issues??

 

Regards

Lars

Edited by dinmc
Link to comment
Share on other sites

 

I would answer this question myself!!

 

I think you'll find this was what I suggested.

 

http://www.oscommerce.com/forums/topic/324179-auctiontastic/page__view__findpost__p__1466089

 

As for the ..

$currency = $_SESSION['currency'];

 

$currency should be set in application_top.php and available already in the global scope.

Edited by FWR Media
Link to comment
Share on other sites

The auction page only show 4 at a time without having to go to next page. Where do I change this setting??

 

 

includes/modules/auctions/classes/oscauctions.php

 

Line 25

 var $rowsPerPage = 4;

Link to comment
Share on other sites

Hi,

 

I made a lot of tests using AuctionTastic on my OSC 2.2MS2 shop and I got a new error.

 

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/www.dinmc.dk/www/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /var/www/www.dinmc.dk/www/catalog/admin/includes/classes/object_info.php on line 18

 

It happens when I delete an ended auction where bids was placed.

 

Any ideas what's wrong??

 

Regards

Lars

Link to comment
Share on other sites

 

As for the ..

$currency = $_SESSION['currency'];

 

$currency should be set in application_top.php and available already in the global scope.

 

Hi.What do you mean by this?? Bare in mind - I'm not a Php programmer - just trying to figure out how is't all put together.

Do I need to add more to catalag/application_top.php than already described in the AuctionTastic installation instruction??

 

Regards

Lars

Link to comment
Share on other sites

Help needed. I'm assuming that this is where I post. I just installed the Auctiontastic contribution but it's not working. The "Auction Products" shows up in the admin section, but when I click on it I get the following:

 

1146 - Table 'coruscan_p_os1.auctions' doesn't exist

 

select count(*) as total from products p, auctions a, products_description pd where p.products_id = pd.products_id and a.products_id = p.products_id and pd.language_id = '1' and p.products_id = a.products_id

 

[TEP STOP]

 

 

I don't recall seeing an sql add in. Also, I ran the installer.php and it showed that everything was fine. Am I missing something?

 

Thanks,

Mike

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...