peeta Posted August 3, 2008 Share Posted August 3, 2008 I want to change the billing cycle sort order to descending: Bi-annual Annual Semi-Annual Quarterly Monthly Does anyone have a code to do this? 0 Quote Link to comment Share on other sites More sharing options...
juiced Posted August 4, 2008 Share Posted August 4, 2008 Not that i can find. Maybe making a new order form? 0 Quote Link to comment Share on other sites More sharing options...
peeta Posted August 17, 2008 Author Share Posted August 17, 2008 This image shows what I want to achieve. I want the 24 month subscription to be default selection. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted August 18, 2008 Share Posted August 18, 2008 chnage the order of the for loop in the tpl ? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted August 18, 2008 Share Posted August 18, 2008 As othellotech said change the order in the tpl The template to edit is configureproduct.tpl lines 32-36 0 Quote Link to comment Share on other sites More sharing options...
peeta Posted August 20, 2008 Author Share Posted August 20, 2008 sparky, thanks for the suggestion but I don't have a file called configureproduct.tpl. Please let me know where that file should be. I got it done based on the suggestion though and so far it seems to be working ok. I use th 'boxes' order theme so I edited order-stepthree.tpl (which had no for loop for the billing cycle) lines 28 - 32 and re-ordered the options as below {if $pricing.biennially}<option value="biennially"{if $billingcycle eq "biennially"} selected="selected"{/if}>{$pricing.biennially}</option>{/if} {if $pricing.annually}<option value="annually"{if $billingcycle eq "annually"} selected="selected"{/if}>{$pricing.annually}</option>{/if} {if $pricing.semiannually}<option value="semiannually"{if $billingcycle eq "semiannually"} selected="selected"{/if}>{$pricing.semiannually}</option>{/if} {if $pricing.quarterly}<option value="quarterly"{if $billingcycle eq "quarterly"} selected="selected"{/if}>{$pricing.quarterly}</option>{/if} {if $pricing.monthly}<option value="monthly"{if $billingcycle eq "monthly"} selected="selected"{/if}>{$pricing.monthly}</option>{/if} As stated, it seems to be working fine but if it is going to cause any other problem please let me know. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted August 20, 2008 Share Posted August 20, 2008 Looks like you are using the order.php script and not the cart script. Glad you got it sorted. FYI the configureproduct.tpl is for the cart script and is located in /templates/orderforms/cart 0 Quote Link to comment Share on other sites More sharing options...
neobug103 Posted August 28, 2009 Share Posted August 28, 2009 but the issue nobody can seem to sort out is how to get the biannual/annual to be the default selected cycle. seems like it hard coded to have the monthly billing cycle selected and changing the order of the cycles means nothing unless you have the annual/biannual as the default cycle 0 Quote Link to comment Share on other sites More sharing options...
serjo Posted September 30, 2009 Share Posted September 30, 2009 has anyone figured how to set the default billing cycle? I can change the order ok - but monthly cycle is still selected as default 0 Quote Link to comment Share on other sites More sharing options...
neobug103 Posted September 30, 2009 Share Posted September 30, 2009 Matt has informed me that it is possible to pass the billing cycle in the direct order link to automatically select a value other than monthly. 0 Quote Link to comment Share on other sites More sharing options...
01jack Posted January 14, 2011 Share Posted January 14, 2011 Very sorry to open up this old thread but needs must.... Matt has informed me that it is possible to pass the billing cycle in the direct order link to automatically select a value other than monthly. I have been searching for a few days now for a method of setting the default 'selected' option for billing cycles. I want to have Annual be selected by deafault but it always defaults to the lower cycles like quarterly. I know you can link directly to a product and pass the billingcycle parameter, but if visitors go straight to the list of products at whmcs_install_url/cart.php then i can't figure out how to pass any parameters from that page to set the default cycle. Someone must know how to do this by now? Thanks very much for any useful help or suggestions. 0 Quote Link to comment Share on other sites More sharing options...
01jack Posted January 14, 2011 Share Posted January 14, 2011 (edited) I have almost cracked it on the 'cart' order template configureproduct.tpl: <select name="billingcycle" onchange="submit()">{if $pricing.annually}<option value="annually"{if $billingcycle eq "annually"} selected="selected"{/if}>{$pricing.annually}</option>{/if} {if $pricing.semiannually}<option value="semiannually"{if $billingcycle eq "semiannually"} selected="selected"{/if}>{$pricing.semiannually}</option>{/if} {if $pricing.quarterly}<option value="quarterly">{$pricing.quarterly}</option>{/if} {if $pricing.monthly}<option value="monthly"{if $billingcycle eq "monthly"} selected="selected"{/if}>{$pricing.monthly}</option>{/if} {if $pricing.biennially}<option value="biennially"{if $billingcycle eq "biennially"} selected="selected"{/if}>{$pricing.biennially}</option>{/if} </select> The remaining problems are that you cannot pass the 'quarterly' billing cycle to the product any more (if you needed to), and also when the 'Update Cart' button is clicked, the first time it brings the page back unchanged, then a second click on 'Update Cart' successfully passes on to the cart view page with the price break down etc correctly showing. EDIT: I just noticed that now (using the above changes) when the selection is changed using the drop-down menu, it immediately redirects to the checkout page...which is no good at all. Many thanks. Edited January 14, 2011 by 01jack 0 Quote Link to comment Share on other sites More sharing options...
01jack Posted January 16, 2011 Share Posted January 16, 2011 Just FYI in case it helps anyone, the answer is to edit /templates/orderforms/web20cart/products.tpl and find <td width="20%" align="center" valign="middle"><input type="button" value="{$LANG.ordernowbutton}"{if $product.qty eq "0"} disabled{/if} onclick="window.location='{$smarty.server.PHP_SELF}?a=add&pid={$product.pid}'" /></td> and add to the url: <td width="20%" align="center" valign="middle"><input type="button" value="{$LANG.ordernowbutton}"{if $product.qty eq "0"} disabled{/if} onclick="window.location='{$smarty.server.PHP_SELF}?a=add&pid={$product.pid}&billingcycle=annually'" /></td> So you don't need to change configureproduct.tpl at all for this. Peace 1 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.