Page 37 of 74 FirstFirst ... 27353637383947 ... LastLast
Results 361 to 370 of 740
  1. #361
    Join Date
    Mar 2009
    Location
    Kibbutz Beit Kama, Israel
    Posts
    6
    Plugin Contributions
    0

    Default Re: Auction Product Type

    Second instalment!

    Although not a really great fix, since type_handler can also be edited, but the chances of it being edited are much smaller. I translate all product type names for managers whose English is not quite what it could be.

    Here's the fix so that editing the type_name from Product - Auction will not break the convert type:

    in file admin/convert_type.php change line 24 from:

    Code:
      $sql = "SELECT * FROM " . TABLE_PRODUCT_TYPES . " WHERE type_name = 'Product - Auction'";
    to

    Code:
      $sql = "SELECT * FROM " . TABLE_PRODUCT_TYPES . " WHERE type_handler = 'product_auction'";

  2. #362
    Join Date
    Dec 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Auction Product Type

    Quote Originally Posted by mjcrabill View Post
    Bramnick,

    I have been working for quite awhile now, trying to get a fully functioning auction for one of my customers and have been fighting problems with the email notifications. Here is what I have found so far with my testing. When you run the first auction, the winner of that auction, is then listed as the winner of all subsequent auctions, even ones they did not bid on, if the first auction winner has not processed thru the pay now. They are listed as the winner, until they have finished the pay now process. Then the winner of the next auction, is the winner of all subsequent auctions again, until they process their payment.

    It's like the database is not updated or refreshed or whatever, to clear the previous winner. When you go to the site itself, the correct winner of the auction, is shown they have won and they get the pay now. But the winning email does not go to them, unless the previous winner had processed thru the pay now.

    Not all people pay instantly when they win. There needs to be a way to clear them from the database winning bid, after they win, but before they pay, so they don't always appear to be the winner of all subsequent auctions.

    I am using ZenCart 1.3.8 a Database patch level 1.3.8 Auction product type mod 0.99a. The email options were tested trying PHP and sendmail, currently it's set to sendmail. I have this setup as a test site, if you would like to look, I can PM you the access information.

    I hope I have explained the problem, in as much detail as possible, while keeping from making it confusing. If you need more details or clarification. Feel free to contact me! I would really like to get this going. I have been working for way to long and have too much time invested, to make it profitable. I need to get it working for my customer ASAP. Any help or guidance would be appreciated.

    I have at least become fairly familiar with the ZenCart and the auction mod with all the troubleshooting and testing I have done, so if anyone else needs this installed or help, I will have a fairly good idea of what to do and what not to do. That is once the email problem can be solved. Thanks again!

    Mike
    The problem is in class.productAuction.php. It does not difer between the diferent products (product_id) when it pick the winner email. Because of that the winner_email goes to the highest bidder no matter of what product he is the winner of.
    So if you are the highest bidder of one product where the auction is closed, you will get the winner-email for the other products too.

    If you have more than one product on aution at the time and they all closes simultaniously, the winner email goes to the highest bidder on one of the products, from all the products.

    Does anyone have a fix for that ?

    Thanks

  3. #363
    Join Date
    Mar 2009
    Location
    Kibbutz Beit Kama, Israel
    Posts
    6
    Plugin Contributions
    0

    Default Re: Auction Product Type

    Hi again all,

    Another really serious problem with the auctrion product type:

    If the auctioned product is defined to include tax, then the bidder's bid is upped by the same percent.
    For example, when the product's price includes 15.5% VAT, and the bidder puts in a bid in the amount of 10 the actual bid will be 11.55 instead of 10.

    This is incorrect behaviour, since the bidder certainly intended to pay 10 including tax.

    I'll take a look at the logic to see if I can patch it, but will probably not have time until next weekend.

  4. #364
    Join Date
    Dec 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Auction Product Type

    Quote Originally Posted by Toft View Post
    The problem is in class.productAuction.php. It does not difer between the diferent products (product_id) when it pick the winner email. Because of that the winner_email goes to the highest bidder no matter of what product he is the winner of.
    So if you are the highest bidder of one product where the auction is closed, you will get the winner-email for the other products too.

    If you have more than one product on aution at the time and they all closes simultaniously, the winner email goes to the highest bidder on one of the products, from all the products.

    Does anyone have a fix for that ?

    Thanks
    Disregard this question. I have modified the class.productAuction so the correct winner-email goes to the correct winner even when several auctions ends at the same time.
    All seems to be working well now

    Thanks

  5. #365
    Join Date
    Dec 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Auction Product Type

    Hi
    I am also working on a few other modifications:

    1.) Include the bids in the customers controll panel, so they can see what products they have bids on.

    2.) Modify the "new products" on front page, so auction products show days, hours and minutes left until the auction ends.

    3.) Modify admin, so admin can see who bidded on which product.

    4.) Show in admin which auctions ends without winner or didnt reach the reserve price.

    5.) Posibility for admin to reset auctions that didnt reach reserve price or where the winner dint buy the product.

    If anyone already made any of this modifications, please let me know ......... would be nice to save some work

    Thanks

  6. #366
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Auction Product Type

    Quote Originally Posted by Toft View Post
    Hi
    I am also working on a few other modifications:

    1.) Include the bids in the customers controll panel, so they can see what products they have bids on.

    2.) Modify the "new products" on front page, so auction products show days, hours and minutes left until the auction ends.

    3.) Modify admin, so admin can see who bidded on which product.

    4.) Show in admin which auctions ends without winner or didnt reach the reserve price.

    5.) Posibility for admin to reset auctions that didnt reach reserve price or where the winner dint buy the product.

    If anyone already made any of this modifications, please let me know ......... would be nice to save some work

    Thanks
    items 2 - 5 are done in the next release.
    Dave
    Always forward thinking... Lost my mind!

  7. #367
    Join Date
    Dec 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Auction Product Type

    Quote Originally Posted by davewest View Post
    items 2 - 5 are done in the next release.
    Hi
    Thanks.
    When will it be released.

    Here is how i fixed the winner email from line 1 to line 70 so it sort the right winner for the right product.

    PHP Code:
    <?php
    /**
     * Zen Auction
     * 
     * @package general
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: 
     */
    /**
     * This Class is part of an automated aucton system for Zen Cart
     *
     */
     
    class productAuction {
      
    /**
       * This method is called within application-top.php to update auction products statuses
       * 
       * Checks for auctions that have not been closed manually (e.g. by buy now)
       * Checks the expiry date/hour and if expired updates the status and sends appropriate emails
       * to auction participants
       *
       */
      
    function checkAuctionStatuses() {
        global 
    $db;
        
    $sql "SELECT * FROM " TABLE_PRODUCT_AUCTION_EXTRA "
                WHERE auction_closed = 'N' AND (CURDATE() > bid_expire_date) or (bid_expire_hour <= " 
    date('H') . " and bid_expire_date = CURDATE() and auction_closed = 'N') ORDER BY products_id";

        
    $auction_info $db->execute($sql);
        while (!
    $auction_info->EOF) {
          
    // the auction should be closed as it has expired
          
    productAuction::sendClosedEmail($auction_info);
          
    $sql "UPDATE " TABLE_PRODUCT_AUCTION_EXTRA "
                  SET auction_closed = 'Y' where products_id = " 
    $auction_info->fields['products_id'];
          
    $db->execute($sql);
          
    $auction_info->moveNext();

        }
      }
      
    /**
       * Method to send emails to participants when closing an expired auction
       * 
       * We first find the customer who has made the highest bid that is above the reserve price.  If a customer is found then they are the auction winner
       * and appropriate email is sent.<br />
       * We also then send email to those who lost the auction
       *
       * @param unknown_type $auction
       */
      
    function sendClosedEmail($auction) {
        global 
    $db;
        
    $last_bid $db->Execute("SELECT products_id FROM " TABLE_PRODUCT_AUCTION_EXTRA "
                WHERE auction_closed = 'N' AND (CURDATE() > bid_expire_date) or (bid_expire_hour <= " 
    date('H') . " and bid_expire_date = CURDATE() and auction_closed = 'N') ORDER BY products_id");
        
    $products_id $last_bid->fields['products_id'] ;
        
    $sql "SELECT customers_id FROM " TABLE_PRODUCTS_AUCTION  "
                WHERE customers_bid >= " 
    $auction->fields['bid_reserve_price'] . " AND products_id = $products_id  ORDER BY customers_bid DESC LIMIT 1";
        
    $customers $db->execute($sql);
        if (
    $customers->recordCount() > 0) {
          
    productAuction::sendClosedWonEmail($auction$customers->fields['customers_id']);
          
    $sql "SELECT DISTINCT customers_id FROM " TABLE_PRODUCTS_AUCTION  "
                  WHERE customers_bid < " 
    $auction->fields['bid_reserve_price'] . 
                  AND customers_id != " 
    $customers->fields['customers_id'] . "
                  ORDER BY customers_bid DESC"

          
    $customersLost $db->execute($sql);
          while (!
    $customersLost->EOF) {
            
    productAuction::sendClosedLostEmail($auction$customersLost->fields['customers_id']);
            
    $customersLost->MoveNext();
          }
          return;
        }
    I also added the if ($previous_bidders_email_address != "") { to function sendClosedLostEmail($auction, $customersID) { to as you sugested for \pages\product_auction_info\ header in an earlier post.

    Have also put in a link to the product in the winner email, but that needs a little "beautifying" before i post it.

    Also item 1 is done, but because of the language files, i will wait with posting until i have writen english language files for it. Now for testing i have put the wordings right into the php files, but it works.

    Thanks

  8. #368
    Join Date
    Dec 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Auction Product Type

    Quote Originally Posted by Toft View Post
    Hi
    Thanks.
    When will it be released.

    Here is how i fixed the winner email from line 1 to line 70 so it sort the right winner for the right product.

    PHP Code:
    <?php
    /**
     * Zen Auction
     * 
     * @package general
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: 
     */
    /**
     * This Class is part of an automated aucton system for Zen Cart
     *
     */
     
    class productAuction {
      
    /**
       * This method is called within application-top.php to update auction products statuses
       * 
       * Checks for auctions that have not been closed manually (e.g. by buy now)
       * Checks the expiry date/hour and if expired updates the status and sends appropriate emails
       * to auction participants
       *
       */
      
    function checkAuctionStatuses() {
        global 
    $db;
        
    $sql "SELECT * FROM " TABLE_PRODUCT_AUCTION_EXTRA "
                WHERE auction_closed = 'N' AND (CURDATE() > bid_expire_date) or (bid_expire_hour <= " 
    date('H') . " and bid_expire_date = CURDATE() and auction_closed = 'N') ORDER BY products_id";

        
    $auction_info $db->execute($sql);
        while (!
    $auction_info->EOF) {
          
    // the auction should be closed as it has expired
          
    productAuction::sendClosedEmail($auction_info);
          
    $sql "UPDATE " TABLE_PRODUCT_AUCTION_EXTRA "
                  SET auction_closed = 'Y' where products_id = " 
    $auction_info->fields['products_id'];
          
    $db->execute($sql);
          
    $auction_info->moveNext();

        }
      }
      
    /**
       * Method to send emails to participants when closing an expired auction
       * 
       * We first find the customer who has made the highest bid that is above the reserve price.  If a customer is found then they are the auction winner
       * and appropriate email is sent.<br />
       * We also then send email to those who lost the auction
       *
       * @param unknown_type $auction
       */
      
    function sendClosedEmail($auction) {
        global 
    $db;
        
    $last_bid $db->Execute("SELECT products_id FROM " TABLE_PRODUCT_AUCTION_EXTRA "
                WHERE auction_closed = 'N' AND (CURDATE() > bid_expire_date) or (bid_expire_hour <= " 
    date('H') . " and bid_expire_date = CURDATE() and auction_closed = 'N') ORDER BY products_id");
        
    $products_id $last_bid->fields['products_id'] ;
        
    $sql "SELECT customers_id FROM " TABLE_PRODUCTS_AUCTION  "
                WHERE customers_bid >= " 
    $auction->fields['bid_reserve_price'] . " AND products_id = $products_id  ORDER BY customers_bid DESC LIMIT 1";
        
    $customers $db->execute($sql);
        if (
    $customers->recordCount() > 0) {
          
    productAuction::sendClosedWonEmail($auction$customers->fields['customers_id']);
          
    $sql "SELECT DISTINCT customers_id FROM " TABLE_PRODUCTS_AUCTION  "
                  WHERE customers_bid < " 
    $auction->fields['bid_reserve_price'] . 
                  AND customers_id != " 
    $customers->fields['customers_id'] . "
                  ORDER BY customers_bid DESC"

          
    $customersLost $db->execute($sql);
          while (!
    $customersLost->EOF) {
            
    productAuction::sendClosedLostEmail($auction$customersLost->fields['customers_id']);
            
    $customersLost->MoveNext();
          }
          return;
        }
    I also added the if ($previous_bidders_email_address != "") { to function sendClosedLostEmail($auction, $customersID) { to as you sugested for \pages\product_auction_info\ header in an earlier post.

    Have also put in a link to the product in the winner email, but that needs a little "beautifying" before i post it.

    Also item 1 is done, but because of the language files, i will wait with posting until i have writen english language files for it. Now for testing i have put the wordings right into the php files, but it works.

    Thanks
    The modification in pervious post is of cause for the include/clases/class.productauction.php

  9. #369
    Join Date
    Dec 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Auction Product Type

    By the way ......... I also made a version of no 2 (include days, hours and minutes until auction expires ) in new products.

    I did it this way with diferent buttons for sales, auctions and auctions waiting for winner to pay,
    You can see it here:
    http://www.tvangsauksjon.no

    But this is is a site for a customer of mine and the site is going live now, so please dont bid.

  10. #370
    Join Date
    Dec 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Auction Product Type

    Quote Originally Posted by dovzamir View Post
    Hi again all,

    Another really serious problem with the auctrion product type:

    If the auctioned product is defined to include tax, then the bidder's bid is upped by the same percent.
    For example, when the product's price includes 15.5% VAT, and the bidder puts in a bid in the amount of 10 the actual bid will be 11.55 instead of 10.

    This is incorrect behaviour, since the bidder certainly intended to pay 10 including tax.

    I'll take a look at the logic to see if I can patch it, but will probably not have time until next weekend.
    Hi

    Go to /includes/modules/pages/product_auction_info/header_php.php
    In about line 24 to 31, find:
    PHP Code:
    require(DIR_WS_MODULES 'require_languages.php');
    $process false;
    if (isset(
    $_POST['action']) && ($_POST['action'] == 'place_bid')) {
      
    $process true;
      
    $auction_bid zen_db_prepare_input($_POST['auction_bid_amount']);
      
    $auction_bid zen_round($auction_bid,  $currencies->currencies[$_SESSION['currency']]['decimal_places']);
      
    $auction_price  zen_db_prepare_input($_POST['auction_price']);
      
    $auction_current_bid  zen_db_prepare_input($_POST['auction_current_bid']);
      
    $auction_current_bid = ($auction_current_bid 0) ? $auction_current_bid 0.01;
      
    $products_id zen_db_prepare_input($_GET['products_id']); 
    Change it to:
    PHP Code:
    require(DIR_WS_MODULES 'require_languages.php');
    $process false;
    $site_tax zen_get_tax_rate($product_info->fields['products_tax_class_id']);
    if (isset(
    $_POST['action']) && ($_POST['action'] == 'place_bid')) {
      
    $process true;
      
    $auction_bid zen_db_prepare_input($_POST['auction_bid_amount']);
      
    $auction_bid zen_round($auction_bid,  $currencies->currencies[$_SESSION['currency']]['decimal_places']);
      
    $auction_price  zen_db_prepare_input($_POST['auction_price']);
      
    $auction_current_bid  zen_db_prepare_input($_POST['auction_current_bid']);
      
    $auction_current_bid = ($auction_current_bid 0) ? $auction_current_bid 0.01;
      
    $products_id zen_db_prepare_input($_GET['products_id']);
      
    $auction_bid $auction_bid "100" sprintf("1".$site_tax); 
    That will exclude the tax from the customers bid and update the tables corectly.

    If you also want minimum bid to show on the page exclude tax, you need to modify /admin/product_auction.php so it show gross and net. (I have done that)
    You can probably also do it in main_template_vars.php by coment out the first querry for zen_get_tax_rate (think that should work but havent tried it)

    This auction is kinda easy to modyfy, but if you need the mod for /admin/product_auction.php , give me a message

 

 
Page 37 of 74 FirstFirst ... 27353637383947 ... LastLast

Similar Threads

  1. Auction Product type
    By Andreas1211 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 14 Aug 2014, 02:13 PM
  2. Auction Product Type: Can't add a product of the type.
    By sw0rdz in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Sep 2009, 02:11 AM
  3. Auction Product Type
    By chinthana in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 Jun 2009, 10:33 AM
  4. Auction Mod. Product Type
    By wilt in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 15 Feb 2007, 07:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR