• Hi

    I saw that your support moved here, so I will continue the discussion at this page. I received some help from you here:

    https://wclovers.com/forums/topic/show-store-hour-in-wcfm_stores-its-possible/#post-142039

    Here you wrote that I should override “wcfmmp-view-store-hours.php in your my folder yourtheme/wcfm/store/widgets from \wp-content\plugins\wc-multivendor-marketplace\views\store\widgets”. However, I don’t have a yourtheme/wcfm/store/widgets folder (I’m using OceanWP). Also, could you please advise where should I add the code provided?

    You can test out my issue on the link provided, please modify your location to Budapest to see the list.
    Many thanks in advance

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter bozso21

    (@bozso21)

    Sorry I messed up the domain: https://muncs.hu/boltkereso/

    Plugin Author WC Lovers

    (@wclovers)

    However, I don’t have a yourtheme/wcfm/store/widgets folder (I’m using OceanWP).

    – Have you any child theme for this?

    Thread Starter bozso21

    (@bozso21)

    Hi, yes thank you I sorted it out. However, when I add the code snippet provided to the store-list view, it still displays it wrong – please kindly check https://ibb.co/bWxBm4K
    Is it possible to move the store hours to the white area right next to the “Visit” button and display only today’s store hours (like it worked on the Single Product page? https://ibb.co/2vzWTgb

    The code provided on WCFM Forums:

    add_action('wcfmmp_store_list_after_store_info','fn_wcfmmp_store_list_after_store_info',11,2);
    function fn_wcfmmp_store_list_after_store_info($store_id, $store_info) {
    	global $WCFM, $WCFMmp, $wp, $WCFM_Query;
    	$store_user  = wcfmmp_get_store( $store_id );		
    	$wcfm_vendor_store_hours = get_user_meta( $store_id, 'wcfm_vendor_store_hours', true );
    	if( !$wcfm_vendor_store_hours ) {
    		return;
    	}	
    	$wcfm_store_hours_enable = isset( $wcfm_vendor_store_hours['enable'] ) ? 'yes' : 'no';
    	if( $wcfm_store_hours_enable != 'yes' ) return;	
    	$wcfm_store_hours_off_days  = isset( $wcfm_vendor_store_hours['off_days'] ) ? $wcfm_vendor_store_hours['off_days'] : array();
    	$wcfm_store_hours_day_times = isset( $wcfm_vendor_store_hours['day_times'] ) ? $wcfm_vendor_store_hours['day_times'] : array();
    	if( empty( $wcfm_store_hours_day_times ) ) return;	
    	$weekdays = array( 0 => __( 'Monday', 'wc-multivendor-marketplace' ), 1 => __( 'Tuesday', 'wc-multivendor-marketplace' ), 2 => __( 'Wednesday', 'wc-multivendor-marketplace' ), 3 => __( 'Thursday', 'wc-multivendor-marketplace' ), 4 => __( 'Friday', 'wc-multivendor-marketplace' ), 5 => __( 'Saturday', 'wc-multivendor-marketplace' ), 6 => __( 'Sunday', 'wc-multivendor-marketplace') );
    	?>
    	<div class="wcfmmp_store_hours">
    	<span class="wcfmmp-store-hours widget-title"><span class="wcfmfa fa-clock"></span>Store Hours</span><div class="wcfm_clearfix"></div>	
    	<?php
    	foreach( $wcfm_store_hours_day_times as $wcfm_store_hours_day => $wcfm_store_hours_day_time_slots ) {
    			if( in_array( $wcfm_store_hours_day, $wcfm_store_hours_off_days ) ) continue;
    			if( !isset( $wcfm_store_hours_day_time_slots[0] ) || !isset( $wcfm_store_hours_day_time_slots[0]['start'] ) ) return;
    			if( empty( $wcfm_store_hours_day_time_slots[0]['start'] ) || empty( $wcfm_store_hours_day_time_slots[0]['end'] ) ) continue;			
    			echo '<span class="wcfmmp-store-hours-day">' . $weekdays[$wcfm_store_hours_day] . ':</span>';			
    			foreach( $wcfm_store_hours_day_time_slots as $slot => $wcfm_store_hours_day_time_slot ) {
    				echo "<br />" . date_i18n( wc_time_format(), strtotime( $wcfm_store_hours_day_time_slot['start'] ) ) . " - " . date_i18n( wc_time_format(), strtotime( $wcfm_store_hours_day_time_slot['end'] ) );
    			}
    			echo '<br /><br />';
    		}
    	?>
    	</div>
    	<?php		
    }

    Many thanks in advance.

    Thread Starter bozso21

    (@bozso21)

    Hi

    Is there any news on the topic?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Store Hours – Only today’ is closed to new replies.