Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order_carrier NullReferenceException error #57

Closed
GiorgioConte opened this issue Jun 13, 2014 · 2 comments
Closed

Order_carrier NullReferenceException error #57

GiorgioConte opened this issue Jun 13, 2014 · 2 comments
Assignees
Labels

Comments

@GiorgioConte
Copy link

Hi,
when i try to call the .get() method for order_carrierFactory, i receive an NullReferenceException error on deserialize class.

Here my code snippet:
OrderCarrierFactory OFOrderCarrier = new
OrderCarrierFactory(BaseUrl.ToString(), AccountRW.ToString(), Password);
order_carrier OrdineTrack = OFOrderCarrier.Get(13); <--------

Here the error:
System.NullReferenceException non è stata gestita dal codice utente
HResult=-2147467261
Message=Riferimento a un oggetto non impostato su un'istanza di oggetto.
Source=Bukimedia.PrestaSharp
StackTrace:
in Bukimedia.PrestaSharp.Deserializers.PrestaSharpDeserializer.GetElementByName(XElement root, XName name) in \Git\PrestaSharp\Deserializers\PrestaSharpDeserializer.cs:riga 391
in Bukimedia.PrestaSharp.Deserializers.PrestaSharpDeserializer.Map(Object x, XElement root) in i\Git\PrestaSharp\Deserializers\PrestaSharpDeserializer.cs:riga 97
in Bukimedia.PrestaSharp.Deserializers.PrestaSharpDeserializer.Deserialize[T](IRestResponse response) in i\Git\PrestaSharp\Deserializers\PrestaSharpDeserializer.cs:riga 55
in RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)
InnerException:

Can u help me?
Regards

@EduLeonPavon EduLeonPavon self-assigned this Jun 13, 2014
@EduLeonPavon
Copy link
Member

Hello @GiorgioConte
First all, thank you for your feedback. Please, tell me if the the order_carrier exists in the affected tables in PrestaShop.
Regards.

@GiorgioConte
Copy link
Author

Hi @EduLeonPavon,
according to official prestashop db schema (http://doc.prestashop.com/display/PS16/Fundamentals+of+PrestaShop+Development#FundamentalsofPrestaShopDevelopment-Databaseschema) there's a table named ps_order_carrier.
And webservice api confirm that with this schema (http:///api/order_carriers)

<order_carrier>

<id_order/>
<id_carrier/>
<id_order_invoice/>

<shipping_cost_tax_excl/>
<shipping_cost_tax_incl/>
<tracking_number/>
<date_add/>
</order_carrier>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants