Jump to content

Раскидать филиалы по табам (фед. округам)


steve07
 Share

Recommended Posts

Здравствуйте! Накидал немного функционал в "локализация" -> "Адрес магазина"
image.png.c5660cec67998e96bb41d95011462baf.png

выбирается в каждом магазине федеральный округ. Все используемые округа я вывел программно в виде табов.
А как раскидать сами магазины по этим табам? возможно как-то привязаться по id федерального округа?

image.png.4c5fbf2bf73a8d405223dc9793e8ac3f.png

 

  			<?php if ($all_FO) { ?>
				<ul class="nav nav-tabs">
					<?php foreach($all_FO as $fo) { ?>
						<li id="fo_<?php echo $fo['fo_id']; ?>">
							<a href="#fo-<?php echo $fo['fo_id']; ?>" data-toggle="tab"><?php echo $fo['fo_name']; ?></a></li>
					<?php } ?>
				</ul>	
			<?php } ?>

			<?php if ($locations) { ?>
			<div class="tab-content">
				<?php foreach ($locations as $location) { ?>
					<div id="fo-<?php echo $location['federal_okrug_id']; ?>" class="location_list tab-pane fade active in">
						<div class="location_item">
							<div class="location_name">
								<div data-objectid="<?php echo $location['location_id']; ?>" class="location_map"><span>Показать на карте <svg class="icon_svg"><use xlink:href="image/catalog/sprite.svg#treugol"></use></svg></span><svg class="icon_svg"><use xlink:href="image/catalog/sprite.svg#map_icon"></use></svg></div>
								<a href="<?php echo $location['href']; ?>"><?php echo $location['name']; ?></a>
							</div>
							<div class="location_address"><?php echo $location['address']; ?></div>
						</div>
					</div>
				<?php } ?>
			</div>
			<?php } ?>

 

Edited by steve07
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...