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

          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

          Masuk log Menu navigasi

          อาณาจักร (ชีววิทยา) ดูเพิ่ม อ้างอิง รายการเลือกการนำทาง10.1086/39456810.5962/bhl.title.447410.1126/science.163.3863.150576276010.1007/BF01796092408502"Phylogenetic structure of the prokaryotic domain: the primary kingdoms"10.1073/pnas.74.11.5088432104270744"Towards a natural system of organisms: proposal for the domains Archaea, Bacteria, and Eucarya"1990PNAS...87.4576W10.1073/pnas.87.12.4576541592112744PubMedJump the queueexpand by handPubMedJump the queueexpand by handPubMedJump the queueexpand by hand"A revised six-kingdom system of life"10.1111/j.1469-185X.1998.tb00030.x9809012"Only six kingdoms of life"10.1098/rspb.2004.2705169172415306349"Kingdoms Protozoa and Chromista and the eozoan root of the eukaryotic tree"10.1098/rsbl.2009.0948288006020031978เพิ่มข้อมูล