Installation
From AuctionBlox
System Requirements
Your server must meet the following system requirements:
- PHP 4.3.x or greater, PHP 5.1.x or greater
- MySql database 3.23.x or greater
- Working osCommerce 2.2 MS2 installation
AuctionBlox Installation Guide
AuctionBlox can be installed into an osCommerce site with only 7 required steps. Other optional edits are provided to enhance your user experience. However, we recommend that you perform the required steps first and verify your installation.
AuctionBlox is compatible with almost all payment modules including any version of PayPal.
Note to existing AuctionBlox Paypal module users: The AuctionBlox PayPal module is no longer available and will be phased out over time. Our latest version provides the same integration with PayPal with which you are familiar, but does not require our specialized module.
Additional Installation Notes for integration with other contributions can be found at the end of this page.
Step 1: Backup Existing Files
Backup the following files:
- catalog/checkout_confirmation.php
- catalog/checkout_process.php
- catalog/checkout_shipping.php
- catalog/shopping_cart.php
- catalog/includes/application_top.php
- catalog/admin/index.php
- catalog/admin/orders.php
- catalog/admin/includes/column_left.php
- catalog/admin/includes/languages/english.php
Step 2: Copy Files
Copy the following files from this contribution to their respective locations (these are all new):
- catalog/abxn.php NOTE: This is your AuctionBlox API Notification URL
- catalog/auctionblox.php NOTE: This is your AuctionBlox Checkout URL
- catalog/auction_finder.php
- catalog/auction_upload.php
- catalog/includes/languages/english/modules/shipping/fixed.php
- catalog/includes/modules/auctionblox/* (i.e. the auctionblox subdirectory and all its contents)
- catalog/includes/modules/MyAuctionBlox/* (i.e. the MyAuctionBlox subdirectory and all its contents)
- catalog/includes/modules/shipping/fixed.php
- catalog/admin/auctionblox.php
- catalog/admin/includes/boxes/auctionblox.php
- catalog/admin/includes/javascript/auctionblox/* (i.e. auctionblox subdirectory and all its contents which includes the SPAW2 HTML editor)
Step 3: Backup Files PRIOR TO Modification
BACKUP! BACKUP! BACKUP!
We cannot emphasize this enough. Please backup the files that you intend to modify in the next step so that you can restore them if necessary.
Step 4: Manually Edit Files
We typically use an FTP comparison tool such as BeyondCompare for this task.
catalog/checkout_confirmation.php (line 64)
- Find:
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);
- Replace with:
//+++AUCTIONBLOX.COM
require(DIR_WS_MODULES . 'auctionblox/includes/classes/abxShipping.php');
$shipping_modules = new abxShipping;
//+++AUCTIONBLOX.COM
catalog/checkout_process.php (line 43)
- Find:
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);
- Replace with:
//+++AUCTIONBLOX.COM
require(DIR_WS_MODULES . 'auctionblox/includes/classes/abxShipping.php');
$shipping_modules = new abxShipping;
//+++AUCTIONBLOX.COM
catalog/checkout_shipping.php (line 63)
- Find:
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);
- Replace with:
//+++AUCTIONBLOX.COM
require(DIR_WS_MODULES . 'auctionblox/includes/classes/abxShipping.php');
$shipping_modules = new abxShipping;
//+++AUCTIONBLOX.COM
catalog/includes/application_top.php (line 123)
- Find:
require(DIR_WS_CLASSES . 'shopping_cart.php');
- Replace with:
//+++AUCTIONBLOX.COM
require(DIR_WS_MODULES . 'auctionblox/includes/classes/abxCart.php');
//+++AUCTIONBLOX.COM
catalog/includes/application_top.php (line 245)
- Find:
if (tep_session_is_registered('cart') && is_object($cart)) {
if (PHP_VERSION < 4) {
$broken_cart = $cart;
$cart = new shoppingCart;
$cart->unserialize($broken_cart);
}
} else {
tep_session_register('cart');
$cart = new shoppingCart;
}
- Replace with:
//+++AUCTIONBLOX.COM
if (tep_session_is_registered('cart') === false && is_object($cart) == false) {
tep_session_register('cart');
$cart = new abxCart;
}
//+++AUCTIONBLOX.COM
catalog/admin/includes/column_left.php
- Add:
//+++AUCTIONBLOX.COM
require(DIR_FS_CATALOG_MODULES . 'auctionblox/external/oscommerce/includes/boxes/auctionblox.php');
//+++AUCTIONBLOX.COM
[OPTIONAL, BUT RECOMMENDED] catalog/shopping_cart.php (line 111)
- Note: This change will allow eBay users to remove eBay items from their cart.
- Find:
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));
$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
if (STOCK_CHECK == 'true') {
$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
if (tep_not_null($stock_check)) {
$any_out_of_stock = 1;
$products_name .= $stock_check;
}
}
- Replace with:
//+++AUCTIONBLOX.COM
if (isset($products[$i]['is_auction_item'])) {
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['listing_id']));
} else {
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));
}
$products_name = '';
if (isset($products[$i]['is_auction_item'])) {
$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="center"><a target="_blank" href="' . $products[$i]['item_url'] . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
' <td class="productListing-data" valign="top"><a target="_blank" href="' . $products[$i]['item_url']. '"><b>' . $products[$i]['name'] . '</b></a>';
} else {
$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
}
if (!isset($products[$i]['is_auction_item'])){
if (STOCK_CHECK == 'true') {
$stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
if (tep_not_null($stock_check)) {
$any_out_of_stock = 1;
$products_name .= $stock_check;
}
}
}
//+++AUCTIONBLOX.COM
[OPTIONAL, BUT RECOMMENDED] catalog/shopping_cart.php (line 143)
- Note: This change will prevent the user from changing the quantity for eBay items
- Find:
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));
- Replace with:
//+++AUCTIONBLOX.COM
if (isset($products[$i]['is_auction_item'])) {
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" readonly="1"') . tep_draw_hidden_field('products_id[]', $products[$i]['listing_id'])); // ABX: used to remove from cart
} else {
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));
}
//+++AUCTIONBLOX.COM
[OPTIONAL, BUT RECOMMENDED] catalog/includes/footer.php (after last line)
- Add at bottom of file
<!-- DO NOT REMOVE: This image calls a script that will enable most of
the order automation for eBay sales to AuctionBlox. Examples of
this automation include paid/shipped status of eBay sales, reminder
emails, and inventory control -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<img src="abxn.php?abx=cron&t=<?php echo time();?>" border="0" alt="" />
</td>
</tr>
</table>
[OPTIONAL] catalog/admin/orders.php (line 63)
- Note: This change will allow the sales to be updated to "completed" status once the order is updated to the "3" order status which is "delivered" in osCommerce. Feel free to change this value to the value that is appropriate for your order statuses.
- Find:
$messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
- Above add:
//+++AUCTIONBLOX.COM
//Magic # 3 == Delivered order status: Set auction as completed.
if($status == 3) {
include(DIR_FS_CATALOG_MODULES . 'auctionblox/includes/classes/abxManager.php');
$abxManager = new abxManager;
$abxManager->updateStatusByOrder($abxManager->COMPLETED, $oID);
}
//+++AUCTIONBLOX.COM
[OPTIONAL] catalog/admin/index.php (line 51)
- Find:
array('title' => BOX_HEADING_TOOLS,
- Above add:
//+++AUCTIONBLOX.COM [OPTIONAL]
array('title' => 'AuctionBlox',
'image' => 'auctionblox.gif',
'href' => tep_href_link('auctionblox.php', 'selected_box=auctionblox'),
'children' => array(array('title' => BOX_AUCTIONBLOX_SALES, 'link' => tep_href_link('auctionblox.php', 'selected_box=auctionblox&abx=sales')),
array('title' => BOX_AUCTIONBLOX_LISTINGS, 'link' => tep_href_link('auctionblox.php', 'selected_box=auctionblox&abx=listings')))),
//+++AUCTIONBLOX.COM [OPTIONAL]
[OPTIONAL] catalog/admin/includes/languages/english.php
- Add:
//+++AUCTIONBLOX.COM [OPTIONAL]
define('BOX_AUCTIONBLOX_SALES','Sales');
define('BOX_AUCTIONBLOX_LISTINGS','Listings');
//+++AUCTIONBLOX.COM [OPTIONAL]
Integration with Popular osCommerce Contributions
For some osCommerce contributions a few changes may be required.
PayPal Contributions
AuctionBlox works with most PayPal contributions. Please see our PayPal integration page for more details: PayPal Integration
SEC - Shoppe Enhancement Controller
When using SEC your customers at checkout will see your catalog price instead of eBay price.
Use the following fix to correct this:
<catalog>/includes/classes/order.php
// BOF: WebMakers.com Added: Shoppe Enhancement Controller
$index = 0;
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
// WebMakers.com Added: exclude products price
if ($products[$i]['products_price_excluded']=='1') {
$products_price_final = 0;
} else {
if ($products[$i]['products_price_excluded']=='1') {
$products_price_final = 0;
} else {
//AUCTIONBLOX SEC FIX : BEGIN
if($products[$i]['is_auction_item']==1){
$products_price_final =$products[$i]['price'];}
else{
$products_price_final = tep_get_products_price_quantity_discount_price($products[$i]['id'], $cart->in_cart_mixed($products[$i]['id']));
}
//AUCTIONBLOX SEC FIX : END
}
}
$this->products[$index] = array('qty' => $products[$i]['quantity'],
'name' => $products[$i]['name'],
'model' => $products[$i]['model'],
'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
'price' => $products[$i]['price'],
STS Simple Template System
Open the file <catalog>/includes/modules/MyAuctionBlox/templates/catalog.php and uncomment the includes for column_left.php and column_right.php that are commented out. For example:
Change line 33 from:
<?php //require(DIR_WS_INCLUDES . 'column_left.php'); ?>
to:
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
Change line 49 from:
<?php //require(DIR_WS_INCLUDES . 'column_right.php'); ?>
to:
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
[Optional Step]
Copy your sts_template.html into the folder <catalog>/includes/sts_templates and rename it to auctionblox.html. Then edit this new file and remove the content of the left and right navigation (without breaking the html code)






