Guest Posted March 30, 2008 Share Posted March 30, 2008 This is a beta release. I have not tested this on a vanilla install. Any help or feedback from those installing on a vanilla OSC would be greatly appreciated. The purpose of this contribution is to allow one to run their own auctions. Current features include : Ability to run many auctions of one product at a time, "Won Auctions automatically added to shopping cart with "remove" and Qty changing disabled. Email automatically sent to winning bidder, etc etc. Please see the original "Auctions" contribution txts. for a full list of features. Auction 2.0 Beta =============== New features/Bug Fixes _____________ - PHP Countdown with auto-refresh - "Won" auctions automatically added to shopping cart - Countdown to any time and date you wish (instead of 12:00) - Auction price now displays highest bid instead of starting price - You can no longer bid lower than starting price - You can no longer bid less than current bid +overbid ammount ____________________________________ Known bugs -Possible multiple "higher bid" notification emails sent to everyone with lower bids when higher bid entered -"higher bid" notification emails are converted into SMTP Logs on some email servers <--This does not affect winning bid emails -Poor use of language definitions -Old obsolete code to be deleted -Terms and conditions link does not work This contribution in tested on a heavily modded OSC. I have documented this install for a New installation only (not upgrade), however changes made from Version 1.4.4 have been commented with "Dans Auction Contribution". Saying that 100% credit must go to the original Author Celdish and MarcusDesign. This is simply a few minor fixes and patches to make the contribution functional. Forgive me if I've left some files or Mods out. It is very difficult for me to keep track of all the changes made. No doubt, with some valuable help from the community, we'll be able to get a solid working version of this truly excellent contrib. -Saying that, this is working great on my own site. I hope it works for you guys too. I'll post the link in the following message.... Quote Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2008 Share Posted March 30, 2008 Here is the link for you all : http://addons.oscommerce.com/info/5843 Dan Quote Link to comment Share on other sites More sharing options...
azer Posted March 30, 2008 Share Posted March 30, 2008 hell i don't understand why make a new contribution page, it s only making people confused and thinking it s two different contributions as long as you write beta , people would understand that it s not final , and would make their choice. since your work is coming from the version 1.4.4 then just post it after and proposal of new features on the topic opend forr the auctions contribution i hope you ll find my thinking usefull , tell me if you agree Quote MS2 Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2008 Share Posted March 30, 2008 (edited) helli don't understand why make a new contribution page, it s only making people confused and thinking it s two different contributions as long as you write beta , people would understand that it s not final , and would make their choice. since your work is coming from the version 1.4.4 then just post it after and proposal of new features on the topic opend forr the auctions contribution i hope you ll find my thinking usefull , tell me if you agree Azer, the old contrib page contains loads and loads of old or obsolete information, secondly, this is a major update to the contrib which was forgotten about long ago due to lack of support and those to finish the contribution off. I should point out and make very clear that even in V1's most recent version 1.4.4, while the core functionality was there, most of the important features which are required to make the thing work were not. As such, I don't believe I would be alone in assuming that most people who tried V1. went through all the effort to find out it was useless - eventually being abandoned by those who started the contrib. These changes relect most of the updates requested in the other forum to make the contrib truely functional. I've put the easy bugs on the backburner in favour of the more important bugs or features. Which is why the simple bugs are still present -further; anyone with limited Php knowledge should be able to figure them out, andif they don't I'll be doing so myself as soon as time allows. In short, I get lost in 11 pages of shit which has been negated 10 times only for myself to come along and do the same thing. My priority now is to make sure the countless hours of me pulling out my hair doesn't go to waste. I would like to see this contrib polished, which means getting as many of you guys to try the contrib and post feedback. - Hence the new forum topic - you're right though- it probably could have been posted under the existing contribs though. Dan Edited March 30, 2008 by psylencer Quote Link to comment Share on other sites More sharing options...
azer Posted March 30, 2008 Share Posted March 30, 2008 i m 100 % understanding, and certains taht it s a major rework of it, if you look in the contirbution and search for my name you ll see that it make 5 years i work on osc and from my experience, contribution taht have been spilt in several page ,get only people to be confused and them and you will be getting on nerves with people askeing you support for the old version and vice versa on the old topic. im sure all people who subscribe to the old topic and know the page of the old contrib would like me love to give feedback and help for this new revision 2 version, and everybody is aware that 2beta means beta , not full workin, 100 % tested. it s a pity, but we dont see how many persons are subscribed a topic, so when somebody post a message sometimes hundred persons recevie an email telling them there is an update. it not like when you make a new contribution page. so im not winning , just trying to get most of people interested to be aware of your new work and also try to get as much people involved on helping. also as i tol in private message , the french members workd in version 1.5 beta also , and i think we should and could join effort to release a version 2.10 with both our efforts :lol: http://www.oscommerce-fr.info/forum/index....amp;hl=encheres Quote MS2 Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2008 Share Posted March 30, 2008 i m 100 % understanding, and certains taht it s a major rework of it, if you look in the contirbution and search for my name you ll see that it make 5 years i work on osc and from my experience, contribution taht have been spilt in several page ,get only people to be confused and them and you will be getting on nerves with people askeing you support for the old version and vice versa on the old topic. im sure all people who subscribe to the old topic and know the page of the old contrib would like me love to give feedback and help for this new revision 2 version, and everybody is aware that 2beta means beta , not full workin, 100 % tested. it s a pity, but we dont see how many persons are subscribed a topic, so when somebody post a message sometimes hundred persons recevie an email telling them there is an update. it not like when you make a new contribution page. so im not winning , just trying to get most of people interested to be aware of your new work and also try to get as much people involved on helping. also as i tol in private message , the french members workd in version 1.5 beta also , and i think we should and could join effort to release a version 2.10 with both our efforts :lol: http://www.oscommerce-fr.info/forum/index....amp;hl=encheres I'd be happy to help, but my understanding of french is limited to that of which babelfish can translate. If I'd known you guys were developing this, I'd have spoken to you first. None the less, it sounds like you guys have been working on an admin side to this which was to be the next thing I look at. Any chance I could get your code to see how the two contribs work together? Dan Quote Link to comment Share on other sites More sharing options...
martinwenn Posted March 31, 2008 Share Posted March 31, 2008 Hello and thanks to all who working with this contribution. I have been looking for a script like this. I have installed this on a virgin installation of oscommerce-2.2rc2a. I found one ' missing in the admin catalog.php file and the 7.2 code is not same as in the oscommerce-2.2rc2a file. product_info generates this message: Expired Date: 2008-03-31 00:00:00 (Time Remaining : Warning: countdown(setup.php): failed to open stream: No such file or directory in /usr/local/pem/vhosts/123533/webspace/httpdocs/catalog/includes/modules/auction_bids.php on line 112 Warning: countdown(setup.php): failed to open stream: No such file or directory in /usr/local/pem/vhosts/123533/webspace/httpdocs/catalog/includes/modules/auction_bids.php on line 112 Fatal error: countdown(): Failed opening required 'setup.php' (include_path='.:/php/includes') in /usr/local/pem/vhosts/123533/webspace/httpdocs/catalog/includes/modules/auction_bids.php on line 112 Quote Link to comment Share on other sites More sharing options...
marcinmf Posted March 31, 2008 Share Posted March 31, 2008 Hello, Last week I start to play with auction code. My store is highly modified CRE but still I managed to make it work. During my custom installation I found some places for improvement. I did not try the beta version yet but I will try it during this week. I think it will be good to change request from POST to GET so you can capture request in the URL. If you have it in URL you could use snapshot that you have commented out in product_info.php //$navigation->set_snapshot(); It still wont work with the commented code. You would have to give something like that: $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_PRODUCT_INFO . '?products_id='.$products_id)); And is you have your request in URL you could add it to my example. For those who don knot what this snap shot is here is explanation: When you are not logged in and you placed a bid you are redirected to the log in page. When snap shot is not set after log in you will be taken back to the index(home) page and after that customer have to navigate again to the auction product and place bid again. In my example customer will be taken back to the auction product but still he/she have to place bid again. If we can place request in URL customer would be redirected to the auction page with bid approved or disapproved. I also made a lot of modification to the email message. My message looks like this: define('AUCTION_HIGHER_BID_NOTIFY_EMAIL','Hello [customer_firstname] [customer_lastname], We are sorry to inform you that you have been out bided. Another customer have just placed higher offer for item: ([auction_name]) at [auction_url] . The New Price is: $[bid_price] Please fallow the link if you wish to raise your bid. --------------------------- Auction details: --------------------------- Item Title : [auction_name] Item Number : [products_id] Item SKU : [auction_sku] Item URL : [auction_url] End Date : [auction_ends] Current Bid : $[bid_price] ---------------------------- * For more information please visit our auction details and rules on the product detail page. ** If you need more assistance please reply to this email. Regards, xxxxxxxxxxxx '); Let me know if you want to see how I did this. Good luck and I will give my feedback after testing beta version. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 1, 2008 Share Posted April 1, 2008 Guys thanks for your feedback, Im not at home at the moment. I will look into these problems as soon as I can. Sounds like a missing file or modification. Dan Quote Link to comment Share on other sites More sharing options...
Guest Posted April 1, 2008 Share Posted April 1, 2008 (edited) Thanks for the feedback. I've included the setup.php file in the latest update available from http://addons.oscommerce.com/info/5843 I completely agree with your issue of being directed to the index.php page once login is completed. I will have this problem rectified hopefully tonight. Ill keep you posted. Cheers Dan Edited April 1, 2008 by psylencer Quote Link to comment Share on other sites More sharing options...
martinwenn Posted April 1, 2008 Share Posted April 1, 2008 (edited) Is it some way to place auctions with start time and stop time. I want to plan comming auctions for exampel next week and want an auction to start 9 am and stop 12 pm. .... and thanx for the setup.php fix. Edited April 1, 2008 by martinwenn Quote Link to comment Share on other sites More sharing options...
cs42na Posted April 2, 2008 Share Posted April 2, 2008 Ok some bugs I fixed in this contribution 1)In Producti Info I changed the query "$sql_auction = 'insert into '.TABLE_AUCTIONS_BIDS." (auctions_bids_id, auctions_id, customers_id, bid_price, bid_status, bid_date_added ) values('', '$auction_id', '$customers_id', '$bid_price', '', now()) ";" into this "$sql_auction = 'insert into '.TABLE_AUCTIONS_BIDS." (auctions_bids_id, auctions_id, customers_id, bid_price, bid_status, bid_date_added ) values(NULL, '$auction_id', '$customers_id', '$bid_price', '', now()) ";" I used a NULL value because auctions_bids_id is autoincremented. 2)There was a problem when one customer was bidding more than once I changed the query " $sql_auction = 'update '.TABLE_AUCTIONS_BIDS." set auctions_id='$auction_id',bid_price= '$bid_price', bid_date_added= 'now()' where auctions_id='$auction_id' and customers_id='$customers_id'"; " into this "$sql_auction = 'update '.TABLE_AUCTIONS_BIDS." set auctions_id='$auction_id',bid_price= '$bid_price', bid_date_added= now() where auctions_id='$auction_id' and customers_id='$customers_id'"; " 3) My problem is when an auction ends I am getting the following error "Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\Nano\catalog\includes\modules\auction_bids.php on line 412" I think is because at the sql query select MAX(ab.bid_price) as bid_price , ab.customers_id,ap.auctions_id, ap.products_id, pp.products_name, pr.products_model, cc.customers_firstname, cc.customers_lastname, cc.customers_email_address from ".TABLE_AUCTIONS_BIDS." ab,".TABLE_AUCTIONS_PRODUCTS." ap, ".TABLE_CUSTOMERS." cc, ".TABLE_PRODUCTS_DESCRIPTION." pp, ".TABLE_PRODUCTS." pr where ab.auctions_id=ap.auctions_id and ab.customers_id = cc.customers_id and ap.products_id = pp.products_id and ap.products_id = ".$products_id." and ap.status = 1 and pr.products_id = ".$products_id." and ap.expires_date <'". date("Y-m-d").' '.date("G:i:s")."' GROUP BY auctions_id"; There is not a table TABLE_AUCTIONS_PRODUCTS. in our database. Any help how to fix this pls?? Thank you very much for your time Quote Link to comment Share on other sites More sharing options...
Guest Posted April 3, 2008 Share Posted April 3, 2008 (edited) Ok some bugs I fixed in this contribution 1)In Producti Info I changed the query "$sql_auction = 'insert into '.TABLE_AUCTIONS_BIDS." (auctions_bids_id, auctions_id, customers_id, bid_price, bid_status, bid_date_added ) values('', '$auction_id', '$customers_id', '$bid_price', '', now()) ";" into this "$sql_auction = 'insert into '.TABLE_AUCTIONS_BIDS." (auctions_bids_id, auctions_id, customers_id, bid_price, bid_status, bid_date_added ) values(NULL, '$auction_id', '$customers_id', '$bid_price', '', now()) ";" I used a NULL value because auctions_bids_id is autoincremented. 2)There was a problem when one customer was bidding more than once I changed the query " $sql_auction = 'update '.TABLE_AUCTIONS_BIDS." set auctions_id='$auction_id',bid_price= '$bid_price', bid_date_added= 'now()' where auctions_id='$auction_id' and customers_id='$customers_id'"; " into this "$sql_auction = 'update '.TABLE_AUCTIONS_BIDS." set auctions_id='$auction_id',bid_price= '$bid_price', bid_date_added= now() where auctions_id='$auction_id' and customers_id='$customers_id'"; " 3) My problem is when an auction ends I am getting the following error "Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\Nano\catalog\includes\modules\auction_bids.php on line 412" I think is because at the sql query select MAX(ab.bid_price) as bid_price , ab.customers_id,ap.auctions_id, ap.products_id, pp.products_name, pr.products_model, cc.customers_firstname, cc.customers_lastname, cc.customers_email_address from ".TABLE_AUCTIONS_BIDS." ab,".TABLE_AUCTIONS_PRODUCTS." ap, ".TABLE_CUSTOMERS." cc, ".TABLE_PRODUCTS_DESCRIPTION." pp, ".TABLE_PRODUCTS." pr where ab.auctions_id=ap.auctions_id and ab.customers_id = cc.customers_id and ap.products_id = pp.products_id and ap.products_id = ".$products_id." and ap.status = 1 and pr.products_id = ".$products_id." and ap.expires_date <'". date("Y-m-d").' '.date("G:i:s")."' GROUP BY auctions_id"; There is not a table TABLE_AUCTIONS_PRODUCTS. in our database. Any help how to fix this pls?? Thank you very much for your time Firstly, thankyou so much for you help on this contrib. I'll try to keep things breif. 1 & 2)<--Excellent work on this, I'll make the changes next contrib (Auction 2.0.4) 3) Sounds like your version of MYSQL or PHP doesn't support numrows(). Mine does, my server versions are below, You are right in a way, there is no table called "TABE_AUCTIONS_PRODUCTS" Notice the "." before and after the reference though, the code reverts back from SQL to PHP, meaning this table is, or should be defined in your "databse_tables.php" file. In short, TABLE_AUCTIONS_PRODUCTS = auctions Ie. you should have a table called "Auctions" in your database, and this should appear in your database_tables.php file. define('TABLE_AUCTIONS_PRODUCTS', 'auctions'); Here is my server versions : Server Host: (10.1.1.4) Database Host: yourserverhere.com (127.0.0.1) Server OS: Database: MySQL 5.0.41-community-nt Server Date: 04/03/2008 22:18:33 Datebase Date: 04/03/2008 23:18:33 Server Up Time: HTTP Server: Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.2 PHP Version: 5.2.2 (Zend: 2.2.0) osCommerce 2.2-MS2 PHP Logo PHP Version 5.2.2 Thankyou SO much for the help. Dan Edited April 3, 2008 by psylencer Quote Link to comment Share on other sites More sharing options...
Guest Posted April 3, 2008 Share Posted April 3, 2008 Is it some way to place auctions with start time and stop time. I want to plan comming auctions for exampel next week and want an auction to start 9 am and stop 12 pm. .... and thanx for the setup.php fix. :rolleyes: There sure is, and as soon as I've got this working, it'll be right up there on my list. How bout we get this working first, and then think about improvements. Also; There are a heap of bugs from the old code of which i'm still yet to resolve. The email code does not work correctly as of yet, this is what I'm working on right now. - So that only the second last bidder is notified of a higher bid, instead of ALL bidders. Dan Quote Link to comment Share on other sites More sharing options...
cs42na Posted April 3, 2008 Share Posted April 3, 2008 I run the project locally using wamp my PHP version is 5.2.5 and Mysql Version is 5.0.51a. So any idea how can I fix this so that the item will be added to the Customers shopping cart and I will not get the error I mentioned above?? P.s I checked the database_tables.php and I have in my code " define('TABLE_AUCTIONS_PRODUCTS', 'auctions'); " so I do not know what the error is Quote Link to comment Share on other sites More sharing options...
Guest Posted April 3, 2008 Share Posted April 3, 2008 I run the project locally using wamp my PHP version is 5.2.5 and Mysql Version is 5.0.51a. So any idea how can I fix this so that the item will be added to the Customers shopping cart and I will not get the error I mentioned above?? P.s I checked the database_tables.php and I have in my code " define('TABLE_AUCTIONS_PRODUCTS', 'auctions'); " so I do not know what the error is Not sure right now, Ill look into it. FYI, Just managed to have some success on the emails thing. I'll post changes tomorrow. Dan Quote Link to comment Share on other sites More sharing options...
Guest Posted April 3, 2008 Share Posted April 3, 2008 (edited) Not sure right now, Ill look into it. FYI, Just managed to have some success on the emails thing. I'll post changes tomorrow. Dan Try this, $query="select * from '.TABLE_PRODUCTS.'"; $result=mysql_query($query); $num=mysql_numrows($result); echo $num; Tell me if this works. - you should get a result greater than 0 (if you have any products that is). Also, check this thread, it might help, if not, I'll continue to look around. http://www.daniweb.com/forums/thread26425.html Edited April 3, 2008 by psylencer Quote Link to comment Share on other sites More sharing options...
cs42na Posted April 3, 2008 Share Posted April 3, 2008 Nop Still no Luck , I am getting the following error " Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in C:\wamp\www\Nano\catalog\includes\modules\auction_bids.php on line 420" Shouldn't the product be added on the Customers shopping cart though?? Quote Link to comment Share on other sites More sharing options...
cs42na Posted April 3, 2008 Share Posted April 3, 2008 I fixed the problem. Because my php is probably configured differently from yours I typed above the query the following code "$products_id = $_REQUEST['products_id'];" and I have no error now. My problems now is how can I add the winning product to the shopping cart and also in the administrator console , the administrator cannot see who won the bid Quote Link to comment Share on other sites More sharing options...
Guest Posted April 4, 2008 Share Posted April 4, 2008 (edited) I fixed the problem. Because my php is probably configured differently from yours I typed above the query the following code "$products_id = $_REQUEST['products_id'];" and I have no error now. My problems now is how can I add the winning product to the shopping cart and also in the administrator console , the administrator cannot see who won the bid The product is automatically added to the winners shopping cart. (Have you tried winning an auction, then checking?) If this isn't working - it should -let me know. The admin will not see this until the product is paid for. The french guys are working on an admin side to this contrib, however Im yet to have a go installing it or to see if it's compatible with this contrib. If not, Im sure it won't be too difficult to whip something up. I'll be posting another update tonight as Ive finally got the Higher bidder notification working perfectly. Only the second highest bidder is notifed of a higher bid, the email sent also contains all details of the auction along with (hopefully) a URL to the auction of which I am working on right now. Dan Edited April 4, 2008 by psylencer Quote Link to comment Share on other sites More sharing options...
cs42na Posted April 4, 2008 Share Posted April 4, 2008 Yep I have tried and won an auction but nothing was added to the shopping cart of the winner:( . Can you tell in which file to look so that I can modify it Quote Link to comment Share on other sites More sharing options...
Guest Posted April 4, 2008 Share Posted April 4, 2008 (edited) Yep I have tried and won an auction but nothing was added to the shopping cart of the winner:( . Can you tell in which file to look so that I can modify it OK, I'll give you a quick run down on how this contrib works. Auction bids are added to the auctions_bids table by the auctions_bids.php file when valid data is posted from this file, to start off with, an auction has the status of "1" or active. You can see this in the auctions table under the column "status"<--check to see if this column exists When an auction is won, one of many things will happen I'll outline them in detail below a) A user (winning or otherwise) will load the product_info.php file (which contains the auctions_bids.php) which will trigger the product to be added ONLY to the database table customers_basket.php (with the WINNING BIDDERS DETAILS) The highest bid for the product is added to a column under this table called "final_price" <--check to see if this column exists and the "Status" column under "auctions" table will revert to "0" - this will disable anyone else adding any further information to the "customers_basket" table. B ) The winner will go straight to their shopping cart - A test is performed on the status column to see if the user has A) won an auction - AND B)already had the product added to their shopping cart (auctions table - status column (see above) Obviously actions occur here depending on the outcome. Ie if no other user has triggered the information to be sent to the customer_basket" table, then this is done at this stage. SECONDLY, regardless of wether the information in the customers_basket table is UPDATED by THE WINNING BIDDER (who is looking at their own shopping cart) or by ANOTHER who was viewing a completed auction (see scenerio A) SESSIONS ARE NOW UPDATED - following this, the shopping cart loads as normal. and Whamo - you should see the product listed in the shopping cart. <--You should also see a note where the "remove tag" usually is stating "This is an auction product, it can not be removed", you should aso notice that you can not modify the ammount of units of the auction product you want to order. c) NO ONE checks their shopping cart or views a completed auction - in this case - the auctions still needs to end, however with no one viewing the page, what will trigger the auction to end? The aucron2.php file, which executed every 5 mins to update the customers_basket table. The class below is VERY important for all of this to work, likewise is the code which is to be inserted into the catalog/shopping_cart.php and auctions_bids.php <--although you should not need to modify this file. ******PLEASE NOTE: THE FOLLOWING IS CODE FROM MY OWN SITE - HENCE THE "CRAZYSTU" reference in the code. Classes/shopping_cart.php the following function should be in there. //DANS Auction Contrib - New function to add auction products to cart function add_cart_auction($products_id, $qty = '1', $attributes = '', $notify = true) { global $new_products_id_in_cart, $customer_id; $products_id = tep_get_uprid($products_id, $attributes); if ($notify == true) { $new_products_id_in_cart = $products_id; tep_session_register('new_products_id_in_cart'); } if ($this->in_cart($products_id)) { $this->update_quantity($products_id, $qty, $attributes); } else { $this->contents[] = array($products_id); $this->contents[$products_id] = array('qty' => $qty); // insert into database if (is_array($attributes)) { reset($attributes); while (list($option, $value) = each($attributes)) { $this->contents[$products_id]['attributes'][$option] = $value; // insert into database } } } $this->cleanup(); // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure $this->cartID = $this->generate_cart_id(); } //EOF Dans AUCTION Contrib Also you'll need to check out /catalog/shopping_cart.php - this is one of the pages where the product is added to the database AND sessions. You'll also find similar code in the auctions_bids.php file, however in auctions_bids.php, only the database table customers_basket is modified - NOT the sessions. //BOF DANS AUCTION Contrib - SQL If (effectively) to test if customer has been notified via email, if not send email, update database and shopping cart. Please note, the "notifed" column in the table "auctions" Notified is actually sessions updated but I havent changed the wording because I can't be stuffed. global $ddd; $query="select MAX(ab.bid_price) as bid_price , ab.customers_id,ap.auctions_id, ap.products_id, pp.products_name, pr.products_model, cc.customers_firstname, cc.customers_lastname, cc.customers_email_address, ap.notified, ap.status from ".TABLE_AUCTIONS_BIDS." ab,".TABLE_AUCTIONS_PRODUCTS." ap, ".TABLE_CUSTOMERS." cc, ".TABLE_PRODUCTS_DESCRIPTION." pp, ".TABLE_PRODUCTS." pr where ab.auctions_id=ap.auctions_id and ab.customers_id = cc.customers_id and ap.products_id = pp.products_id and ap.notified = 1 and ap.expires_date <'". date("Y-m-d").' '.date("G:i:s")."' GROUP BY auctions_id"; $result=mysql_query($query); //echo $query; $num=mysql_numrows($result); global $cart; global $custida; $i=0; while ($i < $num) { global $custida; //Get result Number to work with $Auction_id=mysql_result($result,$i,"auctions_id"); $asfirstname=mysql_result($result,$i,"customers_firstname"); $aslastname=mysql_result($result,$i,"customers_lastname"); $asemail=mysql_result($result,$i,"customers_email_address"); $asbidprice=mysql_result($result,$i,"bid_price"); $asprodname=mysql_result($result,$i,"products_name"); $asprodmod=mysql_result($result,$i,"products_model"); $asprodid=mysql_result($result,$i,"products_id"); $custida=mysql_result($result,$i,"customers_id"); $anotified=mysql_result($result,$i,"notified"); $astatus=mysql_result($result,$i,"status"); //echo date("Y-m-d").' '.date("G:i:s").'<br>'; //echo $custida . '<br>'; //echo $asprodid . '<br>'; //echo $asbidprice . '<br>'; // send email //test to see if current customer is the winner of an auction which has not been processed. if ($custida == $customer_id){ global $customer_id; if ($astatus == 1) { tep_mail($asfirstname.' '.$aslastname, $asemail, 'CrazyStu Auction Won :'.$asprodmod, 'Dear '.$asfirstname.' '.$aslastname.',<br><br><br>Congratulations. You are the winning bidder for a '.$asprodname.'!<br> This product has been added to your shopping cart at CrazyStu.com.au. <br> Please log-in to your account at <a href="https://crazystu.com.au/login.php">https://crazystu.com.au/login.php</a> and proceed directly to the checkout. Once there, you will be given payment and shipping options. Simply select the shipping method and destination you wish to use, then enter your payment details (Paypal, Direct Deposit or Credit Card). A receipt will be issued to you upon order completion.<br> Once payment is confirmed, your order will be dispatched straight away.<br> <strong>Please see below for final auction details:</strong><br> Your Auction ID is :'.$Auction_id.' (To be used as reference for direct deposit)<br> You have bid on '.$asprodmod.', '.$asprodname.'<br> <br>Your winning bid was :$'.$asbidprice.' +Shipping (Please proceed to our checkout for options and pricing)<br> Please contact us at <a href="mailto:[email protected]">[email protected]</a> if you have any further queries.<br> Thank you for your order.<br> <br>Regards,<br> <br>Dirk Renkema.<br> CrazyStu.com.au Administration.<br> <p>**Security notice : Crazystu.com.au will never ask you to reveal your login password. Protect yourself online and keep all login and personal details private and confidential.<br> A copy of our privacy notice is available online at <a href="http://crazystu.com.au/privacy.php">http://crazystu.com.au/privacy.php.</a><br /> <br> <br>', 'CrazyStu.com.au', '[email protected]'); } //update database to processed status $query2 = "update ".TABLE_AUCTIONS_PRODUCTS." SET status = 0 where auctions_id = ".$Auction_id; $result2=mysql_query($query2); $query3 = "update ".TABLE_AUCTIONS_BIDS." SET bid_status = 'won' where bid_price = ".$asbidprice; $result3=mysql_query($query3); $query4 = "INSERT INTO ".TABLE_CUSTOMERS_BASKET." (auction_product, customers_id, products_id, customers_basket_quantity,final_price, customers_basket_date_added) VALUES ('1',".$custida.", ".$asprodid.",'1', ".$asbidprice.", ".date("Y-m-d").")"; $result4=mysql_query($query4); $query5 = "update ".TABLE_AUCTIONS_PRODUCTS." SET notified = '0' where auctions_id = ".$Auction_id; $result5=mysql_query($query5); $cart-> add_cart_auction($asprodid, $qty = '1', $attributes = '', $notify = true); $cart->restore_contents(); } $i++; } //EOF DANS AUCTION Hope this helps. Let me know if you've got any questions. Dan Edited April 4, 2008 by psylencer Quote Link to comment Share on other sites More sharing options...
cs42na Posted April 4, 2008 Share Posted April 4, 2008 The above code exists in my file. I run the whole project locally and I am not using any online Server. I am using wamp apache server and my PHP version is 5.2.5. I just can't find what the error is Quote Link to comment Share on other sites More sharing options...
cs42na Posted April 4, 2008 Share Posted April 4, 2008 I think the problem is that these lines of codes never executed when I run the program /update database to processed status $query2 = "update ".TABLE_AUCTIONS_PRODUCTS." SET status = 0 where auctions_id = ".$Auction_id; $result2=mysql_query($query2); $query3 = "update ".TABLE_AUCTIONS_BIDS." SET bid_status = 'won' where bid_price = ".$asbidprice; $result3=mysql_query($query3); $query4 = "INSERT INTO ".TABLE_CUSTOMERS_BASKET." (auction_product, customers_id, products_id, customers_basket_quantity,final_price, customers_basket_date_added) VALUES ('1',".$custida.", ".$asprodid.",'1', ".$asbidprice.", ".date("Y-m-d").")"; $result4=mysql_query($query4); $query5 = "update ".TABLE_AUCTIONS_PRODUCTS." SET notified = '0' where auctions_id = ".$Auction_id; $result5=mysql_query($query5); $cart-> add_cart_auction($asprodid, $qty = '1', $attributes = '', $notify = true); $cart->restore_contents(); Quote Link to comment Share on other sites More sharing options...
xstreme Posted April 5, 2008 Share Posted April 5, 2008 I have a little problem here psy: I'm testing your contrib on my test amp by an item I previously added to my catalog, and this shows on the header products info page: "44 Warning: Cannot modify header information - headers already sent by (output started at c:\shop\product_info.php:91) in c:\shop\product_info.php on line 109" and this on the Time Remaining box: "Warning: countdown(setup.php): failed to open stream: No such file or directory in c:\shop\includes\modules\auction_bids.php on line 112 Fatal error: countdown(): Failed opening required 'setup.php' (include_path='.;C:\\php\pear\') in c:\shop\includes\modules\auction_bids.php on line 112" I'm using the newest auction_bids.php you posted recently, and this is my product_info.php: <?php /* $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); // bof added by [email protected] for auction product contribution require(DIR_WS_LANGUAGES . $language . '/' . 'auctions.php'); if (isset($_POST['placebid']) ) { $products_id = $_POST['products_id']; $bid_price = $_POST['bid_price']; $auction_id = $_POST['auction_id']; if ( tep_session_is_registered('customer_id') ) { $customers_id = (int)$customer_id; $sql_auction = 'select auctions_bids_id, bid_price from '.TABLE_AUCTIONS_BIDS ." where auctions_id='". $auction_id."' and customers_id='$customers_id'"; if (!tep_db_num_rows(tep_db_query($sql_auction)) ) { $sql_auction = 'insert into '.TABLE_AUCTIONS_BIDS." (auctions_bids_id, auctions_id, customers_id, bid_price, bid_status, bid_date_added ) values('', '$auction_id', '$customers_id', '$bid_price', '', now()) "; tep_db_query($sql_auction); } else { // auction existed $exist_auction = tep_db_fetch_array(tep_db_query($sql_auction)); if ( ($exist_auction['bid_status']!='won')&& ($exist_auction['bid_price']<$bid_price) ){ $sql_auction = 'update '.TABLE_AUCTIONS_BIDS." set auctions_id='$auction_id',bid_price= '$bid_price', bid_date_added= 'now()' where auctions_id='$auction_id' and customers_id='$customers_id'"; tep_db_query($sql_auction); } else { echo ' New price of bid must be more than your last bidding price!!'; } } // send email notify about higher bid than the other customer's bid who won $sql_customer = 'select customers_lastname, customers_firstname,customers_email_address from '. TABLE_CUSTOMERS." c,". TABLE_AUCTIONS_BIDS." ab where c.customers_id=ab.customers_id and ab.auctions_id= '$auction_id' and ab.bid_price<".(int)$bid_price." and ab.bid_status='won'"; $acustomer_query = tep_db_query($sql_customer); while ($acustomer = tep_db_fetch_array($acustomer_query)) { $acustomer_firstname = $acustomer['customer_firstname']; $acustomer_lastname = $acustomer['customers_lastname']; $acustomer_email = $acustomer['customers_email_address']; $acustomer_name = $customer_firstname .' '.$customer_lastname; $auction_url = tep_href_link(FILENAME_PRODUCT_INFO,'products_id='.$auction_id); $email_text = str_replace('[customer_firstname]',$acustomer_firstname,str_replace('[customer_lastname]',$acustomer_lastname,str_replace('[customer_email]',$acustomer_email,str_replace('[auction_name]',$auction_name,str_replace('[auction_url]',$auction_url,str_replace('[bid_price]',$bid_price,AUCTION_HIGHER_BID_NOTIFY_EMAIL)))))); tep_mail($acustomer_name, $acustomer_email, AUCTION_HIGHER_BID_NOTIFY_EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO,'products_id='.$products_id)); } else { // $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } } //DANS AUCTION SCRIPT $curprodid = (int)$HTTP_GET_VARS['products_id'].'<br>'; //END DANS AUCTION SCRIPT //echo $curprodid; // eof added by [email protected] for auction product contribution $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); //if ($exist_auction['bid_status']<>'won'){ //echo 'test'; // eof added by [email protected] for auction product contribution $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <?php //DANS AUCTION SCRIPT -REFRESH $cquery="select products_id from ".TABLE_AUCTIONS_PRODUCTS." where products_id =".(int)$HTTP_GET_VARS['products_id']; $cresult=mysql_query($cquery); $cnum=mysql_numrows($cresult); $z=0; while ($z < $cnum) { $casprodid=mysql_result($cresult,$z,"products_id"); echo $casprodid; $z++; } if ($casprodid==(int)$HTTP_GET_VARS['products_id']) { header('Refresh: 90');} else { echo '';} //END DANS AUCTION SCRIPT ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?> <table cellspacing=0 cellpadding=0> <tr><td colspan=3><img src=images/m32.gif width=490 height=43></td></tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); // bof added by [email protected] for auction product contribution $auction_price = tep_get_products_auction_price($product_info['products_id']); $auction_product = false; if (!$auction_price) { // eof added by [email protected] for auction product contribution if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } // bof added by [email protected] for auction product contribution //BOF DANS Auction Contrib } else { $auction_product = true; $sql_auction = 'select auctions_id from '.TABLE_AUCTIONS_PRODUCTS." where products_id='".$product_info['products_id']."'"; $auction_info = tep_db_fetch_array(tep_db_query($sql_auction)); $auction_id = $auction_info['auctions_id']; $databid = mysql_query("select MAX(bid_price) as bid_price from ".TABLE_AUCTIONS_BIDS.' ab,'.TABLE_AUCTIONS_PRODUCTS.' ap where ab.auctions_id=ap.auctions_id and ab.auctions_id='.$auction_id.'') or die(mysql_error()); while($highbid = mysql_fetch_array( $databid )) if ($highbid['bid_price'] > 0){ $products_price = "Highest Bid:$".$highbid['bid_price']; //EOF DANS Auction Contrib } else {$products_price = "$".number_format($auction_price,2);} } // eof added by [email protected] for auction product contribution if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr><td height=20 colspan=3></td></tr> <tr><td width=181 valign=middle align=center> <!-- display image --> <?php if (tep_not_null($product_info['products_image'])) { ?> <table cellspacing="0" cellpadding="2" align="center"> <tr> <td align="center" class="smallText"> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </td> </tr> </table> <?php } ?> <!--end display image --> </td> <td width=1><img src=images/m31.gif width=1 height=152></td> <td width=298 valign=top> <table cellspacing=0 cellpadding=0 width=252 align=center> <tr><td class=sc2 colspan=2><?=$products_name?></td></tr> <tr><td height=10 colspan=2></td></tr> <tr><td height=15 colspan=2></td></tr> <tr><td colspan=2><b>Item #:</b> <?= $products_id; ?></td></tr> <tr><td colspan=2> <? if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); else echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?> </td></tr> <tr><td height=15 colspan=2></td></tr> <tr><td class=sc2>Price: <font color=#FF0000><?php echo $products_price; ?></font></td> <td><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_BUY_NOW); ?> </td></tr> </table> </td></tr> <tr><td height=10 colspan=3></td></tr> <tr><td colspan=3 align=center><img src=images/m25.gif width=480 height=1></td></tr> <tr><td height=10 colspan=3></td></tr> <tr><td colspan=3 class=sc1><img src=images/m27.gif width=4 height=7> ITEM DESCRIPTION</td></tr> <tr><td height=10 colspan=3></td></tr> <tr><td colspan=3><?php echo stripslashes($product_info['products_description']); ?><br><br>Aenean nonummy hendrerit mauris. Phasellus portauscipit varius mi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla dui. Fusce feugiat malesuada odio. Morbi nunc odio, gravida at, cursus necluctus a, lorem. Maecenas trisLorem ipsum dolor sit amet, consectetuer adipiscing elit.<br><br>Praesent vestibulum molestie lacus. Aenean nonummy hendrerit mauris. Phasellus portauscipit varius mi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla dui. Fusce feugiat malesuada odio. Morbi nunc odio, gravida at, cursus necluctus a, lorem. Maecenas trisLorem ipsum dolor sit amet, consectetuer adipiscing elit.<br><br>Praesent vestibulum molestie lacus. Aenean nonummy hendrerit mauris. Phasellus portauscipit varius mi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla dui. Fusce feugiat malesuada odio. Morbi nunc odio, gravida at, cursus necluctus a, lorem. Maecenas trisLorem ipsum dolor sit amet, consectetuer adipiscing elit.<br><br>Praesent vestibulum molestie lacus. Aenean nonummy hendrerit mauris. Phasellus portauscipit varius mi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla dui. Fusce feugiat malesuada odio. Morbi nunc odio, gravida at, cursus necluctus a, lorem. Maecenas trisLorem ipsum dolor sit amet, consectetuer adipiscing elit.</td></tr> <tr><td height=20 colspan=3></td></tr> <!----------------------- Not editable part --------------------------------> <tr><td> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!-- //bof moved from bellow by [email protected] for auction product contribution --> <?php if ($auction_product) { ?> </form> <?php } ?> <!-- eof moved from bellow by [email protected] for auction product contribution --> <?php //bof added by [email protected] for auction product contribution //rewriten by MarcusDesign if ($auction_product) { include_once(DIR_WS_MODULES.'/auction_bids.php'); } else { ?> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <td class="main" align="right"><?php //BOF dans auction contrib if ($auction_product) { echo tep_draw_hidden_field('products_id', $product_info['products_id']); } else { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } //EOF DANS AUCTION CONTRIB ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } //eof added by [email protected] for auction product contribution ?> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <!-- <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <td class="main" align="right"><!-- bof changed by [email protected] for auction product contribution --> <?php if ($auction_product) { echo tep_draw_hidden_field('products_id', $product_info['products_id']); } else { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } ?> <!-- eof changed by [email protected] for auction product contribution --></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!-- bof added by [email protected] for auction product contribution --> <?php if ($auction_product) { ?> <tr><td class="stockWarning"><?php echo TEXT_AUCTION_PRODUCT_TITLE; ?></td></tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } // end if ?> <!-- eof added by [email protected] for auction product contribution --> <tr> <td> <?php /* if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } */ } ?> </td></tr> </table> <!-- //bof moved to above by [email protected] for auction product contribution --> <?php if (!$auction_product) { ?> </form> <?php } ?> <!-- //eof moved to above by [email protected] for auction product contribution --> </td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Thank You 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.