Frequently Asked Questions

Why do I receive the error wrong country type when I create a manifest?
Last Updated 5 years ago

If you got an error like this:

Canada Post Shipment for shipment #1819 has not been created
Error: /rs/0004329090-0008004925/0004329090/shipment: cvc-simple-type 1: element {}country-of-origin value '20' is not a valid instance of type {}CountryCodeType

And a xml return that includes this:

<customs-description><![CDATA[Printed Viscose Blouse]]></customs-description>

This means that the Canada Post can't recognize the Country code in the attribute.

To solve this problem:
- Go to the Magento Admin.
- Go to "Catalogue" -> "Attribute" -> "Manage Attribute"
- Find "Country of Manufacture" in the attribute code.
- Go to the tab "Manage Label \ Options"
- Change the Manage Options from the full country name (e.g. China) to two-letter-abbreviation (e.g. CN).

This should change the attribute. All the new products with the new attribute should be free from this issue.

There might be some existing products that have the old attribute. You can do this when we confront them. When you see the error message again:
1. Open var/log/canadapost_api.log in the website root folder.
2. Find the item with old attribute <country-of-origin>20</country-of-origin>, and then identify the sku of the product (see attachment 1)
3. Go to the Manage Products in the admin panel, and find the product with that sku. Note that we are not going to change the associated product (see attachment 2. we are not going to update this product).
4. Instead, we find the main product (as shown in attachment 3), open it, and save it (you don't have to make any change)
Repeat the step and update all the products with the old attribute. Then the problem should be solved.

Please Wait!

Please wait... it will take a second!