Jump to content
n00bster

setup business_hours_multiview?

Recommended Posts

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.

Share this post


Link to post

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.

Share this post


Link to post

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:

post-20291-0-96021800-1488781898_thumb.png

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 ...

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

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.

post-20291-0-44389800-1488894198_thumb.png

post-20291-0-10265000-1488894206_thumb.png

Edited by n00bster

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

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:

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

×

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.