Automatically Add Extra Shipping Charge

  • Posts: 109
  • Thank you received: 5
10 years 10 months ago #174581

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.6

Hello, there.

Good evening!

I refer to the discussion in the following post:

www.hikashop.com/forum/4-how-to/8526-aut...shipping-charge.html

Specifically, in post #9644, Nicolas mentioned that the code was updated. Please could you confirm that the code in the post #8551 is the one that has been updated (i.e. that is the working one)? Otherwise, please could you direct me to the location of the latest code (for the discussion)?

Thanks.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #174619

Hello,
That thread is old, so now the solution will probably be to use the "price per product" option to add a price per product on each product page OR just create multiple shipping method regarding the order weight, and set different prices and weight limits (using the "Maximum/Minimum weight" options).
Also, can you tell me what do you exactly want to do so that I can give you the solution ? :).

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 10 months ago #174736

Thanks, Mohamed Thelji.

The business rules that I am trying to achieve are:

a) if the total order weight is < 5kg, the shipping fees will be $x
b) if the total order weight is > 5kg and < 10kg, the shipping fees will be $y
c) if the total order weight is > 10kg, the shipping fees will be $z

And I would want this to be calculated on the fly and be displayed on the mini cart; i.e. as the customer adds/delete a product, the total weight is re-calculated and the shipping fees adjusted accordingly.

Thanks.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #174801

Hello,
The solution will be to create 3 manual shipping methods via "Hikashop->System->Shipping methods" and for your first shipping method set the :
- Price option to $x
- Maximum weight value to 5
For the second shipping method set the :
- Price option to $y
- Maximum weight value to 10
- Minimum weight value to 5
For the third shipping method set the :
- Price option to $z
- Minimum weight value to 10

And I would want this to be calculated on the fly and be displayed on the mini cart; i.e. as the customer adds/delete a product, the total weight is re-calculated and the shipping fees adjusted accordingly.

You'll be able to display you shipping method price only during the "shipping" and "cart" step of your checkout workflow.

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 10 months ago #174907

Hello, Mohamed Thelji.

Good afternoon!

Thanks for the suggestion. I cannot find the maximum and minimum weight settings that you talked about. Please see the attached file. I am using Hikashop Business v 2.3.2.

Thanks.

Take care!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #174917

Hello,
You'll just have to check the "Restrictions" checkbox :).

The following user(s) said Thank You: Ed_Hika

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 10 months ago #176103

Hello, Mohamed Thelji.

Good evening!

Silly me! Yes, something so obvious.

In any case, I have a few questions regarding how Minimum/Maximum Volume works with the Minimum/Maximum Weight. I have read the documentation on www.hikashop.com/support/support/documen...ing-manual-form.html but need clarification.

1) Which takes precedence (Volume or Weight)? For example, for the following settings, how will the shipping charge be calculated.

Shipping Fees = $30
Minimum Weight = 1000g
Maximum Weight = 1999g
Minimum Volume = 1000 millilitre
Maximum Volume = 2999 millilitre

Shipping Fees = $50
Minimum Weight = 2000g
Maximum Weight = 2999g
Minimum Volume = 3000 millilitre
Maximum Volume = 3999 millilitre

a) If Cart Weight = 1500g and Cart Volume = 500 millilitre, what is the shipping fee?
b) If Cart Weight = 1500g and Cart Volume = 1500 millilitre, what is the shipping fee?
c) If Cart Weight = 1500g and Cart Volume = 3500 millilitre, what is the shipping fee?
d) If Cart Weight = 1500g and Cart Volume = 4500 millilitre, what is the shipping fee?
e) If Cart Weight = 2500g and Cart Volume = 500 millilitre, what is the shipping fee?
f) If Cart Weight = 2500g and Cart Volume = 1500 millilitre, what is the shipping fee?
g) If Cart Weight = 2500g and Cart Volume = 3500 millilitre, what is the shipping fee?
h) If Cart Weight = 2500g and Cart Volume = 4500 millilitre, what is the shipping fee?

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #176201

Hello,

Shipping1 :
Shipping Fees = $30
Minimum Weight = 1000g
Maximum Weight = 1999g
Minimum Volume = 1000 millilitre
Maximum Volume = 2999 millilitre

Shipping2 :
Shipping Fees = $50
Minimum Weight = 2000g
Maximum Weight = 2999g
Minimum Volume = 3000 millilitre
Maximum Volume = 3999 millilitre

1.
a) If Cart Weight = 1500g and Cart Volume = 500 millilitre, what is the shipping fee? Shipping1
b) If Cart Weight = 1500g and Cart Volume = 1500 millilitre, what is the shipping fee? Shipping1
c) If Cart Weight = 1500g and Cart Volume = 3500 millilitre, what is the shipping fee? No shipping method
d) If Cart Weight = 1500g and Cart Volume = 4500 millilitre, what is the shipping fee? No shipping method
e) If Cart Weight = 2500g and Cart Volume = 500 millilitre, what is the shipping fee? No shipping method
f) If Cart Weight = 2500g and Cart Volume = 1500 millilitre, what is the shipping fee? No shipping method
g) If Cart Weight = 2500g and Cart Volume = 3500 millilitre, what is the shipping fee? Shipping2
h) If Cart Weight = 2500g and Cart Volume = 4500 millilitre, what is the shipping fee? No shipping method

Last edit: 10 years 9 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 9 months ago #179406

Hello, Mohamed Thelji.

Good evening!

Thank you for your response.

The answers were not quite how I had imagined the weighting and volume limits to work.

Please could you help with the following 2 questions regarding shipping charges? They are:

1) Configuring Shipping Charges for Weight or Volume
The requirement here is to charge based on a weight range or volume range, and the greater shipping charge that is triggered based on the cart weight and volume will apply (please refer to the attached example).
When the cart weight or volume exceeds the configured volume, the system will not allow the user to check out and a message will be displayed.
Please let me know how to configure Hikashop and/or customise the code to enable this to happen. A sample code and the name(s) of the file(s) to edit will help greatly.

2) Shipping Charge to be Automatically Added and Displayed at the Cart Level
As the user adds/deletes items from the cart, the requirement is to have these shipping charges to be automatically calculated and displayed at the product/cart.php level.
Please let me know how to edit the product/cart.php file to enable this to happen.

Thank you very much for your help.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #179487

Hello,
1. The solution will be to directly create one shipping method per case.

2. Can you give me more detail about what do you exactly mean by "cart level" ?

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 9 months ago #179541

Thanks, Mohamed Thelji.

Please could you clarify "directly create one shipping method per case"?
Perhaps, I should clarify the scenarios in the previous illustration. The scenarios refer to the total cart weight and volume as the user adds items to the cart. For instance:
a) Cart A_1 refers to the total cart weight of 1500g and total cart volume of 500 ml, in which case the shipping charge will be $30.00
b) as the user adds more items to the cart, the total cart weight and total cart volume will increase; for example, Cart B_2 refers to the total cart weight of 2500g and total cart volume of 1500 ml, in which case the shipping charge will be $40.00

By "cart level", I am referring to the Hikashop cart module (as in product/cart.php file).

Hope this makes it a bit clearer.

Thanks for your help.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #179617

Hello,

1. You'll have to make sure that you have created a shipping method for each case (all the combination of cart dimension/weight).

2. To do that you'll have to edit the "Cart" file of the "product" view of your front-end template via "Hikashop->Display->Views", and then display a shipping price regarding the cart total weight/dimensions.

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 9 months ago #180147

Hello, Mohamed Thelji.

Good evening!

Regarding having "to make sure that you have created a shipping method for each case (all the combination of cart dimension/weight)", does that mean that the following shipping methods are required? They are:
a) Shipping 1a
Min Weight = 0
Max Weight = 1999
Fee = $30

b) Shipping 1b
Min Volume = 0
Max Volume = 2999
Fee = $30

c) Shipping 2a
Min Weight = 2000
Max Weight = 2999
Fee = $40

d) Shipping 2b
Min Volume = 3000
Max Volume = 3999
Fee = $40

e) Shipping 3a
Min Weight = 3000
Max Weight = 3999
Fee = $50

f) Shipping 3b
Min Volume = 4000
Max Volume = 4999
Fee = $50

g) Shipping 4a
Min Weight = 4000
Fee = not accepted

h) Shipping 4b
Min Volume = 5000
Fee = not accepted

Regarding point 2, "display a shipping price regarding the cart total weight/dimensions", are you able to provide the snippet of code that refers to the object and element for the shipping price?

Thanks for your help.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #180169

Hello,
1.

Regarding having "to make sure that you have created a shipping method for each case (all the combination of cart dimension/weight)", does that mean that the following shipping methods are required?

My advice was just to make sure that all your shipping method can handle the calculation of the shipping price regarding every combination of order weight/volume.
For example :
- Cart weight 1500g/ Volume 500 ml ==> $30
- Cart weight 1500g/ Volume 4500 ml ==> $50
- Cart weight 2500g/ Volume 500 ml ==> $40
- Cart weight 2500g/ Volume 4500 ml ==> $50

2. That won't be that simple to do it, you'll need some development skill to write your shipping calculation algorithm, the best solution will probably to find a third party developer via the " commercial jobs " section for example.

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 8 months ago #181249

Thanks for your response, Mohamed Thelji.

Regarding your advice...

My advice was just to make sure that all your shipping method can handle the calculation of the shipping price regarding every combination of order weight/volume.
For example :
- Cart weight 1500g/ Volume 500 ml ==> $30
- Cart weight 1500g/ Volume 4500 ml ==> $50
- Cart weight 2500g/ Volume 500 ml ==> $40
- Cart weight 2500g/ Volume 4500 ml ==> $50


I don't this this is a viable solution... does that mean that we have to specify every single gram and ml? I.e. did you mean that:
- Cart weight 1500g/ Volume 500 ml ==> $30
- Cart weight 1501g/ Volume 500 ml ==> $30
- Cart weight 1502g/ Volume 500 ml ==> $30
- Cart weight 1503g/ Volume 500 ml ==> $30
- Cart weight 1504g/ Volume 500 ml ==> $30
- Cart weight 1505g/ Volume 500 ml ==> $30
- Cart weight 1506g/ Volume 500 ml ==> $30
- Cart weight 1507g/ Volume 500 ml ==> $30
- Cart weight 1508g/ Volume 500 ml ==> $30
- Cart weight 1509g/ Volume 500 ml ==> $30
...
- Cart weight 1500g/ Volume 501 ml ==> $30
- Cart weight 1500g/ Volume 502 ml ==> $30
- Cart weight 1500g/ Volume 503 ml ==> $30
- Cart weight 1500g/ Volume 504 ml ==> $30
- Cart weight 1500g/ Volume 505 ml ==> $30
- Cart weight 1500g/ Volume 506 ml ==> $30
- Cart weight 1500g/ Volume 507 ml ==> $30
- Cart weight 1500g/ Volume 508 ml ==> $30
- Cart weight 1500g/ Volume 509 ml ==> $30
- Cart weight 1500g/ Volume 510 ml ==> $30
...
Unless I misunderstood, this will be crazy!

How does the Hikashop weight limit and volume limit work? The documentation is not specific enough. And I can't work the business logic through testing Hikashop.

Thanks,

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 8 months ago #181330

Hi,

No you will not have to create one solution per gram and ml.
You just have to create as many shipping methods as prices.

The system work with intervals, so set the min weight, max weight allowed and min volume and max volume for the $30 shipping. Then another one with the correct restrictions for the $40 one, etc.

So creating many methods like that, one per price range and which are covering all the possible weight and volumes is enough ;)

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 8 months ago #181444

Thanks, Xavier.

That sounds good and is what I wanted to hear. Sorry to be so pedantic, but could you please re-confirm Mohamed Thelji's response (see post #176201)?

I am reproducing the response here for convenience.

~~~~~~~~~ START OF TEXT ~~~~~~~~~

Shipping1 :
Shipping Fees = $30
Minimum Weight = 1000g
Maximum Weight = 1999g
Minimum Volume = 1000 millilitre
Maximum Volume = 2999 millilitre

Shipping2 :
Shipping Fees = $50
Minimum Weight = 2000g
Maximum Weight = 2999g
Minimum Volume = 3000 millilitre
Maximum Volume = 3999 millilitre

1.
a) If Cart Weight = 1500g and Cart Volume = 500 millilitre, what is the shipping fee? Shipping1
b) If Cart Weight = 1500g and Cart Volume = 1500 millilitre, what is the shipping fee? Shipping1
c) If Cart Weight = 1500g and Cart Volume = 3500 millilitre, what is the shipping fee? No shipping method
d) If Cart Weight = 1500g and Cart Volume = 4500 millilitre, what is the shipping fee? No shipping method
e) If Cart Weight = 2500g and Cart Volume = 500 millilitre, what is the shipping fee? No shipping method
f) If Cart Weight = 2500g and Cart Volume = 1500 millilitre, what is the shipping fee? No shipping method
g) If Cart Weight = 2500g and Cart Volume = 3500 millilitre, what is the shipping fee? Shipping2
h) If Cart Weight = 2500g and Cart Volume = 4500 millilitre, what is the shipping fee? No shipping method
~~~~~~~~~~ END OF TEXT ~~~~~~~~~~

In particular, I have the following questions:
1) why is answer to c) above "No shipping method"? How do I configure Hikashop such that the answer will be "Shipping2"?
2) why is answer to d) above "No shipping method"? How do I configure/customise Hikashop such that the system will throw up an error message and disallow the user to check out?
3) why is answer to e) above "No shipping method"? How do I configure Hikashop such that the answer will be "Shipping2"?
4) why is answer to f) above "No shipping method"? How do I configure Hikashop such that the answer will be "Shipping2"?
5) why is answer to h) above "No shipping method"? How do I configure/customise Hikashop such that the system will throw up an error message and disallow the user to check out?

Essentially, the business rules that I am trying to configure will be:
A) to charge the higher shipping fee between total cart weight and total cart volume
B) to disallow the user to checkout if either the total cart weight or total cart volume exceeds the highest limit

Thanks again.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 8 months ago #181453

Hello,
1.
A )
Because for :
- Shipping 1 : the weight is OK (1000g < 1500g < 1999g) But not the volume (1000 millilitre<2999 millilitre<3500 millilitre)
- Shipping 2 : the volume is OK (3000 millilitre < 3500 millilitre < 3999 millilitre) But not the weight (1500g<2000g<2999g)
B )
You'll have to enlarge your weight restriction so that 1500 will be included.
2. Because 4500 millilitre isn't included in your 2 shipping volume restriction.
3. Because 500 millilitre isn't included in your 2 shipping volume restriction.
4. Because 1500 millilitre isn't included in your 2 shipping volume restriction.
5.
A ) Because 4500 millilitre isn't included in your 2 shipping volume restriction.
B ) Having a "No shipping method was found" or "Package too large" will be enough to throw up an error message and disallow the user to check out

Last edit: 10 years 8 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 2 months ago #202924

Hello, Mohamed Thelji.

Good evening!

Please could you tell me the name of the function and the php file where the code which determines the shipping method is located?

Also, if you could tell me where in the checkout file the abovementioned function is called from, that will be most appreciated.

Thanks.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 2 months ago #202932

Hello,
The restrictions are managed through the file "administrator\components\com_hikashop\helpers\helper.php" on the "onShippingDisplay" function.

Please Log in or Create an account to join the conversation.

Time to create page: 0.113 seconds
Powered by Kunena Forum