close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Number Format 1'000 00

Thread began 7/07/2015 2:06 pm by info4753 | Last modified 12/21/2015 1:46 pm by Ray Borduin | 474 views | 8 replies |

info4753

Number Format 1'000.00

How can I show my numbers with the following format: 1'000.00

Sign in to reply to this post

Ray BorduinWebAssist

The number_format function allows you to set the decimal and thousands separator. You can use that to get the number to display how you want like:

number_format ([your number],2 ,".","'");

Sign in to reply to this post

info4753

Thanks Ray. But I meant for the cart formats like:

<?php echo WA_eCart_DisplayMoney($eCartMyCart, $eCartMyCart->DisplayInfo("TotalPrice")); ?>

Sign in to reply to this post

Ray BorduinWebAssist

Unfortunately the eCart only offers native US and European number formats. To use yours you would have to us number_format() like:

php:
<?php echo number_format($eCartMyCart->DisplayInfo("TotalPrice"),,".","'"); ?>
Sign in to reply to this post

info4753

That works, thanks Ray.

How do I use it here?

<?php echo WA_eCart_DisplayMoney($eCartMyCart, $eCartMyCart->GrandTotal()); ?>

Sign in to reply to this post

Ray BorduinWebAssist

Yes, same thing:


php:
<?php echo number_format($eCartMyCart->GrandTotal(),,".","'"); ?>
Sign in to reply to this post

info4753

I see ... thanks Ray :-)

Sign in to reply to this post

Nico

Reason for WA_eCart_DisplayMoney not working?

Hi,
I can't figure out why the folowing is not working.
<?php echo WA_eCart_DisplayMoney($eCart1,$getOrderDet->getColumnVal("DetailPrice")); ?>

I have used the same techinque many times and I had no problems. Can't figure out why it is not working on a concrete page.
I am usign a query to display order history. Severak times before I was just including the Ecart Files and the GetContent function. Then I was applying the WA_eCart_DisplayMoney in any value I wanted to tranform based on my Ecart settings.

As I told I did this many times and it is working. For some reason it is not working in a specific page and can't understand why.

Thank you

Sign in to reply to this post

Ray BorduinWebAssist

What is it displaying? Is there an error? can you show the price without formatting?

<?php echo $getOrderDet->getColumnVal("DetailPrice"); ?>

Do you have the eCart1 object on the page?

Try just using the number_format() function.
<?php echo number_format($getOrderDet->getColumnVal("DetailPrice")); ?>

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...