Forum Replies Created

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

    (@bozso21)

    Hi

    Is there any news on the topic?

    Thread Starter bozso21

    (@bozso21)

    Hi

    Is there any news on the topic?

    Thread Starter bozso21

    (@bozso21)

    Hi

    Is there any news on the topic?

    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, please note that our domain has changed

    https://muncs.hu/terkep

    Thread Starter bozso21

    (@bozso21)

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

    Thread Starter bozso21

    (@bozso21)

    Hi

    Thanks for the quick reply. /terkep, here set your location to Budapest to see the list – it’s working for desktop, but not for mobile unfortunately.

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