We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [javascript]

JavaScript (JS) is a client side script language which allows to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed. By default Magento 1 comes with the prototype.js library and Magento 2 comes with jQuery. Use 'prototype-js' and 'jquery' tags for questions about those libraries.

629 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
349 views

Magento2 cant find …min.js

Afer content deploy php bin/magento setup:static-content:deploy de_CH php bin/magento cache:clean in direcrory pub/static..../js created ...min.js files but magento on frontend try to load not min ...
1
vote
1answer
992 views

styles and js not found 404 magento2

I installed magento2 on openserver created my custom theme developer mode is enabled content deployed When i try to load home page browser showed errors in pub/static i have only wNumb.min.js and ...
1
vote
0answers
172 views

Load specific step in One Page Checkout

A link is sent to a customer to complete the payment on payment pending. So the link redirects the customer to the one page checkout. Where all the details are filled in through the quote of the order....
1
vote
2answers
117 views

Magento 2 Default JS doesn't load proper

Magento 2 is broken in admin panel and add to cart does not work. I have checked both pub/static/frontend/Magento/Theme/en_US/mage/dropdown.js and pub/static/adminhtml/Magento/backend/en_US/...
1
vote
0answers
83 views

Overwrite a modules JS files with theme

I've been looking over the Magento 2 Docs for using custom JS and have been trying to add a modified version of 'configurable':'Magento_ConfigurableProduct/js/configurable' to my theme directory so ...
1
vote
0answers
1k views

ReferenceError: Flex is not defined

I am receiving this error with an extension. I think this is related to the last patch 8788, anyone know how to solve it? the error points me here var uploader = new Flex.Uploader('...
1
vote
0answers
495 views

How to disable auto collapse in mobile menu?

In mobile menu of Magento 2 when we click any child item of a parent, the parent collapse [see the image] what can i do to disable this behaviour. Demo: http://magento2-demo.nexcess.net/contact
1
vote
0answers
227 views

Magento 2 : How to merge JS for frontend?

I want to merge all js request and for this I am using Merge JavaScript setting of Magento and set it to yes. But still lots off js request in browser which are not merged. How do I merge all these ...
1
vote
0answers
443 views

Can't get my ajax request to call controller

I'm trying to send information from the view (js) to the server. I'm trying this with the JS request: $.ajax({ type: 'POST', url: 'php_file_in_controller/Main_Class_Name', data: data, ...
1
vote
0answers
88 views

How opinionated is magento2 frontend(JS)?

I hope this question makes sense, there is a chance it doesn't. I am looking into creating a custom checkout module for Magento2 and as a part of it i am evaluating JS frameworks. After evaluating ...
1
vote
1answer
878 views

Magento 2: Adding external CSS and JS to only one content page, and use jquery functions inside the content

I am trying to add some dynamic function to one content page of a Magento 2 site, but didn't manage to do it. Here is what I thought: 1) Adding the external javascript files at the "Layout Update XML"...
1
vote
0answers
270 views

css and js should have relative path in page source - magento2

I have one request that is I need to change all the css & js path from absolute to relative in page source. Please refer the screenshot for your easy reference. here I want to change all the css ...
1
vote
0answers
120 views

Saving a page/static block triggers an tinymce error and I can´t switch from HTML to text

I have a up to date Magento System. But for some reason when I am in the backend and want to edit a page or a static block, I cant switch from the HTML view to the text/visual view. If I click the (...
1
vote
1answer
819 views

Magento 2 How to call a ajax function in x-magento-init type javascript?

It seems cannot use jquery lib inside the x-magento-init type javascript. How to call a ajax function in x-magento-init type javascript? Thanks
1
vote
0answers
49 views

multiple coupon code apply on magento cart

I have been working for 2 days for applying multiple coupon on cart I know there are modules which are available for that. But i don't want to use it. I want some custom code so that i can apply more ...
1
vote
0answers
98 views

Magento 2 Script tag error

I'm having an issue with Magento not processing script tags correctly: This code: echo $this->getChildHtml('addthisJs'); adds this script tag: <script type="text/javascript" async src="//s7....
1
vote
2answers
460 views

Swap image on hover

Galera, would like to switch from one outfit to another over the mouse, I made one code but is a bit buggy. I would like this site here: https://amaro.com/moda-feminina/blusas Mine is this: duetju....
1
vote
0answers
638 views

Uncaught ReferenceError: signals is not defined

Hi I am adding a js file to get a push slide in menu so I can change the country which is working here http://kaiel.fr/shopnew/kaielf.html But in magento 2.1 http://kaiel.fr/shopnew/ it does not work....
1
vote
0answers
152 views

Product Configurator in magento 1.x

I want to create a module for customized t-shirts design. Configurator modules consist following features: Product Image upload Text configuration on production Size Colors For size and color, I can ...
1
vote
0answers
436 views

Magento 2 calculate custom text fields length and width on product view page

How is possible in magento 2.0? I successfully active in magento 1.9 for bellow thing. I am trying to create a product with two custom text fields: Length and Width. When the user types, both a length ...
1
vote
0answers
1k views

Display out of stock options of configurable product

Greetings to all developers! I need your help! I am following this tutorial to display out of stock options of my configurable product. What we want to achieve is even when certain sizes of a product ...
1
vote
0answers
155 views

How to override step-navigator in checkout?

I need to override/extend the step-navigator.js with the function "isProcessed" but that link How to extend js class/method of checkout model class in magento 2 doesn't work. Magento can't find the ...
1
vote
1answer
585 views

Add/call a js file only on the home page magento 2?

I'm using magento 2. I would like to add or call a js file only on the home page , what is the best file to call it?
1
vote
1answer
704 views

Extend or override blanks theme js

I have a custom theme which inherits from blank and I would like to override navigation-menu.js options how would I do that?
1
vote
1answer
279 views

IE Error “Please choose to register or to checkout as guest”

As the title says I'm only getting this error in IE. Anyway to fix this? I removed the instance from the .js and the popup disappears but does not allow checkout. Below is the code //Clear ...
1
vote
0answers
123 views

Make order list refresh in each 5 minute in magento admin

Is this possible in magento admin to make order list refresh if system is idle for 5 minute ??? my client want to make order list refresh in each 5 minute because he don't want to make page refresh ...
1
vote
0answers
432 views

How to implement or extend product gallery widget

In template of module product-video. Widget productGallery called by data-mage-init attribute with template option pass through <div id="<?php /* @escapeNotVerified */ echo $block->getHtmlId(...
1
vote
1answer
420 views

Magento 2 Replace a default JS

here i am replacing configurable.js with my own module. but its not working, and the default one is loading. do i need to initialize it as well ? here is the code path : app/code/ABC/Module/view/...
1
vote
0answers
719 views

How to fix the “payment transaction failure” issue in onepage?

After I installed the following patches: SUPEE-6285-1.9.1v2, SUPEE-6482-1.9.1.1, SUPEE-6788-1.9.1.1, SUPEE-7405-1.9.1.1, my website's onepage checkout payment is not working. Entered debit Card/...
1
vote
2answers
412 views

magento2 new custom theme no CSS or JS

After creating a new theme in app\design\frontend\ appears in my back end under design. When I change it to my custom theme, CSS or JS is NOT loading. I tried running the following command: php ...
1
vote
1answer
234 views

Magento API calling using HTML and javascript

I'm new to Magento and I'm developing a PhoneGap app using HTML5, CSS and Javascript. I searched many places and read Magento documentations, but couldn't get any example for authenticating, calling, ...
1
vote
1answer
534 views

Load Google Maps External Javascript Before Skin Javascript

I'm trying to add the Google Maps Javascript API to my Magento module. The problem I'm having is that the core/text block that I am including, that contains the external Javascript inclusion tag, ...
1
vote
1answer
415 views

JavaScript HTML5 Canvas Snow in 3D in magento

I'm trying to have a snow effect on my magento site. I got a code from seb.ly which i tried on a normal html5 website and it worked, but i added it on my magento page it didn't work. I added it to ...
1
vote
0answers
180 views

Random js error on checkout

I've noticed a strange random JS error on onepagecheckout. Randomly I read this error in console and executions of submit order stops > POST /onestepcheckout/index/savePost/ 503 (OK) send @ >...
1
vote
1answer
44 views

Problems with my admin interface

First of I would like to apologize if there is some rule of this forum I am not following. This is my first post but I am getting desperate, so, here I am. I already posted this on: https://community....
1
vote
0answers
81 views

Top Category links disabling click

Currently my template is using Mega Menu. /RWD/ If 'casting supplies' is clicked on an iPad it will go to the category page and not just drop down the menu. How do I change it so that when 'Casting ...
1
vote
0answers
226 views

Changing color on frontend sets price to zero

I have a configurable product with a few simple products assigned to it. On the frontend I see the price of the product correctly. In the dropdown box with different colors (underlying simple products)...
1
vote
1answer
375 views

Zoom in/out feature on magento banner

I have a magento theme installed which comes with a banner. But I'm trying to add more functionality to the banner to make it catchy for customers. I want the banners to zoom in or out when any image ...
1
vote
0answers
186 views

Magento WidgetInstance is not defined / Unexpected Identifier

Magento is throwing the following error in console when we load the CMS->Widget page there is also an error which I think is related, but what I haven't been able to solve. Uncaught SyntaxError: ...
1
vote
0answers
2k views

Adding an Email Confirmation to the Registration page

So I've been trying to add "Confirm Email" field to my registration page. I'm using these two pages as references: http://magentopaper.blogspot.com/2011/09/how-to-add-confirmation-email-field-in.html ...
1
vote
1answer
120 views

Mobile Device Popup in Magento

I have Android and IOs apps for my website and for promotion of my apps I added banners in website but I want some thing different. When someone visits my website a pop-up appears and ask them to ...
1
vote
1answer
413 views

Getting error on custom add to cart Magento

I am trying to submit custom add to cart on product page with configurable product options but i am getting error with that.My code looks like this : <script> jQuery("#submit").click(function (...
1
vote
1answer
573 views

Add active class to checkout progress

I am trying to add an active class to the opc progress block. I tried modifying the gotoSection function both in opcheckout.js and opcheckout_rwd.js but can't figure out how to change it to update the ...
1
vote
0answers
89 views

Using the built-in price update javascript for custom entity options

Since none of the Magento built-in product types suit my needs, I am using custom entities to represent product options on the product page. These are not custom options, attributes, configurable ...
1
vote
2answers
1k views

Adding custom js and css to Product grid in Magento 2

Can we add custom JavaScript and CSS to the Product grid. I've created a product_listing.xml within my own module, and it's working, but can we add custom JS and CSS to product_listing.xml like we do ...
0
votes
0answers
5 views

Shipping amount is lost with call function estimateTotals Magento 2

In my module I have my own discount and when I load the pag custom discount doesn't load. I try to call function estimateTotals and after it shipping amount is lost but show my discount. That I do: ...
0
votes
1answer
33 views

Submit checkout form with JS after processing payment on checkout page only

I've integrated some custom payment module. I am getting trouble with form submission with JS after payment response. I need to submit the checkout form on click of place order but with JS and that ...
0
votes
2answers
45 views

How to use url.build in JS?

I am getting Uncaught TypeError: url.build is not a function I need to use ajax in JS to get the controller method on the checkout page on click of place order. This is my JS file require(['...
0
votes
0answers
18 views

check whether a product contains specific attribute in checkout tabs

I am new in Magento and i am trying to add a special validation in the checkout page of magento2. for that, I created one more tab in checkout page. I need to show that custom tab only when cart ...
0
votes
0answers
10 views

Magento 2 mixin error

I didn't use mixin in my custom theme or anything. But I get the below error. TypeError: mixin is not a function My require-config.js is below. var config = { paths: { 'owl.carousel': '...