Magento 2.3 - AttributeMerger plugin is updating incorrect element Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraCheckout Not Working on Windows 8 MobileMagento 2 Add new field to Magento_User admin formUpdating Products In PluginUI component hidden input on checkout addressMagento 2.2.1: Add Custom Upload file attribute in CheckoutAdd class or data-attribute to product optionsMagento 2.3 Readiness Check FailingMagento 2.3 “Review & Payments” page not loadingMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento 2.3 Data Transfer Import

Why do distances seem to matter in the Foundation world?

Mistake in years of experience in resume?

Protagonist's race is hidden - should I reveal it?

Intern got a job offer for same salary than a long term team member

How do I prove this combinatorial identity

std::unique_ptr of base class holding reference of derived class does not show warning in gcc compiler while naked pointer shows it. Why?

How can I wire a 9-position switch so that each position turns on one more LED than the one before?

How much cash can I safely carry into the USA and avoid civil forfeiture?

How long after the last departure shall the airport stay open for an emergency return?

How can I practically buy stocks?

Is Electric Central Heating worth it if using Solar Panels?

Could moose/elk survive in the Amazon forest?

How much of a wave function must reside inside event horizon for it to be consumed by the black hole?

Was Dennis Ritchie being too modest in this quote about C and Pascal?

Contradiction proof for inequality of P and NP?

Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?

How would this chord from "Rocket Man" be analyzed?

Implementing 3DES algorithm in Java: is my code secure?

"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?

Can a level 2 Warlock take one level in rogue, then continue advancing as a warlock?

Co-worker works way more than he should

What makes accurate emulation of old systems a difficult task?

How to find if a column is referenced in a computed column?

What was Apollo 13's "Little Jolt" after MECO?



Magento 2.3 - AttributeMerger plugin is updating incorrect element



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraCheckout Not Working on Windows 8 MobileMagento 2 Add new field to Magento_User admin formUpdating Products In PluginUI component hidden input on checkout addressMagento 2.2.1: Add Custom Upload file attribute in CheckoutAdd class or data-attribute to product optionsMagento 2.3 Readiness Check FailingMagento 2.3 “Review & Payments” page not loadingMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento 2.3 Data Transfer Import



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








2















I am trying to either add an additional class "browser-default" to the country_id select field, or replace the existing "select" class with "browser-default"



I put together a quick AttributeMerger plugin based on another post on here, but whenever I try to add an additional class to "country_id," the field class list is updated instead, e.g.:



<?php

namespace MGSCheckoutExtendedModelPlugin;

class AttributeMergerPlugin

public function afterMerge(MagentoCheckoutBlockCheckoutAttributeMerger $subject, $result)

if (array_key_exists('country_id', $result))
$result['country_id']['additionalClasses'] = 'browser_default';


return $result;




Returns this result:



<div class="field browser_default _required" data-bind="visible: visible, attr: 'name': element.dataScope, css: additionalClasses" name="shippingAddress.country_id">


Instead of the expected:



<div class="field _required" data-bind="visible: visible, attr: 'name': element.dataScope, css: additionalClasses" name="shippingAddress.country_id">
<label class="label" data-bind="attr: for: element.uid " for="XW1HKET">
<!-- ko if: element.label -->
<span data-bind="i18n: element.label">Country</span>
<!-- /ko -->
</label>
<div class="control" data-bind="css: '_with-tooltip': element.tooltip">
<!-- ko ifnot: element.hasAddons() -->
<!-- ko template: element.elementTmpl -->
<select class="select browser-default" data-bind="


I have also tried using ['country_id'][0]['additionalClasses'] instead of ['country_id']['additionalClasses'], but with no luck.



I am sure the plugin is working correctly because I can update the placeholder text of another field (text input) just fine. I just can't seem to update this particular select box.



I would appreciate any help with this!










share|improve this question






























    2















    I am trying to either add an additional class "browser-default" to the country_id select field, or replace the existing "select" class with "browser-default"



    I put together a quick AttributeMerger plugin based on another post on here, but whenever I try to add an additional class to "country_id," the field class list is updated instead, e.g.:



    <?php

    namespace MGSCheckoutExtendedModelPlugin;

    class AttributeMergerPlugin

    public function afterMerge(MagentoCheckoutBlockCheckoutAttributeMerger $subject, $result)

    if (array_key_exists('country_id', $result))
    $result['country_id']['additionalClasses'] = 'browser_default';


    return $result;




    Returns this result:



    <div class="field browser_default _required" data-bind="visible: visible, attr: 'name': element.dataScope, css: additionalClasses" name="shippingAddress.country_id">


    Instead of the expected:



    <div class="field _required" data-bind="visible: visible, attr: 'name': element.dataScope, css: additionalClasses" name="shippingAddress.country_id">
    <label class="label" data-bind="attr: for: element.uid " for="XW1HKET">
    <!-- ko if: element.label -->
    <span data-bind="i18n: element.label">Country</span>
    <!-- /ko -->
    </label>
    <div class="control" data-bind="css: '_with-tooltip': element.tooltip">
    <!-- ko ifnot: element.hasAddons() -->
    <!-- ko template: element.elementTmpl -->
    <select class="select browser-default" data-bind="


    I have also tried using ['country_id'][0]['additionalClasses'] instead of ['country_id']['additionalClasses'], but with no luck.



    I am sure the plugin is working correctly because I can update the placeholder text of another field (text input) just fine. I just can't seem to update this particular select box.



    I would appreciate any help with this!










    share|improve this question


























      2












      2








      2








      I am trying to either add an additional class "browser-default" to the country_id select field, or replace the existing "select" class with "browser-default"



      I put together a quick AttributeMerger plugin based on another post on here, but whenever I try to add an additional class to "country_id," the field class list is updated instead, e.g.:



      <?php

      namespace MGSCheckoutExtendedModelPlugin;

      class AttributeMergerPlugin

      public function afterMerge(MagentoCheckoutBlockCheckoutAttributeMerger $subject, $result)

      if (array_key_exists('country_id', $result))
      $result['country_id']['additionalClasses'] = 'browser_default';


      return $result;




      Returns this result:



      <div class="field browser_default _required" data-bind="visible: visible, attr: 'name': element.dataScope, css: additionalClasses" name="shippingAddress.country_id">


      Instead of the expected:



      <div class="field _required" data-bind="visible: visible, attr: 'name': element.dataScope, css: additionalClasses" name="shippingAddress.country_id">
      <label class="label" data-bind="attr: for: element.uid " for="XW1HKET">
      <!-- ko if: element.label -->
      <span data-bind="i18n: element.label">Country</span>
      <!-- /ko -->
      </label>
      <div class="control" data-bind="css: '_with-tooltip': element.tooltip">
      <!-- ko ifnot: element.hasAddons() -->
      <!-- ko template: element.elementTmpl -->
      <select class="select browser-default" data-bind="


      I have also tried using ['country_id'][0]['additionalClasses'] instead of ['country_id']['additionalClasses'], but with no luck.



      I am sure the plugin is working correctly because I can update the placeholder text of another field (text input) just fine. I just can't seem to update this particular select box.



      I would appreciate any help with this!










      share|improve this question
















      I am trying to either add an additional class "browser-default" to the country_id select field, or replace the existing "select" class with "browser-default"



      I put together a quick AttributeMerger plugin based on another post on here, but whenever I try to add an additional class to "country_id," the field class list is updated instead, e.g.:



      <?php

      namespace MGSCheckoutExtendedModelPlugin;

      class AttributeMergerPlugin

      public function afterMerge(MagentoCheckoutBlockCheckoutAttributeMerger $subject, $result)

      if (array_key_exists('country_id', $result))
      $result['country_id']['additionalClasses'] = 'browser_default';


      return $result;




      Returns this result:



      <div class="field browser_default _required" data-bind="visible: visible, attr: 'name': element.dataScope, css: additionalClasses" name="shippingAddress.country_id">


      Instead of the expected:



      <div class="field _required" data-bind="visible: visible, attr: 'name': element.dataScope, css: additionalClasses" name="shippingAddress.country_id">
      <label class="label" data-bind="attr: for: element.uid " for="XW1HKET">
      <!-- ko if: element.label -->
      <span data-bind="i18n: element.label">Country</span>
      <!-- /ko -->
      </label>
      <div class="control" data-bind="css: '_with-tooltip': element.tooltip">
      <!-- ko ifnot: element.hasAddons() -->
      <!-- ko template: element.elementTmpl -->
      <select class="select browser-default" data-bind="


      I have also tried using ['country_id'][0]['additionalClasses'] instead of ['country_id']['additionalClasses'], but with no luck.



      I am sure the plugin is working correctly because I can update the placeholder text of another field (text input) just fine. I just can't seem to update this particular select box.



      I would appreciate any help with this!







      magento2 checkout module forms magento2.3






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 21 at 14:58







      marachlys

















      asked Mar 20 at 16:02









      marachlysmarachlys

      111




      111




















          0






          active

          oldest

          votes












          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%2f266732%2fmagento-2-3-attributemerger-plugin-is-updating-incorrect-element%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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%2f266732%2fmagento-2-3-attributemerger-plugin-is-updating-incorrect-element%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 гг. в Ленинградской области