Jump to content


JReviews is the best selling Joomla Reviews Component and WordPress Reviews Plugin. It's also in a class of its own as a Business Directory.
Photo
- - - - -

setup business_hours_multiview?


  • Please log in to reply
11 replies to this topic

#1 n00bster

n00bster

    Advanced Member

  • Members
  • PipPipPip
  • 300 posts
  • LocationAustria

Posted 05 March 2017 - 12:25 PM

how should i setup this new feature?

 

 +New  [FormBuilder Field] A new output theme is available for business hours to display the full schedule only in detail pages and today’s schedule/status on other pages. To use it change the php theme in the field from business_hours to business_hours_multiview.


[PHP 7.0] [Joomla 3.8] [Easysocial 2.1] [jReviews 2.7]


#2 Alejandro

Alejandro

    Advanced Member

  • Administrators
  • 31940 posts

Posted 05 March 2017 - 02:42 PM

Ok, so maybe that wasn't clear enough, but we've also not posted the release announcement yet.

 

   To use it change the php theme in the field from business_hours to business_hours_multiview.

 

That means, edit the custom field settings. In the PHP format part of the settings, towards the button, there's one that has a value filled out as business_hours. Change that to business_hours_multiview.



#3 n00bster

n00bster

    Advanced Member

  • Members
  • PipPipPip
  • 300 posts
  • LocationAustria

Posted 06 March 2017 - 01:34 AM

That means, edit the custom field settings. In the PHP format part of the settings, towards the button, there's one that has a value filled out as business_hours. Change that to business_hours_multiview.

ok ... but i can not choose the business_hours_multiview because it is not there in my installation:

Attached File  JReviews-hours-Administration.png   386.55KB   2 downloads

i checked via ftp the two folders "fields_formbuilder" and "fields_phpformat" and this multiview theme is only present in the "fields_phpformat" folder.

 

i have installed the latest update 2.7.15.3 ...


[PHP 7.0] [Joomla 3.8] [Easysocial 2.1] [jReviews 2.7]


#4 Alejandro

Alejandro

    Advanced Member

  • Administrators
  • 31940 posts

Posted 06 March 2017 - 07:00 AM

That is the Schema which is what generates the form. This solution does not change that. It only changes the output which is driven by the PHP Format Theme. You need to fill out the new theme, not select it.

 

2017-03-06_07-58-41.png



#5 n00bster

n00bster

    Advanced Member

  • Members
  • PipPipPip
  • 300 posts
  • LocationAustria

Posted 06 March 2017 - 07:52 AM

ok i understand. and how can i show the indicator then the listing views? is it possible to show it on all themes (blog, tableview, thumbview ...)?


[PHP 7.0] [Joomla 3.8] [Easysocial 2.1] [jReviews 2.7]


#6 Alejandro

Alejandro

    Advanced Member

  • Administrators
  • 31940 posts

Posted 06 March 2017 - 09:39 AM

Enable listview for the custom field so it can show something on the list pages. It will work on all of them the same, including modules and other places other than the detail page, which is the only place where the entire schedule will show.



#7 n00bster

n00bster

    Advanced Member

  • Members
  • PipPipPip
  • 300 posts
  • LocationAustria

Posted 07 March 2017 - 08:43 AM

Enable listview for the custom field so it can show something on the list pages.

it is enabled an i have disabled all my overrides to ensure that no theme file is corrupt. but the indicator does not show up in the listings view.

Attached Files


Edited by n00bster, 07 March 2017 - 08:44 AM.

[PHP 7.0] [Joomla 3.8] [Easysocial 2.1] [jReviews 2.7]


#8 Alejandro

Alejandro

    Advanced Member

  • Administrators
  • 31940 posts

Posted 07 March 2017 - 08:52 AM

Thumbview has never supported displaying custom fields. Try it in blog layout. If you want to add fields to thumbview, you need to add them in the theme file.



#9 n00bster

n00bster

    Advanced Member

  • Members
  • PipPipPip
  • 300 posts
  • LocationAustria

Posted 07 March 2017 - 01:43 PM

ok with the blog layout i see the status of the business hours. i tested the implementation on the thumbview layout with the following code , but it does not show anything:

<?php /* THUMBVIEW LISTING Business Hours INDICATOR */ ?>
<?php echo $this->renderControllerView('fields_phpformat','business_hours_status');?>

i want to setup various business status layouts for my different listing types. i could call the field itself, but there i can not link this to a different layout:

<?php echo $CustomFields->field('jr_openinghours',$listing,false,false); ?>

how can i link to different status layouts what i have setup in my fields_phpformat override folder: 

business_hours_status.thtml
business_hours_status_pois.thtml
business_hours_status_shops.thtml

business_hours_status_gyms.thtml

 

 

 

another question, what does the "business_hours_schedule" file do?


[PHP 7.0] [Joomla 3.8] [Easysocial 2.1] [jReviews 2.7]


#10 Alejandro

Alejandro

    Advanced Member

  • Administrators
  • 31940 posts

Posted 07 March 2017 - 03:01 PM

The only possible approach for which we can provide support at this time is this one:

<?php echo $CustomFields->field('jr_openinghours',$listing); ?>

That is the standard way of adding custom fields to theme files. The other things you are trying will not work as you have already discovered because they are not supposed to work.

 

If you want to have different themes for different listing types, then you could try adding some conditionals to check the category or listing type ID inside the business_hours_multiview theme file. I didn't test it, but I think you should be able to access the listing info through the $entry array. So you can use $entry['Category']['cat_id'] and $entry['Criteria']['criteria_id'] for your conditionals and inside that file call different layouts just like we do now.



#11 n00bster

n00bster

    Advanced Member

  • Members
  • PipPipPip
  • 300 posts
  • LocationAustria

Posted 08 March 2017 - 09:16 AM

Alejandro thank you for your help. this is a bit to high for my skills to modify the file. i thought with your new modifications of the "opening  indicator" it would be as easy as "echo a custom field" in a theme file :huh:


[PHP 7.0] [Joomla 3.8] [Easysocial 2.1] [jReviews 2.7]


#12 Alejandro

Alejandro

    Advanced Member

  • Administrators
  • 31940 posts

Posted 08 March 2017 - 10:07 AM

It is even easier than that if you use blogview. You don't have to change anything. The complexity arises when you want to have a different output for different types.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users