6 replies [Last post]
melon@drupal.org's picture
Offline
Joined: 08/12/2007
Juice: 22
Was this information Helpful?

I started to work on a store for my client here in Hungary. I am using latest Drupal 5.x and Ubercart 1.3. The store will use only domestic shipments and the shipping rules are really simple. However, I feel stuck when tried to configure shipping rates with flatrate.

- First rule is to check if the order subtotal is greater than or equal of the configured threshold. Thus, if a customer spends big bucks, receives free shipping, otherwise it's a fixed fee.

- The second rule would be to check all product dimensions against a configured threshold. If a customer buys a big package (or a single large item) - e.g the total of length, witdh OR height is above or equal of a specified value, additional fees should be applied, regardless of the base shipping fee (which may or may not be free)

I could set up the first rule easily with flatrate and workflow-ng, and it works like a charm.
But how do I configure the second rule (based on dimensions?) I found no options in workflow-ng for dimensions, only weight.

If I should start writing a small helper module for this, where should I start? Any comments appreciated, thanks.

TR
TR's picture
Online
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: Flatrate shipping based on dimensions - any thoughts?

If you have a specific product which requires an extra shipping fee because of its size, you can edit that product (on the node/#/edit page) and override the default flatrate shipping charges.

If you want a more general system of calculating the shipping cost based on package dimensions, you will have to write some custom code. You will need to write code to package small items into a larger box, and code to determine a shipping cost based on the size of the larger box. You can use the existing shipping modules as a starting point.

Or you can always write a new Workflow-ng condition (to check dimension) that you can then apply to your existing shipping methods. Again, look at the code for the existing shipping methods to see how Workflow-ng conditions are defined.

<tr>.
Danny_Joris's picture
Offline
Joined: 05/09/2009
Juice: 199
_

Hello ,

I would like to try to write a 'conditional action' like this for UC2. I'm not really experienced with module writing, but I might be able to tweak something if I find another example of a conditional action somewhere in the code.

Do you have any quick hints or documentation that could be useful for this? Any info is very much appreciated. If I succeed, I'll give it back to the community.

Cheers,
Danny

sandroz's picture
Offline
Joined: 08/05/2009
Juice: 25
Hi, Have you written that

Hi,

Have you written that module?
Could you provide it here? I am looking for exactly the same thing...
Having a condition wich calculates the package dimension.

Best Regards
Sandro

sandroz's picture
Offline
Joined: 08/05/2009
Juice: 25
Re: Hi, Have you written that
Danny_Joris's picture
Offline
Joined: 05/09/2009
Juice: 199
_

I wouldn't say sollution yet. I'm quite stuck as I'm not a developer.

Danny_Joris's picture
Offline
Joined: 05/09/2009
Juice: 199
_