Jump to content
Sign in to follow this  
Peter Kocsis

Currency option in Restaurant Menu

Recommended Posts

Since the structure for the restaurant menu is already setup as an array for each section it wouldn't be possible to add the currency there unless you do it for each section, which doesn't make sense. So the best way is to have a new JReviews custom field where users can choose the currency and then you read the value of that field and use it in the restaurant menu theme where we now have hardcoded the currency as $.

 

Joomla: /components/com_jreviews/jreviews/views/themes/default/fields_phpformat/restaurant_menu.thtml

 

WordPress: /wp-content/plugins/jreviews/jreviews/views/themes/default/fields_phpformat/restaurant_menu.thtml

 

You can access your currency custom field as:

<?php echo $CustomFields->field('jr_menucurrency', $entry);?>

Share this post


Link to post

Hi Alejandro,

 

Thanks it would be perfect, but I tried it and is not working for me. This field does not visible in Menu, but I think the set up is correct because I tried to show this field any other place with the above mentioned code and it works. So I don't understand where is the error. 

Share this post


Link to post

I tried it before when I was replying to make sure that it worked and it did for me. You removed the dollar sign just to make sure that changes to the file are reflected? Can you try the code at the very top of the file, even before the opening <?php tag to see if it works? If still nothing submit a ticket so we can check.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.