I have a custom module for batch order in my magento application. I have created another store view and the batch order form will need to have different products in each store.
Here is part of the code that's responsible for the tabs is my order form. The content of the tab can be set in the admin panel.
Updated:
// Gets the block data.
$groups = $this->getGroups();
$mySelectedGroups = array('2', '4'); // this is the group entity_id from database
<!-- tab navigation -->
<ul id="tabs" class="nav nav-tabs">
<?php
// Loops through the groups to get their name as nav heading.
// The first iteration will activate the tab for the first group.
$navI = 1;
foreach ($groups as $group) :
if (in_array($group, $mySelectedGroups))
if ($group->hasProducts()) { ?>
<li <?php if ($navI == 1) { ?> class="active" <?php } ?>>
<a href="#<?php echo $group->getId(); ?>"
data-toggle="tab">
<?php echo $group->getName(); ?>
<i style="display: none;" class="text-danger error_glyph_<?php echo $group->getId(); ?> fa fa-exclamation-circle" aria-hidden="true"></i>
</a>
</li>
<?php $navI++;
} endforeach; ?>
</ul>
<!-- ./ tab navigation -->
It pulls all the groups of products created in the admin. Can you tell me a way of calling them here 1 by 1 instead of bulk action?
I will then be able to set them manually for each store view.
Update:
That's the getData()
for $groups
:
It doesn't look like a normal array...
That's what the original looks like.
Here is the back end setting for it.