Jump to content



* * * * * 2 votes

Connect OScommerce with Ebay and Ebay.Express


  • Please log in to reply
26 replies to this topic

#1   Jupiters

Jupiters
  • Members
  • 55 posts
  • Real Name:Fredlora

Posted 24 January 2007 - 12:19 AM

Hi,

i just wanted to inform the community that there are 2 nice contributions for using Ebay with the help of OSC. With these contributions you can offer your product catalog with a few clicks on ebay and even on ebay express. the hole checkout process is than routed through OSC.

so theres a possibility to gain a lot of new customers...

the contri was develepod as as student project and is listed now here:
http://www.oscommerce.com/community/contributions,4824

a lot of screenshots you can find here (inside the pdfs)
http://www.lener.info/auctionlister.htm

perhaps somebody can need it. as far as i have read, it works but needs some adjustment here and there...

Edited by wheeloftime, 24 January 2007 - 03:29 AM.


#2   Jupiters

Jupiters
  • Members
  • 55 posts
  • Real Name:Fredlora

Posted 24 January 2007 - 11:26 AM

Here are the deailled install instructions:

####### Auction.lister Version #########

A. CREATING DATABASE TABLE.
B. ADDING NEW FILES.(14 files + 8 images).
C. EDITING OS COMMERCE FILES.(catalog dir)  
D. EDITING OS COMMERCE FILES.(admin dir)  




A. CREATING DATABASE TABLE.

Copy the auctionlister_sql_install_script.php from the Setup folder to your catalog folder and run it.

B. ADDING NEW FILES


C. EDITING OS COMMERCE FILES.(catalog dir)


-- Files to Modify in catalog section --------------

1. catalog/checkout_process.php
2. catalog/index.php
3. catalog/login.php
4. catalog/shopping_cart.php
5. catalog/includes/application_top.php
6. catalog\includes\classes\order.php
7. catalog\includes\classes\shopping_cart.php


CATALOG STEP = 1. open catalog/checkout_process.php

find.....(aprox. line no.155)

// do not decrement quantities if products_attributes_filename exists
if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) {
$stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];
} else {
$stock_left = $stock_values['products_quantity'];
}
tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {
tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
}
}
}

.. and add this after...

/*# auction.lister ####################
# update orderid in auction_details #
# START- #
#####################################*/
if($order->products[$i]['auctionid']!=""){
$sqlstring = "UPDATE auction_details SET order_number = '".$insert_id."' WHERE auction_id = '".$order->products[$i]['auctionid']."'  
AND buyer_email = '".$order->customer['email_address']."'";
tep_db_query($sqlstring);
}
/*# auction.lister #
# -END #
##################*/

find.....(aprox. line no.169)

// Update products_ordered (for bestsellers list)
tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");

.. and add this after...

/*# auction.lister ###
# set an auctionid #
# START- #
####################*/  
if($order->products[$i]['auctionid']!=""){
//set special if product is an auction
$auctionid = " (EBAY-ID: ".$order->products[$i]['auctionid'].")";
}else{
$auctionid = "";
}
/*# auction.lister #
# -END #
##################*/

/*# auction.lister ##############################################
# add auctionid to productname in order #
# 'products_name' => $order->products[$i]['name'].$auctionid, #
# e.g. ProductXYZ (EBAY-ID: 1234567890) #
###############################################################*/  

find.....(aprox. line no.193)
'products_name' => $order->products[$i]['name'],


..and replace it with this.......
'products_name' => $order->products[$i]['name'].$auctionid,  


CATALOG STEP = 2. open catalog/index.php

find.....(aprox. line no.306)

<tr>
<td class="main"><?php echo TEXT_MAIN; ?></td>

..and replace it with this.......

<tr>
<td class="main"><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFINE_MAINPAGE); ?></td>



CATALOG STEP = 3. open catalog/login.php

find.....(aprox. line no.23)

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

$error = false;
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {



..and replace it with this.......

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

$error = false;
/*# auction.lister ###########################
# accept login by click in email-link #
# || $HTTP_GET_VARS['action'] == 'auction' #
############################################*/
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process' || $HTTP_GET_VARS['action'] == 'auction')) {

find.....(aprox. line no.30)

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

.. and add this after...

/*# auction.lister ###############################
# set email_address and password automatically #
# START- #
################################################*/
if($HTTP_GET_VARS['action']== 'auction'){
$email_address = tep_db_prepare_input($HTTP_GET_VARS['email_address']);
$password = tep_db_prepare_input($HTTP_GET_VARS['password']);  
}
/*# auction.lister #
# -END #
##################*/

find.....(aprox. line no.48)

// Check that password is good
if (!tep_validate_password($password, $check_customer['customers_password'])) {

..and replace it with this.......

/*# auction.lister #########################################
# encript password out of link and check that it is good #
# START- #
##########################################################*/  
if($HTTP_GET_VARS['action'] == 'auction'){
$ispassword = tep_validate_password_enc($password, $check_customer['customers_password']);  
}else{  
// Check on normal login that password is good
$ispassword = tep_validate_password($password, $check_customer['customers_password']);
}  
if (!$ispassword) {
/*# auction.lister #
# -END #
##################*/  


find.....(aprox. line no.92)

tep_redirect(tep_href_link(FILENAME_DEFAULT));

..and replace it with this.......

/*# auction.lister #####################################
# if login by click in e-mail, then redirect to cart #
# START- #
######################################################*/  
if($HTTP_GET_VARS['action']== 'auction'){
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}else{
//normal login - redirect to user account
tep_redirect(tep_href_link(FILENAME_DEFAULT));
}
/*# auction.lister #
# -END #
##################*/  


CATALOG STEP = 4. open catalog/shopping_cart.php


find.....(aprox. line no.110)

$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']));

..and replace it with this.......

/*# auction.lister ######################################
# if the product is an auction don't show a deletebox #
# and quantitybox - check auctionid in productsarray #
# START- #
#######################################################*/  
$auctionid = $products[$i][auctionid];
if($auctionid!=''){
//no deletebox
$mydelete = "&nbsp;";
//quantity is hidden - no changes can be made by the user
$myquantity = $products[$i]['quantity'].tep_draw_hidden_field('cart_quantity[]', $products[$i]['quantity']). tep_draw_hidden_field('products_id[]', $products[$i]['id']);
//as title show ebayicon - so user knows that this is the product bought at ebay
$mytitle = tep_image(DIR_WS_IMAGES . "ebay.gif");
//link to ebay-auction
$mylink = "'http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&item=".$auctionid."' target='_blank'";
}else{
//if product is not a auction - deletbox can be shown
$mydelete = tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']);
//auctionbox can be shown
$myquantity = tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']);
$mytitle = "";
//link to product
$mylink = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']);  
}
/*# auction.lister #
# -END #
##################*/  

/*# auction.lister ###############
# infobox with delete checkbox #
# 'text' => $mydelete #
################################*/
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => $mydelete);

/*# auction.lister ###############################################################
# insert link an title, if there's one, also the products name #
# <a href=' . $mylink . '><b>' . $mytitle . $products[$i]['name'] . '</b></a>' #
################################################################################
*/


find.....(aprox. line no.154)

$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>' .

.. and add this after...

' <td class="productListing-data" valign="top"><a href=' . $mylink . '><b>' . $mytitle . $products[$i]['name'] . '</b></a>';


find.....(aprox. line no.168)

$products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';

..and replace it with this.......


/*# auction.lister ##########################
# if the product has attributes show #
# dropdown box to let the customer choose #
# this is for NON-AUCTION products! #
# START- #
###########################################*/  
$products_options_array = array();
//select all attributes of the defined productoption  
$sql_query = "select products_options_name, options_values_id, options_values_price, price_prefix, products_options_values_name  
from " . TABLE_PRODUCTS_ATTRIBUTES . ", ".TABLE_PRODUCTS_OPTIONS_VALUES. ", ".TABLE_PRODUCTS_OPTIONS.
" where products_id = '" . (int)$products[$i]['id'] . "'  
AND options_id = '" . (int)$option . "'  
AND products_options_values_id = options_values_id  
AND products_options_id = options_id  
AND ".TABLE_PRODUCTS_OPTIONS.".language_id = '".(int)$languages_id."'
AND ".TABLE_PRODUCTS_OPTIONS_VALUES.".language_id = '".(int)$languages_id."'";
$attribute_query = tep_db_query($sql_query);
//get general productinfos
$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)$products[$i]['id'] . "'  
and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);
//get titel and costs of the selected attributes
while ($products_options = tep_db_fetch_array($attribute_query)) {
$mytitle = $products_options['products_options_name'];
$products_options_array[] = array('id' => $products_options['options_values_id'],  
'text' => $products_options['products_options_values_name']);
//if there are extra costs or reductions show prefix (+/-)
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'])) .') ';
}
}
//select a value in dropdown
$selected_attribute = $value;
//create dropdown with name and costs of each attribute  
$attr_pull_down = $mytitle.": ".tep_draw_pull_down_menu('att_id['.$i.'][' . $option . ']', $products_options_array, $selected_attribute);  
//add for each option a attribute-dropdown
$products_name .= '<br><small><i>'.$attr_pull_down;
/*# auction.lister #
# -END #
##################*/
}
/*# auction.lister ##########################
# if the product has attributes show #
# dropdown box to let the customer choose #
# this is for AUCTION products #
# START- #
###########################################*/  
}else{
//get productid - if product is an auction the productid is a combination --> productid[ebayauctionid] - so you have to extract it
$my_productsid = split("[[]",$products[$i]['id']);
//select all options to the product
$my_sql_query = "select distinct(options_id) from ".TABLE_PRODUCTS_ATTRIBUTES." where products_id = '".$my_productsid[0]."'";
$check_attribute_query = tep_db_query($my_sql_query);
//get attributes of each productoption  
while ($check_attribute = tep_db_fetch_array($check_attribute_query)) {  
$products_options_array = array();  
$sql_query = "select products_options_name, options_values_id, options_values_price, price_prefix, products_options_values_name  
from " . TABLE_PRODUCTS_ATTRIBUTES . ", ".TABLE_PRODUCTS_OPTIONS_VALUES. ", ".TABLE_PRODUCTS_OPTIONS.
" where products_id = '" . $my_productsid[0] . "'  
AND options_id = '" . $check_attribute['options_id'] . "'  
AND products_options_values_id = options_values_id  
AND products_options_id = options_id  
AND ".TABLE_PRODUCTS_OPTIONS.".language_id = '".(int)$languages_id."'
AND ".TABLE_PRODUCTS_OPTIONS_VALUES.".language_id = '".(int)$languages_id."'";
$attribute_query = tep_db_query($sql_query);
//get titel and costs of the selected attributes
while ($products_options = tep_db_fetch_array($attribute_query)) {
$mytitle = $products_options['products_options_name'];
$products_options_array[] = array('id' => $products_options['options_values_id'],  
'text' => $products_options['products_options_values_name']);
//if there are extra costs or reductions show prefix (+/-)
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'])) .') ';
}
}
//select a value in dropdown
$selected_attribute = $value;
//create dropdown with name and costs of each attribute  
$attr_pull_down = $mytitle.": ".tep_draw_pull_down_menu('att_id['.$i.'][' . $check_attribute['options_id'] . ']', $products_options_array, $selected_attribute);
//add for each option a attribute-dropdown
$products_name .= '<br><small><i>'.$attr_pull_down;
}  
/*# auction.lister #
# -END #
##################*/
}  

find.....(aprox. line no.262)
$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
'text' => $products_name);
$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']));

.. and replace with this ...

$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
'text' => $products_name);

/*# auction.lister #################
# infobox with quantity checkbox #
# 'text' => $myquantity); #
################################*/
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => $myquantity);

CATALOG STEP = 5. open catalog\includes\application_top.php

find.....(aprox. line no.349)

$attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';

.. and replace with this ...

/*# auction.lister ######################################################################
# to push attributs out of cart #
# $attributes = ($HTTP_POST_VARS['att_id'][$i]) ? $HTTP_POST_VARS['att_id'][$i] : ''; #
################################################################################
#######*/
$attributes = ($HTTP_POST_VARS['att_id'][$i]) ? $HTTP_POST_VARS['att_id'][$i] : '';  


find.....(aprox. line no.431)

// include the password crypto functions
require(DIR_WS_FUNCTIONS . 'password_funcs.php');


.. and add this after...

/*# auction.lister ########################
# include the password crypto functions #
#########################################*/  
require(DIR_WS_FUNCTIONS . 'password_funcs2.php');  


CATALOG STEP = 6. catalog\includes\classes\order.php



find.....(aprox. line no.213)

$index = 0;
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {

.. and add this after...

/*# auction.lister #############################
# ad auctionid in products array #
# 'auctionid' => $products[$i]['auctionid']) #
##############################################*/  

find.....(aprox. line no.228)

'id' => $products[$i]['id']);

.. and replace with this ...

'id' => $products[$i]['id'],
'auctionid' => $products[$i]['auctionid']);

CATALOG STEP = 7. catalog\includes\classes\shopping_cart.php


find.....(aprox. line no.47)

$products_query = tep_db_query("select products_id, customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");
while ($products = tep_db_fetch_array($products_query)) {
$this->contents[$products['products_id']] = array('qty' => $products['customers_basket_quantity']);
// attributes
$attributes_query = tep_db_query("select products_options_id, products_options_value_id from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products['products_id']) . "'");
while ($attributes = tep_db_fetch_array($attributes_query)) {
$this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id'];
}
}

.. and replace with this ...

/*# auction.lister ########################################
# select auctionid in query, too #
# combine productid and auctionid --> prodid[auctionid] #
# START- #
#########################################################*/
//select also auctionid  
$products_query = tep_db_query("select products_id, auctionid, customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");  
while ($products = tep_db_fetch_array($products_query)) {
//if product is an auction  
if($products['auctionid']!=''){
//conbine ids
$myproducts_id = $products['products_id']."[".$products['auctionid']."]";
}else{
//no auction
$myproducts_id = $products['products_id'];
}
$this->contents[$myproducts_id] =  
array('qty' => $products['customers_basket_quantity'], 'auctionid' => $products['auctionid']);  

// look for attributes
//is auction with attributes?
if($products['auctionid']!=''){
$mysql = "select products_options_id, products_options_value_id from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . "  
where customers_id = '" . (int)$customer_id . "'  
and products_id = '" . tep_db_input($products['products_id']) . "'
and auctionid = '".tep_db_input($products['auctionid'])."'";
}else{
//normal product from shop
$mysql = "select products_options_id, products_options_value_id from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . "  
where customers_id = '" . (int)$customer_id . "'  
and products_id = '" . tep_db_input($products['products_id']) . "'
and auctionid = '0'";
}
$attributes_query = tep_db_query($mysql);
while ($attributes = tep_db_fetch_array($attributes_query)) {
if($products['auctionid']!=''){
$myproducts_id = $products['products_id']."[".$products['auctionid']."]";
}else{
$myproducts_id = $products['products_id'];
}  
//add attributes to productarray  
$this->contents[$myproducts_id]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id'];
}
}
/*# auction.lister #
# -END #
##################*/

find.....(aprox. line no.116)

function add_cart($products_id, $qty = '1', $attributes = '', $notify = true) {
global $new_products_id_in_cart, $customer_id;

.. and add this after...

/*# auction.lister ###############
# save passed products_id tmp #
# $old_prod_id = $products_id; #
################################*/
$old_prod_id = $products_id;

find.....(aprox. line no.134)

if ($this->in_cart($products_id_string)) {
$this->update_quantity($products_id_string, $qty, $attributes);
} else {
$this->contents[$products_id_string] = array('qty' => $qty);
// insert into database
if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$qty . "', '" . date('Ymd') . "')");

if (is_array($attributes)) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
$this->contents[$products_id_string]['attributes'][$option] = $value;
// insert into database
if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "')");
}
}
}

$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();


.. and replace with this ...

/*# auction.lister ########################
# look if product in cart is an auction #
# START- #
#########################################*/
//look for tmp saved prodid - if it is an auction
if($this->contents[$old_prod_id][auctionid]!=''){
//if it is in cart
if ($this->in_cart($old_prod_id)) {
//update quantity and attributes
$this->update_quantity($old_prod_id, $qty, $attributes);  
}
//tmp saved prodid is not an auction  
}else{
//look if normal product is in cart
if ($this->in_cart($products_id_string)) {
//update quantity and attributes
$this->update_quantity($products_id_string, $qty, $attributes);
} else {//product is not in cart
//add a new product to cart
$this->contents[$products_id_string] = array('qty' => $qty);
// insert into database
if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$qty . "', '" . date('Ymd') . "')");
//add attributes
if (is_array($attributes)) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
$this->contents[$products_id_string]['attributes'][$option] = $value;
// insert into database
if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "')");

}
}
}
$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();
}
/*# auction.lister #
# -END #
##################*/


find.....(aprox. line no.181)


$products_id_string = tep_get_uprid($products_id, $attributes);
$products_id = tep_get_prid($products_id_string);

if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity)) {
$this->contents[$products_id_string] = array('qty' => $quantity);
// update database
if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . (int)$quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "'");

if (is_array($attributes)) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
$this->contents[$products_id_string]['attributes'][$option] = $value;
// update database
if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and products_options_id = '" . (int)$option . "'");



.. and replace with this ...

/*# auction.lister ########################
# look if product in cart is an auction #
# START- #
#########################################*/
//tmp save passed productid
$old_prod_id = $products_id;
$products_id_string = tep_get_uprid($products_id, $attributes);
$products_id = tep_get_prid($products_id_string);
//substract auctionid (out of combination --> productid[auctionid])
$myauctionid = substr(strstr($old_prod_id,"["),1,-1);
//get clear productid (out of combination --> productid[auctionid])
$myproducts_id = explode("[",$old_prod_id);

//look if products are in productsarray (auction and normal products)
if (is_numeric($products_id) && (isset($this->contents[$products_id_string]) || isset($this->contents[$old_prod_id])) && is_numeric($quantity)) {
//if no auction product
if($myauctionid==''){
$this->contents[$products_id_string] = array('qty' => $quantity);
}else{ //if an auction
$this->contents[$old_prod_id] = array('qty' => $quantity);
//also set auctionid in productsarray
$this->contents[$old_prod_id]['auctionid'] = $myauctionid;  
}
// update database
if (tep_session_is_registered('customer_id')){
//is not a auction add to database
if($myauctionid==''){
tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . (int)$quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and auction='0'");
}
}  

if (is_array($attributes)) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
//if no auction add attributes
if($myauctionid==''){
$this->contents[$products_id_string]['attributes'][$option] = $value;
}else{//if auction add attributes on this way
$this->contents[$old_prod_id]['attributes'][$option] = $value;
}
// update database
if (tep_session_is_registered('customer_id')){
//is an auction - update db customers basket in this way
if($myauctionid!=''){
$mysqlstring = "update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "'  
where customers_id = '" . (int)$customer_id . "'  
and products_id = '" . tep_db_input($myproducts_id[0]) . "'  
and products_options_id = '" . (int)$option . "'  
and auctionid ='".$myauctionid."'";
//is a normal product
}else{
$mysqlstring = "update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "'  
where customers_id = '" . (int)$customer_id . "'  
and products_id = '" . tep_db_input($products_id_string) . "'  
and products_options_id = '" . (int)$option . "'
and auctionid = '0'";
}
tep_db_query($mysqlstring);
}
/*# auction.lister #
# -END #
##################*/


find.....(aprox. line no.181)

// remove from database
if (tep_session_is_registered('customer_id')) {
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");

.. and replace with this ...

// remove from database
if (tep_session_is_registered('customer_id')) {
/*# auction.lister ##############################
# remove normal product from customers basket #
# normal product --> auctionid==0 #
###############################################*/  
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "' and auction=0");


find.....(aprox. line no.326)

function calculate() {
$this->total = 0;
$this->weight = 0;
if (!is_array($this->contents)) return 0;

reset($this->contents);
while (list($products_id, ) = each($this->contents)) {
$qty = $this->contents[$products_id]['qty'];

// products price
$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
if ($product = tep_db_fetch_array($product_query)) {
$prid = $product['products_id'];
$products_tax = tep_get_tax_rate($product['products_tax_class_id']);
$products_price = $product['products_price'];

.. and replace with this ...

/*# auction.lister ###
# add customer_id #
####################*/  
global $customer_id;

$this->total = 0;
$this->weight = 0;
if (!is_array($this->contents)) return 0;

reset($this->contents);
while (list($products_id, ) = each($this->contents)) {
$qty = $this->contents[$products_id]['qty'];

// products price
/*# auction.lister ##########
# get right product price #
# START- #
###########################*/
//get auctionid  
$auctionid = $this->contents[$products_id][auctionid];
//if product is an auction - get right price out of table auction_details
if($auctionid!=''){
$sqlquery = "select p.products_id, ad.auction_endprice, p.products_tax_class_id,  
p.products_weight from products p, auction_list al, auction_details ad, customers c  
WHERE p.products_id = al.product_id  
AND c.customers_email_address = ad.buyer_email  
AND al.auction_id = ad.auction_id  
AND al.auction_id='".$auctionid."'  
AND c.customers_id = '".$customer_id."'";
}else{
//normal shopproduct - normal select
$sqlquery = "select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'";
}
$product_query = tep_db_query($sqlquery);
if ($product = tep_db_fetch_array($product_query)) {
$prid = $product['products_id'];
$products_tax = tep_get_tax_rate($product['products_tax_class_id']);
//if auction
if($auctionid!=''){
//auctionprice is incl. tax - so you have to get the price without tax (because in cart it automatically added)
$products_price = $product['auction_endprice']/(1+($products_tax/100));
}else{//normalproduct
$products_price = $product['products_price'];
}
/*# auction.lister #
# -END #
##################*/


find.....(aprox. line no.429)

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
if ($products = tep_db_fetch_array($products_query)) {
$prid = $products['products_id'];
$products_price = $products['products_price'];
$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");


if (tep_db_num_rows($specials_query)) {
$specials = tep_db_fetch_array($specials_query);
$products_price = $specials['specials_new_products_price'];
}

$products_array[] = array('id' => $products_id,


.. and replace with this ...

/*# auction.lister ####################
# update orderid in auction_details #
# START- #
#####################################*/  
$auctionid = $this->contents[$products_id][auctionid];
//if product is an auction
if($auctionid!=''){
//query: also select for auctionid - there might be more than one auction from the same product (same productid) with different prices
$sqlquery = "select p.products_id, pd.products_name, p.products_model, p.products_image,  
ad.auction_endprice, p.products_weight, p.products_tax_class_id  
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd,  
auction_details ad, auction_list al where  
ad.auction_id = al.auction_id AND
al.product_id=p.products_id AND  
p.products_id = '" . (int)$products_id . "' and  
pd.products_id = p.products_id  
and al.auction_id = '".$auctionid."'  
and pd.language_id = '" . (int)$languages_id . "'";
$products_query = tep_db_query($sqlquery);
}else{//normal shopproduct - normal select
$sqlquery = "select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price,  
p.products_weight, p.products_tax_class_id  
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd  
where p.products_id = '" . (int)$products_id . "' and  
pd.products_id = p.products_id  
and pd.language_id = '" . (int)$languages_id . "'";
$products_query = tep_db_query($sqlquery);
}
if ($products = tep_db_fetch_array($products_query)) {
$prid = $products['products_id'];
//if auction - get right excl. tax price
if($auctionid!=''){
$products_price = $products['auction_endprice']/(1+(tep_get_tax_rate($products['products_tax_class_id'])/100));
}else{//normal price - normal shopproduct
$products_price = $products['products_price'];

$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");
if (tep_db_num_rows($specials_query)) {
$specials = tep_db_fetch_array($specials_query);
$products_price = $specials['specials_new_products_price'];
}  
}
/*# auction.lister #
# -END #
##################*/

/*# auction.lister ################
# add auctionid to productarray #
# 'auctionid' => $auctionid, #
#################################*/
$products_array[] = array('id' => $products_id,
'auctionid' => $auctionid,

At the End of the file, just before the  

}
?>


/*# auction.lister #######################
# function - check product if it is a #
# combination of prodid and auctionid #
# --> then product would be an auction #
########################################*/  
function is_auction($products_id){
$myproduct = $this->contents[$products_id];
if($myproduct[auctionid] != ''){
return true;
}else{
return false;
}
}  

D. EDITING OS COMMERCE FILES.(admin dir)


-- Files to Modify in admin section --------------

1. catalog\admin\categories.php
2. catalog\admin\index.php
3. catalog\admin\includes\application_top.php
4. catalog\admin\includes\column_left.php
5. catalog\admin\includes\filenames.php
6. catalog\admin\includes\stylesheet.css


1. ADMIN STEP = 1. catalog\admin\categories.php


find.....(aprox. line no.264)


if ($action == 'insert_product') {
$insert_sql_data = array('products_id' => $products_id,
'language_id' => $language_id);

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
} elseif ($action == 'update_product') {
tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
}
}

.. and add this after...


/*# auction.lister #############################
# insert ebay product description in catalog #
# START- #
##############################################*/
if ($action == 'insert_product') {
$sql_data_array = array('products_id' => $products_id,
'auction_description' => tep_db_prepare_input($HTTP_POST_VARS['auction_description']));

tep_db_perform('ebay_products', $sql_data_array);
} elseif ($action == 'update_product') {
$sql_data_array = array('products_id' => $products_id,
'auction_description' => tep_db_prepare_input($HTTP_POST_VARS['auction_description']));
tep_db_perform('ebay_products', $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
}  
/*# auction.lister #
# -END #
##################*/


find.....(aprox. line no.306)

} elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {
$product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$product = tep_db_fetch_array($product_query);


.. and add this after...

//####################################################################
if ($product['products_date_available'] == '') {
tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), null, '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
} else {
tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
}
//####################################################################  

find.....(aprox. line no.381)

$parameters = array('products_name' => '',
'products_description' => '',
'products_url' => '',
'products_id' => '',
'products_quantity' => '',
'products_model' => '',
'products_image' => '',
'products_price' => '',
'products_weight' => '',
'products_date_added' => '',
'products_last_modified' => '',
'products_date_available' => '',
'products_status' => '',
'products_tax_class_id' => '',
'manufacturers_id' => '');

$pInfo = new objectInfo($parameters);

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product = tep_db_fetch_array($product_query);


.. and replace with this ...


/*# auction.lister ###################
# add auction_description in array #
# 'auction_description' => '' #
####################################*/  
$parameters = array('products_name' => '',
'products_description' => '',
'products_url' => '',
'products_id' => '',
'products_quantity' => '',
'products_model' => '',
'products_image' => '',
'products_price' => '',
'products_weight' => '',
'products_date_added' => '',
'products_last_modified' => '',
'products_date_available' => '',
'products_status' => '',
'products_tax_class_id' => '',
'manufacturers_id' => '',
'auction_description' => '');

$pInfo = new objectInfo($parameters);

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
/*# auction.lister ##########
# select all productinfos #
###########################*/  
$sql_query = "select pd.products_name, pd.products_description, ep.auction_description, pd.products_url, p.products_id, p.products_quantity,  
p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified,  
date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id,  
p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, ebay_products ep
where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id  
AND p.products_id = ep.products_id  
and pd.language_id = '" . (int)$languages_id . "'";  
$product_query = tep_db_query($sql_query);
$product = tep_db_fetch_array($product_query);


find.....(aprox. line no.542)

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>


.. and replace with this...

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? $products_name[$languages[$i]['id']] : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>

find.....(aprox. line no.569)

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>
</table></td>
</tr>


.. and replace with this...

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>
</table></td>
</tr>


find.....(aprox. line no.583)

<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>


.. and add this after...

<?php
/*# auction.lister ####################
# add field for auction description #
# START- #
#####################################*/
?>  
<tr>
<td class="main" valign="top">Auktionsbeschreibung</td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15'); ?>&nbsp;</td>
<td class="main"><?php echo tep_draw_textarea_field('auction_description', 'soft', '70', '15', $pInfo->auction_description); ?></td>
</tr>
</table></td>
</tr>  
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<?php
/*# auction.lister #
# -END #
##################*/
?>  

find.....(aprox. line no.623)

<tr>
<td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_file_field('products_image') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_URL . '<br><small>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '</small>'; ?></td>
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_url[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url[$languages[$i]['id']]) : tep_get_products_url($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>


.. and replace with this...

<tr>
<td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_file_field('products_image') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>
</tr>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_URL . '<br><small>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '</small>'; ?></td>
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_url[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? $products_url[$languages[$i]['id']] : tep_get_products_url($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>





XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Post to be continued
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Edited by Jupiters, 24 January 2007 - 11:31 AM.


#3   Jupiters

Jupiters
  • Members
  • 55 posts
  • Real Name:Fredlora

Posted 24 January 2007 - 11:28 AM

Screenshot for the german version:

Edited by wheeloftime, 24 January 2007 - 12:23 PM.


#4   Jupiters

Jupiters
  • Members
  • 55 posts
  • Real Name:Fredlora

Posted 24 January 2007 - 11:32 AM

XXXXXXXXXXXXXXXXXXXXXXXX
CONTINUED INSTALL INSTRUCTIONS
XXXXXXXXXXXXXXXXXXX


find.....(aprox. line no.665)


$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
$product = tep_db_fetch_array($product_query);


.. and replace with this...

/*# auction.lister ################################################
# select special - because there is also an acution_description #
#################################################################*/
$product_query = tep_db_query("select pd.products_name, pd.products_description, ep.auction_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, ebay_products ep where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id AND p.products_id = ep.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product = tep_db_fetch_array($product_query);




find.....(aprox. line no.690)

<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name; ?></td>
<td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price); ?></td>



.. and replace with this...

<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name; ?></td>
<td class="pageHeading" align="right">
<?php  
/*# auction.lister ##########################
# show price incl. tax in product preview #
###########################################*/  
echo $currencies->display_price($pInfo->products_price, tep_get_tax_rate($pInfo->products_tax_class_id)); ?>
<?php /*echo $currencies->format($pInfo->products_price);*/ ?></td>



find.....(aprox. line no.741)

<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<?php
}


.. and add this after...

/*# auction.lister ########################
# show ebay description product preview #
# START- #
#########################################*/  

?>
<tr>
<td><hr></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . 'ebay.gif') .'&nbsp;'. $pInfo->products_name; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo $pInfo->auction_description; ?></td>
</tr>

<?php
/*# auction.lister #
# -END #
##################*/


1. ADMIN STEP = 2. catalog\admin\index.php

find.....(aprox. line no.57)

array('title' => BOX_HEADING_TOOLS,
'image' => 'tools.gif',
'href' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools'),
'children' => array(array('title' => TOOLS_BACKUP, 'link' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools')),
array('title' => TOOLS_BANNERS, 'link' => tep_href_link(FILENAME_BANNER_MANAGER, 'selected_box=tools')),
array('title' => TOOLS_FILES, 'link' => tep_href_link(FILENAME_FILE_MANAGER, 'selected_box=tools')))));


.. and replace with this...


array('title' => BOX_HEADING_TOOLS,
'image' => 'tools.gif',
'href' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools'),
'children' => array(array('title' => TOOLS_BACKUP, 'link' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools')),
array('title' => TOOLS_BANNERS, 'link' => tep_href_link(FILENAME_BANNER_MANAGER, 'selected_box=tools')),
array('title' => TOOLS_FILES, 'link' => tep_href_link(FILENAME_FILE_MANAGER, 'selected_box=tools')))),
/*# auction.lister ####################
# insert auction box to admin_index #
# START- #
#####################################*/
array('title' => 'Auktionen',
'image' => 'auction.gif',
'href' => tep_href_link(FILENAME_AUCTIONS_LIST_SOLD, 'selected_box=auctions'),
'children' => array(array('title' => BOX_AUCTIONS_NEW, 'link' => tep_href_link(FILENAME_AUCTIONS_NEW, 'selected_box=auctions')),
array('title' => BOX_AUCTIONS_LIST_RUNNING, 'link' => tep_href_link(FILENAME_AUCTIONS_LIST_RUNNING, 'selected_box=auctions')),
array('title' => 'Beendete Auktionen', 'link' => tep_href_link(FILENAME_AUCTIONS_LIST_SOLD, 'selected_box=auctions')))));
/*# auction.lister #
# -END #
##################*/


1. ADMIN STEP = 3. catalog\admin\includes\application_top.php

find.....(aprox. line no.45)

// include the list of project filenames
require(DIR_WS_INCLUDES . 'filenames.php');

.. and add this after...

/*# auction.lister ############
# insert password functions #
# START- #
#############################*/  
// include the password crypto functions
require(DIR_WS_FUNCTIONS . 'password_funcs.php');  


1. ADMIN STEP = 4. catalog\admin\includes\column_left.php

At the end oft the file just before the ?> add:

/*# auction.lister #############
# insert auction box in menu #
##############################*/  
require(DIR_WS_BOXES . 'auctions.php');

1. ADMIN STEP = 5. catalog\admin\includes\filenames.php

find.....(aprox. line no.14)

Released under the GNU General Public License
*/
// define the filenames used in the project



.. and add this after...


/*# auction.lister ###############
# insert filenames for auction #
# START- #
################################*/
define('FILENAME_AUCTIONS_LIST_BASKET', 'auctions_list_sold_basket.php');  
define('FILENAME_AUCTIONS_LIST_NOT_SOLD', 'auctions_list_sold_not.php');  
define('FILENAME_AUCTIONS_LIST_ORDER', 'auctions_list_sold_order.php');  
define('FILENAME_AUCTIONS_LIST_PLAN', 'auctions_list_plan.php');  
define('FILENAME_AUCTIONS_LIST_RUNNING', 'auctions_list.php');  
define('FILENAME_AUCTIONS_LIST_SOLD', 'auctions_list_sold.php');
define('FILENAME_AUCTIONS_NEW', 'auctions.php');
define('FILENAME_AUCTIONS_PREDEFINED', 'auctions_predefined.php');
/*# auction.lister #
# -END #
##################*/  


1. ADMIN STEP = 6. catalog\admin\includes\stylesheet.css


find.....(aprox. line no.37)

a.splitPageLink:link { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #0000FF; font-weight: normal; text-decoration: none; }
a.splitPageLink:visited { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #0000FF; font-weight: normal; text-decoration: none; }
a.splitPageLink:active { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #0000FF; font-weight: normal; text-decoration: none; }
a.splitPageLink:hover { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #0000FF; font-weight: normal; text-decoration: underline; background-color: #FFFF33; }



.. and add this after...


a.dataTableHeadingContentLink:link { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; text-decoration: none; }
a.dataTableHeadingContentLink:visited { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; text-decoration: none; }
a.dataTableHeadingContentLink:active { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; text-decoration: none; }
a.dataTableHeadingContentLink:hover { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; text-decoration: underline; }


find.....(aprox. line no.55)

/* data table */
.dataTableHeadingRow { background-color: #C9C9C9; }
.dataTableHeadingContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; }
.dataTableRow { background-color: #F0F1F1; }
.dataTableRowSelected { background-color: #DEE4E8; }
.dataTableRowOver { background-color: #FFFFFF; cursor: pointer; cursor: hand; }
.dataTableContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }

.. and replace with this...

/* data table */
.dataTableHeadingRow { background-color: #C9C9C9; }
.dataTableHeadingContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; }
.dataTableRow { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #F0F1F1; }
.dataTableRow_2 { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #E6E7E7; }
.dataTableRowSelected { background-color: #DEE4E8; }
.dataTableRowOver { background-color: #FFFFFF; cursor: pointer; cursor: hand; }
.dataTableContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }


XXXXXXXXXXXXXXXXXXXXXX

FINISHED

#5   lostndazed

lostndazed
  • Members
  • 214 posts
  • Real Name:Justme

Posted 25 January 2007 - 03:02 AM

My German is pretty poor, for which I apologize.

But it appears that this contribution can automatically list products from osCommerce to ebay? Is this correct?

#6   Jupiters

Jupiters
  • Members
  • 55 posts
  • Real Name:Fredlora

Posted 25 January 2007 - 12:28 PM

dont have to apologize for that. ;)

yes you are right. it lists your auctions automatically, and if someone buys your product he gets an email with the confirmation. inside that mail is a link to confirm the order and the buyer is automatically routed to your store, where he can checkout...actually its an open source project which does the same like a commercial like this one (i hope i dont miss the forum rules if i post this link here):

<yep>


View Postlostndazed, on Jan 25 2007, 04:02 AM, said:

My German is pretty poor, for which I apologize.

But it appears that this contribution can automatically list products from osCommerce to ebay? Is this correct?

Edited by wheeloftime, 25 January 2007 - 02:13 PM.


#7   The Floor

The Floor
  • Members
  • 38 posts
  • Real Name:The Floor

Posted 25 January 2007 - 08:42 PM

Cool will test is next week :thumbsup:

#8   mark27uk3

mark27uk3
  • Members
  • 1,547 posts
  • Real Name:Mark
  • Gender:Male
  • Location:24-7 Mobile Accessories

Posted 25 January 2007 - 09:53 PM

Hi,

Have you installed it fully and gave it a trial run? What are your opinions of it with regards to functionality???

I have not had chance yet to sit and install it, maybe will have some time over the weekend.

If it works then I will dump the other commercial addon that I am using (not posting in case wheeloftime is watching hehe)

Have the language files been translated yet or does that still require some work?

Mark

<hehe  :lol: >

Edited by wheeloftime, 26 January 2007 - 07:51 AM.

Lifes a bitch, then you marry one, then you die!

#9   Jupiters

Jupiters
  • Members
  • 55 posts
  • Real Name:Fredlora

Posted 25 January 2007 - 11:29 PM

i installed it on a blank osc version and it seemed to work quite nice. i havent listed items on ebay, cause i dont have an account there yet.

i think translation is no problem...can be done quite fast. as far as i have read on the german osc forum there are problems with the contribution. so for a productive system its perhaps not made in this stage. perhaps the community likes it and improves it.

to have an impression get the pdfs...iveposted the link and there are a lot of screenshots...

View Postmark27uk3, on Jan 25 2007, 10:53 PM, said:

Hi,



Have you installed it fully and gave it a trial run? What are your opinions of it with regards to functionality???

I have not had chance yet to sit and install it, maybe will have some time over the weekend.

If it works then I will dump the other commercial addon that I am using (not posting in case wheeloftime is watching hehe)

Have the language files been translated yet or does that still require some work?

Mark


#10   maxrisc

maxrisc
  • Validating
  • 55 posts
  • Real Name:D
  • Location:Houston

Posted 08 March 2007 - 11:43 PM

View PostJupiters, on Jan 25 2007, 07:29 PM, said:

i installed it on a blank osc version and it seemed to work quite nice. i havent listed items on ebay, cause i dont have an account there yet.

i think translation is no problem...can be done quite fast. as far as i have read on the german osc forum there are problems with the contribution. so for a productive system its perhaps not made in this stage. perhaps the community likes it and improves it.

to have an impression get the pdfs...iveposted the link and there are a lot of screenshots...


Ok so I copied all the files over and made the database changes by hand.  But I don't see how to use this option.  I would like to get this working on eBay.com as all my business is done there.

Any ideas as to how I would go about listing a product on eBay with this contribution?

I am willing to translate it and debug it if I can get it somewhat working.

Thanks
====================
         Auction Lister Pro
      eBay for osCommerce
====================

#11   maxrisc

maxrisc
  • Validating
  • 55 posts
  • Real Name:D
  • Location:Houston

Posted 08 March 2007 - 11:51 PM

View Postmaxrisc, on Mar 8 2007, 07:43 PM, said:

Ok so I copied all the files over and made the database changes by hand.  But I don't see how to use this option.  I would like to get this working on eBay.com as all my business is done there.

Any ideas as to how I would go about listing a product on eBay with this contribution?

I am willing to translate it and debug it if I can get it somewhat working.

Thanks


Seems to be a bug in admin/includes/column_left.php

I am using CRE Loaded so I will post the fix once I have it up and running.

It's been a couple of years since I hacked osCommerce. :)
====================
         Auction Lister Pro
      eBay for osCommerce
====================

#12   maxrisc

maxrisc
  • Validating
  • 55 posts
  • Real Name:D
  • Location:Houston

Posted 10 March 2007 - 06:34 PM

View Postmaxrisc, on Mar 8 2007, 07:51 PM, said:

Seems to be a bug in admin/includes/column_left.php

I am using CRE Loaded so I will post the fix once I have it up and running.

It's been a couple of years since I hacked osCommerce. :)

So basically there are a lot of inconsistencies with using this on CRE Loaded that will need to be sorted out in time.  So what I have done is set up a testdev environment and I am rewriting the code to make it work with osCommerce MS2.2 (english) out of the box so to speak.  Once that is complete I will convert it to use on CRE Loaded 6.2.  That shouldn't be a big deal once it is working.

My progress so far...

I have already translated a few pages and established a connection with eBay sandbox US (push/pull).  That part is working ok.  Now it is a matter of "fixing" the scripts to work with standard OSC using its variables and locales, translating them to proper English since literal German doesn't read right :-), and fixing the bugs in the scripts as I locate them.

All in all it should take a couple of days to sort this out and get it working for the most part.  I see this as a valuable alternative to Auction Blox for folks using a stock osCommerce Shopping Cart.  It's a feature I really need for a cart I am working on with a tight budget.

I would like to ultimately have this as a drop in script for osc ms2.2 so it doesn't require anything other than an upload of some files and a SQL change.

You can check my profile for a link to my website where I will be posting developer notes since I am not in with the group as much as I used to be.
====================
         Auction Lister Pro
      eBay for osCommerce
====================

#13   maxrisc

maxrisc
  • Validating
  • 55 posts
  • Real Name:D
  • Location:Houston

Posted 16 March 2007 - 06:50 AM

View PostJupiters, on Jan 23 2007, 08:19 PM, said:

Hi,

i just wanted to inform the community that there are 2 nice contributions for using Ebay with the help of OSC. With these contributions you can offer your product catalog with a few clicks on ebay and even on ebay express. the hole checkout process is than routed through OSC.

so theres a possibility to gain a lot of new customers...

the contri was develepod as as student project and is listed now here:
http://www.oscommerce.com/community/contributions,4824

a lot of screenshots you can find here (inside the pdfs)
http://www.lener.info/auctionlister.htm

perhaps somebody can need it. as far as i have read, it works but needs some adjustment here and there...

I am working on the US version of this script.  I like what was done and I am fixing all the problems with using it in the US.  If anyone else would like this contribution please message me and I will give you more information.

I did email Andreas with regard to using this but I have not heard back from her.  I would be more than happy to throw some contributions her way for getting the ball rolling.
====================
         Auction Lister Pro
      eBay for osCommerce
====================

#14   zeeshop

zeeshop
  • Members
  • 190 posts
  • Real Name:zia

Posted 25 March 2007 - 05:20 PM

View Postmaxrisc, on Mar 16 2007, 07:50 AM, said:

I am working on the US version of this script.  I like what was done and I am fixing all the problems with using it in the US.  If anyone else would like this contribution please message me and I will give you more information.

I did email Andreas with regard to using this but I have not heard back from her.  I would be more than happy to throw some contributions her way for getting the ball rolling.

Hi,

Hi succesfully setup oscommerce wensite, and Nearly added 200 products.

I like to open Ebay shop as well, Which may become a way to advertise my oscommerce website.

Please if some one advise me, about any possibilities which make me enable to link ebay shop with oscommerce website.

Means I donot need to add each item in ebay shop again, I saw many ebay shops and they have other ecommerce website and both have nearly same layout and format..

Any contribution , please advise me any possibility so I dont have to add each item in both website again.

I am also waiting for my other importand question whicj is not related to topic here but may be someone popint me on right direction... I asked earlier on : http://forums.oscommerce.com/index.php?showtopic=256077

Thanks and regards

zee

#15   zeeshop

zeeshop
  • Members
  • 190 posts
  • Real Name:zia

Posted 25 March 2007 - 09:04 PM

I copied all auction lister files in appropriate places, but still not able to get sand box keys, and token files from Ebay.
Please help

thanks and regards..

zee

#16   zeeshop

zeeshop
  • Members
  • 190 posts
  • Real Name:zia

Posted 26 March 2007 - 04:06 PM

View Postzeeshop, on Mar 25 2007, 10:04 PM, said:

I copied all auction lister files in appropriate places, but still not able to get sand box keys, and token files from Ebay.
Please help

thanks and regards..

zee

Even I able to get developer account sand box and token key file, but giving error at end.

please if some one made it work can post whole help .
regards
zee

#17   maxrisc

maxrisc
  • Validating
  • 55 posts
  • Real Name:D
  • Location:Houston

Posted 21 June 2007 - 08:14 PM

View Postzeeshop, on Mar 26 2007, 11:06 AM, said:

Even I able to get developer account sand box and token key file, but giving error at end.

please if some one made it work can post whole help .
regards
zee

I created a site for this which handles the US version of eBay.com.  You can get to the site at auctionlisterpro.com

I created a central forum for support.   It's fully osCommerce MS2.2 compatible and is available for free.  Don't forget to thank Ms. Lener for writing it.

- David
====================
         Auction Lister Pro
      eBay for osCommerce
====================

#18   di11on

di11on
  • Members
  • 58 posts
  • Real Name:Jody
  • Location:Dublin, Ireland

Posted 25 July 2007 - 02:04 AM

I've installed this and apart from a few missing Defines, everything seems to be ok...except I'm getting the following error in my edit product and new product pages:

Warning: reset() [function.reset]: Passed variable is not an array or object in C:\Server\Apache2\htdocs\wtoys\admin\includes\classes\object_info.php on line 17

Warning: Variable passed to each() is not an array or object in C:\Server\Apache2\htdocs\wtoys\admin\includes\classes\object_info.php on line 18

I can't see any of the information for my products - all the fields are empty. Looking at the database, I know the information is there.

To verify it wasn't an error on my part making the chages to categories.php, I used the categories.php that came with the installation package. This gives the same error.

I've successfully uploaded a new listing to the ebay sandbox and dowloaded the ebay categories etc. so I know that functionality is working... just seems to be some error in categories.php.

Can someone please help?

Many thanks,

Jody

#19   di11on

di11on
  • Members
  • 58 posts
  • Real Name:Jody
  • Location:Dublin, Ireland

Posted 25 July 2007 - 06:41 PM

View Postdi11on, on Jul 25 2007, 03:04 AM, said:

I've installed this and apart from a few missing Defines, everything seems to be ok...except I'm getting the following error in my edit product and new product pages:

Warning: reset() [function.reset]: Passed variable is not an array or object in C:\Server\Apache2\htdocs\wtoys\admin\includes\classes\object_info.php on line 17

Warning: Variable passed to each() is not an array or object in C:\Server\Apache2\htdocs\wtoys\admin\includes\classes\object_info.php on line 18

I can't see any of the information for my products - all the fields are empty. Looking at the database, I know the information is there.

To verify it wasn't an error on my part making the chages to categories.php, I used the categories.php that came with the installation package. This gives the same error.

I've successfully uploaded a new listing to the ebay sandbox and dowloaded the ebay categories etc. so I know that functionality is working... just seems to be some error in categories.php.

Can someone please help?

Many thanks,

Jody

Never mind - this problem is caused by the ebay_products table being empty. I just populated it with the products_description from the products_description table. Currently sorting out a problem with shopping_cart.php which seems to be a typo of mine!

#20   di11on

di11on
  • Members
  • 58 posts
  • Real Name:Jody
  • Location:Dublin, Ireland

Posted 27 July 2007 - 12:13 AM

The table: ebay_auctiontype is empty. Its used to populate the contents of the auction type dropdown in the new listing screen. What should this table contain?