Home  |  Documentation  |  Forum  |  Blog Log in / create account  
Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
  • Donations
 
Toolbox
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Views
  • Article
  • Discussion
  • View source
  • History

How to allow checkout for eBay listings not listed through AuctionBlox

From AuctionBlox

Jump to: navigation, search

Contents

  • 1 Introduction
  • 2 Common Problems
  • 3 Resolution
    • 3.1 Checkout Redirect
    • 3.2 Missing Product Association
  • 4 osCommerce Shopping Cart Code Modifications
    • 4.1 <CATALOG>/checkout_payment.php
    • 4.2 <CATALOG>/checkout_confirmation.php
  • 5 Paypal Express Checkout Contribution Modifications
    • 5.1 <CATALOG>/express_checkout.php

Introduction

AuctionBlox is integrated into your shopping cart allowing for seamless checkout of eBay listings as if they were products in your shop. This allows for advanced shopping cart features such as centralized inventory management between eBay and your shop.

In order to achieve this, AuctionBlox requires that you list your shop products on eBay using the AuctionBlox Lister. Use of other tools such as eBay "Sell Your Item" page and TurboLister will not make the association between the eBay listing and the shop product.

However, we recognize that not everyone's situation is the same. In certain situations, you may wish to use other tools to list all or a subset of your products.

Common Problems

If you choose to list your eBay listings without using the AuctionBlox Lister, you will run into the following issues:

  1. Checkout redirect cannot be activated for listings that have not been listed using AuctionBlox
  2. Listings will have no product association

Resolution

Checkout Redirect

It is not possible to activate checkout redirect for listings not listed using AuctionBlox. However, you can direct the user to your checkout page in the AuctionBlox-generated winning bidder notification email. A user can checkout in your shop using the AuctionBlox checkout page provided that necessary changes have been made to support the "Missing product association" problem outlined below.

Missing Product Association

Listings that do not have a product association present a problem. When listings do not have a product association, this can have several adverse effects such as:

  1. Listings without product associations cannot be deducted from your inventory
  2. The shopping cart will "loop" during the checkout process since the shop cannot find the product in inventory and will consider it out of stock
  3. Shopping cart tax rules and weight-based shipping will not work since the shopping cart is unaware of the actual product.

AuctionBlox is aware of all listings and sales for your eBay account regardless of whether they were listed with AuctionBlox. Your listings screen will show all listings and your sales screen will show all sales.

One way to resolve the missing product association is edit each sale in your shop administration site using the "Edit Sale" page and associate the correct product. This does cause a timing issue however since someone could attempt checkout prior to you correcting the missing product association. It also involves some additional work that is unacceptable for high-volume sites.

Another way to resolve the missing product association is to edit your shop to allow checkout even if no product is associated with the product. This allows for immediate checkout, but will not work if you use weight-based shipping in your shopping cart. If you use eBay shipping (fixed or calculated), then this method will work.

osCommerce Shopping Cart Code Modifications

In order to allow checkout for listings with no product association, you will need to make manual modifications in the code. These modifications are specific to osCommerce and osCommerce-based shopping carts such as Zen-Cart and CRE Loaded 6.2.

<CATALOG>/checkout_payment.php

Find:

  if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
    $products = $cart->get_products();
    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
        tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
        break;
      }
    }
  }

And replace with:

  //+++AUCTIONBLOX.COM
  if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
    $products = $cart->get_products();
    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      if ($products[$i]['is_auction_item'] !== true && tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
        tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
        break;
      }
    }
  }
  //+++AUCTIONBLOX.COM

<CATALOG>/checkout_confirmation.php

We can make this edit because it is handled earlier in the checkout flow. Any orders that would fail a stock check never should have made it to this page.

Find:

  $any_out_of_stock = false;
  if (STOCK_CHECK == 'true') {
    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
      if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
        $any_out_of_stock = true;
      }
    }
    // Out of Stock
    if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
      tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
    }
  }

And comment out the entire block so it looks like this:

//+++AUCTIONBLOX.COM
//remove entire stock check as this should have been handled
//in checkout_payment 
/*  $any_out_of_stock = false;
  if (STOCK_CHECK == 'true') {
    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
      if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
        $any_out_of_stock = true;
      }
    }
    // Out of Stock
    if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
      tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
    }
  }*/
//+++AUCTIONBLOX.COM

Paypal Express Checkout Contribution Modifications

<CATALOG>/express_checkout.php

Find:

  if ($cart->count_contents() < 1) {
    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
  }

And add this block below it:

  //AUCTIONBLOX - do a stock check here on the cart contents rather than later 
  //on the order contents
  //+++AUCTIONBLOX.COM
  if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
    $products = $cart->get_products();
    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      if ($products[$i]['is_auction_item'] !== true && tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
        tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
        break;
      }
    }
  }
  //+++AUCTIONBLOX.COM

Then remove the stock check on the order later in the file by finding:

  // Stock Check
  $any_out_of_stock = false;
  if (STOCK_CHECK == 'true') {
    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
      if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
        $any_out_of_stock = true;
      }
    }

    // Out of Stock
    if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
	  tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
    }
  }

and commenting it out:

// Stock Check
//AUCTIONBLOX - we need to check the cart for stock, not the order
/*  $any_out_of_stock = false;
  if (STOCK_CHECK == 'true') {
    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
      if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
        $any_out_of_stock = true;
      }
    }

    // Out of Stock
    if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
	  tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
    }
  }*/
//AUCTIONBLOX
Retrieved from "http://members.auctionblox.com/community/documentation/index.php/How_to_allow_checkout_for_eBay_listings_not_listed_through_AuctionBlox"
© 2003-2008 AuctionBlox Inc. All Rights Reserved.