Article

Let's say you have created a number custom field in the "Fields" tab of the listing type and named it Price

While adding the listing, the user will type the price unformatted e.g 5000

But in listing page you want to display the price in the correct format and also add the currency e.g $5,000

How to achieve this depends on where you are displaying the price

 

Displaying the price as a cover detail

Edit listing type > single page tab > cover details > to the right click the pre-set option named "Price"

Click on it, under the "Field" dropdown, choose the price field

Under "Format" dropdown, choose "Number"

Under Prefix or Suffix add the currency of your choice

 

Displaying the price in a table/details block

Edit listing type > single page > content and tabs > choose a tab where you want to display the price > under "Add a new block" dropdown, choose table or detail block, for this example, we'll choose a table.

Click on the table, and choose "Add row"

Under label add "Price"

Under "Fields to use" choose the price field

Under "Content" replace [[field]] with this shortcode

 

[27-format type="price" prefix="$" include-markup="no" date-format="M-d"][[field]][/27-format]

 

You can change the $ sign inside the prefix="$" to the currency symbol of your choice

 

Displaying the price in a shortcode block

Edit listing type > single page > content and tabs > choose a tab where you want to display the price

Under "Add a new block" dropdown, choose shortcode block

In the shortcode block add the shortcode

 

[27-format type="price" prefix="$" include-markup="no" date-format="M-d"][[price]][/27-format]

 

Keep in mind that the [[price]] part depends on the field key of your custom field. When you initially created the field in the "Fields" tab of the listing type, you are asked to type the name and field key. If the field key is let's say monthly-price
then the shortcode should reflect that e.g

 

[27-format type="price" prefix="$" include-markup="no" date-format="M-d"][[monthly-price]][/27-format]

 

Displaying the price in the search form range slider 

Edit listing type > search forms > advanced/basic form > edit the range facet > add the currency in the prefix or suffix fields, and enable the "Format" checkbox

Displaying the price in the preview card

Edit listing type > preview card > under "Head buttons" click "Add new", click on the button and choose the price field.

In the label, replace [[field]] with

[27-format type="price" prefix="$" include-markup="no" date-format="M-d"][[field]][/27-format]

 

Categories