-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
group days with identical hours Issue #22
Comments
Replace the 'hours_this_week_grouped' with this!
|
hi brandbums! Fatal error: Call to undefined method StoreHours::format_hours() in /Applications/MAMP/htdocs/php-store-hours-master_orig/StoreHours.class.php on line 373 |
Hey tillzzz, Copy and paste the most updated version of this file. Then replace the function. Your getting an error on another function in that class. |
hi guys! array (size=7)
'mon' =>
array (size=2)
0 => string '10:00 - 12:00' (length=13)
1 => string '16:00 - 22:00' (length=13)
'tue' =>
array (size=2)
0 => string '10:00 - 12:00' (length=13)
1 => string '16:00 - 22:00' (length=13)
'wed' =>
array (size=2)
0 => string '10:00 - 12:00' (length=13)
1 => string '16:00 - 22:00' (length=13)
'thu' =>
array (size=2)
0 => string '16:00 - 20:00' (length=13)
1 => string '' (length=0)
'fri' =>
array (size=2)
0 => string '18:00 - 22:00' (length=13)
1 => string '' (length=0)
'sat' =>
array (size=2)
0 => string '18:00 - 22:00' (length=13)
1 => string '' (length=0)
'sun' =>
array (size=2)
0 => string '' (length=0) |
I fixed it by changing |
I fixed it by changing : line 265 from foreach ($blocks as $block) { to foreach ($blocks as &$block) { |
Hi!
Thanks for that class!
there is a issue with '$store_hours->hours_this_week(true)' when using $hours- array like this :
$hours = array( 'mon' => array('11:00-20:30'), 'tue' => array('11:00-13:00', '18:00-20:30'), 'wed' => array('11:00-20:30'), 'thu' => array('11:00-1:30'), // Open late 'fri' => array('11:00-20:30'), 'sat' => array('11:00-1:30'), // Open late 'sun' => array() // Closed all day );
RESULT: (group days with identical hours)
MO, MI, FR 11:00-20:30
Di 11:00-13:00, 18:00-20:30
The result is loosing thu and sat as both are 'open late'
Display full list of open hours is rendering just fine:
ORIGINAL CLASS WITHOUT PERSONAL MODIFICATIONS:
The text was updated successfully, but these errors were encountered: