Keyword

SOLVED: How to access extra fields in tag template

  • ljk
  • ljk's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 8 months ago #122066 by ljk
Hi,

I have made sure that tags now have Extra Fields enabled in the K2 Parameters.

But
$price = $this->item->extraFields->Price->value;
still is not returning the Price extra field. Price is the alias of the Price field. Still getting out a blank value for Price.

Other ideas?

Thank you for your help.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #122067 by Yiota
Your extra field code should be like this

$price = $item->extraFields->Price->value; and not $price = $this->item->extraFields->Price->value;

Please Log in or Create an account to join the conversation.

  • ljk
  • ljk's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 8 months ago #122068 by ljk
Hi,

Thank you so much, that gave me the price field.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum