Flat Rate Shipping issue

Posts: 45
Joined: 09/03/2007

Flatrate is installed and enabled. I have input the flat rate amount 15.00 in the appropriate place under the product.

Problem: no flat rate is being charged.

When I go back in to the settings, the flat rate shows as 15 vs. 15.00, if this tells you anything.

thanks,

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

If you're using the dev version of Ubercart, you need Workflow-ng. If you're still on 7e...I don't know what's wrong.

Posts: 45
Joined: 09/03/2007

I'm on alpha 7e, are you implying I should upgrade to the dev version?

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

Not really. I just couldn't figure out why it wouldn't work in 7e. Now that alpha 8 is out, though, you can grab it and Workflow-ng and probably get things working.

Posts: 45
Joined: 09/03/2007

Will give that a try.

Posts: 45
Joined: 09/03/2007

upgraded to the latest and added workflow-ng.

Flat rate shipping still not being shown in the subtotal nor being passed to the merchant account.

Additionally, tax is not being calculated. I'm guessing it would require the customer to log in and give shipping address first, which is not done in my case.

Posts: 45
Joined: 09/03/2007

Within ubercart, I have pulled up a specific order. In those details, almostall of the data is correct, that is: product price, tax but no shipping charges. I just turned on the tax today, the transaction occured last week, so UC is showing a balance for the amount of the tax.

The issue I'm seeing is the point just prior to transmission to my merchant account, the only this showing is the product.

I'm confused as to when/how the customer data got transmitted back to UC and why the tax & shipping is not working.

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

When you said flatrate was enabled, did you mean the module or the quote method under Shipping quote settings? You need both for it to work.

Posts: 45
Joined: 09/03/2007

flatrate is enabled and flat rate per product is set in configuration under Shipping quote settings

Posts: 11
Joined: 11/08/2007

Hi,

I just had the pb: but it was runnig OK a few hours ago until I desactivated wroldquotes and other shipping modules...

So: desactivate workflow-ng module. To do that, you need to desactivate all shipping modules too:
- shipping
- shipping quotes
- flatrate
etc.

Then I refreshed some page to make sure it is not working anymore! like the cart page Smiling

Now it is time to reactivate the modules: should running fine Laughing out loud
Please give feedback.

Alex

Posts: 45
Joined: 09/03/2007

deselected: shipping quotes and flat rate, the only shipping modules I had activated. No change.

Shipping is still not showing up in the shopping cart.

Posts: 45
Joined: 09/03/2007

What do I need to do to get this working?

Everything is real slick until shipping and tax, then it falls apart.

Posts: 45
Joined: 09/03/2007

I might have the tax portion partially figured out. I went to workflow-ng and added a rule, there were none, so this might help.

BUT: no where in my processing until AT the merchant is the customer asked for their address, therefore the rule will never know where where the customer resides.

It seems that flat rate shipping should be inserted immediately and that is never inserted.

Posts: 42
Joined: 11/17/2007

Hi everybody, I have installed Ubercart on a brand new site, so I started with version alpha8. Everything works fine, except the flat rate per product.

I would like to set up my site to have a universal handling fee of (say) $3, and then a flat rate of (say) $1 per product. The handling fee is displayed fine when checking out, but I can't for the life of me get the flat rate per product to show up.

Yes, the module is installed. Yes, it is activated... yet no dice. Is it a bug?

BTW, KUDOS for the fantastic job done on Ubercart, I cannot give it anything but praise. It is by far the BEST shopping cart I have EVER tried!!! Commercial or otherwise!

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

How is the handling fee being applied to the order? If it's from the flat rate per order field, that is a separate shipping method from the flat rate per product. When they are both working, the customer will see both prices and be able to choose between them.

I'd suggest using the taxes module to put the handling fee on every order. Then make sure that the Workflow-ng configurations are set up correctly for the taxes and shipping methods.

Posts: 42
Joined: 11/17/2007

Thanks for your reply Lyle, my friend's store does not need to use taxes, so the module is not even installed. Are you suggesting to implement it anyway?

Here is how ideally we would like to set up the shipping rates and I can't for the life of me find out how: (I am using fake figures but you will get the idea). Roughly, the size/weight of the items for sale depend on the price; cheaper products, smaller packages. So I can think of two possible ways to calculate shipping costs:

Method 1: (requires entering weight of all products)

Handling fee: $3 per order
Shipping costs of all products combined (in addition to handling fee):
<100 grams: free shipping
101-200 grams: $0.50
201-300 grams: $1.00
301-400 grams: $1.50
401-500 grams: $2.00
>501 grams: $3.00

Method 2: (easiest but not exact)

Handling fee: $3 per order
Shipping costs of all products combined (in addition to handling fee):
Total purchase <$10: free shipping
$10.01-$15: $0.50
$15.01-$20: $1.00
$20.01-$25: $1.50
$25.01-$30: $2.00
>$30.01: $3.00

Is that possible at all? This btw would be most in line with the the way the postal service calculates their costs. Thanks ever so much, as I said, Ubercart is awesome, I love it more and more!

PS oh yes, in addition to all that, if the customer chooses to pick up their package, there won't be any shipping or handling at all... just to make your life even more complicated lol.

Posts: 21
Joined: 10/14/2007

This sounds great for what I am trying to do, but taxes are calculated by percentages. How would you go about adding $3 to each order?

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

Oops. Somehow I forgot about that detail. Sad

Back to the drawing board.

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

I'm under alpha8 with all the proper modules active and what I don't understand is that I created several products and I defined a flatrate cost per product and per order under the "Small package" settings. When I create the product I set the shipping settings to "Small package" on the "Default Product Shipping Type" and obviously I don't add anything to the "Flat Shipping Rate" textfield, which displays 0 as default.

Confirming the order the quote shipping is calculated from that 0 not from the "Small package" settings. If I reedit the product and set 3€ on the "Flat Shipping Rate" textfield and I reverify the order and 3€, are added as shipping cost. I reedit the value to 1€ and 1€ is added on the shipping cost.

So, is it no reading the "Small package" values at all? And how can I create other flat rate "packages"? That's the only part of ubercart I still don't understant to be able to operate.

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

It's not supposed to show 0 by default, but that happens because the flatrate is set to 0 when it is submitted as blank.

This will be fixed shortly, but until then, you can put -1 in the flatrate field on the product page to force it to use the default value.

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

Hi Lyle. I've done a new product as you suggested, "Small Package" under "Default Product Shipping Type" is default, and saved, supposing it was going to use these settings for flatrate. On Checkout I saw it was not adding shipping costs. Back to the product edition I see that it has already saved "0" as "Flat Shipping Rate" (it's already on the uc_flatrate_products table).

Editing that product with "-1" as you suggested for "Flat Shipping Rate" and saving. Updating the cart displays that it is considering now the price for that single product (or as many units) but it is not considering the price per order.

First I thought if it was a side effect of the stocklevels module, but the rest of the shop is working smoothly and I see that other people is complaining of the same problem.

Any idea?

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

The flat shipping rate per product is a completely separate thing from the flat shipping rate per order. In addition, neither of them have anything to do with the product's shipping type, "Small Package" or otherwise.

There used to be a field for a base price for shipping costs that would be added to the per-product rates. I don't know why it's gone, but I think that's where a lot of confusion has come from.

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

I see. Probably the problem is that the documentation for that part is quite short. From your words now I don't understand what does "Small Package" means on that process and how to make other "package arrangements".

> There used to be a field for a base price for shipping costs that
> would be added to the per-product rates. I don't know why it's gone,
> but I think that's where a lot of confusion has come from

Hmmm, where should it go. Now I see that I have to add the cost (for flatrate) to every product, but then how to consider a cost per order? I have an e-shop who wants to sell locally and that flatrate would be enough.

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

The idea is that different shipping methods can handle only certain kinds of package types. Our restaurant equipment business ships a lot of orders by freight, so I wrote a freight shipping method module in preparation for moving it to Übercart. Our products could then be set to be either "Freight" or "Small Package" items, and Übercart would know which quote methods it should use. No one has said they needed a freight shipping method, so it hasn't been released yet.

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

OK about the packages, it's a good idea. In any case, no order cost is added on completing ordering when using Flatrate, and it looks you could have some idea. I need to investigate it because is basic for my site.

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

I've tried to see where could the problem and I've described it more carefully on another thread:

http://www.ubercart.org/forum/bug_reports/1907/shipping_weight_ignored_c...

Posts: 1
Joined: 11/26/2007

I was having trouble with the "Weight Rate Per Product" shipping method; it was only calculating the base price and ignoring the "Default cost adjustment per weight unit" that I specified in the Shipping Quote Settings. Finally I got it to work by adding the additional amount to the product configuration for each product under "Shipping Rate by Weight".

It seems like if you specify it as a default on the Shipping Quote configuration, you shouldn't need to specify it on each product... or at least it should be documented more clearly. I tried using "-1" on the product page as Lyle suggested for the flatrate problem to force it to use the default, but on saving the product "-1" changed to "1".

Anyway it's a relief to get it working!

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

Hi mirabile.

I added that "-1" to some product just to test and I saw that ordering those products the system was charging the general cost per product as many times as products on the list. What has not worked at all is the cost per order. I started to look at the code and realized that the "-1" condition was there and started to work on changing things here and there, changing the callbacks to see which functions were called properly, which weren't and arrived to the conclussion that I'll post on the next post (I was reading that thread and another one from zmove complaining about the error you are pointing on wrong weight cost calculation and I posted there a problem related with the flatrate module).

What is true is that if no -1 or individual cost is added to the proper field when you enter a product it adds "0" by default what forces the system to now adding more cost for that product. Hmm, I don't know, something looks wrong to me on that default cost system.

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

That's what I posted on the other thread and deserves to be here.

This is really important and a serious problem. I've been digging with the flatrate shipping module and it doesn't add the cost for the order in any way, it just calculates the cost for each product. I need to know how all this works to develop a module for my local courier companies.

I been looking carefully the uc_flatrate_shipping_method function and looking at the "hook_shipping_method" page on the development area on this site, and also comparing this function to the equivalent one on the uc_ups.module I finally tried to simplify it to have the most clear model, which I think is the next one:

<? php
function uc_flatrate_shipping_method(){
  $methods = array();

  $methods['flatrate'] = array(
    'id' => 'flatrate',
    'module' => 'uc_flatrate',
    'title' => t('Flat Rate per Product'),
    'enabled' => true,
    'quote' => array(
      'type' => 'small_package',
      'callback' => 'uc_flatrate_quote',
      'accessorials' => array(
        t('Shipping Rate'),
      ),
    ),
    'ship' => array(
      'type' => 'small_package',
      'callback' => 'uc_flatrate_quote_order',
    ),
    'weight' => 0,
  );

  return $methods;
}
?>

If that's true something is broken on the module uc_quote. There's no way to callback the uc_flatrate_quote_order function. The code here is too simple, this array is not so complex, so the problem must be on the uc_quote module, but it's too complex to me to see where it could be.

It's hard to believe that this is working on any real site without modification and we need a solution to start ours shops. Please, Lyle, Ryan, any idea?

On the other hand, could it be related to the uc_flatrate_configuration() function and maybe to not having proper or enough workflow_ng_use_action calls?

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

BTW mirabile there is a discussion on your problem on the thread:

http://www.ubercart.org/forum/bug_reports/1907/shipping_weight_ignored_c...

where you will see a discussion running started by zmove.

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

Try looking at the function uc_usps_shipping_method(). Like the flatrate module, it has two separate shipping methods and shows how the shipping method hook needs to be written to make them both available.

I remember there used to be a setting for a starting shipping rate for the flatrate per product method. An order would start at that shipping cost and then add on the price per product. I think that's what you're looking for, but I don't know where it went.

I don't think I meant for it to disappear, so I'll put it back in.

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

Wops, wops. It's interesting, I've activated uc_usps_shipping.module and then uc_flatrate.module has started to work properly, and then, and then, I've understood that the cost per product and cost per order are two completely different methods of payment, not one method with two types of charges. All in all, is surprising that up to activating uc_usps_shipping.module it only uc_flatrate.module only exhibited one of the methods. Something looks weird on the quote shippement systems...

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

I think I had gotten the flatrate module confused with the weightquote module. Weightquote has a base rate for the starting price of shipping costs, so I don't think flatrate ever had it. Now it does.

Posts: 21
Joined: 10/14/2007

Awesome! That is just what I needed. Thanks a bunch.

Sorry I am still fuzzy about how things work here, is that in the Bazaar files?

Posts: 45
Joined: 09/03/2007

I'm still stuck on the flat rate issue.

I put 15.00 for the value, it then gets saved as 15, might not matter, BUT flat rate is never put in the shopping cart nor added at checkout.

Posts: 53
Joined: 11/17/2007

Brewski,
I had the same issue with flat rate set but not showing up.
This is the thread where I figured it out.

http://www.ubercart.org/forum/support/2050/shipping_not_working_flat_rat...

Hote that helps.

--

Thanks,
Claire
Tutus for Toddlers sells Tutus using UberCart for e-commerce with Drupal.

Posts: 5
Joined: 12/07/2007

Yes, I too can confirm that there are issues with calculating shipping costs and the issue is not isolated to flat rate, it is also vulnerable to weight quote and maybe more. Flat rate does begin to calculate properly when usps shipping quote module is active. I've also been able to get flat rate to work when weight quote is active and vice versa. I've also found that after getting flat rate to work I can now uninstall/deactivate the usps quote method and my shipping is still properly calculated for existing products and new products alike. There is something odd going on here...

--

Peace,
-mpare
--
Pare Technologies
Drupal Consulting, Themeing, and Module Development
806.781.8324 | 806.733.3025
www.paretech.com
Figure Something Out? Document Your Success!

Posts: 5
Joined: 12/07/2007

There are probably more appropriate places for me to post this and hopefully some of you who are more aquainted with the ubercart community can point me to the most suitable location but I've made some enhancements to the flat shipping module. People use flat shipping for various reasons, they don't want to get a ups account etc..., but my client didn't like that the customers where being charged the full amount if they ordered multiples of the same product, as it usually only costs a few dollars more per product, so I altered the module so that you have "An additional cost per item" field. The module behavior is this, if the customer orders more than 1 quantity of item A they are charged the base shipping price and the value for the additional cost for the remaining items. It's not the cleanest implementation as I choose to allow for NULL values in the database to save on having to extend the UI. So if you leave the field blank it will still charge the cost per product * quantity. If you enter 0 in this additional shipping field you get FREE shipping for the remainder of the items > 1. I have also incorporated a default option for the cost per additional item. Also I have written an upgrade script bringing it to update2. I have zero knowledge of pgsql so if anyone would like to check that it would be nice. I did not update the language file. This is not a final release nor do I have intentions of maintaining the code, unless of course there is a huge demand, and naturally it comes without warranty but I'm posting it here for all to use. Again this was just a quick and simple fix for my client but please feel free to use it and give me some comments.

AttachmentSize
uc_flatrate.tar.gz3.32 KB
--

Peace,
-mpare
--
Pare Technologies
Drupal Consulting, Themeing, and Module Development
806.781.8324 | 806.733.3025
www.paretech.com
Figure Something Out? Document Your Success!

Posts: 108
Joined: 10/31/2007
Getting busy with the Ubercode.

Hmmm, very interesting. I also realized that activating usps "forced" flatrate to work. As soon as I have time I'll test your proposed module. Thanks Smiling

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Sweet idea here... I'd say your best bet would be to either file it as an issue against the latest flat rate module (which has been undergoing quite a few changes the last couple of days) for Lyle to checkout or to post your module in the contrib directory (http://www.ubercart.org/node/add/contrib) for others to find. If this needs to remain a standalone module, my suggestion would be to rename it so there isn't a module name conflict.

Posts: 34
Joined: 08/19/2007

I also have not been able to get the flat rate shipping working.
this is my setup...
Drupal 5.5
Tried it on ucA8 ... and have since updated to bazaar(12/31)
Upgraded workflow-ng (all 4 parts on)
( I also reset(off then back on) all the modules involved as suggested above)
I have flat rate(7b) turned on as the only shipping method -
(SIDE NOTE in canada... so im not using the usps and im not using weights so i don't have the can post contrib mod active either... when I have weights mod turned on I can apply a preset weight starting amount which is the equiv to a flat rate.. as it passes that along properly without adding anything/kg since weights are unspecified per product - so that is a temp workaround...)

I create an active config event in wokflow-ng .. get quote via flat rate/order
I gave that event an action - fetch ship qoute
(I tried to add a condition -comparison for amount i.e. free shipping over $x or apply shipping if less than $x- but values are "fixed" at $0.00 - so i removed that, but i need this feature...)
so it is just the event and the action - no condition

In checkout it does not apply the shipping flat rate and I get the generic error message
"There were problems getting a shipping quote. Please verify the delivery and product information and try again."

and I also get this red box error when i hit admin pages
warning: Invalid argument supplied for foreach() in /var/www/bead-junction.com/html/modules/ubercart/shipping/uc_quote/uc_quote.module on line 1313.

any tips would be appreciated

Posts: 924
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

You shouldn't have to modify or activate the configuration in workflow_ng, that should be done automatically.

Regardless, this sounds a lot like the problem I was having. See http://www.ubercart.org/comment/9688/Re-Its-works-m for a "fix". My current theory is that workflow_ng has a bug, and all the shipping quote modules are affected because they use workflow_ng.

--

<tr>.

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

If you updated to the Bazaar version, what is the (7b) for? You should have a couple of flatrate shipping methods to use with workflow-ng. I'm confused about what your setup is now.

Posts: 34
Joined: 08/19/2007

Hmmm.. TR i think your hint is on the right track and i need to trigger the auto generation of the workflow configuration event and or generate a wider workflow - reset to default...
meanwhile
... After reading Lyles post I looked in th uc dir and found my install was pointing to old 7b version of uc_flatrate... an old 7b fix leftover...my bad for missing it when manually del those folders a few months back for 7C
So I deleted it and it is now pointing to the current uc_flatrate which is in the shipping folder

Looking good - flat shipping gets added,

however the condition <= $X ordertotal is still stuck at $0.00
Should these values be edited manually in code? as there is no ui to adjust the value
in order to result in free shipping over 50 bucks...
Thanks

Posts: 924
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

In admin/build/workflow-ng you can add and edit conditions for workflow_ng rules. Add a condition, select "Check order total", and fill in the blanks - the condition must then be met before the shipping quote is generated for that method. I was able to change the $ amount of the condition in the Alpha 8 version of the code.

I suggest updating the whole ubercart/shipping branch of code - it's not just the uc_flatrate module that's been changed, the uc_shipping module and the uc_quote module have also been updated. The changes go hand-in-hand, so you might experience weird effects by mixing versions.

--

<tr>.

Posts: 34
Joined: 08/19/2007

Yes thanks the conditions are now working for flatrate shipping ican enter the value but and it applies for < $50 but it returns the generic error (in checkout ) when the order is more than$50

thanks for the help

J

Posts: 34
Joined: 08/19/2007

Also when it applies the 5.00 shipping it seems that it replaces the gst (fed tax) line in the payment total and the order totaled incorrect due to the lack of the tax line gst is (it is there before doing the shipping calc... its as if the ajax is replacing a tax line with a shipping line...

Next time i tried to checkout, the payment total refreshed to dispaly the shipping inclusion and then did 2 more quick refreshes to include the gst back in the totals... so it seems inconsistant , i will continue testing to narrow it down... the next time it added the shipping and both taxes...

In the workflow ng conditions is there a control for the else part of the condition
if order (total <$50 )
fetch shipping quote...
else
skip this step while posting "free shipping " message...

thanks

Posts: 924
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

The bug you describe in the first two paragraphs sounds like a known bug in Alpha 8 that is now fixed in the bazaar version. I don't have links to the thread offhand...

--

<tr>.

Posts: 4
Joined: 01/15/2008

Hi, I'm newly registered here and I have a problem: I also can't get flatrate to do anything.

- The FlatRate module is enabled.
- Values are assigned to products.
- "Hide shipping information when possible for carts with no shippable items." is UNchecked.
- "Flat Rate per Product" is enabled in the Quote methods pane.
- There's a rule for it which was automatically created in Workflow-ng, which is active.

When you proceed to the checkout there is NO mention of shipping ANYWHERE. No messages, no errors, no nothing. Just goes straight from Billing Information to Payment Method.

If "Calculate Shipping Cost" is checked in the checkout panes setting window, then a block appears in the checkout with a "calculate shipping" button. This is not what I'm after though - when you click it nothing happens other than a kind of fancy horizontal gas-gauge!

I've tried all the fixes I can find here, from enabling the tax module to resetting the Workflow-ng rules, but no joy. I can't even get an error message about it - it just doesn't seem to be there at all.

What am I missing? Can anyone help me out?

Posts: 4
Joined: 01/03/2008

I need help with setting up the flat rate shipping calculation for orders over $100 it should be free shipping. I set up a new configuration ('Free shipping for orders over $100') in workfow_ng, modified the original 'Shipping quote via Flat rate per order' configuration to apply only for orders < $100. When I go to checkout try to calculate shipping - it shows an error for orders over $100

Posts: 16
Joined: 01/10/2008

I'm having the same results. Using 5x-1.0-beta2 on 5.5 and I get the error message: "There were problems getting a shipping quote...." for orders that qualify for the free shipping. The flat rate works perfectly for the lower value orders.
Checkout works (it appears) so really the problem is the customer should not see an error message but instead something like, "Congratulations you have qualified for free shipping."
So I edited to uc_quote.pot file but it still displays the original error message. I know it's a drupal thing but how do I make that work? Need to clear cache I think but how?

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

Create a new flatrate method that has $0.00 in all of it's fields. Set it up to be displayed on orders greater than $100. The error comes from the fact that no shipping quotes are being returned, not just free quotes.

Posts: 16
Joined: 01/10/2008

Thanks Lyle. That did it.

Posts: 73
Joined: 12/16/2007
Uber Donor

Lyle,

Great job on your freight module. Has this been released as a contributed module yet? It seems to be exactly what I need. If not, is there any other way to calculate freight charges from freight carriers?

Posts: 45
Joined: 09/03/2007

I just finished auditing my products and found the following flat rate issues:
>when a product is created that has a default flat rate, that same rate seems to also be automatically put in the box above the default rate, and I found that this ADDS to the default rate.

>When I choose more than one in quantity, the shipping rate is not being multiplied

Ideas??