Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Current AUctions V2.0


Guest

Recommended Posts

Please help i have a problem with this mod. The mod works great it finds all my information. The problem is when the current_auctions.php loads the auction box in the left colum is streched or something have a look

 

http://store.deals-online.com.au/current_auctions.php

 

Any help would be great

 

Oh also when i include the boc in the left colum it drops all the inforamtion on my index.php down a couple of lines, you see this at

 

http://store.deals-online.com.au/index.php

 

Thanx

Edited by shadowtek
Link to comment
Share on other sites

  • Replies 107
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...

Hi,

 

Most of the time, I'm getting red x's for my pictures in the Current Auctions listing. Sometimes, I see some of the pictures.

 

It was working fine when I was hosting the site locally, but when I got it hosted, that's when the difficulties started, I think!

 

I'm using the Image Magic contribution - does that impact on this? I see the tep_image function is used, so it shouldn't be too much of a problem.

 

Any inspiration?

 

Many thanks,

 

Jody

Link to comment
Share on other sites

Figured I move this here.

Current Auctions are not being displayed any more.

Ebay, has changed the call to the Current Auctions.

eBayISAPI.dll now requires you to log in.

These warnings show in the log:

[client 00.00.000.00] PHP Warning:  fopen(): HTTP request failed! \x10\xc1\x1e\b in C:\\folder\\site\\includes\\modules\\current_auctions_module.php on line 34, referer: http://***
[client 00.00.000.00] PHP Warning:  fopen(http://cgi6.ebay.com/ws/eBayISAPI.dll?ViewListedItems&userid=xxxxxx&include=0&since=-1&sort=3&rows=0): failed to open stream: No error in C:\\folder\\site\\includes\\modules\\current_auctions_module.php on line 34, referer: http://***
[client 00.00.000.00] PHP Warning:  file_get_contents(): HTTP request failed! \x10\xc1\x1e\b in C:\\folder\\site\\includes\\modules\\current_auctions_module.php on line 42, referer: http://***
[client 00.00.000.00] PHP Warning:  file_get_contents(http://cgi6.ebay.com/ws/eBayISAPI.dll?ViewListedItems&userid=xxxxx&include=0&since=-1&sort=3&rows=0): failed to open stream: No error in C:\\folder\\site\\includes\\modules\\current_auctions_module.php on line 42, referer: http://***

Lines 34 & 42 refer back to the Ebay link.

Logs edited.

Anyone have a work around??

Edited by fl70
Link to comment
Share on other sites

I?m not sure if it is correct, but it works: :)

 

Change in current_auctions.php:

 

// Build the ebay url

$URL = "http://cgi6.ebay.com/ws/eBayISAPI.dll?MfcISAPICommand=ViewListedItems&userid=$ebayid&since=$since&sort=$sort&rows=0";

 

to

 

// Build the ebay url

$URL = "http://search.ebay.com/ws/eBayISAPI.dll?MfcISAPICommand=ViewListedItems&userid=$ebayid&since=$since&sort=$sort&rows=0";

 

But I feel this request takes a little longer for the result page......hope a developer will make a contrib update, soon.... :-"

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

I?m not sure if it is correct, but it works: :)

 

Change in current_auctions.php:

to

But I feel this request takes a little longer for the result page......hope a developer will make a contrib update, soon.... :-"

 

 

here's how i got mine to somewhat work...

I changed the link in the admin & mod page to reflect this url:

 

http://search.ebay.com/ws/eBayISAPI.dll?Vi...edItems&userid=

 

Now my auctions are pulled & show up nicely on the page. But...when you click on one of the links on the store page, it go's to this page:

http://search.ebay.com/_W0QQfgtpZ1QQfrppZ2...edllQ3fViewItem

and shows a warning inside ebay that says no such user name.

 

so i go to ebay without signing in. click on the community link, type in my user name & it brings it up. then click on 'items for sale' or what have you,

'http://search.ebay.com/_W0QQsassZakrilal'

& I copy & paste that link into the mod page & admin sections & they don't show up at all.

 

i don't get it. this would be perfect if i could get it to fully function. what am i forgetting? hmm...any one have a solution?

 

the actual ebay link to my auctions are: http://search.ebay.com/_W0QQsassZakrilalQQhtZ-1

or

http://search.ebay.com/_W0QQfgtpZ1QQfrppZ25QQsassZakrilal

but niether on works correctly once you get them in

arrrrrhhhh!!!

:blink: i wish i wasn't so new at this php stuff!

Link to comment
Share on other sites

AAAARRRGHHH !!!!

API has changed again ????????? ?

Now the modified Ebay search-link doesn`t work too....AAHH this API-changes suck !!!

 

:angry: :angry: :angry:

 

and what now ?

 

Someone an idea what to change ?

 

Or ist the ebay contrib a dead contrib ??? Hey Mr. Developers - where are you - help please; your Contrib is not running well becaus ebay always chenge the API....

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

Let me know if you get anything....

 

I'd like to get it working to...

 

Did it "ever" work for your site?

 

Thanks,

 

Rick...

 

 

 

AAAARRRGHHH !!!!

API has changed again ????????? ?

Now the modified Ebay search-link doesn`t work too....AAHH this API-changes suck !!!

 

:angry: :angry: :angry:

 

and what now ?

 

Someone an idea what to change ?

 

Or ist the ebay contrib a dead contrib ??? Hey Mr. Developers - where are you - help please; your Contrib is not running well becaus ebay always chenge the API....

Link to comment
Share on other sites

Yes - it worked finde since about 2 Years.

But now ebay has changes API and the contrib doesn`t work anymore.

DEvelopers don`t care about it so i deactivated that contrib in my shop and made a link to my ebay auctions directly....

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

Thanks,

 

You may want to try this one:

http://www.oscommerce.com/community/contri...ons,3762/page,5

 

At least it will show something on site....guess I'll have to disable my C/Auctions also...Thanks for letting me know....

 

By the way...did you try the author's website...I heard they weren't supporting it...but it's worth a shot trying to get the help... :thumbsup:

 

 

Yes - it worked finde since about 2 Years.

But now ebay has changes API and the contrib doesn`t work anymore.

DEvelopers don`t care about it so i deactivated that contrib in my shop and made a link to my ebay auctions directly....

Link to comment
Share on other sites

I tried all and contacted all the authors mentiones in the script code or at the contrib site - nothing....and I tried out all available contribs - no is working...

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

I tried all and contacted all the authors mentiones in the script code or at the contrib site - nothing....and I tried out all available contribs - no is working...

 

Okay, I now have a modifed version of the current auctions contribution working. The problem was that ebay are forcing the screen scrape to go through a double page load to get to the data now and the pages need to remember some session info. The new listing page also contains less data so I could not pull start/end times but can get the time remaining in the auction.

 

The modified version looks like this -http://world4kids.co.uk/shop/current_auctions.php] http://world4kids.co.uk/shop/current_auctions.php[/url]

 

All the changes needed are in the file .../includes/module/current_auctions_module.php

 

I've attached my current_auctions_module.php file contents below. I've done this as a favour to the site to get things working so it will take some time to turn it in to an update to the contribution. If anyone else has time please make the change. Also, if you are in the US you will need to change the seach URL to ebay.com from ebay.co.uk.

 

<?php

/*

$Id: current_auctions_module.php,v 2.0 2004/09/15 22:49:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- current_auctions //-->

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

<tr>

<td class="infoBoxHeading" align="center" width="15%"><?php echo TABLE_HEADING_ITEM; ?></td>

<td class="infoBoxHeading" align="center" width="50%"><?php echo TABLE_HEADING_TITLE; ?></td>

<td class="infoBoxHeading" align="center" width="10%"><?php echo TABLE_HEADING_BIDDER; ?></td>

<td class="infoBoxHeading" align="center" width="15%"><?php echo TABLE_HEADING_PRICE; ?></td>

<td class="infoBoxHeading" width="10%"><?php echo TABLE_HEADING_TIME; ?></td>

</tr>

 

<?php

// Build the ebay url

$URL = 'http://search.ebay.co.uk/ws/search/MemberSearchResult?MfcISAPICommand=MemberSearchResult&frompage=itemsbyseller&sofindtype=26&since=30&fcm=1&fsop=1%26fsoo%3D1&frpp=50&fcl=3&amp%3Bsspagename=h%3Ah%3Aadvsearch%3AUk&sacat=-1&nojspr=y&catref=C5&from=R7&nojspr=y&pfid=0&userid=' . EBAY_USERID;

 

// Where to Start grabbing and where to End grabbing

$GrabStart = '<td class=\"ebLeft\">';

$GrabEnd = 'About eBay';

 

// Open Ebays search page to get listing link

$ch = curl_init();

curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookieEbay");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_URL, $URL);

 

ob_start(); // prevent any output

$buf2 = curl_exec ($ch); // execute the curl command

ob_end_clean(); // stop preventing output

curl_close ($ch);

unset($ch);

 

// find search POST string

$pos = strpos($buf2, "_W0QQ") - 40;

if ($pos > 0) {

$surl = substr($buf2, strpos($buf2, "http", $pos));

$surl = substr($surl, 0, strpos($surl," ")-1);

}

 

// Load sellers item list

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/cookieEbay");

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, '1');

curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla");

curl_setopt($ch, CURLOPT_URL, $surl);

 

$r = curl_exec ($ch);

 

curl_close ($ch);

 

// Grab just the contents we want

$stuff = eregi("$GrabStart(.*)$GrabEnd", $r, $content);

 

if (tep_not_null($stuff)) {

 

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

// And set things up to be split into lines and items.

 

$content[1] = str_replace("\r\n", "", $content[1]);

$content[1] = str_replace("\n", "", $content[1]);

$content[1] = str_replace("\r", "", $content[1]);

$content[1] = str_replace("</td>", "[iTEMS]", $content[1]);

$content[1] = str_replace("</tr>", "[LINES]\n", $content[1]);

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

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

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

$content[1] = preg_replace("<div [a-zA-Z \"=;:0-9]*>", "", $content[1]);

$content[1] = preg_replace("<td [a-zA-Z \"=;:0-9]*>", "", $content[1]);

$content[1] = preg_replace("<h3 [a-zA-Z \"=;:0-9]*>", "", $content[1]);

$content[1] = preg_replace("<span[a-zA-Z \"=;:0-9]*>", "", $content[1]);

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

// Line used during debug (for troubleshooting)

//echo "<hr>$content[1]<br><br> <hr>";

 

 

// Build array

$stuff = $content[1];

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

 

// Loop through lines

$count = "0";

foreach ($items as $listing) {

$count++;

 

if (($count > 0) && ($count < (AUCTION_DISPLAY+2))) {

// Break apart each line into individual items

list($A,$B,$Image,$Title,$Bids,$Price,$Postage,$Paypal,$Time) = explode("[iTEMS]",$listing);

 

$class = ( $class == "infoBoxContents" ) ? "smallText" : "infoBoxContents";

 

// If Thumbnails are enabled show them

if (DISPLAY_THUMBNAILS == 1) {

echo '<tr>

<td class="' . $class . '" align="center" width="15%">' . $Image . '</td>

<td class="' . $class . '" width="50%"><b>' . $Title . '</b></td>

<td class="' . $class . '" width="10%">' . $Bids . '</td>

<td class="' . $class . '" width="15%">' . $Price . '</td>

<td class="' . $class . '" align="center" width="10%"><font color="#FF0000">' . $Time . '</font></td>

</tr>';

 

// Otherwise just show the Bid Now link

} else {

echo '<tr>

<td class="' . $class . '" align="center" width="15%"></td>

<td class="' . $class . '" width="50%"><b>' . $Title . '</b></td>

<td class="' . $class . '" width="10%">' . $Bids . '</td>

<td class="' . $class . '" width="15%">' . $Price . '</td>

<td class="' . $class . '" align="center" width="10%"><font color="#FF0000">' . $Time . '</font></td>

</tr>';

}

}

}

} else {

echo '<tr>

<td class="main" align="center" colspan="7"><br>' . TEXT_NO_PRODUCTS . '<br></td>

</tr>';

}

?>

</table>

 

<!-- current_auctions_eof //-->

Link to comment
Share on other sites

ooh thanks mate, i just found this contrib, and used your code you just pasted and it seems to work fine :)

 

there's only one little bug, at the end of the listing it shows this text:

 

Shop again on eBay Express| Shopping Cart<#2#>

(which doesn't link anywhere)

 

next to logoExpress_95x39.gif and btnExpressClose.gif

 

apart from that it's all good, do you think it might be possible maybe to change the grab_end part to finish before it picks up this info?

 

thankyou :)

kev.

Link to comment
Share on other sites

(which doesn't link anywhere)

 

next to logoExpress_95x39.gif and btnExpressClose.gif

 

apart from that it's all good, do you think it might be possible maybe to change the grab_end part to finish before it picks up this info?

 

In the search page I don't see the logoExpress image so your search page seems different to mine. Try

changing the GrabEnd to some like 'To compare items side-by-side' which may fix it.

 

If that does not work you will need to try some variations to capture the end of the listing. Sorry, but without

seeing it I will find it hard to guess the end string.

 

Good luck and I'm glad it worked for you.

Link to comment
Share on other sites

world4kids, that ebay express link seems to only show up for us-based sellers. i've put your fix on both a canadian & us-based store and it only came up for the us one. (changing the ebay.co.uk to ebay.com or .ca did nothing)... so i have to assume the seller's ebay account must be a u.s. address for that peculiar link to appear.

 

it shows up as:

http://mysite.com/#1 and i cannot figure out where it's coming from either.

Link to comment
Share on other sites

scratch that. for the us-based store i changed:

$GrabEnd = 'About eBay';

to:

$GrabEnd = 'To compare items';

 

and it went away.

Link to comment
Share on other sites

  • 2 weeks later...
Spent the last 3 days trying to work this out, to no avail.

Anyone else come up with something??

 

I hope you got things working now. From your post it is not clear what is not working. If you look at my post above [#65] and follow the link you will see that the code change made things work.

 

The code in the contributions area is based on the old eBay process before they changed the API's. The replacement code in post #65 should make the required changes to the contribution to get it to work.

 

If you are in the US you may need to make the change that 'eww' made.

Link to comment
Share on other sites

  • 4 weeks later...
AAAARRRGHHH !!!!

API has changed again ????????? ?

Now the modified Ebay search-link doesn`t work too....AAHH this API-changes suck !!!

 

:angry: :angry: :angry:

 

and what now ?

 

Someone an idea what to change ?

 

Or ist the ebay contrib a dead contrib ??? Hey Mr. Developers - where are you - help please; your Contrib is not running well becaus ebay always chenge the API....

 

 

I can get my auctions to show up. MY SITE But I'm also getting that stupid ebay express stuff at the bottom of the listing with a red x to boot. The formatting is out of whack as well.

 

1. I can't locate the fix mentioned above, i.e., the $GrabEnd = 'To compare items'; change in my code. I've posted it below, pehaps someone could help?!?

 

2. What change is necessary to get the formatting back into to shape?

 

Here's the current_auction.php code:

 

<?php
/*
 $Id: current_auctions.php,v 1.22 2003/06/05 23:26:22 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
##########################################
# php eBay List 1.2
# Grab and Display your eBay auctions on your web site
# --------------------------------------------------
# Many thanks to:
# Written by: Chrispian H. Burks
# email: [email protected]
# website: http://www.aeoninteractive.net
# Please submit bugs to [email protected]
# Modified by Joseph Smith for the OSC Community
# email: [email protected]
#
# Thanks to all the users who sent in feedback and to everyone at
# sitepoint.com for all their help and ideas.
# --------------------------------------------------
# This software is linkware! Please leave the link back
# to Aeon Interactive. Feel free to modify this script.
# If you do, send it to me and I'll include any cool
# mods in the next release.
# --------------------------------------------------
# Legal: This script is presented with no warranty, NOT ENDORSED BY EBAY
#
# THE NAMES MENTIONED ABOVE ARE NOT RESPONSIBLE FOR ANYTHING
#
##########################################



// Define our variables -----------------------------------------------------------------

// Your Ebay Member Name
$ebayid = "politicalcellar";

// Display Thumbnails?
$thumbs = "1";  // 1 = yes 0 = no

// Table Border Color
$table_border_color = "#FFFFFF";

// Table Header Row Color
$table_header_color = "#CCCCFF";

// Table Alt Color Row 1
$table_row1_color = "#FFFFFF";

// Table Alt Color Row 2
$table_row2_color = "#EFEFEF";

// Ebay uses Pacific time zone use this to add hours for your time zone
$timezone = "2";

// Display Ended Auctions (-1 = Current, 1 - 30 = Up to 30 Days in the past)
$since = "1";

//Sort By (Item Number = 1, Auction Start = 2, Auction End = 3, Current Price = 4, Newest First = 8,)
$sort = "8";

// Display how many per page - Set to a very high number like 999999 for all your listings
$limit = "25";

// End of our variables ---------------------------------------------------------------------

 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>

	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main">
<?php

// Start our border table
echo "
	<TABLE border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" width=\"50%\">
	<TR><TD bgcolor=\"$table_border_color\"><TABLE border=\"0\" cellPadding=\"2\" cellSpacing=\"1\" width=\"50%\">
	<TR>
	<tr bgcolor=\"$table_header_color\" valign=\"middle\">
	<td align=\"center\" width=\"20%\"><b><font size=\"1\" face=\"Verdana, Arial, sans-serif\" color=\"#0000FF\">" . AUCTION_ITEM . "</font></b></td>
	<td align=\"center\" width=\"20%\"><b><font size=\"1\" face=\"Verdana, Arial, sans-serif\" color=\"#0000FF\">" . AUCTION_START_DATE . "</font></b></td>
	<td align=\"center\" width=\"20%\"><b><font size=\"1\" face=\"Verdana, Arial, sans-serif\" color=\"#0000FF\">" . AUCTION_END_DATE . "</font></b></td>
	<td align=\"center\" width=\"20%\"><b><font size=\"1\" face=\"Verdana, Arial, sans-serif\" color=\"#0000FF\">" . AUCTION_TIME_LEFT . "</font></b></td>
	<td align=\"center\" width=\"20%\"><b><font size=\"1\" face=\"Verdana, Arial, sans-serif\" color=\"#0000FF\">" . AUCTION_CURRENT_PRICE . "</font></b></td>
	<td align=\"center\" width=\"20%\"><b><font size=\"1\" face=\"Verdana, Arial, sans-serif\" color=\"#0000FF\">" . AUCTION_HIGH_BIDDER . "</font></b></td>
	</TR>
";


// Build the ebay url
$URL = "http://cgi6.ebay.com/ws/eBayISAPI.dll?MfcISAPICommand=ViewListedItems&userid=$ebayid&since=$since&sort=$sort&rows=0";

// Where to Start grabbing and where to End grabbing
$Start = "Click on the column headers to sort";
// $End = "</p><script SRC=\"http://include.ebay.com/aw/pics/js/stats/ss.js\"></SCRIPT><script SRC=\"http://include.ebay.com/aw/pics/js/stats/ss2.js\"></SCRIPT><p>" or "indicates that auction has ended.";

// Open the file
$file = fopen("$URL", "r");

// Read the file
if (!function_exists('file_get_contents')) {
 $r = fread($file, 80000);
}
else {
$r = file_get_contents($URL);
}

// Grab just the contents we want
$stuff = eregi("$Start(.*)$End", $r, $content);

// Get rid of some rubbish we don't need.
// And set things up to be split into lines and items.

$content[1] = ereg_replace("</a><table border=\"1\" cellpadding=\"3\".*</td><br></tr>","",$content[1]);
$content[1] = ereg_replace("<tr bgcolor=\"#CCCCFF\">.*High Bidder \/ Status","",$content[1]);
$content[1] = ereg_replace("<tr bgcolor=\"#CCCCFF\">.*High Bidder \/ Status","",$content[1]);
$content[1] = str_replace("</table>", "", $content[1]);
$content[1] = str_replace("</th>", "", $content[1]);
$content[1] = str_replace("\r\n", "", $content[1]);
$content[1] = str_replace("\n", "", $content[1]);
$content[1] = str_replace("\r", "", $content[1]);
$content[1] = str_replace("<td align=\"center\">", "", $content[1]);
$content[1] = str_replace("<td>", "", $content[1]);
$content[1] = str_replace("<td align=\"right\">", "", $content[1]);
$content[1] = str_replace("<font color=\"\">", "", $content[1]);
$content[1] = str_replace("</font>", "", $content[1]);
$content[1] = str_replace("<tr bgcolor=\"#ffffff\">", "", $content[1]);
$content[1] = str_replace("<tr bgcolor=\"#efefef\">", "", $content[1]);
$content[1] = str_replace("<tr bgcolor=\"#efefef\">", "", $content[1]);
$content[1] = str_replace("</td>", "[ITEMS]", $content[1]);
$content[1] = str_replace("</tr>", "[LINES]\n", $content[1]);


// Line used during debug
// echo "<hr>$content[1]<br><br> <hr>";


// Close the file
fclose($file);

$stuff = $content[1];

// Build our first array for EOF
$items = explode("[LINES]",$stuff);

// Loop through our lines

$count = "0";

foreach ($items as $listing) {
	// Break apart each line into individual items

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

// We want to get rid of the (*) from the High Bidder
	$HighBidder = str_replace("(*)" , "" , $HighBidder);

	//Use a countdown to get Time Left
	//We need to break apart End and convert 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;

	// next we put it into a presentable format
	$Time_Left =  $days . "d" . " " . $hours . "h" . " " . $minutes . "m";

	// and last we want to print auction ended when the auction has ended
	if ($seconds <= 0) {
			$TimeLeft = "Auction Ended";
			}
	else {
			$TimeLeft = $Time_Left;
			}

			// Make sure we have content to print out and print it
			if ($Start && $End && $Title && ($count < $limit)) {

					$count++;

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

							$line = "<TR><TD bgcolor=\"$colour\">$Title</TD></TR>
									  <TR><TD bgcolor=\"$colour\" align=\"center\">$Item</TD>
											<TD bgcolor=\"$colour\">$Start</TD>
											<TD bgcolor=\"$colour\">$End</TD>
											<TD bgcolor=\"$colour\">$TimeLeft</TD>
											<TD bgcolor=\"$colour\">$Price</TD>
											<TD bgcolor=\"$colour\">$HighBidder</TD></TR>\n";


				preg_match('/item=([^"&]*)/', $line, $match);
									$itemnum=$match[1];


							// If Thumbnails are enabled show them
							 if ($thumbs == 1) {
					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\"><b>$Title</b></a></font></td></tr>
											<TR><TD bgcolor=\"$colour\" align=\"center\"><a href=\"http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=$itemnum\" target=\"_blank\">
													<img src=\"http://thumbs.ebay.com/pict/$itemnum.jpg\"></a><br><font face=\"Arial, sans-serif\" size=\"2\">$itemnum</font></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\">$Start</font></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\">$End</font></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\" color=\"#FF0000\">$TimeLeft</font></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><b><font face=\"Arial, sans-serif\" size=\"2\" color=\"#339933\">$Price</font></b></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\">$HighBidder</font></TD></TR>\n";
							 }

							// Otherwise just show the Bid Now link
							 else {
					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><TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\">$itemnum</font></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\">$Start</font></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\">$End</font></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\" color=\"#FF0000\">$TimeLeft</font></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><b><font face=\"Arial, sans-serif\" size=\"2\" color=\"#339933\">$Price</font></b></TD>
											<TD bgcolor=\"$colour\" align=\"center\"><font face=\"Arial, sans-serif\" size=\"2\">$HighBidder</font></TD></TR>\n";
							 }



			}

	}

// Wrap up the border table
echo "</TABLE></td></tr> </table>";
echo "<TABLE border=\"0\" cellPadding=\"2\" cellSpacing=\"1\" width=\"100%\">
	<tr bgcolor=\"$table_header_color\" valign=\"middle\">
	<TD align=\"center\"><font size=\"1\" face=\"Verdana, Arial, sans-serif\" color=\"#0000FF\">
	<b>Powered By: <a href=\"http://www.aeoninteractive.net\" target=\"_blank\">Aeon Interactive</a></b></font></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 //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </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

  • 3 weeks later...

Hi folks,

I'm getting the following error:

 

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/v35163/public_html/catalog/includes/modules/current_auctions_module.php on line 54

 

It was working fine for me until recently. I've installed Ultimate_SEO_URLs - could that be the problem? Only other thing I can think of is that my ISP has changed their secuirty settings!

 

Anyone have any ideas?

 

Thanks in advance,

 

Di11on

Link to comment
Share on other sites

scratch that. for the us-based store i changed:

$GrabEnd = 'About eBay';

to:

$GrabEnd = 'To compare items';

 

and it went away.

 

 

thanks very much for that, i changed the grab end in current_auctions_module.php and it seemed to do the trick!! thankyou!! :)

 

\m/

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