stephanstapel / opentrans.net Goto Github PK
View Code? Open in Web Editor NEW.net implementation of OpenTrans eCommerce data transfer standard
License: Apache License 2.0
.net implementation of OpenTrans eCommerce data transfer standard
License: Apache License 2.0
Hi,
not an urgent issue, but maybe you could add some more country codes to the _translateCountry method, e.g. at least "Austria / AT".
Thank you!
Support for following tags seems to be missing:
CONTROL_INFO
ORDER_INFO
SHIPMENT_PARTIES_REFERENCE
ORDER_ITEM
ORDER
can you please publish a new Version of the NuGet?
Heyho 👋
First of all: Thank you for providing this helpful library/package. I'm currently using your library to realize a communication with an external service and they use the ORDERRESPONSE_DATE
element to provide the information when they processed an order, so they call it "confirmation date" internally. Unfortunately you don't provide a Property in Order
or OrderResponse
for this element, only on serialization of an OrderResponse
you write DateTime.Now
into it:
Do you plan to add the ORDERRESPONSE_DATE
to Order
and OrderResponse
or isn't it relevant enough for the majority to put some effort into it? Fortunately it's not that critical for me, so it's no a reason to not use your libray.
Thanks in advance.
I noticed that the current package published on Nuget lists every existing unit of measurement and probably more, but the latest version on GitHub just lists a few codes. Did this reduction happen by mistake, or was there an intention?
Also, while I was searching for some codes I found this website. It has a table of all codes with proper unit name and sometimes even a description. Maybe I can find some time to write a script for parsing the table. So we could use the result to complete the quantity codes with comment for each one. Guess that would help a lot to find the correct code without leaving the IDE.
Hi, thanks for the Lib.
In the BaseReader
Class there is the _nodeAsDateTime()
method, which will return null if the time is in 24H format e.g. "2021-08-05T14:48:37"
To parse it you are using TryParseExact with the format "yyyy-MM-ddThh:mm:ss". the hh
are for 12H for 24 one should use HH in C#.
Is that a bug or a requirement? :)
Here the code
OpenTrans.net/OpenTrans.net/BaseReader.cs
Line 51 in 51cb41a
I found that OpenTrans use ISO 8601 (Second edition 1997) as the DateTime field, which is in 24H format
https://www.w3.org/TR/NOTE-datetime-970915
Should I make a PR replacing the format?
Thanks again.
Hello Stephan,
first off, thanks for your work. It is a really easy to use API and the documents look good for us.
We noticed that you hardcoded PARTIAL_SHIPMENT_ALLOWED
to TRUE
or FALSE
when creating the Order object:
However, we noticed that our receiver system seems to be using XmlConvert.ToBoolean
, which apparently does not like the upper-case variant of TRUE
or FALSE
.
Since the openTRANS 2.1 document states, dtBoolean values are case-insensitive.
What is your view on changing it in your library, to make it seemingly more broadly compatible with other systems vs. keeping it upper-case, since it should not matter?
Thanks!
Hi Stephan,
would you mind implementing the property "Party ID Type"?
At the moment, this is set as a static string in BaseWriter.cs ("PredefinedOrCustomType").
However, some suppliers need texts like "buyer_specific" or "supplier_specific" to be set as type here.
Thank you,
best regards
Daniel
the elements in ORDER_SUMMARY have a wrong order. according to specification TOTAL_ITEM_NUM has to be before TOTAL_AMOUNT and specification demands the order.
the type of SUPPLIER_PID and SUPPLIER_IDREF are always "". According to specification the attribute type must not be empty, if no value provided the attribute must be omitted.
Hi,
I just tried your _createOrder() example method of file Application.cs.
Unfortunately, the Save() method results in an exception (message in German: "Token StartElement im Status Epilog würde in einem ungültigen XML-Dokument resultieren.").
An empty XML file is created.
This also happens when creating an order with minimal given items like only an order ID, and even with an empty order.
For me it seems like there is some invalid base XML tag created within the library.
It would be great if you could solve this error.
Thank you!
Edit: It happens in OrderWriter.cs; it cannot write the items ORDER_ITEM_LIST, ORDER_SUMMARY and TOTAL_ITEM_NUM.
Could maybe some none-existing URLs on top (xmlns, schemaLocation etc.) be the cause?
PRODUCT_COMPONENTS is not available under ORDER_ITEM
Hello,
I download orders from an FTP folder and have to process them afterwards. However, I have the problem that OrderResponse is always empty.
I load the content of the orders in a MemoryStream and call OrderResponse.Load(Stream)
.
I have attached a sample file (anonymized) including an image.
I use the latest available version via NuGet in a .NET Core 3.1 class library.
You have the element EMAILS in the ADDRESS, but when i look in the OpenTrans documentation ADDRESS only have a EMAIL element and the EMAILS element is in CONTACT_DETAILS. Can you please have a look on this?
Thanks
Hi Stephan,
it would be great if you could make some small adjustments regarding the Address item's country properties.
Thank you!
Add the element BUYER_PID in PRODUCT_ID
sorry, i only check if the object is null when the id is used not when the type is used
Hi Stephan,
I'm using your library to read an ORDER_RESPONSE, where the sender uses Parties with party roles that are not part of standard (e.g. "object_owner").
Fortunately your parser is able to read these values as PartyRoles.unknown
. However, I would like to know the original value, that was sent in the XML (i.e. "object_owner"). Therefore I would like to add an additional property to Party
.
/// <summary>
/// Original string values of each "unknown" party role
/// </summary>
public List<string> RolesUnknown { get; set; } = new List<string>();
To load and store this property, BaseReader
and BaseWriter
would need to be modified.
If you agree to this new feature, I can send you a pull request for these changes. At the moment, I cannot push to your repository.
regards
Rainer
Hi Stephan,
while reading / writing an order-response file from a supplier with your library I noticed some errors e.g.
PRODUCT_FEATURES
are missing description (there is an error in the reader)ALLOW_OR_CHARGES_FIX
which is part of PRODUCT_PRICE_FIX
is missingIs it ok, if I fix the errors I find and send you the pull requests? I don't want to open an issue for each of them.
regards
Rainer
It seems that the nuget for version 2.0.0 was packed wrong, so the assembly is not referenced and namespaces not visible.
The assembly is not in the lib subfolder where afaik it should be....
according to specification
Hi Stephan,
it would be great if you could add the following properties to Address item:
Thank you!
Hi,
would you mind publishing your library as a NuGET package?
Thank you,
best regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.