This seems like a huge problem. Here are the details.
I have a product class node, it has a base price of $55. There are 4 attribute options which add: $0, $144, $343, $542 to the base price (respectively). When the cart is previewed, the cost of the product with any of the 3 attributes that cost more than $0 is reflected in the cart total. However when the ORDER is previewed, and Submitted, the total show only accounts for the base price of the product, and NOT the attribute options.
The net effect of this is that products ordered with attributes that affect the price are sold only at the base price, and not at the adjusted price. This basically makes attributes useless for price adjustment.
is anyone else experiencing this? i have done some searches here and in the ubercart forums but haven't found anything.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 468572.patch | 805 bytes | douggreen |
Comments
Comment #1
Island Usurper commentedSounds like #449688: Price adjustments not carrying through to checkout. Make sure you also get the latest version of uc_discount if you are using it.
Comment #2
GregoryHeller commentedI'm not sure if it is a duplicate, we are not using uc_discount and our problem is in rc3, where as add1sun's was in rc1 and rc2.
Comment #3
douggreen commentedThis is not a duplicate. The problem is that uc_checkout_pane_cart() is using uc_cart_get_contents() and the statically saved order doesn't have the product attributes, possibly because this is happening around the time of the cart validate and uc_order_save(). I'm not actually sure why you're calling uc_cart_get_contents() here because the first argument is the $order which has the products with the attributes.
Since I'm not sure if we can just replace uc_cart_get_contents(), the attached patch checks if the $order has products, and if so uses the products from the order, and if not, then gets them from the cart contents.
Comment #4
Island Usurper commentedWell, I'm not seeing this behavior, so it might be that something else was changed. Try getting the dev version since I just updated it yesterday.
I believe uc_cart_get_contents() is used there to make sure that the order doesn't have any different products from what the customer sees in their cart. It is possible that someone could edit an order with the "in checkout" status, but those changes wouldn't be reflected in that customer's cart. That someone would have to be a store administrator, and there isn't a whole lot of time to do that usually, but something could happen.
Comment #5
douggreen commenteddoh! This problem was caused by some custom code (written by someone else) that worked on hook_order op=save and improperly called node_save() instead of drupal_execute() thus messing up the saved uc_cart_products entry. Sorry :(
Comment #6
info@matrixmedia1.com commentedi am having same issue using the ajax attribute calucation module. when attributes are slected i need price to change in sell price, can any one tell me why its not working after sucessful install of module? my site is http://www.matrixmedia1.com/content/2x6-ticketflyer
i am using drupal 6.11 with ubercart2.0