Dynamic delivery services
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 72
- Joined: 22 Mar 2021, 16:56
Re: Dynamic delivery services
Hello again,
Just visiting this, I notice now that when updating product quantities (via ajax) the price assigned in the service remains the same. If I then "checkout", the customer is sent to last step with the original price of the delivery service. But, because the quantities have changed, the weight of the shipment has changed, which requires recalculating.
In the above instance, I guess I need to go back to a plugin approach? Or at the very least a plugin that listens to address and product events which will remove the delivery service from the basket as a result requiring the user to request a fresh list of delivery services available for the current basket and weight?
The alternative is to recalculate this in the plugin, this means repeating api requests for the updated costs to the customer for their chosen delivery service. I don't know if this good given the amount of times the plugin might be called (but can be limited based on the previous discussions we've had around hashing).
I think for now so I can continue moving forward I will look to remove the delivery service, which I expect will force the user to revisit the step when checking out.
Is there any other approach I should or could be taking to manage this please?
Cheers,
Just visiting this, I notice now that when updating product quantities (via ajax) the price assigned in the service remains the same. If I then "checkout", the customer is sent to last step with the original price of the delivery service. But, because the quantities have changed, the weight of the shipment has changed, which requires recalculating.
In the above instance, I guess I need to go back to a plugin approach? Or at the very least a plugin that listens to address and product events which will remove the delivery service from the basket as a result requiring the user to request a fresh list of delivery services available for the current basket and weight?
The alternative is to recalculate this in the plugin, this means repeating api requests for the updated costs to the customer for their chosen delivery service. I don't know if this good given the amount of times the plugin might be called (but can be limited based on the previous discussions we've had around hashing).
I think for now so I can continue moving forward I will look to remove the delivery service, which I expect will force the user to revisit the step when checking out.
Is there any other approach I should or could be taking to manage this please?
Cheers,
-
- Posts: 72
- Joined: 22 Mar 2021, 16:56
Re: Dynamic delivery services
So it seems removing the service from the basket via the plugin fails to interrupt the steps in the checkout process once the user attempts to checkout again.
I was hoping the removal of the delivery service would force this step as the next step as its incomplete.
I was hoping the removal of the delivery service would force this step as the next step as its incomplete.
Re: Dynamic delivery services
If you didn't disable the ServicesUpdate plugin then this sounds like a bug because if the quantity is changed, the services should be rechecked.createanet wrote: ↑27 May 2021, 08:36 Just visiting this, I notice now that when updating product quantities (via ajax) the price assigned in the service remains the same. If I then "checkout", the customer is sent to last step with the original price of the delivery service. But, because the quantities have changed, the weight of the shipment has changed, which requires recalculating.
Client HTML:
https://github.com/aimeos/ai-client-htm ... #L587-L590
Frontend controller:
https://github.com/aimeos/ai-controller ... .php#L311
Basket:
https://github.com/aimeos/aimeos-core/b ... e.php#L609
ServiceUpdate Plugin:
- https://github.com/aimeos/aimeos-core/b ... hp#L44-L51
- https://github.com/aimeos/aimeos-core/b ... e.php#L105
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Dynamic delivery services
These lines should stop the the checkout at the delivery step if no delivery option is in the basket:createanet wrote: ↑28 May 2021, 06:25 So it seems removing the service from the basket via the plugin fails to interrupt the steps in the checkout process once the user attempts to checkout again.
I was hoping the removal of the delivery service would force this step as the next step as its incomplete.
https://github.com/aimeos/ai-client-htm ... #L263-L271
Can you check why it's not working in your case?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Dynamic delivery services
I think we've fixed the problem with stopping at the checkout step if you remove e.g. the choosen delivery option from the basket:
https://github.com/aimeos/ai-client-htm ... edd8d07c6f
https://github.com/aimeos/ai-client-htm ... edd8d07c6f
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 72
- Joined: 22 Mar 2021, 16:56
Re: Dynamic delivery services
Thanks for looking into this...
Im still working on the 2020.10 LTS, and for now have no plans to upgrade to 2021.*.
What is required for me to pull in these changes please?
TY
Im still working on the 2020.10 LTS, and for now have no plans to upgrade to 2021.*.
What is required for me to pull in these changes please?
TY
-
- Posts: 72
- Joined: 22 Mar 2021, 16:56
Re: Dynamic delivery services
Just incase it is/isnt the correct way I have managed to get the updates via the following command.
Thanks again
Code: Select all
composer req aimeos/ai-client-html:2020.10.x-dev
Re: Dynamic delivery services
That's correct.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star