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;
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
add a comment |
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
add a comment |
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
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
magento2 checkout module forms magento2.3
edited Mar 21 at 14:58
marachlys
asked Mar 20 at 16:02
marachlysmarachlys
111
111
add a comment |
add a comment |
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
);
);
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%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
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%2f266732%2fmagento-2-3-attributemerger-plugin-is-updating-incorrect-element%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