Closed polaije closed 5 years ago
Hello @polaije, I guess you already find out how to do that, but just in case, there is a SpecificPriceFactory
for creating specific prices, that's why product has no associations with them.
You need to set the id_product
property on each specific_price
instance, and then, use the Add
method from specific price factory for creating them.
Let me know if that solve you question. Also, there is a slack group created for solving questions like that, because the issue section of this repository is just for communicating bugs. Find out how to join to the slack group in the repository's home page.
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.
Hi, I have a new product and I add this list of specific prices:
List<Bukimedia.PrestaSharp.Entities.specific_price> SpecificPrices = new List<Bukimedia.PrestaSharp.Entities.specific_price>(); Bukimedia.PrestaSharp.Entities.specific_price Spe = new Bukimedia.PrestaSharp.Entities.specific_price(); Spe.price = Convert.ToDecimal(textBoxDiscount.Text); Spe.reduction_type = "percentage"; SpecificPrices.Add(Spe);
But how can I associate the specific price to the new product item ?newProduct.associations has no specific price function.
Thanks helping me. Jean-Marie