Jump to content

EAN code / Does not apply error ( SOLUTION )


Recommended Posts

Hi Guys
i've spend the last 2 months reading all your error, fixer, even custom made mod of ebay official module.
I've a fix for everyone that have issue with EAN Variations and "Does not Apply" feature.
You should understand that this is a very rare issue regardless a missing feature of 202commerce's module.
The actual module doesn't validate EAN code, so this is for al the people that :
- use software like Danea Easyfatt or similar that generate a casual EAN if empty
- selling brands like Nike that doesn't use 13 chars in EAN (count it, nike use 12 char) 
If you're one of those cases you'll always have EAN error while sending products to eBay.
This is because the module doesn't count or check if it's an valid EAN.
When you send a product with variations and one or more have incorrect EAN, eBay automatically reject the product.
The solution is pretty simple but remember: you're hacking a official module.
SO here's the quick fix:
edit modules/ebay/ebay/api/GetVariations.tpl and edit as i did the "$synchronize_ean" line 63

				{if ($synchronize_ean != "")}<EAN>{if isset($variation.ean13) && strlen($variation.ean13) > 12}{$variation.ean13}{else}{$does_not_apply}{/if}</EAN>{/if}
				{if ($synchronize_isbn != "")}<ISBN>{if isset($variation.isbn) && $variation.isbn != ''}{$variation.isbn}{else}{$does_not_apply}{/if}</ISBN>{/if}
				{if ($synchronize_upc != "")}<UPC>{if isset($variation.upc) && $variation.upc != ''}{$variation.upc}{else}{$does_not_apply}{/if}</UPC>{/if}

You've to delete $variation.ean != '' and substitute with strlen($variation.ean13) > 12


This will count the EAN chars and, if more than 12 send it to eBay. Otherwise it will write "Does not apply"



Hope this will save time as it did for me!

Edited by footballitalia (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...