Jump to content

annual price same as monthly


keneso

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Thank you.

Yes that was it.

we got there in the end! :idea:

 

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated