Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [magento-2.1]

Denotes questions related to Magento CE and EE 2.1.x

1
vote
0answers
30 views

How to implement content security policy in magento 2

I want to know how to implement CSP on Magento 2 with GTM. The site has multiple stores. Tried to google but was unable to find any concrete result. Implimenting a Content Security Policy Magento 1....
2
votes
0answers
15 views

Magento2 ajaxsuite- ajax login

I want to show Ajax suit modules, Ajax login popup on cart page when press checkout button. right now, I used $('.modals-wrapper .popup-authentication').addClass("_show") and it shows magento2 ...
0
votes
2answers
81 views

Magento 2 - get final prices include tax and round

I've custom block phtml in my old store and I need to be converted to Magento 2. Magento 1.9.x code: $_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(...
1
vote
2answers
17 views

Get Category URL multistore and multisite

I have a 2 website. https://website.com (Default Website) https://site.website.com (Secondary Website) Now I'm accessing the admin panel using the https://website.com/admin/catalog/category... Now ...
2
votes
3answers
46 views

Order Created From Frontend or Admin

I want to check whether an order is created by an Admin or by the customer.
2
votes
1answer
71 views

How to override mini-cart default template html file?

I have Magento 2.2.4 version, And I want to overwrite Magento_Checkout/template/minicart/item/default.html file in my custom module. For this, I created require-jsconfig.js file at below path /app/...
0
votes
0answers
17 views

Show validate popup in magento 2

My function validate and save show popup , but call in function execute it not show , why ?? My code public function execute() { $data = $this->getRequest()->getParams(); $attr = $data[...
1
vote
0answers
32 views

Magento 2.1 : Add to cart adds 2 products from PDP

In magento2.1 add to cart button adds two quantity in cart when you press it for second time. I mean, on product page when add a product to cart it's ok and adds 1 qty. But on second time when I press ...
1
vote
2answers
38 views

How to save stock taking by name product - update quantity by name product

I wrote update quantity product by sku, but i also want update quantity product by name. Only update by sku or name . Look my form <3 My form My controller public function execute() { $data =...
1
vote
0answers
33 views

Unable to create admin form using layout

This Is Edit.php file Magneto\BookFreeLayout\Block\Adminhtml\Demo\Edit.php <?php namespace Magneto\BookFreeLayout\Block\Adminhtml\Demo; class Edit extends \Magento\Backend\Block\...
1
vote
0answers
18 views

Google search console error Content wider than screen

My site is in Magento2.1.8 EE and I am getting Google search console error Content wider than screen and clickable elements too close on around 76 pages. One of the page is: https://int-...
1
vote
0answers
16 views

Sticky cart summary on magento 2.1

I want to stick my cart.summary (sidebar) in cart page. mean that, when i scroll down to see other items in cart page, side bar stick in the left and always can see him over scroll up or down.
2
votes
0answers
40 views

how to get welcome Email when creating customer using custom API in magento 2

I am using magento B2B feature, which has company-modulea and i created a custom api to create company and company user but am unable to get a welcome when i create using the custom api. here is ...
2
votes
2answers
59 views

Loading a .phtml file within an Observer Magento 2

I'm trying to load my .phtml files in the template folder within my observer but I'm getting this error Invalid template file: 'VENDOR_MYModule::Category/index.phtml' in module: 'VENDOR_MYModule' ...
0
votes
1answer
69 views

Your session has expired main home page magento 2

Go to home page and add to cart product and then this time error is come Your Session Has Expired I also try to change pen PHPMYADMIN run: UPDATE core_config_data SET value = 864000 WHERE path = '...
2
votes
0answers
22 views

Can't add products to shopping cart / cart keeps loading Magento 2

I recently copied a website over to another host by using the import tool. After this I don't seem able to add items into my shopping cart. The button keeps saying loading and the Ajax loader shows ...
1
vote
0answers
16 views

how to validate before save stocktaking in magento 2 backend

Help me ! i saved the qty successfully using ajax popup, but i want hide 2 button in popup Close Save When you click the save button -> save When you click the save Close-> not save My jquery ...
0
votes
0answers
14 views

Customer panel myorders area magento 2.1

I want to show below content to my orders on magento 2.1 customer panel my orders tab: => product name, payment method, shipment method, custom attributes, configurable products options. => i want to ...
0
votes
0answers
7 views

Changing Base URL breaks pages

Why is it that after changing the base_url of my site every pages breaks. Like the css/image/js and the title of each page changes to 404 not found? I'm not sure how to change this without breaking ...
3
votes
0answers
17 views

Magento2.1 payment method and shipping method on my orders of buyer panel

I want to show shipping method and payment method of my orders in my orders on customer panel. i'm using magento 2.1
4
votes
0answers
22 views

Load default address when logged in on magento2

I want to load magento2.1 default address on my cart page address box when i'm logged in. mean that, when i'm in one step checkout page and logged in, in my address part, see default address instead ...
2
votes
0answers
8 views

QTY box validation

I want to set a validation to use only English keyboard number on QTY box in product page magento 2.1 I mean that with any keyboard press 3 it use English keyboard not for-example Arabic keyboard
1
vote
0answers
15 views

Webkul Layerednavigation

I just installed Magento 2 webkul advanced layered navigation. but wen I use it as composer, I get below error: [RuntimeException] Source class "\Webkul\AdvancedLayeredNavigation" for "\Webkul\...
3
votes
1answer
26 views

Magento 2 : Search For Admin Menu Items

In magento2 admin dashboard , We have an option for Search. When we search for "rma" for example it is showing "rma in products" , "rma in pages" etc but I need to know if rma found in any of the ...
1
vote
0answers
15 views

magento 2 seperated parent and sub categories dropdowns

I want to show different input dropdown that seperate parent categories and subcategories. Indeed, the first dropdown shows parent categories, the second dropdown empty at first sight, then loaded ...
2
votes
0answers
15 views

Magento 2.1.16 - Search only returning 1 page of results

Since updating to 2.1.16 our search results now only return one page of 30 results. There is no option to view other results or other pages of search results. Where can I investigate further? ...
2
votes
1answer
21 views

how can we add a jQuery Library in phtml file Magento 2

I am using below code in my phtml file. Afte using below code: province drop down is not showing.
2
votes
1answer
15 views

How to use Magento HTTP\Client\Curl with HTTPS Url

How can I do a curl get request if the URL is in SSL? I get an error of malform url or 419. But I used a valid url. I'm thinking is probably the URL is in HTTPS? Although I'm not sure. So I was ...
3
votes
1answer
33 views

Custom field in the form not saving values in to the Database in magento 2.1

I have created a custom attribute for customer using below code. setup/installData.php $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'samsung', [ 'type' => '...
1
vote
0answers
19 views

How to fix My Account menu link in Magento 2.1 after migration from 1.9

We have upgraded our store from Magento 1.9 to Magento 2.1. the My Account is link to /index.php/account it should link to /index.php/customer/account/ We are using Solwin FreeGo theme for Magento 2. ...
2
votes
2answers
42 views

Magento 2 : How to run bin/magento setup:static-content:deploy command programatically?

Is there a way to run bin/magento setup:static-content:deploy in a M2 script? or programatically? I have a scenario where in the CSS file is replaced within the admin panel. So I was thinking to ...
0
votes
1answer
16 views

html_content not working for ui component

The Ui components the following tag works, but only onces. If i tried to use another htmlcontent tag then the new tag does not appear. <htmlContent name="html_content"> <argument name="...
1
vote
1answer
27 views

Inline Edit Not Working In Admin Grid Magento 2

<?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/...
0
votes
0answers
13 views

Write to Custom Theme CSS folder

Hi I'm writing a custom js file in my script and I would like to save it to my custom theme directory. How can I do this? Below is what I have $objectManager = \Magento\Framework\App\ObjectManager::...
0
votes
1answer
23 views

Mutiple fields search for products magento 2

I need to implement a multiple field search block on my website, For example a field for brand the next one for model and the last one for year Help me please if you have any idea
0
votes
2answers
61 views

Magento 2 : How to show special price and regular price in cart page?

I want to show base price and special price both in cart page, right now, by default it just shows special price. How to show exactly like product page or list page. Version 2.1x
0
votes
2answers
23 views

Website level default.xml

Hi I'm trying to include an external css/js in Magento. From what I found one suggestion is to put this under <module>/view/frontend/layout/default.xml which is what I did and was able to ...
0
votes
1answer
28 views

Magento 2 Around Plugin get posted form value

I am customizing the address form to add custom arithmetic captcha. We are using ClassyLlama\AvaTax module to validate the customer address in Model File. Now, to validate my custom captcha on server ...
1
vote
0answers
13 views

Having problems with Magento 2.2.4 outgoing email to customers

Can anybody identify this error message and tell me what it means? Running Magento 2.2.4 TLS 1.2 Have Campaigner Extension installed I have problems sending customers emails from Admin panel and ...
0
votes
2answers
35 views

Magento 2 - Get data attribute value and check if has value per product

I create one custom date attribute for my products in backend: I need to get the attribute value in the products list page and to check if the product have any data added for the product. I try ...
1
vote
0answers
40 views

Magento 2: No such entity with customerId = '' when place an order

I getting below error when place an order. Error: No such entity with customerId = The customer placed an order with their login account but it's not showing customers in error. This error is ...
1
vote
1answer
51 views

Magento 2 Minicart Ajax update

I need to update mini cart without the need to click on update button (just clicking on +/- button) I can't find module or code to do that!
0
votes
0answers
19 views

How To Fetch Product Image From Product Name Or Entity Id In Magento 2 [duplicate]

I Have Given A Foreign Key in my table field name is productid with an entity of product I have already fetched product name from id but now I want to fetch product image from that id and display it ...
2
votes
1answer
133 views

I want hide Add New Customer button for specific admin roles

I want to hide "ADD NEW CUSTOMER" button on customer_grid page for certain admin roles, how to specify Specify ACL's for ui_components..?
1
vote
1answer
20 views

CSS not reflecting after modifications

I'm new to Magento 2 I have an edited CSS file somewhere in app/design/frontend//web/css/, then I run the deploy static content command. I can see the new CSS file is already in pub/static/ folder. ...
0
votes
0answers
31 views

How to add filters(Filter Form ) in Grid( Custom Table Collection)?

I want to add Filter to Grid like Sku or name fillter in Manage Product here my code Grid.php class Grid extends \Magento\Backend\Block\Widget\Grid\Extended { /** * @var \Magento\...
1
vote
0answers
37 views

How do i eliminate render blocking css and js in magento 2

In google page-speed test it shows best opportunity to speed up is eliminate blocking resource. So is there anyone who can guide me to do this?
1
vote
1answer
37 views

How to override to remove/comment a line in customer_listing.xml in Magento 2

I want remove/comment this line <filterSearch name="fulltext"/> in customer_listing.xml located in vendor/magento/module-customer/view/adminhtml/ui_component/customer_listing.xml I want to ...
2
votes
0answers
23 views

How to create a custom payment method module

I was trying something new on the payment method where people can upload receipt and it will appear in backend I was thinking about editing the amazon pay and put my own code to it ,I am totally new ...
1
vote
0answers
18 views

display particular product name and image in custom admin grid page

I want to display product name and product image in a custom page in admin grid that page opens on view click in action