• Resolved francescolia

    (@francescolia)


    Hi! I don’t understand how to integrate to main search (in header) in Bebo Store.

    This is the code in header where search form is:
    <?php
    global $beau_option;
    $megamenu_setting = $beau_option[‘megamenu-type’];
    $wishlist_setting = $beau_option[‘enabled-wishlist’];
    $disable_search = $beau_option[‘disable_search’];
    if ($megamenu_setting == ”) {
    $megamenu_setting = ‘No’;
    }
    $enabled_cart = $beau_option[‘enabled-cart-header’];
    include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );
    ?>
    <div class=”menu-fix-all”>
    <div class=”container”>
    <span class=”humberger-button”>
    <button>
    <i></i>
    <i></i>
    <i></i>
    </button>
    </span>
    <div class=”beau-logo”>
    <?php
    $store_logo = $beau_option[‘logo’][‘url’];
    if ($store_logo == “”) {
    $store_logo = get_template_directory_uri().’/asset/images/logo.png’;
    }
    ?>
    “>” alt=”Logo”>
    </div><!–End .logo–>
    <div class=”menu”>
    <?php
    if ($megamenu_setting == ‘No’) {

    wp_nav_menu(array(
    ‘theme_location’ => ‘main-menu’,
    ‘menu_class’ => ‘col-md-12 col-sm-12 hidden-xs’,
    ‘menu_id’ => ‘main-navigation’,
    ‘container’ => ”,
    ‘theme_location’ => ‘main-menu’,
    ));
    }
    if ($megamenu_setting == ‘Yes’) {

    if ( is_plugin_active( ‘megamenu/megamenu.php’ ) ) {
    wp_nav_menu( array( ‘theme_location’ => ‘main-menu’ ) );
    }
    }
    ?>
    </div>
    <?php get_template_part(‘templates/stick’,’search’) ?>
    </div>
    </div>
    <header class=”header-two”>
    <div class=”header-top”>
    <div class=”container-fluid”>
    <?php if (has_nav_menu(‘small-menu’)): ?>
    <div class=”menu-top”>
    <?php
    wp_nav_menu(array(
    ‘theme_location’ => ‘small-menu’,
    ‘menu_class’ => ‘col-md-12 col-sm-12 hidden-xs’,
    ‘menu_id’ => ‘main-navigation’,
    ‘container’ => ”,
    ‘theme_location’ => ‘small-menu’,
    ));
    ?>
    </div><!–End menu-top–>
    <?php endif ?>
    <div class=”social-contact pull-right”>
    <?php get_template_part(‘templates/social’,’list’);?>
    <?php if ($beau_option[‘hotline’]): ?>
    <span class=”header-phone”> <i class=”fa fa-phone”></i> <?php echo esc_attr($beau_option[‘hotline’]); ?></span>
    <?php endif ?>
    </div><!–End social-contact–>
    </div>
    </div>
    <div class=”header-bottom”>
    <div class=”container-fluid”>
    <div class=”full-height col-md-3 col-sm-4 col-xs-12″>
    <div class=”humberger-menu-logo no-left”>
    <span class=”humberger-button”>
    <button>
    <i></i>
    <i></i>
    <i></i>
    </button>
    </span>
    <div class=”book-logo”>
    <?php
    $store_logo = $beau_option[‘logo’][‘url’];
    if ($store_logo == “”) {
    $store_logo = get_template_directory_uri().’/asset/images/logo.png’;
    }
    ?>
    “>” alt=”Logo”>
    </div>
    </div><!–End humberger-menu–>
    </div>
    <div class=”full-height col-md-6 col-sm-8 col-xs-12″>
    <?php if ($disable_search != ‘2’): ?>
    <div class=”search-navigation-full”>
    <div class=”search”>
    <form action=”<?php echo esc_url(home_url( ‘/’ ));?>” method=”GET”>
    <span class=”felement”>
    <input type=”text” name=”s” id=”txt-search” placeholder=”<?php esc_html_e(‘Cerca per titolo, autore, o tema trattato’,’bebostore’); ?>”>
    <input type=”hidden” name=”post_type” value=”product” />
    <select name=”category_name” class=”custom-dropdown search-fillter”>
    <option value=”0″ selected><?php esc_html_e(‘Tutti i prodotti’,’bebostore’); ?></option>
    <?php
    $args = array(
    ‘orderby’ => ‘title’,
    ‘order’ => ‘ASC’,
    ‘hide_empty’ => FALSE,
    );
    $product_categories = get_terms( ‘product_cat’, $args );
    $count = count($product_categories);
    if ( $count > 0 ){
    foreach ( $product_categories as $product_category ) {
    echo ‘<option value=”‘ . $product_category->slug . ‘”>’ . $product_category->name . ‘</option>’;
    }
    }
    ?>
    </select>
    </span>
    <button type=”submit”><?php esc_html_e(‘Search’,’bebostore’);?></button>
    </form>
    </div><!–End search–>
    <script>
    (function($){
    “use strict”;
    jQuery(‘#txt-search’).focus(function() {
    jQuery(‘.felement’).addClass(‘solid-border’);
    });
    jQuery(document).click(function(event) {
    if(!jQuery(event.target).closest(‘.felement’).length) {
    if(jQuery(‘.felement’).hasClass(‘solid-border’)) {
    jQuery(‘.felement’).removeClass(‘solid-border’);
    }
    }
    })
    })(jQuery)

    </script>
    </div><!–End search-navigation–>
    <?php endif ?>

    </div>
    <div class=”full-height col-md-3 col-sm-12 hidden-xs”>
    <div class=”nav-right”>
    <ul class=”list-right-nav”>
    <?php
    if( !is_user_logged_in()) {
    ?>

Viewing 1 replies (of 1 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    You need to replace all content between <form … </form> with

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

Viewing 1 replies (of 1 total)
  • The topic ‘Integration to Bebo Store’ is closed to new replies.