Closed lichesser closed 5 years ago
Hy,
a little refactoring of our code helped to make the product class extension work. What we found out is, that we had to name the extension class also 'product' and trick around a little bit with namespaces (Bukimedia.PrestaSharp.Entities.product vs our project.PrestasharpExtension.Entities). Our class was first named 'myProduct' but this didn't work, since it seems that xml deserialization magically matches the singularEntityName, so it expected a 'product' and not a 'myproduct' and didn't return any data.
Since it's solved for us, I close the ticket.
Gtx, L
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hy,
is there a guideline on how to extend Prestasharp? Means, we use Prestasharp Nuget package within our project and found out, that there are properties missing in the webservice., So, that's why we want to extend f.ex the product class by 2 additional properties (used in step 4 of product backend). I started with adding a folder to my project called 'PrestasharpExtension', where I put in an 'Entities' and 'Factories' folder, where I places a product.cs and a ProductFactory.cs.
In my product.cs I did this:
[XmlType(Namespace = "myProject/PrestasharpExtension/Entities")]
and in my ProductFactory this
namespace myProject.PrestasharpExtension.Factories {
}
What I'd have expected is, that I can now use this new property within my product entity like
myproduct.additional_delivery_times = 1
but this doesn't work.
What am I missing?
Gtx, L