VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: reinhold on November 15, 2012, 17:54:34 PM

Title: [PATCH] alternating rowcolors in cart broken (typo in default_pricelist.php)
Post by: reinhold on November 15, 2012, 17:54:34 PM
The variable $i in components/com_virtuemart/views/cart/tmpl/default_pricelist.php, which controls the alternating colors in the shopping cart, is currently wrongly incremented:


$i = 1 ? 2 : 1;


Clearly, this should rather be

$i = ($i==1) ? 2 : 1;

or alternatively

$i = ($i % 2) + 1;


Attached is a patch (relative to current svn trunk) that fixes this small typo.

Cheers,
Reinhold

[attachment cleanup by admin]
Title: Re: [PATCH] alternating rowcolors in cart broken (typo in default_pricelist.php)
Post by: alatak on November 16, 2012, 10:12:42 AM
Hello
Yes u are rigth .. strange code. And thanks for the solution.

I have fixed it
Title: Re: [PATCH] alternating rowcolors in cart broken (typo in default_pricelist.php)
Post by: Scott799 on November 25, 2012, 20:26:35 PM
Hi Alatak,

I've spent a lot of time reading about needed edits in default_pricelist.php
I see there's solutions for the problem I'm having, but I don't exactly know what to do - I'm not at all code capable without clear direction, still learning.

My site is
https://www.golfsgreatheritage.com

My Problem:
I have the problem where -itemized and total- prices don't show up in the cart.  This happens in both my template and switched to Beez (screen shot is Beez).  Should I update to 2.0.14 - I'm on 2.0.10?  I would rather just insert the fixed code to the default_pricelist.php and be done with it, but code corrections aren't clear to me (the specific changes are in the image doload, but weren't specific to missing cart prices on which apply to that problem, ie., OLD CODE and NEW CODE -- http://virtuemart.net/news/list-all-news/416

Looking for a helping hand, suggestion with direction, or something.... without cart prices I can't get any business so it's a very important fix for me...

Note: on backend VM config settings, I have checked all the places for show prices.

Many Thanks!
Scott

[attachment cleanup by admin]