keneso Posted April 7, 2015 Share Posted April 7, 2015 Hi, I am setting up products, and when testing the cart displays same amount for monthly, and annual price, mainly instead of the annual price set in the pricing it returns the monthly price. Using comparison template. What am I missing/doing wrong? Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 7, 2015 Share Posted April 7, 2015 three things to try... 1. check you haven't entered the pricing wrong - it's easily done. 2. change the order-form template to see if the error still shows using other templates... i'm assuming you haven't modified the template? 3. empty your template cache -> utilities -> system -> system cleanup -> empty template cache 0 Quote Link to comment Share on other sites More sharing options...
keneso Posted April 8, 2015 Author Share Posted April 8, 2015 Thank you. 1. check you haven't entered the pricing wrong - it's easily done. Pricing is: Recurring Monthly (checked) 3.00 Annual (checked) 30.00 Of course different products have different values 2. change the order-form template to see if the error still shows using other templates... i'm assuming you haven't modified the template? I had modified the template, but ONLY layout (css) However when noticed the problem I switched back to the "regular" template, tried two of them (comparison, and modern) three things to try...3. empty your template cache -> utilities -> system -> system cleanup -> empty template cache Done. Also changed template, and cleaned up after each change. Regardless I still have same (monthly) price displayed both for monthly, and annual. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 8, 2015 Share Posted April 8, 2015 two further thoughts... 1. didn't I help you with adding data feed output to your language files? http://forum.whmcs.com/showthread.php?99375-product-price-snip-in-language-file is there any possibility the order-form templates are using these language file entries and showing the wrong cycle price? 2. a link to your site would be useful to see what is actually going on - if you don't want to make it public, PM the URL. when are you seeing the wrong price shown? on the opening page of "Comparison" (where it shows the products in a table), if both cycles exist it will display the monthly price instead of the annual price... or are you seeing the error only when you get to the choose billing cycle stage? 0 Quote Link to comment Share on other sites More sharing options...
keneso Posted April 8, 2015 Author Share Posted April 8, 2015 Thank you for your patience. 1. didn't I help you with adding data feed output to your language files? is there any possibility the order-form templates are using these language file entries and showing the wrong cycle price? Yes indeed, and no reference to the language in the the order-form, unless this {if $pricing.annually}<tr><td class="radiofield"><input type="radio" name="billingcycle" id="cycle4" value="annually"{if $billingcycle eq "annually"} checked{/if} onclick="submit()" /></td><td class="fieldarea"><label for="cycle4">{$pricing.annually}</label></td></tr>{/if} references it thru $pricing.annually, which I don't know. However I removed the override language file, changed order-form to modern, cleaned the cache, reloaded and still get the monthly price for the annual cycle. when are you seeing the wrong price shown? on the opening page of "Comparison" (where it shows the products in a table), if both cycles exist it will display the monthly price instead of the annual price... or are you seeing the error only when you get to the choose billing cycle stage? I see it on the "choose billing cycle" stage. 2. a link to your site would be useful to see what is actually going on - if you don't want to make it public, PM the URL. If the above doesn't help, please let me know, and I'll PM you. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 8, 2015 Share Posted April 8, 2015 something just occurred to me - do you have Monthly Pricing Breakdown enabled? setup -> general settings -> ordering http://docs.whmcs.com/Ordering_Tab#Monthly_Pricing_Breakdown Monthly Pricing Breakdown Enabling this divides your quarterly, semi-annual, annual, and biennial prices into the equivalent monthly price. For example, a product with an annual price of $120 would be divided by 12 months and the price displayed as $10/month. if it's not that, i'll probably need to see the URL. 0 Quote Link to comment Share on other sites More sharing options...
keneso Posted April 9, 2015 Author Share Posted April 9, 2015 Thank you. Yes that was it. Now it arises another question: I disabled it, and in the billing cycle displays correctly both monthly, and annual prices, but if I enable that, and set only the annual pricing I don't see the monthly breakdown anywhere, i.e. the script you suggested in the language thread reports a -1.00 value. How should I set up so that the cycling is annual, but the customers can see how much it would be per month? Shall I just hardcode it, or am I missing (as usual) something? If you think this is OT, and needs a new thread please let me know. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 9, 2015 Share Posted April 9, 2015 Thank you.Yes that was it. we got there in the end! btw, it might be useful in the future to post a screenshot of what you're seeing when you see a problem like this - it will give us a better picture of what you're seeing. Now it arises another question:I disabled it, and in the billing cycle displays correctly both monthly, and annual prices, but if I enable that, and set only the annual pricing I don't see the monthly breakdown anywhere, i.e. the script you suggested in the language thread reports a -1.00 value. How should I set up so that the cycling is annual, but the customers can see how much it would be per month? Shall I just hardcode it, or am I missing (as usual) something? if you ever see a -1.00 value with a product price data feed, assume that the price has not been set for that product using the specified billing cycle... so take a look in the language file entry that uses the data feed and see if the feed URL is trying to obtain the monthly price rather than the annual price. hopefully, that will take care of the -1.00 issue. now showing the customer how much it would be per month, using language/data feed, is slightly trickier - we shouldn't really do any calculations in the language file; we can't use Smarty - so the easiest solution would be to modify the data feed itself by replacing... $price = $data[$billingcycle]; $price = formatCurrency($price); with... $price = $data[$billingcycle]; IF ($billingcycle == "annually") { $price = $price / 12; } $price = formatCurrency($price); so when you use this data feed and specify annually, it should calculate and return the price per month - all other cycles will return the full amount... although it could easily be expanded to calculate monthly prices for semiannually, quarterly etc.. also, remember what I said in the other thread about changing its filename so that it doesn't get overwritten during a whmcs upgrade. just for reference, if you ever want to tweak the billing cycle text displayed in the template, I did write a tutorial on how to do this last year. http://forum.whmcs.com/showthread.php?85823-Tutorial-How-to-modify-the-Recurring-Billing-Cycle-text If you think this is OT, and needs a new thread please let me know. well this thread already includes a link to the data feed thread, so I guess it's fine. 0 Quote Link to comment Share on other sites More sharing options...
keneso Posted April 9, 2015 Author Share Posted April 9, 2015 Thank you very much for your help, patience, and kindness. I took a quick look at your tutorial, and it's very interesting, I think I might use it after I finish the basic setup in order to enhace the site. 0 Quote Link to comment Share on other sites More sharing options...
crossing Posted April 9, 2015 Share Posted April 9, 2015 Great tutorial, thanks ! 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.