Shipping Cost Problems

Posts: 5
Joined: 10/13/2008

Hi everyone - this is the first Ubercart that I have installed but I have experience with other eCommerce packages and I am perplexed to say the least. I have never run into such problems setting up a cart before. I am attempting to get this new site online and can' t get the shipping prices (they are all flat rate no UPS no FEDEx NO USPS) to display on the order and get added to add to the order total on a DRUPAL 5.10 site.

* I have shipping and shipping quotes intalled and enabled under modules
* I have shipping quotes enabled under the store settings
* I have each of the shipping options created under shipping quotes and enabled - This one mystified me since
each product that I entered had the flat rate that we wanted to charge filled in the default shipping box nothing fancy since most of our customers will only buy one item - one CD is shipped free - 5 CD pack - $2.00 shipping - 10 CD Pack - $4.00 shipping - Books - 3.00 and DVDs - 2.00 but I went ahead and entered each of those shipping charge options under shipping quotes since filling in the default shipping charge without creating the shipping quotes did not work. Now I have this list of all the shipping charges on each content form - the default would have sufficed (I think)
* All products are shippable and that box is checked on each content form when I entered the product. I verified this by checking the product database and each product has a "1" under the shippable option.
* I have unchecked the "hide shipping when product not shippable" option
* Calculate shipping charges does not work at all anywhere in the store - the message box on the order form says "Javascript must be enabled" but I know it is enabled since I tested it on a site that I did that uses Javascript.

When I attempt to place a test order (PayPaL Sandbox) the order is added to the cart with no shipping charge....even checking out does not add shipping charges. Placing multiple items in the cart and checking out does not produce a shipping charge.

* I have never encountered any question during the order process that asks about shipping

I am now officially mystified as to why this does not work - it seems too complicated to get this to work (my frustration, probably) as I have worked on this problem ALL weekend.

I have looked at documentation and read forum posts until I don't want to read anymore - Can someone help or point me in th right direction.

Thanks in advance for any help

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

Do you see shipping charges if you don't use PayPal? As in, the regular Ubercart checkout?

Posts: 5
Joined: 10/13/2008

Hi - thanks for replying. I did not think of that so I went into admin and disabled the PayPal module, leaving all the other modules (shipping, shipping quotes, gateway, payment and so on) enabled and nothing.....no shipping charges on check out. The only payment option offered was check/money order. I am pulling my hair out on this one!

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

Quote:
Calculate shipping charges does not work at all anywhere in the store - the message box on the order form says "Javascript must be enabled" but I know it is enabled since I tested it on a site that I did that uses Javascript.

I think this is the problem you need to address. If you post a link to your site we can take a look, but I'm guessing maybe your theme doesn't include the JavaScript files needed by the checkout process...

It would also help to post what version of Drupal and Ubercart you're using.

--

<tr>.

Posts: 5
Joined: 10/13/2008

Ah - I wasn't aware of any javascript files that needed to be uploaded.....I just installed the necessary modules/packages mentioned in the docs - here is a link to one of the products in the store.

http://electiondefensealliance.org/electronic_voting_threat_democracy_10...

I published the content so you can access it. There is a four dollar shipping charge on that particular product. You can check out- I have re-enabled the PayPal module and have the sandbox enabled. The store is running under DRUPAL 5.10 and I am using Ubercart 5.x.1.4

Thanks again for any help you can offer

Posts: 8
Joined: 10/09/2008

Same problem here after an upgrade to 1.5

"Javascript must be enabled to view the order total preview" is displayed with Flat rate shipping with PayPal enabled in a box in the Payment method section just below "Select a payment method from the following options."Note that "Payment Method" and radio buttons for Paypal and Check or money order still display.

IE reports: 'getElementById' is null or not an object. Line 13 Char 5

Chrome reports: Uncaught TypeError: Cannot read proerty 'getElementById' of undefined
http://mydomain/cart/checkout (line 1)

Firebug doesn't catch it. I've dug through all the included JS I can find, with no luck.

Posts: 8
Joined: 10/09/2008

It looks like similiar issue is also discussed here:
http://www.ubercart.org/forum/support/6111/error_javascript_must_be_enab...

where problem appears to have been in uc_taxes.js In this installation UC Taxes is NOT enabled

Problem site is using:
Drupal 5.7
Ubercart 5.x-1.5

Also occurs when theme is set to Garland - that should rule out theme related issues.

Posts: 5
Joined: 10/13/2008

Our organization is tax exempt so I am not using the tax module - I did not even enable it. We are using a custom theme, however. I was not at the organization when it was created so I don't know anything about it.

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

Thanks for the link. As I suspected, none of the Drupal JavaScript files are getting loaded, so of course things won't work. This is because your theme page.tpl.php is failing to <?php print $scripts; ?> in the head. The $scripts variable contains the HTML to load all the scripts used by Drupal and any Drupal module, including Ubercart.

--

<tr>.

Posts: 8
Joined: 10/09/2008

My theme *is* calling

<?php
print $scripts;
?>
:

<head>
<title><?php print $head_title; ?></title>
<?php print $head; ?>
<?php print $styles; ?>
<!--[if IE]>
<link rel="stylesheet" href="<?php print $base_path . $subtheme_directory; ?>/ie.css" type="text/css">
<![endif]-->
<?php print $scripts; ?>
</head>

It also isn't working for me in Garland. Latest config:

*Updated Drupal to 5.11
*Update Ubrowser 5.x-1.4
*Update Table API to 5.x-1.6

*Enabled Taxes (just for grins)

Removed and Uninstalled:
* Google Analytics
* GA for UC
* Fedex
* UPS
* Credit Card
* Paypal
* Test Gateway.

So I've got a Flat Shipping rate defined and COD / Check / Other. Not sure where to go from here.

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

None of the Drupal JavaScript files show up in your HTML (well, some do, but inside an HTML comment). So, since you do have a print $scripts, $scripts must be empty. Maybe _phptemplate_variables() has been redefined in your template.php?

Also, are you absolutely sure you're looking at the right page template? Because in the page source this is what I see:

<head>
  <title>Checkout | Election Defense Alliance - public site</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">@import url(http://www.electiondefensealliance.org/sites/all/modules/civicrm/css/civ...);</style>

<!--[if lt IE 7]>
    <script type="text/javascript" src="/misc/jquery.js"></script>
    <script type="text/javascript" src="/misc/drupal.js"></script>
    <script type="text/javascript" src="/sites/all/modules/nice_menus/nice_menus.js"></script>
    <![endif]-->
  <style type="text/css" media="all">@import "/files/css/309a57a5115cc55a388d0e6eef5887e4.css";</style>

  <meta name="Keywords" content="vote,voter,rights,election,national,president,reform,right,secure,transparent,count,impartial,independent">
  <meta name="Description" content="Election Defense Alliance (EDA) is building a national citizen movement to expose electoral fraud and establish electoral integrity, so that governments accountable to the people are legitimately elected.
">
  <script type="text/javascript"> </script>
</head>

This is obviously *not* generated by the code snippet you posted. Where did the meta tags come from? Where did the <!--[if IE]> go, and where did the <!--[if lt IE 7]> come from? It really looks like it's a problem with your theme. Are you sure you tried it with an unmodified version of Garland? If template.php was messed with, it would be normal to stick those changes into any theme installed on your site, breaking them all.

--

<tr>.

Posts: 8
Joined: 10/09/2008

There are two of us here with the same problem.

Shadow has the non-profit. I have the site that's not making any profits until I figure this out.

I posted the code theme code snipped above and I've got a brand spankin' new install of Garland 5.11 that breaks. Sorry for any confusion.

Posts: 5
Joined: 10/13/2008

It just calculated the shipping charges!!!!! Two days I worked on that! I put the line right after the print styles line and bingo! Thanks so much!

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

dkopecek wrote:
There are two of us here with the same problem.

Shadow has the non-profit. I have the site that's not making any profits until I figure this out.

I posted the code theme code snipped above and I've got a brand spankin' new install of Garland 5.11 that breaks. Sorry for any confusion.

Post a link to your site please.

--

<tr>.

Posts: 8
Joined: 10/09/2008

Problem resolved with jQuery.js downgrade...

Quote:

Well, Firebug tells me there's a JavaScript error on your cart/checkout page, so the JavaScript that handles the shipping quote and payment quote never gets run - that's the root cause of your problem.
I noticed you're running jquery_update 1.0 - perhaps that could be an issue. I know that jquery_update 2.0 works with Ubercart 1.4, but I don't know if 1.0 causes problems and I don't know if either works with Ubercart 1.5.
I would bet you're seeing the same thing as http://www.ubercart.org/issue/6905/calculate_shipping_resets_payment_opt..., which, to summarize, is a problem resulting from the changed semantics of the jQuery end() method between jQuery 1.0 and jQuery 1.1, coupled with new .js in Ubercart 1.5 that makes extensive use of jQuery end().
I suggest turning off jquery_update temporarily to see if it fixes the problem, and if it does then add your experience to the above thread.

TR, You are the MAN !

My version of jquery.js had this as the first line:

// JQuery 1.1.2

I grabbed a copy from an older development version with this version info:

// $Id: jquery.js,v 1.6 2006/12/23 21:46:35 dries Exp $

I turned off jquery_update & after flushing all browser caches and using the Devel Module to flush Drupal's caches all is working again.

Thank you.