Calculate Shipping Costs
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!
Calculate Shipping Costs
Hey there!
I would like to calculate the shipping costs like that: "weight of products" * "quantity of products".
How is the simplest way to do it?
PS: I'm an absolute beginner.
Thanks for feedback.
(PHP: 7.1.23, Aimeos: 18.7.3)
I would like to calculate the shipping costs like that: "weight of products" * "quantity of products".
How is the simplest way to do it?
PS: I'm an absolute beginner.
Thanks for feedback.
(PHP: 7.1.23, Aimeos: 18.7.3)
Re: Calculate Shipping Costs
There's no existing service decorator for this. The "Weight" decorator only enables or disables delivery options if the weight of the products in the basket is within the configured range:
https://github.com/aimeos/aimeos-core/b ... Weight.php
You can use it's code as base and multiply the weight in the calcPrice() method by the amount per kilo or whatever your metric is. For details, please have a look into this article:
https://aimeos.org/docs/Developers/Libr ... _decorator
If you are very new, you should read the developer documentation first:
https://aimeos.org/docs/Developers
https://github.com/aimeos/aimeos-core/b ... Weight.php
You can use it's code as base and multiply the weight in the calcPrice() method by the amount per kilo or whatever your metric is. For details, please have a look into this article:
https://aimeos.org/docs/Developers/Libr ... _decorator
If you are very new, you should read the developer documentation first:
https://aimeos.org/docs/Developers
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: Calculate Shipping Costs
hello ,
I am facing some problem in integrating delivery method ,currently I am using UPS Rate API to grab all the rate but problem is that i cant access that rate in response even that i dump my response variable noting happen , and aimeos moves to next step which is the selection of payment method and after that it moves to payment gateway ,
my question is that how can i get dynamic rate and put that price in to my delivery method or add that charge in to invoice.
currently I am following this documentation https://aimeos.org/docs/2020.x/provider ... status.and doing work as according to your document but i cant figure out so please help me.
thankyou in advance
I am facing some problem in integrating delivery method ,currently I am using UPS Rate API to grab all the rate but problem is that i cant access that rate in response even that i dump my response variable noting happen , and aimeos moves to next step which is the selection of payment method and after that it moves to payment gateway ,
my question is that how can i get dynamic rate and put that price in to my delivery method or add that charge in to invoice.
currently I am following this documentation https://aimeos.org/docs/2020.x/provider ... status.and doing work as according to your document but i cant figure out so please help me.
thankyou in advance
Re: Calculate Shipping Costs
Implement a service decorator and add it to your configuration in the services panel of the admin backend (that's important for using it!):
https://aimeos.org/docs/2020.x/provider ... ecorators/
https://aimeos.org/docs/2020.x/provider ... ecorators/
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