Multiple select attribute Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Values for custom select attributeRemove comma generated by multiple select attributeNot saving data when add multiple select attribute in product gridMulti Select Category Attribute not savingMultiple Select - Render as url and searchImages for multiple select valuesMagento2 : not able to unselect all option of custom multi select attributeMagento 2: Import multiple select attribute values using CSVMagmi skips multiple select attributesMultiple select product attribute is not showing in front end
Why light coming from distant stars is not discreet?
How to react to hostile behavior from a senior developer?
Is the Standard Deduction better than Itemized when both are the same amount?
Identify plant with long narrow paired leaves and reddish stems
51k Euros annually for a family of 4 in Berlin: Is it enough?
If a contract sometimes uses the wrong name, is it still valid?
How can I make names more distinctive without making them longer?
Can an alien society believe that their star system is the universe?
How to answer "Have you ever been terminated?"
Why are Kinder Surprise Eggs illegal in the USA?
Denied boarding although I have proper visa and documentation. To whom should I make a complaint?
How do I keep my slimes from escaping their pens?
Check which numbers satisfy the condition [A*B*C = A! + B! + C!]
What is Arya's weapon design?
What is Wonderstone and are there any references to it pre-1982?
How much time will it take to get my passport back if I am applying for multiple Schengen visa countries?
Why did the Falcon Heavy center core fall off the ASDS OCISLY barge?
Why aren't air breathing engines used as small first stages
Error "illegal generic type for instanceof" when using local classes
Storing hydrofluoric acid before the invention of plastics
What is the meaning of the new sigil in Game of Thrones Season 8 intro?
Extract all GPU name, model and GPU ram
At the end of Thor: Ragnarok why don't the Asgardians turn and head for the Bifrost as per their original plan?
How discoverable are IPv6 addresses and AAAA names by potential attackers?
Multiple select attribute
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Values for custom select attributeRemove comma generated by multiple select attributeNot saving data when add multiple select attribute in product gridMulti Select Category Attribute not savingMultiple Select - Render as url and searchImages for multiple select valuesMagento2 : not able to unselect all option of custom multi select attributeMagento 2: Import multiple select attribute values using CSVMagmi skips multiple select attributesMultiple select product attribute is not showing in front end
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Im working on a sports e shop and some shoes belong to specific techs which i would like to be shown as images
like this:
I thought of creating a multi select attribute named techs and put values as shown below and create for each option a seperate cms block so that i would call many of these simultanously
View.phtml
<?php /* @var $this Mage_Catalog_Block_Product_View_Abstract */?>
<?php $_product = $this->getProduct() ?>
<?php echo $this->getChildHtml('product_type_data_extra') ?>
<?php echo $this->getPriceHtml($_product) ?>
<?php if ($this->displayProductStockStatus()): ?>
<?php if ($_product->isAvailable()): ?>
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php else: ?>
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
<?php endif; ?>
<!-- Step 1 We need to add this to be able to get the attribute values -->
<?php
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct()
?>
<!-- Step 2 Allow for techs attribute to display different images based on value of attribute -->
<?php if ($_product->getAttributeText('tech') == "Pulsor"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml() ?>
<?php elseif ($_product->getAttributeText('tech') == "Flexo"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml() ?>
<?php endif; ?>
However when i put 2 cms nothing is shown if i put one its ok
product-attribute multiselect-attribute multiple
add a comment |
Im working on a sports e shop and some shoes belong to specific techs which i would like to be shown as images
like this:
I thought of creating a multi select attribute named techs and put values as shown below and create for each option a seperate cms block so that i would call many of these simultanously
View.phtml
<?php /* @var $this Mage_Catalog_Block_Product_View_Abstract */?>
<?php $_product = $this->getProduct() ?>
<?php echo $this->getChildHtml('product_type_data_extra') ?>
<?php echo $this->getPriceHtml($_product) ?>
<?php if ($this->displayProductStockStatus()): ?>
<?php if ($_product->isAvailable()): ?>
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php else: ?>
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
<?php endif; ?>
<!-- Step 1 We need to add this to be able to get the attribute values -->
<?php
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct()
?>
<!-- Step 2 Allow for techs attribute to display different images based on value of attribute -->
<?php if ($_product->getAttributeText('tech') == "Pulsor"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml() ?>
<?php elseif ($_product->getAttributeText('tech') == "Flexo"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml() ?>
<?php endif; ?>
However when i put 2 cms nothing is shown if i put one its ok
product-attribute multiselect-attribute multiple
add a comment |
Im working on a sports e shop and some shoes belong to specific techs which i would like to be shown as images
like this:
I thought of creating a multi select attribute named techs and put values as shown below and create for each option a seperate cms block so that i would call many of these simultanously
View.phtml
<?php /* @var $this Mage_Catalog_Block_Product_View_Abstract */?>
<?php $_product = $this->getProduct() ?>
<?php echo $this->getChildHtml('product_type_data_extra') ?>
<?php echo $this->getPriceHtml($_product) ?>
<?php if ($this->displayProductStockStatus()): ?>
<?php if ($_product->isAvailable()): ?>
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php else: ?>
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
<?php endif; ?>
<!-- Step 1 We need to add this to be able to get the attribute values -->
<?php
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct()
?>
<!-- Step 2 Allow for techs attribute to display different images based on value of attribute -->
<?php if ($_product->getAttributeText('tech') == "Pulsor"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml() ?>
<?php elseif ($_product->getAttributeText('tech') == "Flexo"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml() ?>
<?php endif; ?>
However when i put 2 cms nothing is shown if i put one its ok
product-attribute multiselect-attribute multiple
Im working on a sports e shop and some shoes belong to specific techs which i would like to be shown as images
like this:
I thought of creating a multi select attribute named techs and put values as shown below and create for each option a seperate cms block so that i would call many of these simultanously
View.phtml
<?php /* @var $this Mage_Catalog_Block_Product_View_Abstract */?>
<?php $_product = $this->getProduct() ?>
<?php echo $this->getChildHtml('product_type_data_extra') ?>
<?php echo $this->getPriceHtml($_product) ?>
<?php if ($this->displayProductStockStatus()): ?>
<?php if ($_product->isAvailable()): ?>
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php else: ?>
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
<?php endif; ?>
<!-- Step 1 We need to add this to be able to get the attribute values -->
<?php
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct()
?>
<!-- Step 2 Allow for techs attribute to display different images based on value of attribute -->
<?php if ($_product->getAttributeText('tech') == "Pulsor"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml() ?>
<?php elseif ($_product->getAttributeText('tech') == "Flexo"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml() ?>
<?php endif; ?>
However when i put 2 cms nothing is shown if i put one its ok
product-attribute multiselect-attribute multiple
product-attribute multiselect-attribute multiple
edited 6 mins ago
Muhammad Anas
622320
622320
asked Feb 7 '17 at 15:01
MarinosMarinos
82
82
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You need to use it as an array
$techTypes = explode(",",$_product->getResource() ->getAttribute('tech')->getFrontend() ->getValue($_product));
foreach($techTypes as $key => $value)
if ($_product->getAttributeText('tech') == "Pulsor"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml();
elseif ($_product->getAttributeText('tech') == "Flexo"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml();
endif;
add a comment |
I managed to do this without the use of cms blocks
<!-- Display Product Tech Images -->
<div class="techs">
<div class="techs-title">
<span><strong>Technology</strong></span>
</div>
<ul>
<?php
$multiSelectArray = $this->getProduct ()->getAttributeText('tech');
$lastItem = end ($multiSelectArray);
foreach ($multiSelectArray as $multiSelectItem) :?>
<li>
<a tabindex="0" role="button" title="" data-toggle="popover" data-trigger="hover" data-placement="top" data-original-title="<? echo $multiSelectItem; ?>">
<img src="/media/wysiwyg/techs/<?php echo $multiSelectItem ?>.jpg"></img>
<p class="tech-name"><? echo $multiSelectItem; ?></p>
<div class="hidden popover-content">
</div>
</a>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
$.noConflict();
$('[data-toggle="popover"]').popover();
);
</script>
</li>
<?php endforeach;?>
</ul>
</div>
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f158594%2fmultiple-select-attribute%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to use it as an array
$techTypes = explode(",",$_product->getResource() ->getAttribute('tech')->getFrontend() ->getValue($_product));
foreach($techTypes as $key => $value)
if ($_product->getAttributeText('tech') == "Pulsor"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml();
elseif ($_product->getAttributeText('tech') == "Flexo"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml();
endif;
add a comment |
You need to use it as an array
$techTypes = explode(",",$_product->getResource() ->getAttribute('tech')->getFrontend() ->getValue($_product));
foreach($techTypes as $key => $value)
if ($_product->getAttributeText('tech') == "Pulsor"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml();
elseif ($_product->getAttributeText('tech') == "Flexo"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml();
endif;
add a comment |
You need to use it as an array
$techTypes = explode(",",$_product->getResource() ->getAttribute('tech')->getFrontend() ->getValue($_product));
foreach($techTypes as $key => $value)
if ($_product->getAttributeText('tech') == "Pulsor"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml();
elseif ($_product->getAttributeText('tech') == "Flexo"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml();
endif;
You need to use it as an array
$techTypes = explode(",",$_product->getResource() ->getAttribute('tech')->getFrontend() ->getValue($_product));
foreach($techTypes as $key => $value)
if ($_product->getAttributeText('tech') == "Pulsor"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_pulsor')->toHtml();
elseif ($_product->getAttributeText('tech') == "Flexo"):
echo $this->getLayout()->createBlock('cms/block')->setBlockId('tech_flexo')->toHtml();
endif;
answered Feb 7 '17 at 15:30
Jaimin SutariyaJaimin Sutariya
9,44322055
9,44322055
add a comment |
add a comment |
I managed to do this without the use of cms blocks
<!-- Display Product Tech Images -->
<div class="techs">
<div class="techs-title">
<span><strong>Technology</strong></span>
</div>
<ul>
<?php
$multiSelectArray = $this->getProduct ()->getAttributeText('tech');
$lastItem = end ($multiSelectArray);
foreach ($multiSelectArray as $multiSelectItem) :?>
<li>
<a tabindex="0" role="button" title="" data-toggle="popover" data-trigger="hover" data-placement="top" data-original-title="<? echo $multiSelectItem; ?>">
<img src="/media/wysiwyg/techs/<?php echo $multiSelectItem ?>.jpg"></img>
<p class="tech-name"><? echo $multiSelectItem; ?></p>
<div class="hidden popover-content">
</div>
</a>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
$.noConflict();
$('[data-toggle="popover"]').popover();
);
</script>
</li>
<?php endforeach;?>
</ul>
</div>
add a comment |
I managed to do this without the use of cms blocks
<!-- Display Product Tech Images -->
<div class="techs">
<div class="techs-title">
<span><strong>Technology</strong></span>
</div>
<ul>
<?php
$multiSelectArray = $this->getProduct ()->getAttributeText('tech');
$lastItem = end ($multiSelectArray);
foreach ($multiSelectArray as $multiSelectItem) :?>
<li>
<a tabindex="0" role="button" title="" data-toggle="popover" data-trigger="hover" data-placement="top" data-original-title="<? echo $multiSelectItem; ?>">
<img src="/media/wysiwyg/techs/<?php echo $multiSelectItem ?>.jpg"></img>
<p class="tech-name"><? echo $multiSelectItem; ?></p>
<div class="hidden popover-content">
</div>
</a>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
$.noConflict();
$('[data-toggle="popover"]').popover();
);
</script>
</li>
<?php endforeach;?>
</ul>
</div>
add a comment |
I managed to do this without the use of cms blocks
<!-- Display Product Tech Images -->
<div class="techs">
<div class="techs-title">
<span><strong>Technology</strong></span>
</div>
<ul>
<?php
$multiSelectArray = $this->getProduct ()->getAttributeText('tech');
$lastItem = end ($multiSelectArray);
foreach ($multiSelectArray as $multiSelectItem) :?>
<li>
<a tabindex="0" role="button" title="" data-toggle="popover" data-trigger="hover" data-placement="top" data-original-title="<? echo $multiSelectItem; ?>">
<img src="/media/wysiwyg/techs/<?php echo $multiSelectItem ?>.jpg"></img>
<p class="tech-name"><? echo $multiSelectItem; ?></p>
<div class="hidden popover-content">
</div>
</a>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
$.noConflict();
$('[data-toggle="popover"]').popover();
);
</script>
</li>
<?php endforeach;?>
</ul>
</div>
I managed to do this without the use of cms blocks
<!-- Display Product Tech Images -->
<div class="techs">
<div class="techs-title">
<span><strong>Technology</strong></span>
</div>
<ul>
<?php
$multiSelectArray = $this->getProduct ()->getAttributeText('tech');
$lastItem = end ($multiSelectArray);
foreach ($multiSelectArray as $multiSelectItem) :?>
<li>
<a tabindex="0" role="button" title="" data-toggle="popover" data-trigger="hover" data-placement="top" data-original-title="<? echo $multiSelectItem; ?>">
<img src="/media/wysiwyg/techs/<?php echo $multiSelectItem ?>.jpg"></img>
<p class="tech-name"><? echo $multiSelectItem; ?></p>
<div class="hidden popover-content">
</div>
</a>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
$.noConflict();
$('[data-toggle="popover"]').popover();
);
</script>
</li>
<?php endforeach;?>
</ul>
</div>
edited Feb 8 '17 at 7:45
7ochem
5,85493768
5,85493768
answered Feb 8 '17 at 5:38
MarinosMarinos
113
113
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f158594%2fmultiple-select-attribute%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown