PDA

View Full Version : Formatting Custom Product Fields


ocpxc02
09-07-06, 04:41 PM
What is the best way to format a custom product field? For example, I have one entitled "MSRP" and want to display it with two decimal positions like the product price is shown.

Also, is there a document that lists all of the variables that are available for use within the various page templates?

Thanks for your help,
Paul

ocpxc02
09-08-06, 12:05 AM
Is there no way to do this?


Paul

Pete McNamara
09-08-06, 01:06 AM
I for one, don't understand what exactly you are trying to do and why you can't do what you outline above, wihout formatting - i.e. the price appears formatted to customers yet hasn't been through some special formatting process.

How about providing some detail and examples?

ocpxc02
09-08-06, 02:52 AM
Sorry if I'm wasn't clear or used the wrong terminology.

I have a custom field set up for my products that will be populated with a the product's list price. If the value is 4 (to represent $4), I want it to appear as '4.00', not '4' . How can I make it appear this way on my pages?


Thanks,
Paul

Gazungle
09-08-06, 02:57 AM
You can just make sure to change all the entries in that custom field to say 4.00 (depending on how many products). Or after the custom field code, just put a .00 if all the numbers are single numbers.

Pete McNamara
09-08-06, 03:21 AM
Exactly. And place a $ immediately before the custom field

ocpxc02
09-08-06, 03:47 AM
Yes, I can definitely do that in the previous example. However, I'm really trying to find a way to display any given number with two decimal places.

Here's a different example. I want to use the product's price and this MSRP value in an expression that displays the savings to the customer. This difference will be calculated on the fly, but the result may not have two decimal places. I'm guessing there must be some way to achieve this type of thing, but am not sure how to approach it.


Thanks,
Paul