Hikashop Shipping Plugin For Rate per kg

  • Posts: 7
  • Thank you received: 1
9 years 10 months ago #186377

-- HikaShop version -- : 2.2.0
-- Joomla version -- : 2.5.11

Hi,
i want to create a plugin to calculate shipping price per kg and also change the total price which a user pays accordingly.
Does anyone know how to do this and where to implement this?

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

  • Posts: 2143
  • Thank you received: 747
9 years 10 months ago #186381

Hi,

Please look here: www.hikashop.com/forum/shipping-methods/...g-price-per-1kg.html

Additional explanation in Xavier's post here: www.hikashop.com/forum/install-update/87...s-kg-how.html#183902

And for an example see Nicolas' last post in this thread: www.hikashop.com/forum/install-update/87...s-kg-how.html#184142

Using the search here for e.g. "shipping per kg" or so will give you more.

Documentation on the manual shipping method: www.hikashop.com/support/documentation/i...ing-manual-form.html



BTW, you're on a fairly old HikaShop version, and a meanwhile unsupported Joomla version... time to update? ;)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: ruchika

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

  • Posts: 7
  • Thank you received: 1
9 years 10 months ago #186393

Hi lousyfool,
Thank you for your response!!

i have already seen the links mentioned by you. Also, i have created my own custom plugin for this . i have calculated the shipping price and total order price in the checkout process .
For e.g - if weight is > 400g then shipping price is increased by 2 for every kg.
This final total is shown to user in the checkout page.
the problem is now in the payment price or order price . When a user orders for the product his order full price is the old one but i want to overwrite this by my new calculation.

And regarding old version can't help it . its client's :)

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

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

Hello,
Your issue is probably coming from the way you developed your shipping method, note that you'll have to add your final rate like on every onShippingDisplay function of your shipping plugin, for example on the Australia post plugin :

foreach($rates as $finalRate){
$usable_rates[$finalRate->shipping_id]=$finalRate;
$cache_usable_rates[$finalRate->shipping_id] = $finalRate;
}

Also, note that you'll probably be able to do what you want by using the manual shipping method options.

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

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

  • Posts: 7
  • Thank you received: 1
9 years 10 months ago #186570

Hi,
thank you ! i will try to add the finalrate as you mentioned . This was missing in my plugin. :)

Also, i cannot modify the Manual Plugin because i think this would be not a good idea . In my plugin i have an extra field named "Rate per Kg" in the configuration page of the plugin through which user can enter the rate he wants to add to the shipping price after every kg > 0.4kg. Therefore i made my own plugin .

Note: i am developing hikashop plugin for the first time :)

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

  • Posts: 7
  • Thank you received: 1
9 years 10 months ago #186611

HI please can you tell me what is addRate() in aupost plugin ?

currently i am working on my plugin added the foreach as you mentioned but $rates array is coming blank. Also, "no shipping method found" message is displaying.

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

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

Hello,
The addRate() function of the AuPost plugin will only do the request to the Aupost server to gather rates information for your order.

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

  • Posts: 7
  • Thank you received: 1
9 years 10 months ago #186791

Thank you everyone for your response . I have made the plugin successfully as i wanted :)

Thank you all !! :)

The following user(s) said Thank You: Mohamed Thelji

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

Time to create page: 0.095 seconds
Powered by Kunena Forum