Problems, need help? Have a tip or advice? Post it here.
11 posts Page 1 of 2
Hi,

I have a code
Code: Select all
value="<cms:show amount />"


and now I like to place it on
Code: Select all
<cms:number_format '1234567890' />


so its now
Code: Select all
<cms:number_format 'value="<cms:show amount />"' />


Now there is a problem with end single inverted comma,

How do I figure it ?

Thanks
Subhamoy
Ok I solve it my self
Code: Select all
value="<cms:number_format "<cms:show amount />" />"


Thanks
Or just:
Code: Select all
value="<cms:number_format amount />"
;)
Thanks for quick reply
but There is a warning of both case

Warning: number_format() expects parameter 1 to be double, string given in C:\xampp\htdocs\note\couch\tags.php on line 5589

What to do ?
Temporarily remove the number_format tag. What value is returned when you <cms:show amount />?
Hi,

For that case it show value without number format (, and .) and no warning .

Thanks
Subhamoy
@Subhamoy, can you please copy and paste in here the exact output you get on using <cms:show amount />? Thanks.
Ok

Code: Select all
<tbody id="itemlist">
                    <tr>
                        <td ><a href="<cms:route_link 'page_view' rt_id=k_page_id />" class="button">Edit/Delete</a></td>
                        <td><input type="bound" name="particular"class="form-control input-sm" value="<cms:show particular />" ></a></td>
                        <td><input type="bound" name="amount"class="form-control input-sm text-right" value="<cms:show amount />"  data-cell="<cms:show cell />"></td>
                  <td><input type="bound" name="amounttwo" class="form-control input-sm text-right" value="<cms:show amounttwo />"data-cell="<cms:show cell />"></td>                                     
                        <td class="hidden-text date"><cms:date k_page_modification_date format="%c" /></td>
               </tr>                                   
                </tbody> 

[img]
normal.png
[/img]

And when I use
Code: Select all
<tbody id="itemlist">
                    <tr>
                        <td ><a href="<cms:route_link 'page_view' rt_id=k_page_id />" class="button">Edit/Delete</a></td>
                        <td><input type="bound" name="particular"class="form-control input-sm" value="<cms:show particular />" ></a></td>
                        <td><input type="bound" name="amount"class="form-control input-sm text-right" value="<cms:number_format amount />"  data-cell="<cms:show cell />"></td>
                  <td><input type="bound" name="amounttwo" class="form-control input-sm text-right" value="<cms:number_format amounttwo />"data-cell="<cms:show cell />"></td>                                     
                        <td class="hidden-text date"><cms:date k_page_modification_date format="%c" /></td>
               </tr>                                   
                </tbody> 
           

[img]
error.png
[/img]

Attachments

@subhamoy,
Can you please edit couch/tags.php line 5589 and change the following code
$html = number_format( $number, $decimal_precision, $decimal_character, $thousands_separator );

to this -
$html = number_format( (float)$number, $decimal_precision, $decimal_character, $thousands_separator );

Please let me know if that helps resolve the issue.
Hi KK,

With follow your guidance

Quote:
$html = number_format( (float)$number, $decimal_precision, $decimal_character, $thousands_separator );


It's run successfully

[img]
success.png
[/img]


Thanks lots

Subhamoy

Attachments

11 posts Page 1 of 2