*

kriskoyk

  • *****
  • 388 posts
Edit profile in location missing City
« on: December 07, 2025, 10:55:12 PM »
It is impossible for the user to edit the location because the city is missing.

*

MB Themes

Re: Edit profile in location missing City
« Reply #1 on: December 08, 2025, 09:08:44 AM »
Location handle Country, region & city all in one field.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 388 posts
Re: Edit profile in location missing City
« Reply #2 on: December 08, 2025, 02:39:24 PM »
I replaced this code in the oc-content\themes\beta/user-profile.php file

 
Code: [Select]
<div id="right-user" class="line">
              <?php osc_run_hook('user_profile_sidebar'); ?>
             
              <div class="row">
                <input type="hidden" name="countryId" id="countryId" class="sCountry" value="<?php echo $user['fk_c_country_code']; ?>"/>
                <input type="hidden" name="regionId" id="regionId" class="sRegion" value="<?php echo $user['fk_i_region_id']; ?>"/>
                <input type="hidden" name="cityId" id="cityId" class="sCity" value="<?php echo $user['fk_i_city_id']; ?>"/>

                <label for="term"><?php _e('Location''beta'); ?></label>

                <div id="location-picker" class="loc-picker ctr-<?php echo (bet_count_countries() == 'one' 'more'); ?>">
                  <input type="text" name="term" id="term" class="term" placeholder="<?php _e('Location''beta'); ?>" value="<?php echo bet_get_term(Params::getParam('term'), bet_ajax_country(), bet_ajax_region(), bet_ajax_city()); ?>" autocomplete="off"/>
                  <i class="fa fa-angle-down"></i>

                  <div class="shower-wrap">
                    <div class="shower" id="shower">
                      <?php echo bet_def_location(); ?>
                    </div>
                  </div>

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

              <div class="row">
                <label for="cityArea"><?php _e('City Area''beta'); ?></label>
                <div class="input-box"><?php UserForm::city_area_text(osc_user()); ?></div>
              </div>

              <div class="row">
                <label for="address"><?php _e('Street''beta'); ?></label>
                <div class="input-box"><?php UserForm::address_text(osc_user()); ?></div>
              </div>

              <div class="row">
                <label for="address"><?php _e('ZIP''beta'); ?></label>
                <div class="input-box"><?php UserForm::zip_text(osc_user()); ?></div>
              </div>

              <div class="row">
                <label for="user_type"><?php _e('User type''beta'); ?></label>
                <div class="input-box"><?php UserForm::is_company_select(osc_user()); ?></div>
              </div>

              <div class="row">
                <label for="webSite"><?php _e('Website''beta'); ?></label>
                <div class="input-box"><?php UserForm::website_text(osc_user()); ?></div>
              </div>

              <?php osc_run_hook('user_form'); ?>

              <div class="row user-buttons">
                <button type="submit" class="btn btn-primary mbBg"><?php _e('Save changes''beta'); ?></button>
              </div>
            </div>

with this

Code: [Select]
<div id="right-user" class="line">
              <div class="row">
                <input type="hidden" name="countryId" id="countryId" class="sCountry" value="<?php echo $user['fk_c_country_code']; ?>"/>
                <input type="hidden" name="regionId" id="regionId" class="sRegion" value="<?php echo $user['fk_i_region_id']; ?>"/>
                <input type="hidden" name="cityId" id="cityId" class="sCity" value="<?php echo $user['fk_i_city_id']; ?>"/>

                <label for="term"><?php _e('Location''beta'); ?></label>

                <div id="location-picker" class="loc-picker ctr-<?php echo (bet_count_countries() == 'one' 'more'); ?>">

                  <input type="text" name="term2" id="term2" class="term2" placeholder="<?php _e('Location''beta'); ?>" value="<?php echo bet_get_term(Params::getParam('term'), bet_ajax_country(), bet_ajax_region(), bet_ajax_city()); ?>" autocomplete="off"/>
                  <i class="fa fa-angle-down"></i>

                  <div class="shower-wrap">
                    <div class="shower" id="shower">
                      <?php echo bet_locbox_short($prepare['i_country'], $prepare['i_region'], $prepare['i_city']); ?>
                <a href="#" class="btn btn-primary mbBg loc-confirm isMobile"><i class="fa fa-check"></i></a>

                <div class="button-wrap isTablet isDesktop">
                  <a href="#" class="btn btn-primary mbBg loc-confirm"><?php _e('Continue''beta'); ?></a>
                    </div>
                  </div>
  </div>

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

              <div class="row">
                <label for="cityArea"><?php _e('City Area''beta'); ?></label>
                <div class="input-box"><?php UserForm::city_area_text(osc_user()); ?></div>
              </div>

              <div class="row">
                <label for="address"><?php _e('Street''beta'); ?></label>
                <div class="input-box"><?php UserForm::address_text(osc_user()); ?></div>
              </div>

              <div class="row">
                <label for="address"><?php _e('ZIP''beta'); ?></label>
                <div class="input-box"><?php UserForm::zip_text(osc_user()); ?></div>
              </div>

              <div class="row">
                <label for="user_type"><?php _e('User type''beta'); ?></label>
                <div class="input-box"><?php UserForm::is_company_select(osc_user()); ?></div>
              </div>

              <div class="row">
                <label for="webSite"><?php _e('Website''beta'); ?></label>
                <div class="input-box"><?php UserForm::website_text(osc_user()); ?></div>
              </div>

              <?php osc_run_hook('user_form'); ?>

              <div class="row user-buttons">
                <button type="submit" class="btn btn-primary mbBg"><?php _e('Save changes''beta'); ?></button>
              </div>
            </div>
         

and it works as I want. Is it safe? Will this replacement cause me a problem?
« Last Edit: December 08, 2025, 02:43:41 PM by kriskoyk »