You are here:  » Displaying extra fields in price box


Displaying extra fields in price box

Submitted by bodybuildingcom... on Sun, 2017-09-24 15:02 in

Hi David,

I have added extra index fields into the normal PT, as per your post https://www.pricetapestry.com/node/3094. Thank you again for the help as always.

I have displayed them as per here: {link saved}

I am wondering whether the same information in the price box with retail price, discount and the normal price, can be displayed in the worpdress version? As you can see here: {link saved} it doesn't display that information.

I am wondering whether this is possible?

Thanks.

Norbert

Submitted by support on Mon, 2017-09-25 08:47

Hello Norbert,

To display custom fields in the price comparison table in the plugin you need to add the column headings to the Prices / Before template, and then use the %DB_fieldname% placeholders in the Prices / Each template to pull in the actual values.

So from, /wp-admin/ > Settings > PriceTapestry.org, scroll down to Templates and then Prices / Each and look for the following markup (as per BETA 3 distribution)

<th class='pto_ali-c'>Price</th>

...and REPLACE with (to replicate what you have created in standalone /pt/)

<th class='pto_ali-c'>Usual Retail Price</th>
<th class='pto_ali-c'>You Save</th>
<th class='pto_ali-c'>Current Price</th>

And then in Prices / Each look for the following markup:

<td class='pto_ali-c'>%PRICE%</td>

...and REPLACE with:

<td class='pto_ali-c'>%DB_rrp%</td>
<td class='pto_ali-c'>%IFDB_discount%%DB_discount%%%ENDIFDB_discount%</td>
<td class='pto_ali-c'>%PRICE%</td>

Note the use of the %IFDB_fieldname%...%ENDIFDB_fieldname% for the discount field, so that the discount and % character are only displayed if there is a discount value, as per the use of IF in standalone...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by bodybuildingcom... on Mon, 2017-09-25 20:25

Hi David,

Thanks. It worked like a charm.

Norbert