Jump to content

Develop a carrier module without range: the carrier option does not appear


bourdux

Recommended Posts

Hello everyone,

 

I am the happy owner/developer of a Japan-based e-commerce website. I would like my customers to be able to use the Kuroneko carrier service http://www.kuronekoyamato.co.jp/en/ .

 

The problem is that Kuroneko calculates its fees not according to the weight, but according to the box size. I started by developing an algorithm that calculates the final box size and it seems to work.

 

The problem is that I don't seem to manage to integrate this module. I adapted the example available at the following address: http://doc.prestashop.com/display/PS14/Carrier+modules+-+functions%2C+creation+and+configuration as shown in the attached file.

 

In order to test the simplest behavior possible, I set "need_range" to 0 and defined the shipping cost as follows:

 


public function getOrderShippingCostExternal($params)
{
echo("helloExt");
var_dump($params);
return 300;
}

 

I just wanted to know what was happening.

 

The problem is that the carrier does not appear in the list, even if I think I configured the zones properly (The other carriers created from the back-office do not cause any problem and appear in the list). Since the shipping cost calculation does not use ranges, the carrier should appear, even I don't define them.

 

Does someone know what is going on?

 

Thank you in advance!

kuroneko.php

Link to comment
Share on other sites

After having looked carefully, I think that the problem comes from the Carrier class, in the getCarriersForOrder method. This method will only fetch carriers that are either free or have a behaviour defined for weight or price range. I think I will override this class to add a new shipping method.

 

I'll let you know how it goes.

Link to comment
Share on other sites

  • 2 weeks later...

hi. i have to setup similar scenario. My problem is related to european carrier, which have different proces for different weights, and have some sizes limits. together there are some percentage to cover fual and highway.. i would be verry happy to hear about your progress, as this feature is needed to integrate into cariers mothods.

Link to comment
Share on other sites

I actually did not make any progress on the matter yet since some more urgent matters came up in between. I just started my business and I thought it would be more time efficient if I started by connecting to customers in the real world first :)

 

I'll post again when I come back to this matter, maybe at the end of October. In the meantime, you might want to check if the carriers you wish to use have a web service to calculate shipping fees. You could also explain the matter in the conditions of delivery page, and mail the customers directly about shipping fees after the order. That is what I am doing, as I do not have orders very frequently (working in original artworks sale, with few orders online).

Link to comment
Share on other sites

  • 10 months later...
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...