Add percentage of shipping cost to shipping cost

  • Posts: 11
  • Thank you received: 0
3 years 1 month ago #336489

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.10.2
-- PHP version -- : 7.4.14
-- Browser(s) name and version -- : Chrome 94.0.4606.81

Hi,

I'm trying to add a percentage of the shipping cost to the shipping cost, using the USPS plugin. As far as I can tell, the current percentage and formula fields only take the price of the items in the cart. I'd like to take the USPS generated shipping rate and multiply it by 1.2. Is there an easy way to do this that I'm missing?

Any help would be greatly appreciated.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 1 month ago #336497

Hi,

There is indeed no option to do that. You have the Weight approximation and Dimension approximation settings that you can use to increase the weight/dimensions of the package and thus the shipping price calculated by USPS.
Otherwise, to really do what you want, you would have to add the line:

$usps_rate['Rate'] = $usps_rate['Rate'] * 1.2;
before the line:
if(isset($currency) && $currency != $rates[$type]->shipping_currency_id)
in the file plugins/hikashopshipping/usps/usps.php
Note however that you would loose the change after each update of HikaShop.

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

Time to create page: 0.052 seconds
Powered by Kunena Forum