Jump to content

Smarty - Product Pricing


alexpirate

Recommended Posts

Hello

 

I'm trying to get only the price for the product.

Like example:

 

50 USD

 

But when i try with:

{if $product.paytype eq "free"}
     {$LANG.orderfree}
     {elseif $product.paytype eq "onetime"}
     {$product.pricing.onetime} {$LANG.orderpaymenttermonetime}
     {elseif $product.paytype eq "recurring"}
     {if $product.pricing.monthly}{


    $product.pricing.monthly


     }<br />
     {/if}

   {/if}

 

It show: 50 USD Monthly

 

Is there a way to do ?

Link to comment
Share on other sites

Thanks a lot for the help.

Smarty have regular expression ? Becouse now the output is :

-1.00 ЛВ

5.76 ЛВ

18.48 ЛВ

39.60 ЛВ

And i dont want to show this string : -1,00 ЛВ( Bugarian Lev )

 

And there i can read more about WHMCS Smarty Strings....

 

Thanks, And sorry for my English

Link to comment
Share on other sites

The sample I gave you exists out of 3 pieces. In my WHMCS, a price looks like € 12,34 EUR.

 

- {$currency.prefix} is the

- {$product.pricing.rawpricing.monthly} is the price 12,34

- {$currency.suffix} is the EUR

 

If you want to see all available variables in your .tpl file, just put in {debug} at the bottom of the .tpl-file.

Link to comment
Share on other sites

Did you put it inside the {if $product.pricing.monthly} and {/if} tag? It shouldn't display it when -1.00 is given.

      {if $product.pricing.monthly}{$currency.prefix}{$product.pricing.rawpricing.monthly}{$currency.suffix}  <br />
     {/if}

Link to comment
Share on other sites

  • 2 weeks later...

Hello

 

As you see the Monthly, Quarterly, Semi-Annually , we dont offer nothing in Normal. I want in this line to input some image. That image will show :

 

<img width="25" border="0" height="25" src="images/dialog-no.png" alt="" />

 

Monthly               X                5.76 ЛВ         18.48 ЛВ        39.60 ЛВ
Quarterly             X                17.28 ЛВ        55.44 ЛВ       118.80 ЛВ
Semi-Annually         X               34.56 ЛВ        110.88 ЛВ       237.60 ЛВ

 


                   Normal       Standart         Business        Business Pro

Monthly                             5.76 ЛВ         18.48 ЛВ        39.60 ЛВ
Quarterly                          17.28 ЛВ         55.44 ЛВ       118.80 ЛВ
Semi-Annually                      34.56 ЛВ        110.88 ЛВ       237.60 ЛВ
Annually            42.00 ЛВ       57.60 ЛВ        203.28 ЛВ       435.60 ЛВ 

 

The code of my products are:

 

<tr>

<td align="left" valign="middle"><div class="curveleft">
{$LANG.orderpaymenttermmonthly}
</div></td>


{foreach key=num item=product from=$products}
<td align="left" valign="middle"><div align="center">
{if $product.pricing.monthly}{$currency.prefix}{$product.pricing.rawpricing.monthly}{$currency.suffix}  <br />
     {/if}  
</div></td>

{/foreach}
</tr>

 

This is the code of rawpricing.monthly.

 

So can anyone help me to make it work ....

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