*

NuCode

  • **
  • 18 posts
Remove Location from search on Home and sidebar
« on: June 08, 2018, 09:23:17 AM »
Hello i want to remove the location from home and in the search / browse page, how can i achieve this


]



And also where is the best place to insert the Virtual products codes
« Last Edit: June 08, 2018, 09:24:57 AM by NuCode »

*

MB Themes

Re: Remove Location from search on Home and sidebar
« Reply #1 on: June 09, 2018, 08:56:03 PM »
Hello
Homepage can be modified in main.php and inc.search.php.
Best place for virtual products is in item.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

NuCode

  • **
  • 18 posts
Re: Remove Location from search on Home and sidebar
« Reply #2 on: June 09, 2018, 09:07:01 PM »
Hi There,

I managed to remove the location from listings browse page but i'm not able to do it on the main page if i try to remove the code for the location all the site design breaks


The code that i'm saying is this box

Code: [Select]
<div class="b2 i-box">
            <label for="term"><?php _e('Where?''stela'); ?></label>
            <div class="box">
              <div id="location-picker">
                <?php if($location_closest <> '') { ?>
                  <i class="fa fa-crosshairs locate-me" title="<?php echo osc_esc_js(__('Get my location''stela')); ?>" data-location="<?php echo $location_closest?>"></i>
                <?php ?>
                <input type="text" name="term" id="term" class="term" placeholder="<?php _e('Your city...''stela'); ?>" value="<?php echo stela_get_term(Params::getParam('term'), Params::getParam('sCountry'), Params::getParam('sRegion'), Params::getParam('sCity')); ?>" autocomplete="off"/>
                <div class="shower-wrap">
                  <div class="shower" id="shower">
                    <div class="option service min-char"><?php _e('Type country, region or city''stela'); ?></div>
                  </div>
                </div>


If i remove it the layout is broken


What code should i use so that the location box b2 i-box  is removed and the layout is not broken

Bellow is the full code of inc.search.php




Code: [Select]
<div class="home-search-wrap">
  <div class="home-titles">
    <?php
      
require_once('model/geoplugin.class.php');
      
$geoplugin = new geoPlugin();
      
$geoplugin->locate();
      
$location array_values(array_filter(array($geoplugin->city$geoplugin->region$geoplugin->countryName$geoplugin->continentCode)));

      if(isset(
$location[0]) && $location[0] <> '') {
        
$location_closest $location[0];
      } else {
        
$location_closest __('your area''stela');
      }
    
?>


    <h1><?php _e('Discover''stela'); ?> <?php echo $location_closest?></h1>
    <h2><?php _e('Easily buy or sell items in your city!''stela'); ?></h2>
  </div>

  <div id="home-search">
    <div class="hs-box">
      <form action="<?php echo osc_base_url(true); ?>" method="get" class="search nocsrf" >
        <input type="hidden" name="page" value="search" />
        <input type="hidden" name="cookieAction" id="cookieAction" value="" />
        <input type="hidden" name="sCountry" class="sCountry" value="<?php echo Params::getParam('sCountry'); ?>"/>
        <input type="hidden" name="sRegion"  class="sRegion" value="<?php echo Params::getParam('sRegion'); ?>"/>
        <input type="hidden" name="sCity"  class="sCity" value="<?php echo Params::getParam('sCity'); ?>"/>

        <div class="b0">
          <div class="b1 i-box">
            <label for="sPattern"><?php _e('What?''stela'); ?></label>
            <div class="box">
              <?php if (osc_get_preference('item_ajax''stela_theme') == 1) { ?>
                <div id="item-picker">
                  <input type="text" name="sPattern" id="sPattern" class="pattern" placeholder="<?php _e('Ex: car, phone, house''stela'); ?>" value="<?php echo Params::getParam('sPattern'); ?>" autocomplete="off"/>

                  <div class="shower-wrap">
                    <div class="shower" id="shower">
                      <div class="option service min-char"><?php _e('Type keyword''stela'); ?></div>
                    </div>
                  </div>

                  <div class="loader"></div>
                </div>
              <?php } else { ?>
                <input type="text" name="sPattern" placeholder="<?php _e('Ex: car, phone, house''stela'); ?>" value="<?php echo Params::getParam('sPattern'); ?>" autocomplete="off"/>
              <?php ?>
            </div>
          </div>

          <div class="b2 i-box">
            <label for="term"><?php _e('Where?''stela'); ?></label>
            <div class="box">
              <div id="location-picker">
                <?php if($location_closest <> '') { ?>
                  <i class="fa fa-crosshairs locate-me" title="<?php echo osc_esc_js(__('Get my location''stela')); ?>" data-location="<?php echo $location_closest?>"></i>
                <?php ?>
                <input type="text" name="term" id="term" class="term" placeholder="<?php _e('Your city...''stela'); ?>" value="<?php echo stela_get_term(Params::getParam('term'), Params::getParam('sCountry'), Params::getParam('sRegion'), Params::getParam('sCity')); ?>" autocomplete="off"/>
                <div class="shower-wrap">
                  <div class="shower" id="shower">
                    <div class="option service min-char"><?php _e('Type country, region or city''stela'); ?></div>
                  </div>
                </div>

                <div class="loader"></div>
              </div>
            </div>
          </div>
        </div>

        <div class="b3">
          <button type="submit" class="round3 tr1"><i class="fa fa-search"></i><span><?php _e('Search''stela'); ?></span></button>
        </div>
      </form>
    </div>
  </div>

  <?php osc_current_web_theme_path('inc.category.php'); ?>
</div>

*

NuCode

  • **
  • 18 posts
Re: Remove Location from search on Home and sidebar
« Reply #3 on: June 10, 2018, 02:19:32 PM »
Or can you tell me how to use the mobile search box only  instead of the dextop one

*

MB Themes

Re: Remove Location from search on Home and sidebar
« Reply #4 on: June 10, 2018, 09:02:50 PM »
If you remove anything in theme, yoh should be prepared to adjust css to fix possible design issues.
If you are not sure how to remove something, rather then hide it via css.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

NuCode

  • **
  • 18 posts
Re: Remove Location from search on Home and sidebar
« Reply #5 on: June 11, 2018, 02:46:44 PM »
hi, obowsly i'm not good at it that's why i'm asking so please tell me how to hide that desktop version of search bar and use the one for mobile or anything that will hide the where(location) part

*

MB Themes

Re: Remove Location from search on Home and sidebar
« Reply #6 on: June 11, 2018, 06:06:41 PM »
I am abroad until 20th june so I cannot check that.
You can find hundreds of tutorial how to hide object via css that takes 3 minutes.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots