Modifying authentication popup Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraModifying the checkout success page in magentoMagento2 override admin js fileMagento 2: Modify authentication-popup.html form actionMagento 2 - Minicart not updated after login from authentication popupmagento 2 js modal popup close eventMagento2 - Add mailchimp popupLoading Javascript for minicart in Magento 2Call default Magento 2 authentication popup from a custom moduleHow to hide particular admin form field(UI Component) based on the value of select field?overriding Authentication popup is notworking
What is ls Largest Number Formed by only moving two sticks in 508?
Is Electric Central Heating worth it if using Solar Panels?
What is the term for a person whose job is to place products on shelves in stores?
Why didn't the Space Shuttle bounce back into space many times as possible so that it loose lot of kinetic energy over there?
Multiple fireplaces in an apartment building?
Can I criticise the more senior developers around me for not writing clean code?
std::is_constructible on incomplete types
How to keep bees out of canned beverages?
Is Bran literally the world's memory?
Suing a Police Officer Instead of the Police Department
Retract an already submitted recommendation letter (written for an undergrad student)
Dynamic Return Type
Is Diceware more secure than a long passphrase?
How to find the right literary agent in the USA?
PIC mathematical operations weird problem
Error: Syntax error. Missing ')' for CASE Statement
Map material from china not allowed to leave the country
Is it acceptable to use working hours to read general interest books?
What's parked in Mil Moscow helicopter plant?
Refugee travel document from Spain to US
Need of separate security plugins for both root and subfolder sites Wordpress?
Identify story/novel: Tribe on colonized planet, not aware of this. "Taboo," altitude sickness, robot guardian (60s? Young Adult?)
As an international instructor, should I openly talk about my accent?
AI positioning circles within an arc at equal distances and heights
Modifying authentication popup
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraModifying the checkout success page in magentoMagento2 override admin js fileMagento 2: Modify authentication-popup.html form actionMagento 2 - Minicart not updated after login from authentication popupmagento 2 js modal popup close eventMagento2 - Add mailchimp popupLoading Javascript for minicart in Magento 2Call default Magento 2 authentication popup from a custom moduleHow to hide particular admin form field(UI Component) based on the value of select field?overriding Authentication popup is notworking
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm trying to apply the authentication popup on a custom button in my module. I've implemented it by overriding it in my requirejs-config.
var config =
map:
'*':
'Magento_Customer/js/model/authentication-popup': 'Vendor_CustomPopup/js/model/authentication-popup-download'
;
and my modified JS looks like this:
define(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function ($, modal)
'use strict';
return
modalWindow: null,
// Create popUp window for provided element
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
,
// Show login popup window
showModal: function ()
$(this.modalWindow).modal('openModal');
);
The only change I need to apply is the trigger in the options, this works, but is there a better way of modifying this without overriding the whole function?
magento2 javascript extend
bumped to the homepage by Community♦ 5 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm trying to apply the authentication popup on a custom button in my module. I've implemented it by overriding it in my requirejs-config.
var config =
map:
'*':
'Magento_Customer/js/model/authentication-popup': 'Vendor_CustomPopup/js/model/authentication-popup-download'
;
and my modified JS looks like this:
define(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function ($, modal)
'use strict';
return
modalWindow: null,
// Create popUp window for provided element
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
,
// Show login popup window
showModal: function ()
$(this.modalWindow).modal('openModal');
);
The only change I need to apply is the trigger in the options, this works, but is there a better way of modifying this without overriding the whole function?
magento2 javascript extend
bumped to the homepage by Community♦ 5 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm trying to apply the authentication popup on a custom button in my module. I've implemented it by overriding it in my requirejs-config.
var config =
map:
'*':
'Magento_Customer/js/model/authentication-popup': 'Vendor_CustomPopup/js/model/authentication-popup-download'
;
and my modified JS looks like this:
define(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function ($, modal)
'use strict';
return
modalWindow: null,
// Create popUp window for provided element
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
,
// Show login popup window
showModal: function ()
$(this.modalWindow).modal('openModal');
);
The only change I need to apply is the trigger in the options, this works, but is there a better way of modifying this without overriding the whole function?
magento2 javascript extend
I'm trying to apply the authentication popup on a custom button in my module. I've implemented it by overriding it in my requirejs-config.
var config =
map:
'*':
'Magento_Customer/js/model/authentication-popup': 'Vendor_CustomPopup/js/model/authentication-popup-download'
;
and my modified JS looks like this:
define(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function ($, modal)
'use strict';
return
modalWindow: null,
// Create popUp window for provided element
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
,
// Show login popup window
showModal: function ()
$(this.modalWindow).modal('openModal');
);
The only change I need to apply is the trigger in the options, this works, but is there a better way of modifying this without overriding the whole function?
magento2 javascript extend
magento2 javascript extend
asked Jul 21 '16 at 11:44
belfort1belfort1
377110
377110
bumped to the homepage by Community♦ 5 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 5 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can do it with a mixin and only update the function createPopUp.
Vendor/Module/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Customer/js/view/authentication-popup':
'Vendor_Module/js/view/authentication-popup-mixin': true
;
Vendor/Module/view/frontend/web/js/view/authentication-popup-mixin.js
define([
'uiComponent',
'jquery',
'Magento_Ui/js/modal/modal'
], function (Component, $, modal)
'use strict';
return function (Component)
return Component.extend(
/**
* @inheritDoc
*/
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
);
;
);
add a comment |
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%2f126800%2fmodifying-authentication-popup%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
You can do it with a mixin and only update the function createPopUp.
Vendor/Module/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Customer/js/view/authentication-popup':
'Vendor_Module/js/view/authentication-popup-mixin': true
;
Vendor/Module/view/frontend/web/js/view/authentication-popup-mixin.js
define([
'uiComponent',
'jquery',
'Magento_Ui/js/modal/modal'
], function (Component, $, modal)
'use strict';
return function (Component)
return Component.extend(
/**
* @inheritDoc
*/
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
);
;
);
add a comment |
You can do it with a mixin and only update the function createPopUp.
Vendor/Module/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Customer/js/view/authentication-popup':
'Vendor_Module/js/view/authentication-popup-mixin': true
;
Vendor/Module/view/frontend/web/js/view/authentication-popup-mixin.js
define([
'uiComponent',
'jquery',
'Magento_Ui/js/modal/modal'
], function (Component, $, modal)
'use strict';
return function (Component)
return Component.extend(
/**
* @inheritDoc
*/
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
);
;
);
add a comment |
You can do it with a mixin and only update the function createPopUp.
Vendor/Module/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Customer/js/view/authentication-popup':
'Vendor_Module/js/view/authentication-popup-mixin': true
;
Vendor/Module/view/frontend/web/js/view/authentication-popup-mixin.js
define([
'uiComponent',
'jquery',
'Magento_Ui/js/modal/modal'
], function (Component, $, modal)
'use strict';
return function (Component)
return Component.extend(
/**
* @inheritDoc
*/
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
);
;
);
You can do it with a mixin and only update the function createPopUp.
Vendor/Module/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Customer/js/view/authentication-popup':
'Vendor_Module/js/view/authentication-popup-mixin': true
;
Vendor/Module/view/frontend/web/js/view/authentication-popup-mixin.js
define([
'uiComponent',
'jquery',
'Magento_Ui/js/modal/modal'
], function (Component, $, modal)
'use strict';
return function (Component)
return Component.extend(
/**
* @inheritDoc
*/
createPopUp: function (element)
this.modalWindow = element;
var options =
'type': 'popup',
'modalClass': 'popup-authentication',
'responsive': true,
'innerScroll': true,
'trigger': '.download-purchase', // only change needed
'buttons': []
;
//console.log(options);
modal(options, $(this.modalWindow));
);
;
);
answered Sep 20 '18 at 11:42
raumatbelraumatbel
733414
733414
add a comment |
add a comment |
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%2f126800%2fmodifying-authentication-popup%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