zdep Posted December 4, 2009 Share Posted December 4, 2009 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 Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 13, 2009 Share Posted December 13, 2009 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 Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 13, 2009 Share Posted December 13, 2009 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 Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 13, 2009 Share Posted December 13, 2009 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 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 13, 2009 Author Share Posted December 13, 2009 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; } Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 13, 2009 Author Share Posted December 13, 2009 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. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
dinmc Posted December 13, 2009 Share Posted December 13, 2009 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 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 13, 2009 Author Share Posted December 13, 2009 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; } Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
dinmc Posted December 14, 2009 Share Posted December 14, 2009 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 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 14, 2009 Author Share Posted December 14, 2009 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. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
dinmc Posted December 14, 2009 Share Posted December 14, 2009 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 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 14, 2009 Author Share Posted December 14, 2009 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. dinmc 1 Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
dinmc Posted December 14, 2009 Share Posted December 14, 2009 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 Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 14, 2009 Share Posted December 14, 2009 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 Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 14, 2009 Author Share Posted December 14, 2009 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 Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
dinmc Posted December 15, 2009 Share Posted December 15, 2009 Hi, Installed AuctionTastic on OSC 2.2MS2 (with lots of changes). The bidding works strage. Take a look here: 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 Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 17, 2009 Share Posted December 17, 2009 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. Hi Did you give it a go to test it on a OSC 2.2MS2?? Regards Lars Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 17, 2009 Share Posted December 17, 2009 (edited) Hi, Installed AuctionTastic on OSC 2.2MS2 (with lots of changes). The bidding works strage. Take a look here: 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 December 17, 2009 by dinmc Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 18, 2009 Share Posted December 18, 2009 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 Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 18, 2009 Share Posted December 18, 2009 (edited) 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 December 18, 2009 by dinmc Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 18, 2009 Author Share Posted December 18, 2009 (edited) 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 December 18, 2009 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted December 18, 2009 Author Share Posted December 18, 2009 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; Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
dinmc Posted December 20, 2009 Share Posted December 20, 2009 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 Quote Link to comment Share on other sites More sharing options...
dinmc Posted December 22, 2009 Share Posted December 22, 2009 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 Quote Link to comment Share on other sites More sharing options...
coruscant-voyager Posted December 24, 2009 Share Posted December 24, 2009 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.