Frequently Asked Questions

Why do I receive the error wrong country type when I create a manifest?

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 {http://www.canadapost.ca/ws/shipment}country-of-origin value '20' is not a valid instance of type {http://www.canadapost.ca/ws/shipment}CountryCodeType

And a xml return that includes this:

<item>
<customs-number-of-units>1</customs-number-of-units>
<customs-description><![CDATA[Printed Viscose Blouse]]></customs-description>
<sku>E2016_AB13_002_6m</sku>
<hs-tariff-code>6209.90.10.00</hs-tariff-code>
<unit-weight>0.05</unit-weight>
<customs-value-per-unit>30</customs-value-per-unit><country-of-origin>20</country-of-origin></item>

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.

Attachments: GS Billable_20160324.png (132.2 kb)  attachment1.png (61.3 kb)  attachment2.png (103.4 kb)  attachment3.png (143.7 kb) 


 Last updated Tue, Jul 8 2014 12:31pm

Be sure to browse our E-commerce Questions Section (FAQs), before opening a ticket.

Please Wait!

Please wait... it will take a second!