minadreapta Posted October 18, 2007 Share Posted October 18, 2007 i have a hosting package and i allow 6 upgrades for that package. on the upgrade.php page i get the list of these 6 packages in td rows, colored like this: row1: bgcolor2 row2:bgcolor2 row3:bgcolor2 row4:bgcolor1 row5:bgcolor2 row6:bgcolor1 if i only allow 5 upgrades, i will have like this: row1:bgcolor2 row2:bgcolor2 row3:bgcolor2 row4:bgcolor1 row5:bgcolor2 row2 doesn't get the alternate color... is there any fix to have alternate colored rows working properly? i think the problem is on this string: <tr class="orderrow{if $num % 2}2{else}1{/if}"> can anyone help me? 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted October 18, 2007 Share Posted October 18, 2007 Remove it from the tr class. Put that code in the td class. <tr> <td class="orderrow{if $num % 2}2{else}1{/if}"></td> </tr> 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted October 18, 2007 Author Share Posted October 18, 2007 not working, no matter what i do i, get the first 3 rows with orderrow2 class, then it starts alternating. it is not alternating for rows 1, 2, 3 then for 4,5,6 it is. i tried moving the class from tr to td it's not working. anyway, in style.css orderrow1 and 2 are defined for tr, not td i tried to define it like td.orderrow1 and 2, but it was not working. in this moment, it looks like this: 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted October 18, 2007 Share Posted October 18, 2007 Instead, remove the tr/td from the class in the css. That way it's JUST .orderrow. That way it can get applied anyway, without any issues (eg: having to be only TD or TR). .orderrow1 { background-color: #E8F0F9; color: #000000; } .orderrow2 { background-color: #D6E4F6; color: #000000; } It sounds like you might have an issue with your upgrade.tpl page, because I just set it up with my template, and it works with no issues at all. Here's what I have (albeit, you'll have to change a few things around...): <table id="clientpkgupgrade" summary="Client Package Upgrade/Downgrade" cellspacing="0" cellpadding="0"> <tr> <th>{$LANG.clientareahostingpackage}</th> <th>{$LANG.orderprice}</th> </tr> {foreach key=num item=upgradepackage from=$upgradepackages} <tr> <td class="orderrow{if $num % 2}2{else}1{/if}"> [b]{$upgradepackage.groupname} - {$upgradepackage.name}[/b] {$upgradepackage.description} </td> <td> <form method="post" action="{$smarty.server.PHP_SELF}"> <input type="hidden" name="step" value="2"> <input type="hidden" name="type" value="{$type}"> <input type="hidden" name="id" value="{$id}"> <input type="hidden" name="pid" value="{$upgradepackage.pid}"> {if $upgradepackage.pricing.type eq "free"} {$LANG.orderfree} <input type="hidden" name="billingcycle" value="free"> {elseif $upgradepackage.pricing.type eq "onetime"} {$product.pricing.onetime} {$LANG.orderpaymenttermonetime} <input type="hidden" name="billingcycle" value="onetime"> {elseif $upgradepackage.pricing.type eq "recurring"} <select name="billingcycle"> {if $upgradepackage.pricing.monthly}<option value="monthly">{$upgradepackage.pricing.monthly}</option>{/if} {if $upgradepackage.pricing.quarterly}<option value="quarterly">{$upgradepackage.pricing.quarterly}</option>{/if} {if $upgradepackage.pricing.semiannually}<option value="semiannually">{$upgradepackage.pricing.semiannually}</option>{/if} {if $upgradepackage.pricing.annually}<option value="annually">{$upgradepackage.pricing.annually}</option>{/if} {if $upgradepackage.pricing.biennially}<option value="biennially">{$upgradepackage.pricing.biennially}</option>{/if} </select> {/if} <div class="buttons"> <button type="submit" value="{$LANG.ordercontinuebutton}" class="positive"> [img=templates/{$template}/images/clientarea/tick.png] {$LANG.ordercontinuebutton} </button> </div> </form> </td> </tr> {/foreach} </table> If you copy that word for word, you'll have issues with it's styling, since I a few customized elements in there... But that works fine and alternates each TD without fail. 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted October 18, 2007 Author Share Posted October 18, 2007 i tried to copy your code, tried with td, with tr, edited the css... even if there are issues in css, i can see in the source code of the page that the first 3 rows are the same class: orderrow2, no matter what i did. 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted October 18, 2007 Share Posted October 18, 2007 I don't know what else to say, since this works for me without fail. Have you tried to overwrite your copy of upgrade.tpl with a fresh one from a new whmcs download? 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted October 18, 2007 Author Share Posted October 18, 2007 yes, i've just downloaded a fresh copy of WHMCS and overwrite the template.tpl file. it doesn't work, it acts the same. 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted October 18, 2007 Share Posted October 18, 2007 You have been clearing out your template_c folder, correct? Because that caches your templates. 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted October 18, 2007 Author Share Posted October 18, 2007 yes i did. the same result. 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted October 18, 2007 Share Posted October 18, 2007 Can you give me your URL with a dummy client account (with a product in a pending state) so I can test it out and see for myself? 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted October 18, 2007 Author Share Posted October 18, 2007 i sent you a PM 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted October 18, 2007 Author Share Posted October 18, 2007 first change the language, then go to "My Hosting Packages" check the one that is active and try to upgrade it. 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted October 18, 2007 Share Posted October 18, 2007 I really don't know what to tell you at this point. Especially if you've already cleared out template cache, and replaced upgrade.tpl with an unedited version. Refer to your PM I sent. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.