Closed (fixed)
Project:
UC Variable Price
Version:
7.x-1.0-rc2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2011 at 04:54 UTC
Updated:
19 Feb 2012 at 22:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
oromix commentedI have the same situation... default installation of Ubercart, using one attribute on the product. The entered amount in the variable price does not display in either the cart or the checkout screen except for the subtotal and total amounts on the checkout screen.
Comment #2
oromix commentedI made a patch to fix this issue. The price of the item was getting correctly set, however the "display_price" was not.
Please test and let me know if it doesnt work.
Comment #3
mcfilms commentedHi oromix,
The patch does not quite work. I get the following error when I try and patch uc_varprice 7.x-1.0-rc2:
--------------------------
Computer:~/Desktop/VARPRICE/uc_varprice me$ patch < uc_varprice_cart_display.patch
patching file uc_varprice.module
Hunk #1 succeeded at 223 (offset -3 lines).
can't find file to patch at input line 18
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/sites/all/modules/custom/custom_prospera/custom_prospera.module b/sites/all/modules/custom/custom_prospera/custom_prospera.module
|index ade5c7b..3ecee5b 100644
|--- a/sites/all/modules/custom/custom_prospera/custom_prospera.module
|+++ b/sites/all/modules/custom/custom_prospera/custom_prospera.module
--------------------------
File to patch:
--------------------------
So the patch is looking to integrate with your custom_prospera module. When I try and run this partially patched file on the server I get the same results. The default price id the only price seen in the shopping cart.
PS -- Now that I look at that patch closer, I suspect that you uploaded the wrong patch.
Comment #4
spoonbow commentedAny progress/updates on this? Having the same problem here...
Thanks!
Matt
UPDATE - Looked at the patch file, found the pertinent code ($item->display_price = $item->data['varprice'];) and inserted it into uc_varprice.module at line 226. Prices now display correctly in the cart. Updated code snippet:
Comment #5
mcfilms commentedHey Spoonbow, thank you for posting that. It works perfectly.
I set this aside because I thought the patch was for the wrong module. I'm so glad you did a little more investigating. It would be nice if we could get this rolled into the next version of UC Variable Price. But changing the status to "reviewed and tested" might lead the maintainer to believe the patch is good to go. So I set it to "Needs Work." (?)
Oh, also, thanks to oromix for digging through the module and finding the error in the first place.
Comment #6
Feet commentedI haven't reviewed it, but it has worked for me.
Cheers.
(I should learn how to review and test properly)
Comment #7
HorsePunchKid commentedHere's a freshly rolled patch against 7x.-1.0-rc2. Works for me, makes sense, and is simple.
Comment #8
natukWorks for me.
Comment #9
dquark3 commentedWorked for me too. Without the patch, any entered amount was disregarded and subtotal showed 0.00.
Comment #10
Darkwaltz4 commentedubercart 7.x-3.0-rc4 deleted hook_uc_cart_item... uc_varprice_uc_cart_item should be replaced with:
Comment #11
Darkwaltz4 commentedComment #12
HorsePunchKid commentedI can confirm that Darkwaltz4's code in #10 works as I would expect. Attached is the same code in patch form.
Comment #13
jrust commentedThanks, patch applied.