Custom shipping CalcPrice being overwritten for delivery
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Custom shipping CalcPrice being overwritten for delivery
I have a CalcPrice decorator for my delivery service. It hits an external API to get the costs for shipping.
I extended the Service\Provider\Base.php->calcPrice to take in an array of values from my external API function.
It defaults to an empty array if nothing is passed in.
The cost is present in the delivery option check screen, all the way through to the summary page. Once I click "Buy Now", the basket sent to the process payment to be saved as ordered has 0.00 for all shipping costs. The order->getCosts() is 0, as well as the delivery cost in the services array.
I have a feeling somehow a blank Price object is getting passed in to my services.
How can you persist shipping costs from the delivery selection screen all the way to an order?
Do I need to set the basket costs within my CalcPrice decorator?
I extended the Service\Provider\Base.php->calcPrice to take in an array of values from my external API function.
It defaults to an empty array if nothing is passed in.
The cost is present in the delivery option check screen, all the way through to the summary page. Once I click "Buy Now", the basket sent to the process payment to be saved as ordered has 0.00 for all shipping costs. The order->getCosts() is 0, as well as the delivery cost in the services array.
I have a feeling somehow a blank Price object is getting passed in to my services.
How can you persist shipping costs from the delivery selection screen all the way to an order?
Do I need to set the basket costs within my CalcPrice decorator?
Re: Custom shipping CalcPrice being overwritten for delivery
So far I found a workaround where I store the basket in the session, and then pull it out of the session before the transaction is written to the db.
Re: Custom shipping CalcPrice being overwritten for delivery
Your workaround should not be necessary. Can you post your code?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
