Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Ebay auction manager for OSCOMMERCE


Recommended Posts

Hello, I have been working on combining auctionblox's contrib with my current auctions contrib.


First step: Compair the auction number from ebay with the ones in the auction_basket table. If it is already there than update. If not than add to table. I have kind of figured this out. I know what I want to tell SQL but not sure how to go about it with OSC. This is what I have so far:

tep_db_query("select ext_id from " . TABLE_AUCTION_BASKET);
for ($i = 0; $i < $sql->rows; $i++) {
? ? ?$sql->Fetch($i);
? ? ?$itemn = $sql->data[0];

?// If The auction is found update it
?if ($itemn == $itemnum) ?{
?	echo("update\n");

?// Otherwise add the new auction listing
?else {
?	echo("add\n");

The problem is what is $sql->rows in OSC?

And what is $sql->Fetch in OSC?

And what is $sql->data[0] in OSC?



Help? ;)

Edited by smitty1
Link to comment
Share on other sites

  • Replies 636
  • Created
  • Last Reply

Top Posters In This Topic

As for the Canadian prices vs US prices, I thought about that too. Have multiple shipping. For mine I'd have an "international" flag, and if not in the US, then they get the international rate.

Link to comment
Share on other sites

Ok I got it!


$query_result_handle = mysql_query ("select ext_id from " . TABLE_AUCTION_BASKET) 
       or die ('The query failed!'); 

   // use mysql_fetch_row to retrieve the results 
   while ($row = mysql_fetch_row ($query_result_handle))  { 

  	 // If The auction is found update it
     if ($row[0] == $itemnum)  {
    	 echo("update table<br>");

  	 // Otherwise add the new auction listing
     else {
    	 echo("add to table<br>");

Next step: to input variables from ebay into auction_basket, and or update them.

Link to comment
Share on other sites


That change in file worked,, and it apears to be working like a charm now,, thanks dude



that mod sounds kewl,, to tye the two together so to speak,,

If you would,, keep me posted,, and if you need any testing on it,, let me know,,


Link to comment
Share on other sites

well,, it apears i got all but one thing working for me in this,,

well,, really two,, i am still getting the runtime error on some pc's,, but that is depending on the pc,,, so my only real universal problem,, is the email when they checkout,,, it has a link to the invoice.. when its clicked,, it wont load,, i get a page cannot be found error

Link to comment
Share on other sites

Okay, this will be the 4th time I've tried to post in this thread in the last 5 days, and we'll see if it errors out on me again... I've forgotten most of what I said in the previous ones....




As for the Canadian shipping. A flag for "International" or something of the sort would be good. Then if it's a US address it's one price, and if it's not, then it's another.



Another thing that would be nice. Checkout the auction product before the auction is over. ie, you list one item for 10 days on eBay at $9.99. A standard auction. Then in the auction have a "Don't want to wait, buy it now for $xx.xx" with a "Buy It Now" button that links to the OSC site with that item and the set shipping price.


That way you can list 1 item every 10 days, and that will save on Final Value Fees, as well as listing costs.



Well, I had some bad news. One of our dogs blew out it's ACL and has to have this insanely expensive surgery to have it fixed (anyone know a cheap place to have a TPLO surgery done on a dog?). So, I will be selling alot sooner than I expected to try to cover the costs.



Please keep up the good work and get that automation piece done, and work on getting the Buy It Now integrated! :)



I look forward to you getting your mod to work with this great contribution!

Link to comment
Share on other sites

Okay, got it installed. Looks great and works great so far.


Okay... Product Mapping....

For instance, why can't I do this:


Map 'Alias Season 2' to eBay Auction # 123456789

Price: 41.99

Shipping: 9.95

Addtl Item: 5.00

Alt Shipping: 19.95

Alt Adtl Item: 9.00

Insurance: 0 (0 = Not Offered)



*Note: Tax isn't needed, it's calculated in the checkout, or have it calculated automatically.


I click on Ended Auctions->New Product

Product: Alias Season 2 - eBay Auction # 123456789 (Drop down of Mapped Products)

Time Ended: Copy time from eBay manually

eMail address: Copy from eBay manually

eBay ID: Copy from eBay manually

Quantity: 1

Paid: True/False


Check box to send Invoice/and Checkout Instructions


Once a day, all I would need to do is go into my ended items and copy the information in and it would take care of invoicing and stuff.

If Paid = True, then it sends an invoice with a standard letter saking to complete checkout to track order.

If Paid = False, then it sends invoice and checkout instructions.


To me that seems alot easier. It allows to map items to multiple auctions, and it would allow me to use it for the Buy It Now items. Since I don't know about the automation process or anything, I don't know if that would then help handle Buy It Now items. But the above would be a HUGE time saver and allow me to utilize the Buy It Now feature on eBay now :)


By entering the auction number, it should guarentee that it finds the correct auction.


Also, in the Ended Items, instead of a drop down, just enter the auction number. That could be easily copied from eBay as well. I would only need to spend 30 seconds per item by copy/paste 5 things into this great mod then :)

Link to comment
Share on other sites

I also see some of those mods being a stepping stone to creating auctions from OSC.


Create eBay Listing


Radio Buttons: Fixed, Standard

Item (dropdown of all items)


Catagory: (dropdown list of catagories entered by seller, or imported from eBay)

Price: 41.99 (Begining Price if Standard, Price if Fixed)

Shipping: 9.95

Addtl Ship: 5.00

Alt Shipping: 19.95

Addtl Alt Ship: 9.00

Ship Globally: Yes/No

Select Add-Ons: Bold, Highlight, etc.



--eBay Template--




World-Wide Shipping (if applicible)


<insert image from OSC>


<insert description from OSC>


<insert available date from OSC>


<Insert Shipping>


<insert checking button>






Something like that. Can you tell it's been a slow day at work? To do that you'd have to have the eBay developer stuff. But you can see where it's going :)

Link to comment
Share on other sites

That's the problem with having a thread so darn long, takes forver to go through. And the way the forum has been acting lately, I don't have 10 hours to go through 30 pages on the forum.

Link to comment
Share on other sites

Here are my thoughts:


Product Mapping is NOT used except with automation. It's purpose is to "map" a title to a product (product ID really). Since my automation system knows nothing about my individual catalog or your individual catalog, all it can do is say that an auction has ended. It tells you the auction ID, winner id, email, sales price, shipping cost, etc from the auction. When it uploads it creates an entry in your ended auctions screen with the appropriate product ID selected based on the keywords in the product mapping screen. To be clear, there is no reason to use this screen currently.


Tax is not needed -- it IS calculated at checkout. But, I included it in case you're using the automation piece and wanted to verify it's the same amount. It really is unnecessary and I never use it. I would recommend that you leave it blank. Also, you don't necessary have to set the end time. It sets it to the current time, and it's never displayed to the user. Of course, it won't match eBay's records, but not sure that's really an issue.


I think what you're saying that you want is a copy auction function. that way you can re-use the same template over again for multiple item auctions. That would be a nice feature...


Regarding payment, I generally don't want payment in my auctions until after they have checked out. You probably use the "I accept PayPal, Pay Now" function. I do not. I state that I accept PayPal in my listing, but not using TurboLister. This way I don't give the user a way to pay with PayPal until they checkout. That helps me tremendously. But, of course, I guess it helps that I'm not sitting at my computer creating "Ended Auction" entries in the admin. :P


That said, Buy It Now using PayPal WITHOUT an existing order is a trivial feature for me to add. Working on it...


Not sure what you mean about a drop-down in the admin. The only drop-down is the product ID which you of course need to have associated in your catalog. I guess I could use the product mapping to help with this, but it seems like the copy auction feature would be better suited for this purpose.


I thought about listing on eBay from osCommerce as well. I hope to add that at some point primarily because I want to be able to schedule my listings like you can within turbo lister but with additional frequency options. TurboLister let's you export your database as CSV file and the columns are documented at eBay. Thought we could use that.


Yes, I agree with you on the shipping options. I get those requests sometimes. When I do, I have to go and change the shipping cost after the auction ends and that is a pain. (I like my work totally automated.)

Link to comment
Share on other sites

I was trying to run through scenarios which I could use this to my advantage.


You know, I completely forgot that accepting Paypal is an option in the auction setup. *beats head against desk* So yeah, can just forget that "Paid" thing. Just get the automation to work for my Buy It Now auctions :)


Back to the Product Mapping. How does your automation use it? Why not map it to a specific auction # instead of keywords? Why not set up price and things in the product mapping as well. Then all that information would be stored there and wouldn't need to be entered multiple times.


<raise your hand if you're sick of my replies>

Link to comment
Share on other sites

Mapping to a specific auction number defeats the purpose. I list the same items over and over again on eBay. I use variations on the title to test which titles attract the most attention. The upload feature uses the auction title from an infinite number of auctions to map to a particular product in my catalog. I set up the mapping once and list over and over again with no additional work on my end except for packing the item and change the order status to delivered. If I mapped a single auction ID to the mapping, then I would have to set up a mapping every time I list this item.


You list multi-item auctions. I list multiple auctions for a single item of the same product. Make sense?

Link to comment
Share on other sites

Yes it does make sense. I sell 150-200 items a week, but it's off of 15 listings. Whereas you may sell 150-200 of of 150-200 listings. So yeah, that makes sense.


Thanks for the URL bluephoenix.

Link to comment
Share on other sites

When I use SSL checkout, the information lost then(the checkout total will be 0). But when I use NO SSL then it works well. Did you have the same problem.


auctionblox: your demo site is base on no ssl, I don't know if you tested it in SSL mode.


Any body can knows the problem?



Link to comment
Share on other sites

Posted a new version for MS2 which addresses the issues with duplicate ID errors and javascript runtime errors being reported. Also fixed a defect with the MS2 distribution that would send an existing customer back to the default page. Easy upgrade instructions included.


No, I was concerned about SSL, but don't have access to a SSL certificate to debug that at the moment. So, sounds like SSL does not work. I've donated it to the community. I hope someone in the community can figure this one out.

Link to comment
Share on other sites

Regarding the SSL problem, try the following:


In catalog\auction_order_info_process.php





00021: tep_redirect(tep_href_link(FILENAME_AUCTION_ORDER_INFO, '', 'NONSSL'));

00318: $breadcrumb->add('Order Info', tep_href_link(FILENAME_AUCTION_ORDER_INFO, '', 'NONSSL'));





00021: tep_redirect(tep_href_link(FILENAME_AUCTION_ORDER_INFO, '', 'SSL'));

00318: $breadcrumb->add('Order Info', tep_href_link(FILENAME_AUCTION_ORDER_INFO, '', 'SSL'));


If that works, let me know and I'll add it to the distributions.

Link to comment
Share on other sites

Just spent about 2 hours reading the thread and checking out solutions.


Here are my thoughts.


1. We want a few different things when it comes to Auctions and OSC. a) Ebay integration where users checkout in OSC B) an auction listing mod from OSC to Ebay/Yahoo c) auctions within OSC outside of Ebay


To me the biggest and best thing we could do is c. Why not create an excellent Peer-to-peer auction system for OSC? It could be HUGE! Imagine all OSC stores linked? It could cripple places like Amazon, Yahoo, and even Ebay. It could instantly have thousands of products and auctions. All without paying high fees. At worst we would need a central server to link them all. I would be betting that we could get it donated. I would be willing to donate for that. It shouldnt cost that much. A server in UK, Germany, East Coast and West Coast USA, and maybe a couple others. They could essentially link all the OSC sites and turn OSC into a gigantic market. It would be the largest online shopping mall ever! All with small business owners. This would be like Kazaa except for the online retail market. Just like the RIAA is in trouble a project like this could potentially crush Amazon and others.



Who is willing to help? I am gonna copy and paste this into a new topic to see if it gets support. Go there and post please.

Link to comment
Share on other sites

No, it doesn't work.




use test@digicell.ca to checkout, then the Subtotal: CAD$0.00


Actually, when it's like http://www.digicell.ca/catalog/auction_fin...tion_house=eBay it works but no ssl.


When I input the email address at http://www.digicell.ca/catalog/auction_finder.php then the page goes to https://xxxxxx.


I change the code you mentioned above. It won't help. The same thing happened. The page goes to https just like before.

Link to comment
Share on other sites


I have found a solution for....auctionblox's...if you want to auction an item that is not in your catalog. If you go to catalog > Catagories/Products in the admin creat a new folder with no name and a product in that folder named something like "Auction item" with a price of 0.00. Now when ever you enter a auction you can map it to this item and use it for your auctions.



Second Auctionblox I need some help. I think I found a way to combine contribs but I need someone to look at this.


$query_result_handle = mysql_query ("select ext_id from " .TABLE_AUCTION_BASKET) or die ('The query failed!'); 

// use mysql_fetch_row to retrieve the results 
while ($row = mysql_fetch_row ($query_result_handle))  { 
// If The auction is not found add the new auction listing
if ($row[0] != $itemnum)  {
    	 mysql_query ("INSERT INTO " . TABLE_AUCTION_BASKET . " ( `auction_basket_id` , `auction_house_id` , `auction_item_id` , `ext_id` , `auction_winner_id` , `listing_status` , `time_start` , `time_end` , `orders_id` , `ext_title` , `ext_desc` , `quantity` , `price_start` , `price_end` , `insurance` , `shipping` , `sales_tax` , `products_id` ) VALUES ('', '1', '0', '$itemnum', '1', '2', '0000-00-00 00:00:00', '$time_end', NULL , '$Title', NULL , '1', '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '0')");
    	 echo mysql_errno() . ": " . mysql_error(). "\n";
// Otherwise update it
else  {
    	 mysql_query ("UPDATE " . TABLE_AUCTION_BASKET . " SET time_end = '$time_end' WHERE ext_id = '$itemnum'");
    	 mysql_query ("UPDATE " . TABLE_AUCTION_BASKET . " SET auction_house_id = '1' WHERE ext_id = '$itemnum'");
        	 echo mysql_errno() . ": " . mysql_error(). "\n";



when I run this I get a error message: 1062: Duplicate entry '3048756776' for key 2


Now, what i think is happening is the first ime it is run it enters the auction just fine. But then it every time after that the error.

It seems using the "while" statement it takes $itemnum (which is the item number from ebay) and compairs it to each row of the ext_id field. So if you have five auction number (rows) in the field it will run five times.


Isn't there an easier way to compair $itemnum (which is the item number from ebay) against all the rows of the ext_id field?


Please help :( :lol:

Link to comment
Share on other sites

basically, it's all correct except for the initial query:


change to :


$query_result_handle = mysql_query ("select ext_id from " . TABLE_AUCTION_BASKET . " where ext_id = '" . $item_num . "'") or die ('The query failed!');


Note the where clause and the single quotes in the query.


also, look at my code in auction_listing_item for an easier way to code the update and inserts rather than using the table names and SQL directly.


you will need to execute your code snippet for each listing downloaded from ebay.

Edited by auctionblox
Link to comment
Share on other sites

That works great for updating but it does not add the auctions. What I am triing to tell mysql is:


Check to see if $itemnum is in the table, if its not than add to table, if it is (else)than update table.


It seems like a simple task, maybe I am just making it more complicated than it needs to be. Or maybe I am just confusing myself.


HELP! :o :o

Link to comment
Share on other sites

Well, I think if each time you are not creating a new item, then it might be best to just add that item to the database and put it in a hidden category. That way you have the auction ad to reuse if you sell more than one of the items.


Not sure if this will work but how about this,

If you use the auction creation script, it could possibly be set so that each time the csv for an item is downloaded a new item is created in the database. Then after there is an auction id, the store can add the id to the database. When the auction ends ebay immediately sends out an email to the seller. That email could be parsed and pertinent parts auto-populated to the database. That way no additional mapping would be necessary.

Or instead of parsing emails a cron job can be set to check with Ebay and get the data and update the database. That way the user would be able to check out.

Or maybe that is all too convoluted?

Edited by bluephoenix
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.

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