This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » eZ Publish 5 Platform » How do I get at the price of a product ?

How do I get at the price of a product ?

How do I get at the price of a product ?

Friday 13 September 2013 11:04:14 am - 5 replies


I have a content object with an attribute of type price, in an EZ4 template I can print out its value with:

This costs <b>{$node.data_map.price.value.price}</b> moneys.

what is the equivalent in twig/EZ5 ?

{{ thisProduct.getFieldValue( 'price') }} does not print out anything.

{{ ez_render_field(thisProduct, 'price') }} tells me "Cannot find 'ezprice_field' template block."



Friday 13 September 2013 12:45:17 pm

Hi Francesco

ezprice field type hasn't been ported yet, that's the reason...

Friday 13 September 2013 3:28:47 pm

Thank Jerome,

do you have any pointers on how I could implement the porting myself ?

Or would that require diving too deep in the EZ internals ?

Friday 13 September 2013 4:09:53 pm

Well, you will need to dive in the eZ internals since implementing a field type is not trivial happy.gif Emoticon... You can find information in this guide on Confluence. You could try to implement it in a separate bundle, but the best practice would be to do a pull-request against ezpublish-kernel GitHub repository.

Friday 13 September 2013 4:12:36 pm

In any case, if you decide to do the porting, feel free to ask for help happy.gif Emoticon. Send me a PM so that we can share direct contact blunk.gif Emoticon

Friday 13 September 2013 4:24:43 pm

Thanks, the project's deadline is approaching, so I don't think I will be able to dedicate much time to it now. At the moment I am looking for workarounds.


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from