8 replies [Last post]
nick.w's picture
Offline
Joined: 06/07/2011
Juice: 14
Was this information Helpful?

Hi everyone,

I'm a pretty new Drupal/Ubercart user and I haven't had any luck locating any information regarding this issue (either in this forum or via Google search) so I truly apologize if somebody else has already posted on this.

I've just finished a project on D6/UC2 that involved applying a new theme and adding/changing some products, attributes, and options. All the work is completed and working, but for some reason, when you get to the final page before submitting the CC info for processing (/cart/checkout/review), $14 is being chopped off the subtotal for the total price as below:

Payment method
Subtotal: $649.00
Total: $635.00

The reduction seems to be a flat amount as it does not differ based on the number of products in the cart or the prices of the individual items. I've been pulling my hair out for 2 hours going through each and every configuration setting without any luck locating anything that could be causing the problem. My question would be if anybody can point me in the direction as to where this $14 reduction is being applied? The problem seems to be occurring between /cart/checkout and /cart/checkout/review as on the previous page, "Subtotal" and "Order Total" are both correctly $649.00. I don't think this is a tax or shipping or product option pricing issue but I could be wrong. By the way, all of these products have the "product and its derivatives are shippable" checkbox unchecked and trying this out with the checkbox set did not make a difference.

Thanks in advance for any help you may be able provide

nick.w's picture
Offline
Joined: 06/07/2011
Juice: 14
Some further details

Since my last post, I have tried the following on a test copy of the DB/site:

disabling and re-enabling all Ubercart modules
uninstalling and re-installing all Ubercart modules

Neither of these things fixed the problem. As I mentioned before, neither taxes nor shipping nor coupon modules are installed or enabled and in the process of the original work, the only Ubercart related settings that I did touch were “Use collapsing checkout panes” and “Collapse current pane when next button is clicked” both of which I changed from checked to unchecked (reverting these settings did nothing).

This is truly frustrating and if I have to resort to manually hacking the cart code to add +$14 back to the order total to get this working, I would think that this is a severe indictment of the quality of Drupal and Ubercart.

end user's picture
Offline
Joined: 01/11/2008
Juice: 1198
nick.w wrote: I would think
nick.w wrote:

I would think that this is a severe indictment of the quality of Drupal and Ubercart.

if it was then everyone would be having this issue. What other modules do you have installed? Is this a regular product or a product kit? Are you using attributes? Have you tried this with a fresh install of D/.UC with just the bare minimum of modules?

nick.w's picture
Offline
Joined: 06/07/2011
Juice: 14
Re: nick.w wrote: I would think

Thank you for the reply. This was an existing site that I was asked to re-theme and provide some tweaks to the product selection process. I created a custom product and option selection page that uses the uc_cart_add_item() method to add the item with options and then redirect to /cart/checkout.

Installed modules aside from a handful of core optional modules (which I can list if you would like) ... those indicated with (*) are ones that I installed, the rest were previously installed and, other than the two checkboxes I mentioned in my previous reply, were left untouched:
CCK
*CCK Dates
*jQuery UI (for date the CCK date picker)

Ubercart:
Cart
Conditional Actions
Order
Product
Store
Attribute
Reports
Google Analytics for UC
Credit Card
Moneris Debit Button
Moneris Payment Gateway for Ubercart
Test Gateway

Other modules (which should be unrelated):
Views 2.5
FCKEditor
FAQs
*Menu Block
Webform
Secure Pages
LightBox2

I suspect that something is altering the "total" value of the order calculated by the cart but I have no idea where and would greatly appreciate any insight as to where this deduction may be taking place. Thanks again

end user's picture
Offline
Joined: 01/11/2008
Juice: 1198
Re: Re: nick.w wrote: I would think

Can you post a screen shot of the cart page with the item or an exact test item and then a screen shot of the checkout where the change happens?

nick.w's picture
Offline
Joined: 06/07/2011
Juice: 14
Screenshots

Here are the relevant screen shots:

cart-checkout.jpg corresponds to /cart/checkout <-- everything looks fine to this point
cart-checkout-review.jpg corresponds to /cart/checkout/review <-- $14 taken off and if you click submit order, the incorrectly adjusted amount is charged

Please let me know if you need any more information. Thanks again

AttachmentSize
cart-checkout.jpg 80.21 KB
cart-checkout-review.jpg 53.37 KB
end user's picture
Offline
Joined: 01/11/2008
Juice: 1198
Re: Screenshots

That's weird. Was this site running UC before? Is there some kind of conditional action that would change the price? No discount modules?

nick.w's picture
Offline
Joined: 06/07/2011
Juice: 14
Re: Re: Screenshots

Yes, it was running UC beforehand. I thought it might be related to the new products I created (I kept the old "deprecated" products in the system because I didn't know if it would/didn't want to break any of the old sales reports) but adding the old products to the shopping cart caused the same problem.

The conditional actions (which I've checked out previously) are as follows:

Update order status on full payment
E-mail admin checkout notification
E-mail customer checkout notification
Update order status upon checkout completion with full payment
E-mail an order update notification

None of the actions taken here seem to be the culprit, and besides, the trigger for each would appear to be after checkout completion, not during the checkout process. Further evidence that this is not the source of the problem would be the fact that I completely uninstalled and re-installed the module on a test copy of the site so the only triggers that should be remaining would be the default ones.

As for the the discount module, none is even installed ... there are modules for shipping and taxes, neither of which are enabled. At first I thought that perhaps there was a default shipping amount saved somewhere and since these products all have "product is shippable" unchecked, perhaps it was discounting this flat amount? I was not able to find such a setting. In your experience, are there any other modules/hooks/etc. that could be affecting the cart's total price? I have seen role-based discounts but I think that was on another Drupal site I was working on and the only other thing I thought might possibly be related is the "default price hander" in price handler settings ... but I am unable to see what this handler does and it seems innocuous enough from it's description.

Given that I uninstalled and re-installed the module (in the process wiping clean and re-initializing any of the Ubercart related data) and the problem still persists, is it fair to say that the problem is not with the module itself but with some other unknown interaction? And given that the previous statement is correct, and that the only changes I made were in creating a theme, juggling some menu items and page content, installing a handful of modules as described above, and making the two settings changes to the UC checkout process as I stated ... which of these changes would you finger in order as the most likely to cause such a problem? Is there anything else I can try short of debugging the cart code itself to figure out where it's being fed the discount?

Thanks again

nick.w's picture
Offline
Joined: 06/07/2011
Juice: 14
Hi End User, I've figured out

Hi End User,

I've figured out the problem and wanted to not only thank you for spending the time to try to help me but also wanted to give an explanation of the problem to (hopefully) help others avoid the 3+ days of frustration I have endured because of this issue. The problem was due to the CCK Date module that I installed ... it implements a hook called date_order() which was being invoked during uc_order_save() which calls uc_order_get_total() to get the value to write to the uc_orders.order_total field. date_order() returns a bunch of negative weights that uc_order_get_total() was happily adding to the calculated total, resulting in the $14 deduction. I've since uninstalled CCK Date and come up with an alternate solution for the content type that needed it.

Being that you are more experienced than I am with Drupal in general, I was wondering if you can suggest a shorter debug route than I took. I ended up having to hack uc_order.module, uc_cart.module, includes/module.inc, and possibly other files to figure out exactly which hook was being called. Then I had to grep for hook being called in order to figure out which module was in conflict ... surely there's a better way as a layperson would never have been able to figure this out.

Thanks