Magento 2 : How to get Swatches attribute options in popup?jQuery event listeners working most of the time but not sometimes?Magento 2 Add new field to Magento_User admin formmagento 2 js modal popup close eventHide out of stock configurable product options in color swatchesMagento 2 - Update quantity and totals of cart page without page reload?Website freezes in checkout on a multistore Magento 2 installationHow to select by default first swatches from dependent options color & size in magento 2Magento 2 : How to get product size Swatches in Configurable product page?Login form validation is working but other forms validation is not workingEdit in Cart using AJAX with model popup to update qty and options of product

Designing a magic-compatible polearm

LWC - Local Dev - How can I run the local server on HTTPS?

Does the monk's Step of the Wind feature activate the benefit of the Mobile feat?

Is there any proof that high saturation and contrast makes a picture more appealing in social media?

What does it mean to not be able to take the derivative of a function multiple times?

How would modern naval warfare have to have developed differently for battleships to still be relevant in the 21st century?

Understanding the reasoning of the woman who agreed with Shlomo to "cut the baby in half"

Methodology: Writing unit tests for another developer

Is Famished Paladin and Resplendent Mentor a legal infinite life combo?

Is it possible to get a mortgage with a custom duration in the US?

Causes of High CHTs

Should the party get XP for a monster they never attacked?

Constitutionality of U.S. Democratic Presidential Candidate's Supreme Court Suggestion

Story about a space war, and a human prisoner of war captured by alien enemy

How to execute a command when ALL of the players are close enough

Identifying a distribution

Why isn't my calculation that we should be able to see the sun well beyond the observable universe valid?

Do I have any obligations to my PhD supervisor's requests after I have graduated?

Primes and SemiPrimes in Binary

Why is it easier to balance a non-moving bike standing up than sitting down?

Why is it recommended to mix yogurt starter with a small amount of milk before adding to the entire batch?

How to maintain a closed environment for one person for a long period of time

What are Elsa's reasons for selecting the Holy Grail on behalf of Donovan?

Loss of power when I remove item from the outlet



Magento 2 : How to get Swatches attribute options in popup?


jQuery event listeners working most of the time but not sometimes?Magento 2 Add new field to Magento_User admin formmagento 2 js modal popup close eventHide out of stock configurable product options in color swatchesMagento 2 - Update quantity and totals of cart page without page reload?Website freezes in checkout on a multistore Magento 2 installationHow to select by default first swatches from dependent options color & size in magento 2Magento 2 : How to get product size Swatches in Configurable product page?Login form validation is working but other forms validation is not workingEdit in Cart using AJAX with model popup to update qty and options of product






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








2















popup open in ajax response. So all values come from the controller and set in the popup, but attributes options are not shown.



vendormagentomodule-checkoutviewfrontendtemplatescartitemrendereractionsedit.phtml



<?php if ($block->isProductVisibleInSiteVisibility()): ?>

<a class="action action-edit display-before" data-id="<?php echo $itemId; ?>" data-product-id="<?php echo $productId; ?>"
href="<?= /* @escapeNotVerified */ $block->getConfigureUrl() ?>"
title="<?= $block->escapeHtml(__('Edit item parameters')) ?>">
<span>
<?= /* @escapeNotVerified */ __('Edit') ?>
</span></a><?php endif ?>


my ajax popup



<script type="text/javascript">
//jquery for show popup in ajax responce
require(['jquery'],function($)
jQuery(document).ready(function()
jQuery('.display-before').on('click',
function(e)
e.preventDefault();
var itemId = $(this).attr("data-id");
var productId = $(this).attr("data-product-id");
//alert(itemId);
jQuery.ajax(
url:"<?php echo $this->getUrl('checkout/cart/configure');?>",
method:'GET',
dataType:"json",
data:
id : itemId,
product_id : productId,
,
showLoader: true,
success: function(response)
var name = response['product_name'];
var qty = response['qty'];
var item_id = response['item_id'];

require(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function (
$,
modal
)
var modaloption =
type: 'popup',
modalClass: 'modal-popup',
responsive: true,
innerScroll: true,
clickableOverlay: true,
title: ''
;
var callforoption = modal(modaloption, $('.modal'));
if($('.modal').modal('openModal'))
$('.modal').show();
$('#name').html(name);
$('#qty').attr('value',qty);
$(".item_id").attr("value",item_id);


);

);
);
);
);</script>









share|improve this question









New contributor



Monark Bhawani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • please attach your code

    – Rk Rathod
    Jun 12 at 11:43











  • yeah, now, please check.

    – Monark Bhawani
    Jun 12 at 12:04

















2















popup open in ajax response. So all values come from the controller and set in the popup, but attributes options are not shown.



vendormagentomodule-checkoutviewfrontendtemplatescartitemrendereractionsedit.phtml



<?php if ($block->isProductVisibleInSiteVisibility()): ?>

<a class="action action-edit display-before" data-id="<?php echo $itemId; ?>" data-product-id="<?php echo $productId; ?>"
href="<?= /* @escapeNotVerified */ $block->getConfigureUrl() ?>"
title="<?= $block->escapeHtml(__('Edit item parameters')) ?>">
<span>
<?= /* @escapeNotVerified */ __('Edit') ?>
</span></a><?php endif ?>


my ajax popup



<script type="text/javascript">
//jquery for show popup in ajax responce
require(['jquery'],function($)
jQuery(document).ready(function()
jQuery('.display-before').on('click',
function(e)
e.preventDefault();
var itemId = $(this).attr("data-id");
var productId = $(this).attr("data-product-id");
//alert(itemId);
jQuery.ajax(
url:"<?php echo $this->getUrl('checkout/cart/configure');?>",
method:'GET',
dataType:"json",
data:
id : itemId,
product_id : productId,
,
showLoader: true,
success: function(response)
var name = response['product_name'];
var qty = response['qty'];
var item_id = response['item_id'];

require(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function (
$,
modal
)
var modaloption =
type: 'popup',
modalClass: 'modal-popup',
responsive: true,
innerScroll: true,
clickableOverlay: true,
title: ''
;
var callforoption = modal(modaloption, $('.modal'));
if($('.modal').modal('openModal'))
$('.modal').show();
$('#name').html(name);
$('#qty').attr('value',qty);
$(".item_id").attr("value",item_id);


);

);
);
);
);</script>









share|improve this question









New contributor



Monark Bhawani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • please attach your code

    – Rk Rathod
    Jun 12 at 11:43











  • yeah, now, please check.

    – Monark Bhawani
    Jun 12 at 12:04













2












2








2


2






popup open in ajax response. So all values come from the controller and set in the popup, but attributes options are not shown.



vendormagentomodule-checkoutviewfrontendtemplatescartitemrendereractionsedit.phtml



<?php if ($block->isProductVisibleInSiteVisibility()): ?>

<a class="action action-edit display-before" data-id="<?php echo $itemId; ?>" data-product-id="<?php echo $productId; ?>"
href="<?= /* @escapeNotVerified */ $block->getConfigureUrl() ?>"
title="<?= $block->escapeHtml(__('Edit item parameters')) ?>">
<span>
<?= /* @escapeNotVerified */ __('Edit') ?>
</span></a><?php endif ?>


my ajax popup



<script type="text/javascript">
//jquery for show popup in ajax responce
require(['jquery'],function($)
jQuery(document).ready(function()
jQuery('.display-before').on('click',
function(e)
e.preventDefault();
var itemId = $(this).attr("data-id");
var productId = $(this).attr("data-product-id");
//alert(itemId);
jQuery.ajax(
url:"<?php echo $this->getUrl('checkout/cart/configure');?>",
method:'GET',
dataType:"json",
data:
id : itemId,
product_id : productId,
,
showLoader: true,
success: function(response)
var name = response['product_name'];
var qty = response['qty'];
var item_id = response['item_id'];

require(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function (
$,
modal
)
var modaloption =
type: 'popup',
modalClass: 'modal-popup',
responsive: true,
innerScroll: true,
clickableOverlay: true,
title: ''
;
var callforoption = modal(modaloption, $('.modal'));
if($('.modal').modal('openModal'))
$('.modal').show();
$('#name').html(name);
$('#qty').attr('value',qty);
$(".item_id").attr("value",item_id);


);

);
);
);
);</script>









share|improve this question









New contributor



Monark Bhawani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











popup open in ajax response. So all values come from the controller and set in the popup, but attributes options are not shown.



vendormagentomodule-checkoutviewfrontendtemplatescartitemrendereractionsedit.phtml



<?php if ($block->isProductVisibleInSiteVisibility()): ?>

<a class="action action-edit display-before" data-id="<?php echo $itemId; ?>" data-product-id="<?php echo $productId; ?>"
href="<?= /* @escapeNotVerified */ $block->getConfigureUrl() ?>"
title="<?= $block->escapeHtml(__('Edit item parameters')) ?>">
<span>
<?= /* @escapeNotVerified */ __('Edit') ?>
</span></a><?php endif ?>


my ajax popup



<script type="text/javascript">
//jquery for show popup in ajax responce
require(['jquery'],function($)
jQuery(document).ready(function()
jQuery('.display-before').on('click',
function(e)
e.preventDefault();
var itemId = $(this).attr("data-id");
var productId = $(this).attr("data-product-id");
//alert(itemId);
jQuery.ajax(
url:"<?php echo $this->getUrl('checkout/cart/configure');?>",
method:'GET',
dataType:"json",
data:
id : itemId,
product_id : productId,
,
showLoader: true,
success: function(response)
var name = response['product_name'];
var qty = response['qty'];
var item_id = response['item_id'];

require(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function (
$,
modal
)
var modaloption =
type: 'popup',
modalClass: 'modal-popup',
responsive: true,
innerScroll: true,
clickableOverlay: true,
title: ''
;
var callforoption = modal(modaloption, $('.modal'));
if($('.modal').modal('openModal'))
$('.modal').show();
$('#name').html(name);
$('#qty').attr('value',qty);
$(".item_id").attr("value",item_id);


);

);
);
);
);</script>






magento2 configurable-swatches






share|improve this question









New contributor



Monark Bhawani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Monark Bhawani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited Jun 12 at 12:21







Monark Bhawani













New contributor



Monark Bhawani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked Jun 12 at 11:42









Monark BhawaniMonark Bhawani

112




112




New contributor



Monark Bhawani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Monark Bhawani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • please attach your code

    – Rk Rathod
    Jun 12 at 11:43











  • yeah, now, please check.

    – Monark Bhawani
    Jun 12 at 12:04

















  • please attach your code

    – Rk Rathod
    Jun 12 at 11:43











  • yeah, now, please check.

    – Monark Bhawani
    Jun 12 at 12:04
















please attach your code

– Rk Rathod
Jun 12 at 11:43





please attach your code

– Rk Rathod
Jun 12 at 11:43













yeah, now, please check.

– Monark Bhawani
Jun 12 at 12:04





yeah, now, please check.

– Monark Bhawani
Jun 12 at 12:04










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



);






Monark Bhawani is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278107%2fmagento-2-how-to-get-swatches-attribute-options-in-popup%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








Monark Bhawani is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Monark Bhawani is a new contributor. Be nice, and check out our Code of Conduct.












Monark Bhawani is a new contributor. Be nice, and check out our Code of Conduct.











Monark Bhawani is a new contributor. Be nice, and check out our Code of Conduct.














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%2f278107%2fmagento-2-how-to-get-swatches-attribute-options-in-popup%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

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?