Calculate Weight

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hello,

I need to calculate the weights for the product from the next scale:

local until 2kg 5euros, until 15kg 8 euros and 1 euro additional per kilo after that.

Region until 2kg 6euros, until 15kg 8 euros  and 1.5 euro additional per kilo after that.

National until 2kg 7euros, until 5kg 7.9 euros, until 10kg 8.9, until 15kg 9.9 and 1.8 euro additional per kilo after that.

Anybody knows how can I accomplish it?

Thank you in advance.
7 years ago
lumeEire wrote:
Hello,

I need to calculate the weights for the product from the next scale:

local until 2kg 5euros, until 15kg 8 euros and 1 euro additional per kilo after that.

Region until 2kg 6euros, until 15kg 8 euros  and 1.5 euro additional per kilo after that.

National until 2kg 7euros, until 5kg 7.9 euros, until 10kg 8.9, until 15kg 9.9 and 1.8 euro additional per kilo after that.

Anybody knows how can I accomplish it?

Thank you in advance.

Use Shipping by Weight computation method
7 years ago
I did see that already but my question is:

Do I need to create 5 new records by my example for the National service:
"National until 2kg 7euros, until 5kg 7.9 euros, until 10kg 8.9, until 15kg 9.9 and 1.8 euro additional per kilo after that"

Something like:

National2Kg:
- Order weight from     0
- Order weight to       2
- Additional fixed cost 7
- Lower weigh limit     0
- Rate per weight unit  0
- Charge percentage     0

National5Kg:
- Order weight from     2.01
- Order weight to       5
- Additional fixed cost 7.9
- Lower weigh limit     0
- Rate per weight unit  0
- Charge percentage     0

National10Kg:
- Order weight from     5.01
- Order weight to       10
- Additional fixed cost 8.9
- Lower weigh limit     0
- Rate per weight unit  0
- Charge percentage     0

National15Kg:
- Order weight from     10.01
- Order weight to       15
- Additional fixed cost 9.9
- Lower weigh limit     0
- Rate per weight unit  0
- Charge percentage     0

NationalOver15Kg:
- Order weight from     15.01
- Order weight to       1000
- Additional fixed cost 0
- Lower weigh limit     0
- Rate per weight unit  1.8
- Charge percentage     0

I cannot see it working.....

Thank you in advance.
7 years ago
lumeEire wrote:
I did see that already but my question is:

Do I need to create 5 new records by my example for the National service:
"National until 2kg 7euros, until 5kg 7.9 euros, until 10kg 8.9, until 15kg 9.9 and 1.8 euro additional per kilo after that"

Yes but you'd only need 4 records, the last record would look like:

National15Kg:
- Order weight from     10.01
- Order weight to       1000
- Additional fixed cost 9.9
- Lower weigh limit     15
- Rate per weight unit  1.8
- Charge percentage     0

The lower weight limit it the cutoff point at which the rate per weight unit is added to the fixed cost for each unit of weight above the limit. So a 20kg parcel would be charged at €9.9 + (5 x €1.8) = €18.90
7 years ago
I had added a list of shipping Methods

SELECT name FROM dbo.ShippingMethod

Local
Provincial2Kg
Provincial15Kg
Regional2Kg
Regional15Kg
Nacional2Kg
Nacional5Kg
Nacional10Kg

And I added the shipping by weight that shows in DB like:
SELECT
       [From] ,
       [To] ,
       AdditionalFixedCost ,
       PercentageRateOfSubtotal ,
       RatePerWeightUnit ,
       LowerWeightLimit  FROM dbo.ShippingByWeight


From  To  AdditionalFixedCost  PercentageRateOfSubtotal  RatePerWeightUnit  LowerWeightLimit
0.00  1000.00  3.00  0.00  0.30  15.00
0.00  2.00  3.45  0.00  0.00  0.00
2.01  1000.00  3.70  0.00  0.30  15.00
0.00  2.00  3.45  0.00  0.00  0.00
2.01  100.00  3.45  0.00  0.40  15.00
0.00  2.00  4.15  0.00  0.00  0.00
2.01  5.00  4.50  0.00  0.00  0.00
5.01  10.00  5.10  0.00  0.00  0.00
10.01  1000.00  6.25  0.00  0.50  15.00


The problem is that when I am going to the payments it shows several types of payments instead of show the calculation.

Could you advise?

Thank you in advance.
7 years ago
lumeEire wrote:
I had added a list of shipping Methods

SELECT name FROM dbo.ShippingMethod

Local
Provincial2Kg
Provincial15Kg
Regional2Kg
Regional15Kg
Nacional2Kg
Nacional5Kg
Nacional10Kg

The problem is that when I am going to the payments it shows several types of payments instead of show the calculation.

Shipping methods are used to offer alternative shipping services to the customer. From what you've described of your current setup it sounds like you only need 1 shipping method setup (let's call it Standard shipping), it's just that the price for standard shipping is different for different addresses and parcel weights.

At some later date you might want to introduce an express shipping method for some or all of the areas with faster service at higher prices. At which point you could add a second shipping method called express and create the corresponding shipping by weight records.

Alternatively it might be that with your current setup Local and Provincial deliveries are handled by the post office whereas regional and national deliveries use a courier company, in which case you might start with 2 shipping methods.

In any case you probably don't need a shipping method per weight bracket.
7 years ago
Hi,

You are suggesting to only use one shipping method but if that is the case. How can I configure the different prices when there are several depending on the weight and area.

Provincial until 2 kg 3,45 €, until 15 kg 3,70 € and 0,30 € after 15 kg

Regional until 2 kg 3,45 €, until 15 kg 3,70 € and 0,40 € after 15 kg

National until 2 kg 4,15 until 5 kg € 4,50 €, until 10kg 5,10, until 15 € 6,25 €  and 0,50 € after 15 kg

Local  3,00 every weight € and 0,30 € after 15 kg

How the system will be able to handle it?
7 years ago
lumeEire wrote:
Hi,

You are suggesting to only use one shipping method but if that is the case. How can I configure the different prices when there are several depending on the weight and area.

Provincial until 2 kg 3,45 €, until 15 kg 3,70 € and 0,30 € after 15 kg

Regional until 2 kg 3,45 €, until 15 kg 3,70 € and 0,40 € after 15 kg

National until 2 kg 4,15 until 5 kg € 4,50 €, until 10kg 5,10, until 15 € 6,25 €  and 0,50 € after 15 kg

Local  3,00 every weight € and 0,30 € after 15 kg

How the system will be able to handle it?

Yes one shipping method as configured on this screen: http://admin-demo.nopcommerce.com/Admin/Shipping/Methods

You still need multiple records setup for the Shipping rate computation method which is configured on this screen: http://admin-demo.nopcommerce.com/Admin/Shipping/ConfigureProvider?systemName=Shipping.ByWeight. One for each area and weight bracket.

The system will handle it because that's how it's been designed to work.
7 years ago
I think I will need to debug to see the calculations as it is not giving me the correct values.

When I hit the Estimated button could you tell me where to set the breakpoint in the code?

Thanks
7 years ago
It may be easier if you set breakpoint in the Shipping By Weight plugin

\plugins\nop.plugin.shipping.byweight\byweightshippingcomputationmethod.cs
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.