kingmoore Posted August 28, 2006 Share Posted August 28, 2006 I have set my package up with these options: 19.95/Monthly 101.70/Semi-Anually 179.40/Anually On the Choose a package page, I would like the dropdown to show the Per month price... not just "179.40 USD Anually" but something like "14.95/month (179.40 USD Anually)" Is there a way to do this? Or perhaps I have it wrong and I should be putting the monthly cost in the Semi-Anually and Anually boxes in the configuration, and not the monthly cost multiplied by the months. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 30, 2006 Share Posted August 30, 2006 No, your doing it right. I questioned that myself once too. The easiest way i would do it is by using smarty math to do division on the total amount. When i get around to doing it for myself, I will try to remember to post the code here. Im working on a couple other smarty plugins that im going to share and i think others will benefit from as well. 0 Quote Link to comment Share on other sites More sharing options...
kingmoore Posted August 30, 2006 Author Share Posted August 30, 2006 So I'd be updating the order page template? Hmmm okay. I need to get more fermiliar w/smarty anyways. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 31, 2006 Share Posted August 31, 2006 smarty math cant be currently used since Matt hardcoded text to the pricing variables. For example: {$pricing.annually} prints out: $XX.XX USD Annually If i have to, i will just make a plugin that pulls the prices directly from the db and then assigns them to new smarty variables. Then we can do what we please with them. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 31, 2006 WHMCS CEO Share Posted August 31, 2006 You can simply use the substr to extract the price from the text string - you could also use some if functions to allow for if the price is $xx.xx or $xxx.xx - then you could do your calculations. Matt 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 31, 2006 Share Posted August 31, 2006 that would be a work around, yes, but it would best if you used the templating correctly and did not include any markup or text that could not be changed through templating or language files. 0 Quote Link to comment Share on other sites More sharing options...
kingmoore Posted August 31, 2006 Author Share Posted August 31, 2006 smarty math cant be currently used since Matt hardcoded text to the pricing variables. For example: {$pricing.annually} prints out: $XX.XX USD Annually If i have to, i will just make a plugin that pulls the prices directly from the db and then assigns them to new smarty variables. Then we can do what we please with them. That would be sweet. 0 Quote Link to comment Share on other sites More sharing options...
tech Posted March 31, 2010 Share Posted March 31, 2010 smarty math cant be currently used since Matt hardcoded text to the pricing variables. For example: {$pricing.annually} prints out: $XX.XX USD Annually If i have to, i will just make a plugin that pulls the prices directly from the db and then assigns them to new smarty variables. Then we can do what we please with them. any developments? 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.