Shop By Brand/Manufacturer Dropdown Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Creating dropdown menu of brands(manufacturer)Colors aren't showing in the “Shop By Color” areaHow to reduce Magento search autocomplete dropdown time delay?Fresh Magento 1.9.1 install shows wrong price format in dropdown menus of configurable productsAdd custom Dropdown Column to Manage Product > Images Tab in Admin sectionShop crashes SQLSTATE[HY000] in error reportsSort Configurable Attribute Options Alphabetically Except for First One (Default)

Should a wizard buy fine inks every time he want to copy spells into his spellbook?

Special flights

After Sam didn't return home in the end, were he and Al still friends?

What is a more techy Technical Writer job title that isn't cutesy or confusing?

Why is std::move not [[nodiscard]] in C++20?

Can humans save crash-landed aliens?

What does 丫 mean? 丫是什么意思?

What initially awakened the Balrog?

Why is a lens darker than other ones when applying the same settings?

Mounting TV on a weird wall that has some material between the drywall and stud

Most effective melee weapons for arboreal combat? (pre-gunpowder technology)

Putting class ranking in CV, but against dept guidelines

One-one communication

Is there any word for a place full of confusion?

Why weren't discrete x86 CPUs ever used in game hardware?

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

A proverb that is used to imply that you have unexpectedly faced a big problem

Can you force honesty by using the Speak with Dead and Zone of Truth spells together?

How does TikZ render an arc?

What's the difference between Try Ubuntu and Install Ubuntu option in VirtualBox?

Random body shuffle every night—can we still function?

Nose gear failure in single prop aircraft: belly landing or nose-gear up landing?

What order were files/directories output in dir?

What would you call this weird metallic apparatus that allows you to lift people?



Shop By Brand/Manufacturer Dropdown



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Creating dropdown menu of brands(manufacturer)Colors aren't showing in the “Shop By Color” areaHow to reduce Magento search autocomplete dropdown time delay?Fresh Magento 1.9.1 install shows wrong price format in dropdown menus of configurable productsAdd custom Dropdown Column to Manage Product > Images Tab in Admin sectionShop crashes SQLSTATE[HY000] in error reportsSort Configurable Attribute Options Alphabetically Except for First One (Default)



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















So I am trying to create a dropdown on my homepage that will allow the user to select a brand and it will bring them to a page with each product that has that attribute selected.



So I took a post (http://www.blog.magepsycho.com/magento-utility-function-how-to-easily-create-select-box-for-drop-down-attributes/) and made a few changes to how it is called since it was throwing a fatal error.



function getSelectBox($attributeCode, $label = '', $defaultSelect = null, $extraParams = null)
$options = array();
$product = Mage::getModel('catalog/product');
$attribute = $product->getResource()->getAttribute($attributeCode);
if($attribute->usesSource())
$options = $attribute->getSource()->getAllOptions(false);
array_unshift($options, array('label' => $label, 'value' => ''));


$select = Mage::app()->getLayout()->createBlock('core/html_select')
->setName($attributeCode)
->setId($attributeCode)
->setTitle($label)
->setValue($defaultSelect)
->setExtraParams($extraParams)
->setOptions($options);
return $select->getHtml();



This is the code that is calling the attributes inside of a dropdown.



The code I used to call it was:



<?php echo Mage::helper('function')->getSelectBox('manufacturer', 'Select Manufacturer'); ?>


This worked and called all the manufacturers for me however the issue is that if I select one of the manufacturers in the dropdown it does not bring me to another page with the products.



Each product in my store is assigned a manufacturer. Each manufacturer is listed in the dropdown. I just want it so when I click on one of the manufacturer options that it will bring me to a list of those products that have said manufacturer assigned.



I do not want an extension for this at all. Please refrain from suggesting them.



I do realize I can create categories for each of the brands as well however I am unsure if that would be the smartest way to do this.



Thank you! I would really appreciate any help here. :)










share|improve this question




























    0















    So I am trying to create a dropdown on my homepage that will allow the user to select a brand and it will bring them to a page with each product that has that attribute selected.



    So I took a post (http://www.blog.magepsycho.com/magento-utility-function-how-to-easily-create-select-box-for-drop-down-attributes/) and made a few changes to how it is called since it was throwing a fatal error.



    function getSelectBox($attributeCode, $label = '', $defaultSelect = null, $extraParams = null)
    $options = array();
    $product = Mage::getModel('catalog/product');
    $attribute = $product->getResource()->getAttribute($attributeCode);
    if($attribute->usesSource())
    $options = $attribute->getSource()->getAllOptions(false);
    array_unshift($options, array('label' => $label, 'value' => ''));


    $select = Mage::app()->getLayout()->createBlock('core/html_select')
    ->setName($attributeCode)
    ->setId($attributeCode)
    ->setTitle($label)
    ->setValue($defaultSelect)
    ->setExtraParams($extraParams)
    ->setOptions($options);
    return $select->getHtml();



    This is the code that is calling the attributes inside of a dropdown.



    The code I used to call it was:



    <?php echo Mage::helper('function')->getSelectBox('manufacturer', 'Select Manufacturer'); ?>


    This worked and called all the manufacturers for me however the issue is that if I select one of the manufacturers in the dropdown it does not bring me to another page with the products.



    Each product in my store is assigned a manufacturer. Each manufacturer is listed in the dropdown. I just want it so when I click on one of the manufacturer options that it will bring me to a list of those products that have said manufacturer assigned.



    I do not want an extension for this at all. Please refrain from suggesting them.



    I do realize I can create categories for each of the brands as well however I am unsure if that would be the smartest way to do this.



    Thank you! I would really appreciate any help here. :)










    share|improve this question
























      0












      0








      0








      So I am trying to create a dropdown on my homepage that will allow the user to select a brand and it will bring them to a page with each product that has that attribute selected.



      So I took a post (http://www.blog.magepsycho.com/magento-utility-function-how-to-easily-create-select-box-for-drop-down-attributes/) and made a few changes to how it is called since it was throwing a fatal error.



      function getSelectBox($attributeCode, $label = '', $defaultSelect = null, $extraParams = null)
      $options = array();
      $product = Mage::getModel('catalog/product');
      $attribute = $product->getResource()->getAttribute($attributeCode);
      if($attribute->usesSource())
      $options = $attribute->getSource()->getAllOptions(false);
      array_unshift($options, array('label' => $label, 'value' => ''));


      $select = Mage::app()->getLayout()->createBlock('core/html_select')
      ->setName($attributeCode)
      ->setId($attributeCode)
      ->setTitle($label)
      ->setValue($defaultSelect)
      ->setExtraParams($extraParams)
      ->setOptions($options);
      return $select->getHtml();



      This is the code that is calling the attributes inside of a dropdown.



      The code I used to call it was:



      <?php echo Mage::helper('function')->getSelectBox('manufacturer', 'Select Manufacturer'); ?>


      This worked and called all the manufacturers for me however the issue is that if I select one of the manufacturers in the dropdown it does not bring me to another page with the products.



      Each product in my store is assigned a manufacturer. Each manufacturer is listed in the dropdown. I just want it so when I click on one of the manufacturer options that it will bring me to a list of those products that have said manufacturer assigned.



      I do not want an extension for this at all. Please refrain from suggesting them.



      I do realize I can create categories for each of the brands as well however I am unsure if that would be the smartest way to do this.



      Thank you! I would really appreciate any help here. :)










      share|improve this question














      So I am trying to create a dropdown on my homepage that will allow the user to select a brand and it will bring them to a page with each product that has that attribute selected.



      So I took a post (http://www.blog.magepsycho.com/magento-utility-function-how-to-easily-create-select-box-for-drop-down-attributes/) and made a few changes to how it is called since it was throwing a fatal error.



      function getSelectBox($attributeCode, $label = '', $defaultSelect = null, $extraParams = null)
      $options = array();
      $product = Mage::getModel('catalog/product');
      $attribute = $product->getResource()->getAttribute($attributeCode);
      if($attribute->usesSource())
      $options = $attribute->getSource()->getAllOptions(false);
      array_unshift($options, array('label' => $label, 'value' => ''));


      $select = Mage::app()->getLayout()->createBlock('core/html_select')
      ->setName($attributeCode)
      ->setId($attributeCode)
      ->setTitle($label)
      ->setValue($defaultSelect)
      ->setExtraParams($extraParams)
      ->setOptions($options);
      return $select->getHtml();



      This is the code that is calling the attributes inside of a dropdown.



      The code I used to call it was:



      <?php echo Mage::helper('function')->getSelectBox('manufacturer', 'Select Manufacturer'); ?>


      This worked and called all the manufacturers for me however the issue is that if I select one of the manufacturers in the dropdown it does not bring me to another page with the products.



      Each product in my store is assigned a manufacturer. Each manufacturer is listed in the dropdown. I just want it so when I click on one of the manufacturer options that it will bring me to a list of those products that have said manufacturer assigned.



      I do not want an extension for this at all. Please refrain from suggesting them.



      I do realize I can create categories for each of the brands as well however I am unsure if that would be the smartest way to do this.



      Thank you! I would really appreciate any help here. :)







      ce-1.9.1.0






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 24 '15 at 23:21









      DarkMatterDarkMatter

      459




      459




















          1 Answer
          1






          active

          oldest

          votes


















          0














          Based on this answer, using option #1, modified to work on Magento CE 1.9+:



          <li>
          <a href="#">Browse by Manufacturer</a>
          <ul>
          <?php $attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'manufacturer');
          if ($attribute->usesSource())
          $options = $attribute->getSource()->getAllOptions(false);
          foreach ($options as $option)

          echo '<li style="list-style:none"><a href="'.Mage::getUrl('catalogsearch/advanced/result').'?manufacturer%5B%5D='.$option['value'].'">'.$option['label'].'</a></li>';

          ?>
          </ul>
          </li>





          share|improve this answer

























            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
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f75626%2fshop-by-brand-manufacturer-dropdown%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Based on this answer, using option #1, modified to work on Magento CE 1.9+:



            <li>
            <a href="#">Browse by Manufacturer</a>
            <ul>
            <?php $attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'manufacturer');
            if ($attribute->usesSource())
            $options = $attribute->getSource()->getAllOptions(false);
            foreach ($options as $option)

            echo '<li style="list-style:none"><a href="'.Mage::getUrl('catalogsearch/advanced/result').'?manufacturer%5B%5D='.$option['value'].'">'.$option['label'].'</a></li>';

            ?>
            </ul>
            </li>





            share|improve this answer





























              0














              Based on this answer, using option #1, modified to work on Magento CE 1.9+:



              <li>
              <a href="#">Browse by Manufacturer</a>
              <ul>
              <?php $attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'manufacturer');
              if ($attribute->usesSource())
              $options = $attribute->getSource()->getAllOptions(false);
              foreach ($options as $option)

              echo '<li style="list-style:none"><a href="'.Mage::getUrl('catalogsearch/advanced/result').'?manufacturer%5B%5D='.$option['value'].'">'.$option['label'].'</a></li>';

              ?>
              </ul>
              </li>





              share|improve this answer



























                0












                0








                0







                Based on this answer, using option #1, modified to work on Magento CE 1.9+:



                <li>
                <a href="#">Browse by Manufacturer</a>
                <ul>
                <?php $attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'manufacturer');
                if ($attribute->usesSource())
                $options = $attribute->getSource()->getAllOptions(false);
                foreach ($options as $option)

                echo '<li style="list-style:none"><a href="'.Mage::getUrl('catalogsearch/advanced/result').'?manufacturer%5B%5D='.$option['value'].'">'.$option['label'].'</a></li>';

                ?>
                </ul>
                </li>





                share|improve this answer















                Based on this answer, using option #1, modified to work on Magento CE 1.9+:



                <li>
                <a href="#">Browse by Manufacturer</a>
                <ul>
                <?php $attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'manufacturer');
                if ($attribute->usesSource())
                $options = $attribute->getSource()->getAllOptions(false);
                foreach ($options as $option)

                echo '<li style="list-style:none"><a href="'.Mage::getUrl('catalogsearch/advanced/result').'?manufacturer%5B%5D='.$option['value'].'">'.$option['label'].'</a></li>';

                ?>
                </ul>
                </li>






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Apr 13 '17 at 12:55









                Community

                1




                1










                answered Feb 2 '16 at 20:10









                Joshua34Joshua34

                1,5791120




                1,5791120



























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f75626%2fshop-by-brand-manufacturer-dropdown%23new-answer', 'question_page');

                    );

                    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







                    Popular posts from this blog

                    Masuk log Menu navigasi

                    Identifying “long and narrow” polygons in with PostGISlength and width of polygonWhy postgis st_overlaps reports Qgis' “avoid intersections” generated polygon as overlapping with others?Adjusting polygons to boundary and filling holesDrawing polygons with fixed area?How to remove spikes in Polygons with PostGISDeleting sliver polygons after difference operation in QGIS?Snapping boundaries in PostGISSplit polygon into parts adding attributes based on underlying polygon in QGISSplitting overlap between polygons and assign to nearest polygon using PostGIS?Expanding polygons and clipping at midpoint?Removing Intersection of Buffers in Same Layers

                    Старые Смолеговицы Содержание История | География | Демография | Достопримечательности | Примечания | НавигацияHGЯOLHGЯOL41 206 832 01641 606 406 141Административно-территориальное деление Ленинградской области«Переписная оброчная книга Водской пятины 1500 года», С. 793«Карта Ингерманландии: Ивангорода, Яма, Копорья, Нотеборга», по материалам 1676 г.«Генеральная карта провинции Ингерманландии» Э. Белинга и А. Андерсина, 1704 г., составлена по материалам 1678 г.«Географический чертёж над Ижорскою землей со своими городами» Адриана Шонбека 1705 г.Новая и достоверная всей Ингерманландии ланткарта. Грав. А. Ростовцев. СПб., 1727 г.Топографическая карта Санкт-Петербургской губернии. 5-и верстка. Шуберт. 1834 г.Описание Санкт-Петербургской губернии по уездам и станамСпецкарта западной части России Ф. Ф. Шуберта. 1844 г.Алфавитный список селений по уездам и станам С.-Петербургской губернииСписки населённых мест Российской Империи, составленные и издаваемые центральным статистическим комитетом министерства внутренних дел. XXXVII. Санкт-Петербургская губерния. По состоянию на 1862 год. СПб. 1864. С. 203Материалы по статистике народного хозяйства в С.-Петербургской губернии. Вып. IX. Частновладельческое хозяйство в Ямбургском уезде. СПб, 1888, С. 146, С. 2, 7, 54Положение о гербе муниципального образования Курское сельское поселениеСправочник истории административно-территориального деления Ленинградской области.Топографическая карта Ленинградской области, квадрат О-35-23-В (Хотыницы), 1930 г.АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1933, С. 27, 198АрхивированоАдминистративно-экономический справочник по Ленинградской области. — Л., 1936, с. 219АрхивированоАдминистративно-территориальное деление Ленинградской области. — Л., 1966, с. 175АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1973, С. 180АрхивированоАдминистративно-территориальное деление Ленинградской области. — Лениздат, 1990, ISBN 5-289-00612-5, С. 38АрхивированоАдминистративно-территориальное деление Ленинградской области. — СПб., 2007, с. 60АрхивированоКоряков Юрий База данных «Этно-языковой состав населённых пунктов России». Ленинградская область.Административно-территориальное деление Ленинградской области. — СПб, 1997, ISBN 5-86153-055-6, С. 41АрхивированоКультовый комплекс Старые Смолеговицы // Электронная энциклопедия ЭрмитажаПроблемы выявления, изучения и сохранения культовых комплексов с каменными крестами: по материалам работ 2016-2017 гг. в Ленинградской области