Magento eBay Extension (ESS-UA) bug fixes

We have been working on some mild Magento >< eBay integration using the extension above, but we had run into a few hurdles with the code, so we have improved portions of it.

Prices displayed with 4 significant figures, line breaks not displayed in descriptions

In the page body, prices were displayed as £18.5000 instead of £18.50 and the descriptive paragraph didn't have any line breaks, just lin/unix nr terminators. This was a quick fix and only required a few lines to be changed. Start by editing your listing template and wrap your price #price# that is displayed in line in a simple span so we can preg_replace it.
<span class="roundprice">#price#</span>
Edit: app/code/local/Ess/Ebay/controllers/Adminhtml/EbayapiController.php Change from
$request.='<Description><![CDATA['.nl2br(preg_replace_callback('/<span class="roundprice">(.*?)</span>/is',create_function('$matches','return number_format($matches[1],2);'),$description[0]['value'])).']]></Description>';

Adding a custom label when using Selling Manager Pro

If you also use Selling Manager Pro and you take advantage of the "custom label" feature, you can pass this data through using the <sku></sku> tag in the eBay API.

All eBay store categories not listed in dropdown

If you have noticed that all of your store categories haven't appeared in the drop menu it is because the code in the extension isn't quite right. So if you want to get your hands dirty and fix it ... Edit: app/code/local/Ess/Ebay/controllers/Adminhtml/EbayapiController.php Change from

	if($reader->name == 'CustomCategories')
			$id = '';

			if($id != '' &&	$name != '')
				$string[] = array("id" => $id,"name" => $name);
    if($reader->name == 'Name' && empty($storeName))
      $storeName = $reader->value;


$storeName = $reader->

$data['name'] = $storeName;

Extension URL: