Jump to content

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


Recommended Posts

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

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



  			<?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 } ?>
			<?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 class="location_address"><?php echo $location['address']; ?></div>
				<?php } ?>
			<?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.
Note: Your post will require moderator approval before it will be visible.

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.


  • Recently Browsing   0 members

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