Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter Mikos91

    (@mikos91)

    Oke strangest thing just happend.. After posting this topic, i checked if the link was correct and the page is all fine now…

    Guess it is solved

    Thread Starter Mikos91

    (@mikos91)

    ** Resolved **

    Thread Starter Mikos91

    (@mikos91)

    @cookforweb,

    Just updated the plugin and saw you integrated the deploy on hover function! Great job and thank you verry much!

    Greets Mike

    Thread Starter Mikos91

    (@mikos91)

    129mac,

    Depends on how experienced you are with customizing themes/plugins?

    Best way to make changes is creating a child theme with a style.css in it. See this: https://codex.ww.wp.xz.cn/Child_Themes

    And add the next code in this style.css

    .megamenu-child-container {
        top: 0px;
    }

    If you are not as experienced i suggest you add that bit of css into the plugins customizer. I don’t know for sure if your custimizations will stay after a new plugin update. That’s why i always work with a child theme.

    Good luck

    Greets Mike

    Thread Starter Mikos91

    (@mikos91)

    Mistake message..

    Thread Starter Mikos91

    (@mikos91)

    @cookforweb @129mac,
    Hmm, after taking a closer look at the css it looks like it solves the problem by commenting top: 80px; in the following div class.. Any reason why it’s there?

    .megamenu-child-container {
        background: #1c1c1c;
        border-top: 3px solid;
        padding: 10px 10px 0px;
        position: absolute;
        top: 80px; <!-- this here -->
        left: 0px;
        float: left;
        box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.25);
        -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.25);
        -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.25);
        z-index: 99;
    }

    Because after deleting this your menu is working just fine.. Also tablet/phone version.

    Thread Starter Mikos91

    (@mikos91)

    @ cookforweb,
    Thanks for the addition! Forgot the menu is responsive.. I’ll take a look when i’m home again later today.

    @129mac,
    Well if you want to make customizations to a plugin or theme i suggest you use a child theme and customize the style.css within. Easiest to keep total control over all your changes. I’ll look into the hover action when i get back home later today.

    Greets Mike

    Thread Starter Mikos91

    (@mikos91)

    Looks like your submenu is to far from the main menu. So when you hover your mouse to the submenu, it basically ‘unhover’ the main menu.

    Try adding this to your style.css

    #main-menu > ul.menu > li > .megamenu-child-container {
        margin-top: -20px;
    }

    As your submenu/drop down menu will rise a little bit, the problem should be solved.

    Hope it helped!

    Greets Mike

    Thread Starter Mikos91

    (@mikos91)

    Thanks for the reply. For the deploy on hover thing i’m still working on it. For the second thing i changed this code on line 468 in All-in.css

    .menu-item a.menu-link.active,  <--- this here
    .menu-item a.menu-static-link:hover,
    .menu-item a.menu-link:hover,
    .menu-item a.menu-static:hover{
    	background-color: rgba(0,0,0,0.25)
    }

    To

    .menu-item a.menu-link.selected,  <--- to this
    .menu-item a.menu-static-link:hover,
    .menu-item a.menu-link:hover,
    .menu-item a.menu-static:hover{
    	background-color: rgba(0,0,0,0.25)
    }

    Thanks again. I’ll let you know if i have found the solution for the deploy on hover.

    Greets Mike

    Thread Starter Mikos91

    (@mikos91)

    Thank you for your response!

    Is it possible for you to send me the code which you used to get the hover working? From there i can try to figure out how to get it working onh a mobile. If i can solve it, i’ll send you the code back.

    Second thing, when i hover a menu-item it stays highlighted even when i’m not hovering above it. How can i make the highlight disappear if i’m not hovering above the menu-item??

    Many thanks in advance!

    Greets Mike

    Thread Starter Mikos91

    (@mikos91)

    Charlie,

    Thank you for your fast reply. I managed to change the sequence, so that’s 1 issue solved!

    Great to hear, i’ll be waiting for the update then.

    Thanks again!

    Greets Mikos

    Thread Starter Mikos91

    (@mikos91)

    After some struggling i have managed to put in an extra option with every payment gateway. This way i can check/uncheck which gateways there can be used.

    I took the file ‘class-wc-gateway-bacs.php’ and added this code to it:

    'enable_for_virtual' => array(
    				'title'             => __( 'Enable for virtual orders', 'woocommerce' ),
    				'label'             => __( 'Enable COD if the order is virtual', 'woocommerce' ),
    				'type'              => 'checkbox',
    				'default'           => 'yes'
    			)

    and this:

    /**
    	 * Check If The Gateway Is Available For Use
    	 *
    	 * @return bool
    	 */
    	public function is_available() {
    		$order = null;
    
    		if ( ! $this->enable_for_virtual ) {
    			if ( WC()->cart && ! WC()->cart->needs_shipping() ) {
    				return false;
    			}
    
    			if ( is_page( wc_get_page_id( 'checkout' ) ) && 0 < get_query_var( 'order-pay' ) ) {
    				$order_id = absint( get_query_var( 'order-pay' ) );
    				$order    = wc_get_order( $order_id );
    
    				// Test if order needs shipping.
    				$needs_shipping = false;
    
    				if ( 0 < sizeof( $order->get_items() ) ) {
    					foreach ( $order->get_items() as $item ) {
    						$_product = $order->get_product_from_item( $item );
    
    						if ( $_product->needs_shipping() ) {
    							$needs_shipping = true;
    							break;
    						}
    					}
    				}
    
    				$needs_shipping = apply_filters( 'woocommerce_cart_needs_shipping', $needs_shipping );
    
    				if ( $needs_shipping ) {
    					return false;
    				}
    			}
    		}
    
    		if ( ! empty( $this->enable_for_methods ) ) {
    
    			// Only apply if all packages are being shipped via local pickup
    			$chosen_shipping_methods_session = WC()->session->get( 'chosen_shipping_methods' );
    
    			if ( isset( $chosen_shipping_methods_session ) ) {
    				$chosen_shipping_methods = array_unique( $chosen_shipping_methods_session );
    			} else {
    				$chosen_shipping_methods = array();
    			}
    
    			$check_method = false;
    
    			if ( is_object( $order ) ) {
    				if ( $order->shipping_method ) {
    					$check_method = $order->shipping_method;
    				}
    
    			} elseif ( empty( $chosen_shipping_methods ) || sizeof( $chosen_shipping_methods ) > 1 ) {
    				$check_method = false;
    			} elseif ( sizeof( $chosen_shipping_methods ) == 1 ) {
    				$check_method = $chosen_shipping_methods[0];
    			}
    
    			if ( ! $check_method ) {
    				return false;
    			}
    
    			$found = false;
    
    			foreach ( $this->enable_for_methods as $method_id ) {
    				if ( strpos( $check_method, $method_id ) === 0 ) {
    					$found = true;
    					break;
    				}
    			}
    
    			if ( ! $found ) {
    				return false;
    			}
    		}
    
    		return parent::is_available();
    	}

    Only problem i’m having now is to save this file in my child-theme and override the original. But sinds it’s a woocommerce plugin i haven’t figured out where to put this file.

    Does somebody know how to save a woocommerce file in a child-theme? Original path:

    woocommerce -> includes -> gateways -> bacs -> 'class-wc-gateway-bacs.php'

    Thread Starter Mikos91

    (@mikos91)

    After some struggling i have managed to put in an extra option with every payment gateway. This way i can check/uncheck which gateways there can be used.

    I took the file ‘class-wc-gateway-bacs.php’ and added this code to it:

    'enable_for_virtual' => array(
    				'title'             => __( 'Enable for virtual orders', 'woocommerce' ),
    				'label'             => __( 'Enable COD if the order is virtual', 'woocommerce' ),
    				'type'              => 'checkbox',
    				'default'           => 'yes'
    			)

    and this:

    /**
    	 * Check If The Gateway Is Available For Use
    	 *
    	 * @return bool
    	 */
    	public function is_available() {
    		$order = null;
    
    		if ( ! $this->enable_for_virtual ) {
    			if ( WC()->cart && ! WC()->cart->needs_shipping() ) {
    				return false;
    			}
    
    			if ( is_page( wc_get_page_id( 'checkout' ) ) && 0 < get_query_var( 'order-pay' ) ) {
    				$order_id = absint( get_query_var( 'order-pay' ) );
    				$order    = wc_get_order( $order_id );
    
    				// Test if order needs shipping.
    				$needs_shipping = false;
    
    				if ( 0 < sizeof( $order->get_items() ) ) {
    					foreach ( $order->get_items() as $item ) {
    						$_product = $order->get_product_from_item( $item );
    
    						if ( $_product->needs_shipping() ) {
    							$needs_shipping = true;
    							break;
    						}
    					}
    				}
    
    				$needs_shipping = apply_filters( 'woocommerce_cart_needs_shipping', $needs_shipping );
    
    				if ( $needs_shipping ) {
    					return false;
    				}
    			}
    		}
    
    		if ( ! empty( $this->enable_for_methods ) ) {
    
    			// Only apply if all packages are being shipped via local pickup
    			$chosen_shipping_methods_session = WC()->session->get( 'chosen_shipping_methods' );
    
    			if ( isset( $chosen_shipping_methods_session ) ) {
    				$chosen_shipping_methods = array_unique( $chosen_shipping_methods_session );
    			} else {
    				$chosen_shipping_methods = array();
    			}
    
    			$check_method = false;
    
    			if ( is_object( $order ) ) {
    				if ( $order->shipping_method ) {
    					$check_method = $order->shipping_method;
    				}
    
    			} elseif ( empty( $chosen_shipping_methods ) || sizeof( $chosen_shipping_methods ) > 1 ) {
    				$check_method = false;
    			} elseif ( sizeof( $chosen_shipping_methods ) == 1 ) {
    				$check_method = $chosen_shipping_methods[0];
    			}
    
    			if ( ! $check_method ) {
    				return false;
    			}
    
    			$found = false;
    
    			foreach ( $this->enable_for_methods as $method_id ) {
    				if ( strpos( $check_method, $method_id ) === 0 ) {
    					$found = true;
    					break;
    				}
    			}
    
    			if ( ! $found ) {
    				return false;
    			}
    		}
    
    		return parent::is_available();
    	}

    Only problem i’m having now is to save this file in my child-theme and override the original. But sinds it’s a woocommerce plugin i haven’t figured out where to put this file.

    Does somebody know how to save a woocommerce file in a child-theme? Original path:

    woocommerce -> includes -> gateways -> bacs -> 'class-wc-gateway-bacs.php'

    Thread Starter Mikos91

    (@mikos91)

    Thanks for your reply. Good idea! I’ll be back when i have got the answer.

    Thread Starter Mikos91

    (@mikos91)

    Kind of, used another code to get it straight to my Php.Header.

    <?php echo do_shortcode( '[DISPLAY_ULTIMATE_SOCIAL_ICONS]' ); ?>

    But thanks anyway! And much more thanks for the great plugin!

Viewing 15 replies - 1 through 15 (of 16 total)