Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ebay auction manager for OSCOMMERCE


quicklyshop

Recommended Posts

Quicklyshop,

Could you write an E-Bay mod. You seem more knowledgeable than we are about it. I am willing to help with the "grunt" work part-

 

The problem is the time. I have anline shop quicklyshop.com also i am trying to manage a a hosting site quicklyweb.co.uk. Also i work part time for an IT company. I only get 4-5 hours sleep daily. Otherwise i wouldn't mind to work on this project.

I can't type a trick like i can type.

Link to comment
Share on other sites

  • Replies 636
  • Created
  • Last Reply

Top Posters In This Topic

Hello,

So I decided to design OSC as an ebay auction manager, but I may need some help. Fist I want to be able to Parse html from my selling page in my ebay. I think all the info I need is there summed up on one page. Second I am thinking of setting up some kind of php code that checks the html parse once a day and then a timer that checks it again once the auction closes. This could be used to determine the closing price and the winning bidder. Then an automatic email would be sent to the winnig bidder with a link to the product and check out. Walla! Probibly a little more complicated than that but that is the basic idea. Another Idea is when setting up an auction one could just use a java script to point to the product on the website. This way there would be no need to list twice (once on ebay and one on the website). Anyone got any thoughts or suggestions on this idea?

Link to comment
Share on other sites

I've been 'tossing around' the idea of integrating eBay's Seller Assistant Pro (which we already use) & the ODBC method of linking OSC's tables to SAP's Access tables ... It all looks pretty feasible

SAP is approx. US$15 per month to use and you get all the calls to the eBay API you need!

 

Anyone else been down this path?

Link to comment
Share on other sites

Hi,

 

Sounds like a cool idea.

 

We integrated our own eBay like auction into our site using PHPAuction Pro Plus ( www.phpauction.org ).

 

The php application is very easy to customize and includes options to make money from sales using PayPal IPN as the payment system.

 

Check out our version @ http://www.dappamobiles.com/auction/index.php

 

Thanks,

 

Taz :D

Link to comment
Share on other sites

Greetings, All!

 

I've been working on my first contribution. It is designed so far to do just a few basic things that have been discussed.

 

So far, it can:

 

1) Display a "create auction" button when you go through the Catalog listings in Admin. This button takes you to....

 

2) Create an auction listing template (specifically designed for eBay). It automatically moves the product's title and description into the Auction Template's Title and Description fields. Once you identify your various auction related options (prices, payment policies, etc.), you submit it... which....

 

3) Adds the Auction Template to a table in the database... and reloads you to a sort of "Auction Templates Queue" page... which lists all the templates you've created so far. From here you may edit or delete listings. This form-page also....

 

4) Allows you to check-mark one or more Auction Templates... flagging them for export. You then hit the export button and (currently).....

 

5) The Auction Templates are transformed into a csv file, which you may then save to your PC and import into Turbo Lister. Note that at this point, the item quantities are deducted from the product tables as well.

 

 

I'd like to basically ask for a couple of mentor-testers. I need assistance from a few people to provide me feedback on current functionality, new functionality, and code-structure (how I can make this fit better into OSC's guidelines for contributions... I've been following one of their docs on this, but I'd definitely like more input before I submit this as a real contribution).

 

I should say up-front that my time is somewhat limited, so I'll have to ask for people's patience in developing this.

 

I know there are a few improvements I either know I need to make or would consider creating:

 

1) Right now, when you do an export, the page reloads AS a csv file. There's no HTML output other than a reloading of the Auction Templates Queue page when the export is complete. I probably need to actually write the csv file to disk and present HTML output, in case I need to display error messages.

 

2) I'm curious about this "checkout link" that suppossedly people are creating in their auctions that refers them back to their OSC store for checkout, upon auction completion. I would think I could have my code automatically create such a link within the Auction's Description or Payment Instructions fields.?? But then, from what I've read, I would have to somehow, upon auction-export, "move" the product / product quantities over into some sort of separate hidden product category, where they'd await such check-out. But then I wonder how one handles getting the buyer's info (name, address,etc.) when they DO arrive at the store to check out? These are the kinds of issues I'd like to discuss with just a few people.

 

So, if you're interested in providing a bit of mentoring-and-testing on this, please PM me and I will get back to you with a .zip of the code and my email address.

 

Please note that I may have to limit this to three or four people, just to keep from being overwhelmed. I work full-time, plus run a small hosting company on-the-side, plus my wife and I are selling our house and attempting to look for a new one. So, I'm very busy these days.

 

Thank you !

 

-= Dave =-

Link to comment
Share on other sites

Hello all,

In all my time reserching this idea I have found and exellent source for parsing data from ebay. It is from Aeon Interactive. I pulls the data from your "About" page on ebay. The script can be found at:

 

http://www.aeoninteractive.net/scripts.php

 

You can view my modified example intergrated into OSC at:

 

http://smittys.pointclark.net/auctions/cur...nt_auctions.php

 

I still need two more peices of data to make this complete. First "Time Left" and then some script to convert the winning bidder user id to an e-mail address. Any suggestions? I still have a long way to go but I am going to get there eventually.

Link to comment
Share on other sites

Very cool mod, smitty1 - Maybe you could post a link to your already osCommerce intigrated version so that I (and anyone else) could take a look and perhaps help with the functionality?

-D. M. 8)

Link to comment
Share on other sites

Sure not a problem, The more the merrier. First what I did is set up another generic page an then added the code in the body text. It looks like this:

 

<?php

/*

$Id: shipping.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

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

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CURRENT_AUCTIONS));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><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 tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main">

<?php

 

// Define our variables

//

 

// Your Ebay Member Name

$ebayid = "ebay_user";

 

// Table Border Color

$table_border_color = "#FFFFFF";

 

// Table Header Row Color

$table_header_color = "#E2E0E0";

 

// Table Alt Color Row 1

$table_row1_color = "#FFFFFF";

 

// Table Alt Color Row 2

$table_row2_color = "#F4F4F4";

 

 

 

//-----------------------------------------------------------------

// Nothing Below Here needs editing.

//

 

// Start our border table

echo "

<TABLE border="0" cellPadding="0" cellSpacing="0" width="100%">

<TR><TD bgcolor="$table_border_color">

<table cellpadding="2" cellspacing="1" width="100%">

<tr bgcolor="$table_header_color" valign="middle">

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">Item #</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">Current Price</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">Start Date</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">(PST)<BR>End Date</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">Time Left</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">High Bidder</font></b></u></td>

</tr>

 

";

 

// Build the ebay url

$URL = "http://members.ebay.com/aboutme/$ebayid";

 

 

// Where to Start grabbing and where to End grabbing

$Start = " <!-- Items for sale --> ";

$End = " <!-- Feedback graphic -->";

 

// Open the file

$file = fopen("$URL", "r");

// Read the file

$r = fread($file, 80000);

// Grab just the contents we want

$stuff = eregi("$Start(.*)$End", $r, $content);

 

// Get rid of some rubbish we don't need.

$content[1] = str_replace("<br><br>", "", $content[1]);

$content[1] = str_replace("<table border=0 width=100%><tr><td bgcolor=#99CC00>", "", $content[1]);

 

// Close the file

fclose($file);

 

$stuff = $content[1];

 

// Get rid of eBay's formatting and place artifacts to build our array

$stuff = str_replace("</td>", "[bREAK]</td>", $stuff);

$stuff = str_replace("<TABLE border="1">", "", $stuff);

$stuff = str_replace("<TR>", "", $stuff);

$stuff = str_replace("<th BGCOLOR="#CCCCCC" align=center>", "", $stuff);

$stuff = str_replace("</th>", "", $stuff);

$stuff = str_replace("</tr></table>", "", $stuff);

$stuff = str_replace("</TR>", "[sPLIT]", $stuff);

$stuff = str_replace("<td>", "", $stuff);

$stuff = str_replace("<td align=right>", "", $stuff);

$stuff = str_replace("</td>", "", $stuff);

$stuff = str_replace("</TABLE>", "", $stuff);

$stuff = str_replace("ItemStartEndPriceTitleHigh Bidder", "", $stuff);

 

 

 

// Build our first array for EOF

$items = explode("[sPLIT]",$stuff);

 

// Loop through our lines

foreach ($items as $listing) {

 

// Break apart each line into individual items

list($Item,$Start,$End,$Price,$Title,$HighBidder ) = explode("[bREAK]",$listing);

 

// Do a little fudging to get our item number

$ItemNumTxt = str_replace("<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=", "", $Item);

 

$ItemNumTxt = str_replace("">", "[iTEMBREAK]", $ItemNumTxt);

 

// Break out the Item number

list($ItemNum,$Junk ) = explode("[iTEMBREAK]",$ItemNumTxt);

 

// Make sure we have content to print out and print it

if ($Start && $End && $Title) {

 

$colour = ( $colour == "$table_row1_color" ) ? "$table_row2_color" : "$table_row1_color";

 

// Display the results

{

 

echo "<tr bgcolor="$colour">

<td align="left" colspan="6">

<font face="Arial, sans-serif" size="2">

<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=$ItemNum&category=undefined" target="_blank">$Title</a></font></TD>

</tr>

<tr bgcolor="$colour">

<td align="center" nowrap="true">

<font face="Arial, sans-serif" size="2">$Item</font>

</td>

<td align="center" nowrap="true">

<font face="Arial, sans-serif" size="2" color="#339933"><b>$Price</b></font>

</td>

<td align="center" nowrap="true">

<font face="Arial, sans-serif" size="2">$Start</font>

</td>

<td align="center" nowrap="true">

<font face="Arial, sans-serif" size="2">$End</font>

</td>

<td align="center" nowrap="true">

<font face="Arial, sans-serif" size="2" color="#FF0000">end time</font></td>

<td align="center" nowrap="true">

<font face="Arial, sans-serif" size="2">$HighBidder</font></td></tr>n";

 

 

}

 

}

 

}

 

// Wrap up the border table

echo "</TABLE></td></tr> </table>";

 

?>

</td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

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

<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

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

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<!-- body_text_eof //-->

 

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

What do you think? Would it be possible to parse the "Time Left" and then write some script to convert the winning bidder user id to an e-mail address?

Link to comment
Share on other sites

One problem I can think of for finding out the email address is that you have to be logged into ebay to get that email address.

 

The time left though, could be done one of two ways - first way would be to get the time from your own server and then program some math to subtract one from the other to determine the time left, except if your server's time is a minute or two off from ebay's time, that might not be so good.

 

The other way would be perhaps to get the script to open the item number's page and snag the stuff after 'time left' in the same way it snags all the info from the 'about me' page. That might be a little tricker than just grabbing the text off of the 'about me' page due to all the potential different states of the item page.

 

Hmm, just a few of my first thoughts - I'll keep thinking about this. Thanks for posting the code.

-D. M. 8)

Link to comment
Share on other sites

We could configure this to work with the mod DM did for the hidden products mod that will allow e-bay buyers to checkout. This is almost ready for upload. I am testing it on MS2.2 on Firday then will upload - DM was inspired on this one!

How about a way to create accounts for winning bidders that will allow for the url to be sent that will be basically a link that uses the auction id as product id, then winner enter auction ID and winner e-mail and can then add item to cart.

E-Bay allows free use of API as long as not use multi-development by many people (same id that is) so maybe after item is listed the store could append a link to the auction page that would have the link to the product.

After auction the winning bidder gets an auto e-mail that supplies password. When people click on the link in the auction, the item is added to the cart and they are take to checkout - where they can create account or buy without account or login if already winner.

Or - with this the gift registry or wishlist could be used. THe item is added to a list with their e-mail. At the end of the auction they go to the registry which we can call acutions and input their e-bay id - and from there can see all wins and add to cart.

otherwise, there will need to be a way to create a manual order since hidden products currently requires login. Or maybe if we can set it so winners do not have to be logged in to see item.

Hmm - how about a way to give a category a restriced status - all hidden products go in that category - then winning bidder e-mail will have the link and anything in that category can only be accessed by direct link - not in searches etc. This way no need for manual order entry and no need for shop owner to do anything besides have the store generate the winning e-mail. Then, anything in those categories could get their own shipping rates - we all know some sellers have higher shipping for auctions -

 

Or am I making it too complicated?

Link to comment
Share on other sites

Hello,

Update - I found a script that acually grabs the text from the actuall ebay item page. Now I need to figure out how to have php just get the info I need and diplay it or even better store it in the osc database and the display it from there. Does anyone know any great how to's on parsing info with php? That would be key. Anyone who would be willing to help me with this project, jump right in.

 

bluephoenix, did you know there is a contribution for osc to check out without an account. That is what I was going to use for the auctions. Also where could I get this free ebay API?

Link to comment
Share on other sites

http://developer.ebay.com/

 

and more specifically

 

http://developer.ebay.com/overview/application.html

 

Not going to happen with those prices.  :shock:  

 

Ebay thinks way too much of themselves IMHO.  :roll:

 

You got that right. They don't seem to recognize that, with the growth they have had, the little guy who was a big guy on Ebay, is now a little guy again, since all the big retail businesses got involved. :wink:

 

However, an integrated listing tool could only make osCommerce better (if that is possible). And, if you got a bur up your a** about Ebay (like me), Yahoo Auctions might be a viable alternative. I'm sure any integrated listing tool would want to handle both. :idea:

Link to comment
Share on other sites

I made a shopping cart about a year ago that would successfully export listings to either Mister Lister ... or ... to an Excel spreadsheet formatted for Yahoo Auctions' Bulk Upload... and then it would load the proper Yahoo page (logged in as you) for Bulk Uploading, just to make it a bit easier on you.

 

I'll look into adding that into the contribution I'm working on. It'll be a bit tricky, because Yahoo's fields are a bit different, so storing the auction data for later tracking... for both Ebay and Yahoo... might take a bit of ingenuity. We'll see.

 

I've done some parsing of Ebay's search results pages. Used it to create the tools I have over on my auctionmole.com site, where I have some free demos, if anybody cares to take a look.

 

Thanks!

 

-= Dave =-

Link to comment
Share on other sites

bluephoenix, did you know there is a contribution for osc to check out without an account. That is what I was going to use for the auctions. Also where could I get this free ebay API?

 

The API is at http://developer.ebay.com/DevProgram/membe...ip/services.asp

The individual is free but has a 50API call per day limit (not including additem and relisting)

 

I have seen the mod to checkout without an account - the thing is that a lot of merchants prefer to keep theri auctions hidden from their regular customers. They do not mind if the winning bidders do some upbuying but they do not (wisely) want to lose regular customers to auction. As a result the winning items need to be in a hidden or private category - the checkout without account currently will not function with the hidden product as the item gets assigned a approval code that the customer is also assigned.

All other options I can think of require some pre-registration. Will have to give it more thought.

Link to comment
Share on other sites

Greetings All!

 

I'm curious.

 

There's been some discussion in this thread in the past about how some people are posting their Ebay auctions with a "check-out link".... a link that will, when the auction-winner clicks on it, take the winner to the seller's OSC store to check-out.

 

I'm wondering:

 

Does this link ONLY appear to the winner once the auction's over or is it just a link displayed in the item's description?

 

If it appears to everyone, can't any old person follow the link and purchase that item?

 

What do you do with regards to the final selling price of the item? If the customer clicks that link and goes to your store to check-out, how does the store "know" how much the item sold for ?

 

 

Thanks!

Link to comment
Share on other sites

Well,

The link would have to work with the api like the paypal link - it will have to check the auction status so that if auction is not completed then the buyer cannot checkout. The item price should also come from the same place - after the auction is done - that info can be retrieved and become part of the url.

Link to comment
Share on other sites

Greetings All!

 

I'm almost done creating a mod that allows you to quickly take a product and convert it to an Ebay Auction Listing Template. It then adds each such template to a holding queue / table. You can then check-mark which listings you want to export... and then choose to export them as either an Ebay-Turbo-Lister-ready or Yahoo-Bulk-Loader-ready .csv file.

 

But I have a minor issue here to clear up.

 

Ebay's doc on how their csv file should be set up shows that the csv file has two fields that I'm not quite sure what to do with:

 

"Buyer pays fixed"

and

"Title bar image"

 

Now, when you think "Buyer pays fixed", obviously "shipping costs" comes to mind. However, Turbo Lister already appears to have other fields that take this into account:

 

Buyer pays shipping

Seller pays shipping

Shipping and handling

Additional Shipping

 

 

It would seem to me that the Turbo Lister software would detect that a particular listing had some dollar value inserted into Shipping and Handling field.... and would detect that "buyer_pays_shipping=1" and would therefore "know" that the buyer pays fixed shipping??

 

I've created several sample auctions in Turbo Lister... plus I've imported ones from my Mod.... and I can't figure out where there's any control in Turbo Lister that actually allows you to manually set this. It still looks like Turbo Lister more or less "knows" whether or not the shipping total is a fixed rate.

 

 

As far as the Title Bar Image goes, I'm clueless. I even manually posted a couple of auctions this week on Ebay and I never saw any reference to this.

 

So, for now, I've created two fields in my form to create auction listing templates.... and I've got the appropriate database fields for them... and they export to the .csv file properly. But I really don't know if I even need to have the user select these. And I don't know what little "help explanations" I can put on the form to help instruct a newbie as to exactly what these do.

 

Any thoughts anybody ??

Link to comment
Share on other sites

Hello all,

I need some help, someone that's good at arrays. I am working on a script that pulls all of the text off of the ebay item page and converts it to text. Ok here is the problem, I only want to pull certian lines of text and I need an array (or possibly a function?) to do it. The answer is probibly right in front of me but I have been stairing at this so long I need some outside help. OK, here is the script:

 

<?php

/*

//Public functions



VOID  Init($AuctionID)  //Initialize the class, fetches all auction information

STRING	GetItemText() 	 //Text of the auction (HTML Stripped out)



//Private Functions

Convert()

CreateTextArray()

ConvertHTMLToText()

mTrim()



*/	

class eBayAPI

{



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Private Variables



var $ItemNumber;

var $ItemHTML;

var $ItemText;

var $ItemArray;

var $eBayURL = "http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=";



///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Public Functions



//Function Name: Init

//Description: Initialize the class, fetch the auction information and 

// convert the html to text

//Arguments: ItemNumber - the item number for the auction

//Return: None

function Init($ItemNumber)

{

 $this->ItemNumber = $ItemNumber;

 $this->ItemHTML = implode('',file($this->eBayURL.$ItemNumber));

 $this->Convert();

 $this->CreateTextArray();

}



//Function Name: GetItemText

//Description: returns the Text of the auction, this is the HTML with the tags stripped

//Arguments: None

//Return: string

function GetItemText()

{

 return $this->ItemText;

}





///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Private Functions



//Dummy function for ConvertHTMLToText	

function Convert()

{

 $this->ItemText .= $this->ConvertHTMLToText($this->ItemHTML);

}



//Create an array for the text version of the auction

function CreateTextArray()

{

 $this->ItemArray = explode("r",$this->ItemText);

}



//Convert the auction HTML to Text

function ConvertHTMLToText($document)

{

 // $document should contain an HTML document.

 // This will remove HTML tags, javascript sections

 // and white space. It will also convert some

 // common HTML entities to their text equivalent.

 

 $search = array ("'<script[^>]*?>.*?</script>'si",  // Strip out javascript

      "'<[/!]*?[^<>]*?>'si",           // Strip out html tags

      "'([rn])[s]+'",                 // Strip out white space

      "'&(quot|#34);'i",                 // Replace html entities

      "'&(amp|#38);'i",

      "'&(lt|#60);'i",

      "'&(gt|#62);'i",

      "'&(nbsp|#160);'i",

      "'&(iexcl|#161);'i",

      "'&(cent|#162);'i",

      "'&(pound|#163);'i",

      "'&(copy|#169);'i",

      "'(d+);'e");                    // evaluate as php

 

 $replace = array ("",

       "",

       "1",

       """,

       "&",

       "<",

       ">",

       " ",

       chr(161),

       chr(162),

       chr(163),

       chr(169),

       "chr(1)");

 

 return preg_replace ($search, $replace, $document);

}



//trim multiple times

function mTrim($Value)

{

 return trim(trim(trim(trim(trim($Value)))));

}

}



?>





<html>

<head>

<title>Auction API</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>



<body bgcolor="#FFFFFF" text="#000000">

Auction API

<form name="CheckAuction" method="post" action="<?$PHP_SELF ?>">

 <table width="100%" border="0" cellspacing="0" cellpadding="0">

   <tr> 

     <td width="50%"> 

       <p>Auction ID: 

         <input type="text" name="AuctionID" value="<?=$AuctionID?>">

         <br>

         <br>

         <input type="hidden" name="text" value="YES" <? if (!empty($text)) echo "Enter Item Number"; ?>>

         <input type="submit" name="Submit" value="Submit">

       </p>

     </td>

    </tr>

 </table>

 </form>

<hr><br>





<?php

$E = new eBayAPI;

$E->Init($AuctionID);

	 if (!empty($text)) echo "<pre>".$E->GetItemText()."</pre>n<hr>";





?> 



<?php

$E = new eBayAPI;

$E->Init($AuctionID);

$E->GetItemText();



$file = $E->GetItemText();

$lines = file($file);



if (!empty($text)){

  	 echo "Item Number: ".$lines[0]."<br>n";

  	 echo "Start: ".$lines[1]."<br>n";

  	 echo "Current: ".$lines[2]."<br>n";

  	 echo "Ends: ".$lines[3]."<br>n";

  	 echo "Winner: ".$lines[4]."<br>n";

array_shift($lines);

array_shift($lines);

}

?> 













</body>

</html>

 

This is what I have so far. Can anyone please help me?

Link to comment
Share on other sites

Here's a question, what about winners of multiple auctions and combined shipping for those auctions? Also I think someone may have touched on this, but we tend to upsell a lot of our auction winners by pointing out how they can maximize the shipping dollars they spend by getting more, shoot we even cap their shipping cost at a low point and pay the difference ourselves, so can you let auction winners of hidden products loose on your store to add to their cart before checking out. I know they'll see the item they bid on, perhaps ata different price than they're going to pay and we figure if it's a bit less godd for them, we have a new customer, and if its more, good for us, they found a new supplier ;) !

Thanks,

Jeremy

Link to comment
Share on other sites

Update -I finished the first step

 

Hello everyone, I sucessfully fixed my time "left problem" I inserted a countdown that well, counts down until the auction end. I will be adding this script to the contribs. This is an exellent source for parsing auction info from ebay. Once again I have to give thanks to Aeon Interactive at http://www.aeoninteractive.net/scripts.php Also once again this script pulls the data from your "About" page on ebay.

 

You can view my modified example intergrated into OSC at:

 

http://smittys.pointclark.net/auctions/cur...nt_auctions.php

 

But for you impatient ones here it is:

 

<?php



/*



 $Id: shipping.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $







 osCommerce, Open Source E-Commerce Solutions



 http://www.oscommerce.com







 Copyright (c) 2003 osCommerce







 Released under the GNU General Public License



*/







 require('includes/application_top.php');







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







 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CURRENT_AUCTIONS));



?>



<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">



<html <?php echo HTML_PARAMS; ?>>



<head>



<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">



<title><?php echo TITLE; ?></title>



<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">



<link rel="stylesheet" type="text/css" href="stylesheet.css">



</head>



<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">



<!-- header //-->



<?php require(DIR_WS_INCLUDES . 'header.php'); ?>



<!-- header_eof //-->







<!-- body //-->



<table border="0" width="100%" cellspacing="3" cellpadding="3">



 <tr>



   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">



<!-- left_navigation //-->



<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>



<!-- left_navigation_eof //-->



   </table></td>



<!-- body_text //-->



   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">



     <tr>



       <td><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 tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>



         </tr>



       </table></td>



     </tr>



     <tr>



       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>



     </tr>



     <tr>



       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">



         <tr>



           <td class="main">



<?php







// Define our variables



//







// Your Ebay Member Name 



$ebayid = "smittyscomp1";



// Ebay uses Pacific time zone use this to add hours for your time zone

$timezone = "3";







// Table Border Color



$table_border_color = "#FFFFFF";







// Table Header Row Color



$table_header_color = "#E2E0E0";







// Table Alt Color Row 1



$table_row1_color = "#FFFFFF";







// Table Alt Color Row 2



$table_row2_color = "#F4F4F4";











// -----------------------------------------------

// Many thanks to:            

// Written by: Chrispian H. Burks

// email: [email protected]                                       

// website: http://www.aeoninteractive.net                                    



// -----------------------------------------------

// Modified by Joseph Smith for the OSC Community

// -----------------------------------------------



// Nothing Below Here needs editing.



//







// Start our border table



echo "	



<TABLE border="0" cellPadding="0" cellSpacing="0" width="100%">

<TR><TD bgcolor="$table_border_color">

<table cellpadding="2" cellspacing="1" width="100%">

<tr bgcolor="$table_header_color" valign="middle">

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">Item #</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">Current Price</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">Start Date</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">(PST)<BR>End Date</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">Time Left</font></b></u></td>

<td align="center" width="20%"><u><b><font size="1" face="Verdana, Arial, sans-serif" color="#0000FF">High Bidder</font></b></u></td>

</tr>





";







// Build the ebay url	



$URL = "http://members.ebay.com/aboutme/$ebayid"; 











// Where to Start grabbing and where to End grabbing



$Start = " <!-- Items for sale --> ";



$End = " <!-- Feedback graphic -->";







// Open the file



$file = fopen("$URL", "r");



// Read the file

$r = fread($file, 80000); 



// Grab just the contents we want



$stuff = eregi("$Start(.*)$End", $r, $content);







// Get rid of some rubbish we don't need.



$content[1] = str_replace("<br><br>", "", $content[1]);



$content[1] = str_replace("<table border=0 width=100%><tr><td bgcolor=#99CC00>", "", $content[1]);





// Close the file



fclose($file);







$stuff = $content[1];







// Get rid of eBay's formatting and place artifacts to build our array



$stuff = str_replace("</td>", "[BREAK]</td>", $stuff); 	 



$stuff = str_replace("<TABLE border="1">", "", $stuff); 	 



$stuff = str_replace("<TR>", "", $stuff); 	 



$stuff = str_replace("<th BGCOLOR="#CCCCCC" align=center>", "", $stuff); 	 



$stuff = str_replace("</th>", "", $stuff); 	 



$stuff = str_replace("</tr></table>", "", $stuff); 	 



$stuff = str_replace("</TR>", "[SPLIT]", $stuff); 	 



$stuff = str_replace("<td>", "", $stuff); 	 



$stuff = str_replace("<td align=right>", "", $stuff); 	 



$stuff = str_replace("</td>", "", $stuff); 	 



$stuff = str_replace("</TABLE>", "", $stuff); 	 



$stuff = str_replace("ItemStartEndPriceTitleHigh Bidder", "", $stuff); 	 















// Build our first array for EOF



$items = explode("[SPLIT]",$stuff);







// Loop through our lines



foreach ($items as $listing) {







// Break apart each line into individual items



list($Item,$Start,$End,$Price,$Title,$HighBidder ) = explode("[BREAK]",$listing);



  	 



  	 // Do a little fudging to get our item number



  	 $ItemNumTxt = str_replace("<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=", "", $Item); 	 







$ItemNumTxt = str_replace("">", "[ITEMBREAK]", $ItemNumTxt);







// Break out the Item number



list($ItemNum,$Junk ) = explode("[ITEMBREAK]",$ItemNumTxt);



//Use a countdown to get Time Left



// $day = 31; // Day of the countdown 

// $month = 8; // Month of the countdown 

// $year = 03; // Year of the countdown 

// $hour = 4;

// $minute = 0;

// $second = 0;

//We need to break apart End and conert the months to numbers

$seperate = split('[- :]', $End);



$seperate[0] = str_replace("Jan", "1", $seperate[0]);

$seperate[0] = str_replace("Feb", "2", $seperate[0]);

$seperate[0] = str_replace("Mar", "3", $seperate[0]);

$seperate[0] = str_replace("Apr", "4", $seperate[0]);

$seperate[0] = str_replace("May", "5", $seperate[0]);

$seperate[0] = str_replace("Jun", "6", $seperate[0]);

$seperate[0] = str_replace("Jul", "7", $seperate[0]);

$seperate[0] = str_replace("Aug", "8", $seperate[0]);

$seperate[0] = str_replace("Sep", "9", $seperate[0]);

$seperate[0] = str_replace("Oct", "10", $seperate[0]);

$seperate[0] = str_replace("Nov", "11", $seperate[0]);

$seperate[0] = str_replace("Dec", "12", $seperate[0]);



  	 $month = $seperate[0];

  	 $day = $seperate[1];

  	 $year = $seperate[2];

  	 $hour = $seperate[3]+$timezone; 

  	 $minute = $seperate[4];

$second = $seperate[5];



// mktime is the marked time, and time() is the current time. 

$target = mktime($hour,$minute,$second,$month,$day,$year); 

$diff = $target - time(); 



$days = ($diff - ($diff % 86400)) / 86400; 

$diff = $diff - ($days * 86400); 

$hours = ($diff - ($diff % 3600)) / 3600; 

$diff = $diff - ($hours * 3600); 

$minutes = ($diff - ($diff % 60)) / 60; 

$diff = $diff - ($minutes * 60); 

$seconds = ($diff - ($diff % 1)) / 1; 

	 



 // Make sure we have content to print out and print it



 if ($Start && $End && $Title) {







	 $colour = ( $colour == "$table_row1_color" ) ? "$table_row2_color" : "$table_row1_color"; 







	 // Display the results

   {



  	 echo "<tr bgcolor="$colour">

     <td align="left" colspan="6">

     <font face="Arial, sans-serif" size="2">

     <a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=$ItemNum" target="_blank">$Title</a></font></td>

     </tr>

     <tr bgcolor="$colour">

     <td align="center" nowrap="true">

     <font face="Arial, sans-serif" size="2">$ItemNum</font></td>

     <td align="center" nowrap="true">

     <font face="Arial, sans-serif" size="2" color="#339933"><b>$Price</b></font>

     </td>

     <td align="center" nowrap="true">

     <font face="Arial, sans-serif" size="2">$Start</font>

     </td>

     <td align="center" nowrap="true">

     <font face="Arial, sans-serif" size="2">$End</font>

     </td>

     <td align="center" nowrap="true">

     <font face="Arial, sans-serif" size="2" color="#FF0000"><b>$days</b>d <b>$hours</b>h <b>$minutes</b>m</font></td>

    	 <td align="center" nowrap="true">

     <font face="Arial, sans-serif" size="2">$HighBidder</font></td></tr>n";







   }







 }    







}







// Wrap up the border table



echo "</TABLE></td></tr> </table>";







?>



            </td>



         </tr>



       </table></td>



     </tr>



     <tr>



       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>



     </tr>



     <tr>



       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">



         <tr class="infoBoxContents">



           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">



             <tr>



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



               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>



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



             </tr>



           </table></td>



         </tr>



       </table></td>



     </tr>



   </table></td>



<!-- body_text_eof //-->



   



 </tr>



</table>



<!-- body_eof //-->







<!-- footer //-->



<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>



<!-- footer_eof //-->



<br>



</body>



</html>



<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

  • 2 weeks later...

Greetings All!

 

Since I'm still somewhat new here, I'm hesitant to actually upload this mod I made via the official "Contribute a New Package" link.

 

So I thought I might just humbly submit it via a link within this message... and get some feedback and suggestions for improvements.

 

Auction Build-n-Export Mod http://www.auctionmole.com/auction_build_n_export.zip

==================

 

This mod does the following :

 

 

I. Take any already-created product (in the Admin catalog) and click on a "Create Auction" button to automatically copy the Name, Description, and Image of a product over into a form for creating an Auction Listing Template.

 

II. These Templates sit in a table or queue, waiting for you to edit them again if you wish or to export them, either individually... or all at once. This queue is viewable by clicking an "Auctions Queue" submenu under "Catalog" in Admin's left-hand navbar.

 

III. Auction Listing Templates may be exported into one of two formats at will:

 

a) Pre-formatted for Ebay's Turbo Lister

B) Pre-formatted for Yahoo's Bulk Loader

 

Note that when items are exported, their quantities are deducted from the "products" table in the database.

 

Please also note that the mod does very little "logic checking" when it comes to how you create your Auction Listing. It assumes (at this point) that you've built auctions at Ebay before and know pretty much what you're doing. So, you may occasionally find that Turbo Lister will load your listing, but may tell you about an error you need to correct before it will let you save it.

 

Oh, and I should mention that the templates are still in the queue after you do your exports, so they are reusable, though you can delete them at will.

 

So far, I've tested this mod and so has bluephoenix, but that's about it.

 

OK, I'm done for the night. Off to bed!!

 

Thanks!

 

-= Dave =-

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...