Results 1 to 10 of 740

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Location
    Raleigh, NC
    Posts
    30
    Plugin Contributions
    0

    Default Re: Auction Product Type

    I should add that in Auctions Manager, it shows the ended auctions as not having ended, and the columns are weirdly offset in Auctions Manager. Screenshot included.

    It's also not showing the pay now button to the highest bidder when that account is logged in.
    Attached Images Attached Images  

  2. #2
    Join Date
    May 2008
    Posts
    12
    Plugin Contributions
    0

    Default Re: Auction Product Type

    I've fixed the weird misalignment in Auctions Manager. Make sure you back up a copy of zc_admin/auctions_manager.php, and then do the following:

    1) Looking at code view, find <!-- header //--> and <!-- footer //-->
    2) Replace all of the code between those two tags with the following:

    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
    <!-- body //-->
    <table border="0" width="100%" cellspacing="2" cellpadding="2">
    <tr>
    <!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
    <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
    <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td class="smallText" width="100%" align="right">
    <?php
    // toggle switch for editor
    echo TEXT_EDITOR_INFO . zen_draw_form('set_editor_form', FILENAME_AUCTIONS_PRODUCTS, '', 'get') . '&nbsp;&nbsp;' . zen_draw_pull_down_menu('reset_editor', $editors_pulldown, $current_editor_key, 'onChange="this.form.submit();"') . zen_hide_session_id() .
    zen_draw_hidden_field('cID', $cPath) .
    zen_draw_hidden_field('cPath', $cPath) .
    zen_draw_hidden_field('aID', $_GET['aID']) .
    zen_draw_hidden_field('page', $_GET['page']) .
    zen_draw_hidden_field('action', 'set_editor') .
    '</form>';
    ?>
    </td>
    </tr>
    <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr class="dataTableHeadingRow">
    <td class="dataTableHeadingContent"><?php echo TEXT_TITLE_PRODUCT_ID; ?></td>
    <td class="dataTableHeadingContent"><?php echo TEXT_TITLE_PRODUCT_NAME; ?></td>
    <td class="dataTableHeadingContent"><?php echo TEXT_TITLE_Product_IMAGE; ?></td>
    <td class="dataTableHeadingContent"><?php echo TEXT_TITLE_AUCTION_ENDDATE; ?></td>
    <td class="dataTableHeadingContent"><?php echo TEXT_TITLE_EMAIL_SENT; ?></td>
    <td class="dataTableHeadingContent"><?php echo TEXT_TITLE_AUCTION_OVER; ?></td>
    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
    </tr>

    <?php
    $auctions_query_raw = "select p.products_id, p.products_status,
    p.products_image, p.products_type, p.products_price, pd.products_name,
    ax.products_id, ax.bid_start_price, ax.bid_expire_date,
    ax.bid_expire_hour, ax.bid_reserve_price, ax.bid_buynow_price,
    ax.auction_closed, ax.last_auction_winner_email_sent,
    ax.auction_closed_email_sent, ax.bid_minimum_increase
    from "
    . TABLE_PRODUCTS . " p, "
    . TABLE_PRODUCTS_DESCRIPTION . " pd, "
    . TABLE_PRODUCT_AUCTION_EXTRA . " ax
    where p.products_id = pd.products_id
    and pd.products_id = ax.products_id
    group by p.products_id
    order by ax.bid_expire_date asc ";

    $auctions_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $auctions_query_raw, $auctions_query_numrows);
    $auctions = $db->Execute($auctions_query_raw);

    if(!empty($auctions)) {
    while (!$auctions->EOF) {

    if ((!isset($_GET['aID']) || (isset($_GET['aID']) && ($_GET['aID'] == $auctions->fields['products_id']))) && !isset($lInfo) && (substr($action, 0, 3) != 'new')) {

    $lInfo_array = array_merge($auctions->fields);
    $lInfo = new objectInfo($lInfo_array);

    }

    if (isset($lInfo) && is_object($lInfo) && ($auctions->fields['products_id'] == $lInfo->products_id)) {
    echo '<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)"' . "\n";
    } else {
    echo '<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)"' . "\n";
    }
    ?>
    <td class="dataTableContent"><?php echo $auctions->fields['products_id']; ?></td>
    <td class="dataTableContent"><?php echo $auctions->fields['products_name']; ?></td>
    <td class="dataTableContent"><?php echo zen_image(DIR_WS_CATALOG_IMAGES . $auctions->fields['products_image'], HEADING_TITLE, 50, HEADING_IMAGE_HEIGHT); ?></td>
    <td class="dataTableContent"><?php echo date("m/d/Y",strtotime($auctions->fields['bid_expire_date'])); ?></td>
    <td class="dataTableContent" align="center"><?php
    if ($auctions->fields['last_auction_winner_email_sent'] > '0000-00-00 00:00:00') {
    echo date("m/d/Y",strtotime($auctions->fields['last_auction_winner_email_sent']));
    } else {
    echo TEXT_NO;
    }
    ?></td>
    <td class="dataTableContent" align="center"><?php
    if ( $auctions->fields['auction_closed'] == 'Y') {
    echo TEXT_YES;
    } else {
    echo TEXT_NO;
    }
    ?></td>
    <td class="dataTableContent" align="right"><?php
    if ($auctions->fields['products_status'] == '1') {
    echo '<a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&aID=' . $auctions->fields['products_id'] . '&action=setflag&flag=0') . '">' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '</a>';
    } else {
    echo '<a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&aID=' . $auctions->fields['products_id'] . '&action=setflag&flag=1') . '">' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . '</a>';
    }
    ?></td>
    <td class="dataTableContent" align="right"><?php
    $type_handler = $zc_products->get_admin_handler($auctions->fields['products_type']);
    if (isset($lInfo) && is_object($lInfo) && ($auctions->fields['products_id'] == $lInfo->products_id)) {
    echo '<a href="' . zen_href_link($type_handler, 'cPath=' . $auctions->fields['master_categories_id'] . '&product_type=' . $auctions->fields['products_type'] . '&pID=' . $auctions->fields['products_id'] . '&action=new_product">') . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a>&nbsp&nbsp';
    echo '<a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&amp;aID=' . $auctions->fields['products_id'].$extra_args) . '">' . zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', IMAGE_ICON_INFO) . '</a>';
    } else {
    echo '<a href="' . zen_href_link($type_handler, 'cPath=' . $auctions->fields['master_categories_id'] . '&product_type=' . $auctions->fields['products_type'] . '&pID=' . $auctions->fields['products_id'] . '&action=new_product">') . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a>&nbsp&nbsp';
    echo '<a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&amp;aID=' . $auctions->fields['products_id'].$extra_args) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; }
    ?>&nbsp;</td>

    </tr>
    <?php

    $auctions->MoveNext();
    }

    ?>
    <tr>
    <td colspan="4"><table border="0" width="100%" cellpadding="0"cellspacing="2">
    <tr>
    <td class="smallText" valign="top"><?php echo $auctions_split->display_count($auctions_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_AUCTIONS); ?></td>
    <td class="smallText" align="right"><?php echo $auctions_split->display_links($auctions_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>
    </tr>
    <?php
    if (empty($action)) {
    ?>
    <tr>
    <td colspan="2" style="text-align:right;"></td>
    </tr>
    <?php
    }
    }
    ?>
    </table></td>
    </tr>
    </table></td>
    <?php
    $heading = array();
    $contents = array();

    $email_pref_text = ('TEXT');

    switch ($action) {

    case 'delete':
    $heading[] = array('text' => '<b>' . $lInfo->products_name . '</b>');
    $contents = array('form' => zen_draw_form('auctions', FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&aID=' . $lInfo->products_id . '&action=deleteconfirm'));
    $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
    $contents[] = array('text' => '<br /><b>' . TEXT_TITLE_PRODUCT_ID . $lInfo->products_id . TEXT_DELETE_AUCTION_BIDS . '</b>');
    $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_clear_bids.png', IMAGE_DELETE) . '&nbsp;<a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&aID=' . $_GET['aID']) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
    break;

    case 'deletebid':
    $bids_id = zen_db_prepare_input($_GET['bID']);

    $heading[] = array('text' => '<b>' . $lInfo->products_name . '</b>');
    $contents = array('form' => zen_draw_form('auctions', FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&aID=' . $lInfo->products_id . '&cID=' . $auction_bids->fields['customers_id'] . '&bID=' . $bids_id . '&action=deletebidconfirm'));
    $contents[] = array('text' => TEXT_INFO_DELETE_BID);
    $contents[] = array('text' => '<br /><b>' . TEXT_TITLE_BID_ID . $bids_id . TEXT_DELETE_BID . '</b>');
    $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_delete_bid.png', IMAGE_DELETE) . '&nbsp;<a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&aID=' . $_GET['aID']) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
    break;

    default:
    if (isset($lInfo) && is_object($lInfo)) {

    $auction_bids = $db->Execute("select a.bid_id, a.customers_id, a.customers_bid, a.products_id,
    a.date_of_bid, c.customers_firstname, c.customers_lastname,
    c.customers_email_address, c.customers_id
    from "
    . TABLE_PRODUCTS_AUCTION . " a, "
    . TABLE_CUSTOMERS . " c
    where a.customers_id = c.customers_id
    and a.products_id = " . $lInfo->products_id . "
    order by a.bid_id DESC");

    $heading[] = array('text' => '<b>' . $lInfo->products_name . '</b><br/>');
    $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS_MAIL, 'mail_to=' . $auction_bids->fields['customers_email_address']) . '">' . zen_image_button('button_email.gif', IMAGE_EMAIL) . '</a> <a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&aID=' . $lInfo->products_id . '&action=delete') . '">' . zen_image_button('button_clear_bids.png', IMAGE_DELETE) . '</a>');
    $contents[] = array('text' => '<br /> BuyNow Price: ' . $currencies->format($lInfo->bid_buynow_price) . '<br />');
    $contents[] = array('text' => '<br /> Starting Price: ' . $currencies->format($lInfo->bid_start_price) . '<br />');
    $contents[] = array('text' => '<br /> Reserve Price: ' . $currencies->format($lInfo->bid_reserve_price) . '<br />');
    $contents[] = array('text' => '<br /> Minimum Increase: ' . $currencies->format($lInfo->bid_minimum_increase) . '<br />');

    $contents[] = array('text' => '<hr />');
    $contents[] = array('text' => '<b>Current Product Price: ' . $currencies->format($lInfo->products_price) . '</b><br />');
    if ($auction_bids->fields['bid_id'] > 0) {
    $i=0; //we only want two bids or less to show
    while (!$auction_bids->EOF && $i < (int)DISPLAY_AUCTION_BIDS) {
    $i++;
    if ($i > 1) {
    $contents[] = array('text' => '<br /> Bid ID: ' . $auction_bids->fields['bid_id'] . '<br />');
    }else{
    $contents[] = array('text' => '<br /> Bid ID: ' . $auction_bids->fields['bid_id'] . '&nbsp;&nbsp;<a href="' . zen_href_link(FILENAME_AUCTIONS_PRODUCTS, 'page=' . $_GET['page'] . '&aID=' . $lInfo->products_id . '&cID=' . $auction_bids->fields['customers_id'] . '&bID=' . $auction_bids->fields['bid_id'] .'&action=deletebid') . '">' . zen_image_button('button_red_x.gif', IMAGE_BUTTON_DELETE) . '</a><br />');
    }
    $contents[] = array('text' => 'Customer ID: ' . $auction_bids->fields['customers_id'] . '<br />');
    $contents[] = array('text' => 'Current High Bid: ' . $currencies->format($auction_bids->fields['customers_bid']) . '<br />');
    $contents[] = array('text' => 'High Bider Name: ' . $auction_bids->fields['customers_firstname'] . " " . $auction_bids->fields['customers_lastname'] . '<br />');
    $contents[] = array('text' => 'High Bid Email: ' . $auction_bids->fields['customers_email_address'] . '<br />');
    $auction_bids->MoveNext();
    }
    } else {
    $contents[] = array('text' => '<br /><b>No Bids yet!</b><br /> ');
    }
    $contents[] = array('text' => '<br /> Auction End Date: ' . date("m/d/Y",strtotime($lInfo->bid_expire_date)) . '<br />');
    }
    break;
    }
    if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
    echo ' <td style="width:25%;vertical-align:top;">' . "\n";

    $box = new box;
    echo $box->infoBox($heading, $contents);

    echo ' </td>' . "\n";
    }

    ?>
    </tr>
    </table></td>
    </tr>

    </table></td>
    <!-- body_text_eof //-->
    </tr>
    </table>
    <!-- body_eof //-->


    It makes the page at least organized and readable.


    Rob

 

 

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

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