Closed (fixed)
Project:
Open Deals Drupal Distribution
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
28 Oct 2011 at 04:51 UTC
Updated:
29 Oct 2011 at 21:11 UTC
The discount price is not rounded in the sopping cart view. That may break your layout and show a big number inside the "You Earn" ribbon. Here is a screenshot of the issue: http://img443.imageshack.us/img443/2987/discountpricenotrounded.png
Just follow these steps:
1) Edit the "Shopping cart form" view
2) Edit the Footer - "Global: Text area"
3) Find and replace:
echo $disc;
with:
echo round($disc, 0 );
4) Save the view
You will have a nice and clean ribbon that will show the discount price as rounded integer.
Check out the screenshot: http://img411.imageshack.us/img411/1329/discountpricerounded.png
Comments
Comment #1
yannisc commentedThanks ANDiTKO for the report and the fix. Can you provide a patch?
If not, we'll do it.
Comment #2
yannisc commentedFor some reason, I don't get this bug to happen! I added the round function though and will be included in the next version.
Comment #3
ANDiTKO commentedHere are the steps to reproduce the issue:
1) Click the "Buy now" button on any deal. (I did it with the "$129 for 3 nights at Golden Villas Mykonos")
2) You will be then redirected to the checkout page. Then click the "Cancel" button.
3) You get redirected to the "cart" page where the discount is not rounded.
And obviously you will have to roll back to the "echo $disc;" (without the round function) to reproduce it.
Comment #4
yannisc commentedI think I know what happened. We had this field calculated in the view, but then we moved it to the module code. We forgot to remove it from the cart, because we bypass cart and move user directly to checkout.
So, the right solution would be to either remove it from the cart also and replace it with the respective field or disable the cart (and the cancel button) altogether.
We'll address that in the next version.