Skip to main content

Questions tagged [magento-2.1]

Denotes questions related to Magento CE and EE 2.1.x

Filter by
Sorted by
Tagged with
4 votes
3 answers
3k views

Magento 2.1 update special price dates programmatically

I have a problem updating the special price dates of a simple product. I've tried 2 versions of code, but without results. In both cases the special price will be update, but no affect to the start ...
6 votes
1 answer
3k views

Mass action in custom grid block Magento 2 not showing

I've created a product grid block following this tutorial, right now i want to add new massAction item but the mass action field won't show up in the toolbar grid, here's the xml file: <?xml ...
0 votes
4 answers
2k views

How to add header and footer at sales order print page

I think by not mentioning magento version I made a mistake. This question is related to Magento 2.1.5 I need specific answer regarding How to add header and footer at sales order print page? i.e. /...
1 vote
1 answer
1k views

How to change the colors only of all email templates in M2?

I've been trying to scratch my head through this most of the day, and I seem to be running in circles. I know I shouldn't edit the default email templates at all (and I'm cool with that). I've found ...
1 vote
1 answer
4k views

Sending variable to a bootstrap modal

I have seen this asked before but a lot of the answers I found where people looking to get a variable into a modal to query a database. However thats not what I want. I just want to send a variable ...
0 votes
2 answers
1k views

Database connectivity issue in Magento 2.1

I am trying to connect to Magento database of another system with the following configuration in app/etc/env.php array ( 'host' => '192.168.1.172', 'dbname' => 'datacenter', '...
2 votes
1 answer
4k views

Filters and results not working properly

Filters are not working properly, not all the attributes like 'size' are in the sidebar. Also, when selecting an option to filter on, there are no products found for this selection but in the backend, ...
1 vote
1 answer
3k views

Magento 2 layered navigation price filter issue

Price filter show negative pricing like -1000- -01 and so on I have some configurable products in Magento 2 and it shows negative pricing in the layered navigation filter. Please find the screenshot ...
0 votes
0 answers
1k views

window.checkout is undefined

When I do an add to cart, nothing happens. I have this error in the console: TypeError: window.checkout is undefined For: images.js & minicart.js Thank you for your help.
1 vote
3 answers
2k views

Magento2: Calling upsell block from phtml is not working.

I want get up-sell product block. when I am working with XML script block is working. but when I am trying to this in .phtml file it's showing nothing .I do not what is wrong with .phtml and XML data ...
8 votes
3 answers
5k views

Programmatically update name of category in specific store

I have a magento 2 multi store setup (e.g. stores with the id 1 - 3) and I want to update the name of the category with the entity_id 3. I've tried $cat = $this->_categoryRepository->get(3, 3);...
4 votes
4 answers
15k views

Magento 2: How to send emails from localhost?

I'm working on a module which sends emails from admin panel on some action. I want to test these emails on localhost. How can I configure my Magento 2.1 settings or add SMTP so that sends emails over ...
1 vote
1 answer
2k views

Magento 2 Mass Product Action module (append text to products name , update price....)

I need the code of the module magento 2 which allows to add mass action (append text to products name , update price....) I am blocked help me please
4 votes
2 answers
2k views

How to Display Vertical mega menu in Magento 2?

I want to display a vertical menu instead of the default horizontal menu for category and subcategory
0 votes
2 answers
3k views

Magento 2: Custom validation on product attribute

There are only six validation available for product attributes validate-number (Decimal Number) validate-digits (Integer Number) validate-email (Email) validate-url (URL) validate-alpha (...
0 votes
2 answers
19 views

current version - none, required version - 1.0.0

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. The following ...
6 votes
4 answers
3k views

magento 2 change attribute position

i have a configurable product with 3 choises. choose meterial (dropdown) choose chain (dropdown) add your name here (custom option - text field) now i want the "add your name here" to be first ...
0 votes
2 answers
3k views

How to solve 500 internal server error in custom module in magento 2

My php version is 5.6 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_curl.dll' - /usr/lib/php/20131226/php_curl.dll: cannot open shared object file: No such ...
0 votes
1 answer
1k views

How to get order data from sales_order_shipment_save_after event

I am using sales_order_shipment_save_after event events for update update order status after shipment. namespace Tenx\SalesExt\Observer; use Magento\Framework\Event\ObserverInterface; /** * Webkul ...
0 votes
1 answer
2k views

Magento 2 Mass Product Action module

Hi magenticians I need the code of the module magento 2 which allows to add a text input when clicking on a mass action to enter a value like this example
0 votes
1 answer
35 views

How to create a Grid Form with Ui Component Can you give me an example

How to create a Grid Form with Ui Component Can you give me an example
3 votes
1 answer
1k views

Magento 2.0.7 to 2.1 - Error in Review Order Page - "We cant place the order"

Steps to reproduce Install Magento 2.1 Add any product to cart Hit Go TO Checkout Select Checkout with Paypal Option Login and Hit PayNow Expected result After Hitting PayPal Pay Now button - ...
1 vote
1 answer
2k views

Magento 2 : How to update Quote Customer?

I want to move all cart items of a current customer with another customer(move all cart items to another customer cart items). In other words, I want to share One Customer Cart items with another ...
0 votes
2 answers
5k views

Multi website and multi store view with custom url in magento 2

I have a magento 2 installed and configured the following: default website with 1 store view called us_en eu website with 1 store view called eu_en When I change base url to store view like ...
2 votes
1 answer
4k views

How do I change date picker format for admin date field

How can I change the date format to display as dd/mm/yyyy for admin date field? Currently it is displaying as mm/dd/yyyy format. Can you please help me out?
2 votes
1 answer
3k views

Force Customer to register in Magento 2 checkout

What can I do if I want the customer to register in the check out process? Is there any simple way to do it? I want the user register from the billing information where users are required to fill in ...
1 vote
1 answer
3k views

Magento 2 Layered Navigation on Advanced Search Result Page

I am able to enable 'Layered Navigation' on Catalog Search Result-Page "http://127.0.0.1/catalogsearch/result/index/" (see image below) by just enabling the storefront properties 'Use in Search ...
1 vote
1 answer
2k views

Magento 2- Force Display Full Breadcrumb Path

I found recently that When I go from home to a product description page its breadcrumb not showing full path in Magento 2.1.8 just showing home -> product . in magento 1.9 there is a fix but In ...
1 vote
1 answer
2k views

Magento2 Fatal Error: Call to a member function isStatic() on boolean

I am getting Fatal Error: Call to a member function isStatic() on boolean This error in addAttributeToSelect() function on module-eav\Model\Entity\Collection\AbstractCollection.php on line 480
1 vote
1 answer
2k views

Magento 2: Products images are not showing on category page

I have a huge catalog and imported images for them by csv file. Unfortunately images are not showing on category page but they are showing on view page. I executed all the commands such as: php bin/...
0 votes
1 answer
3k views

Magento2: Receiving a The page you requested was not found eventhough the desired page is found

My Magento 2.1.5 is trowing a "The page you requested was not found, but we have searched for relevant content." displayed on front pages. After clearing sessions and local cache the message goes away ...
0 votes
1 answer
1k views

How Importing Images with Labels using addImageToMediaGallery in magento2?

Magento2.1.x I had a problem adding a product Image Label programatically. Here's the code I used: $imageLabel1 = 'Test1'; $imageLabel2 = 'Test2'; $imageLabel3 = 'Test3'; $product-&...
4 votes
2 answers
2k 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
1 answer
2k views

Magento 2 Credit Memos : Template override doesn't work after clicking "Update Qty's" button

I am creating a custom module to simplify the Credit Memo creation for admin users. One of the features is hiding the "Return to Stock" column. I have overwritten 2 files for this: vendor/magento/...
0 votes
1 answer
19 views

magento246: How to redirect only homepage of website to another website using .htaccess?

I'm trying to redirect my homepage http://magento246.local/ to http://magento245.local/ but http://magento246.local/admin http://magento246.local/products/ and other URLs after slash should work as ...
4 votes
1 answer
2k views

magento 2 : show all attributes even after filters applied in layered navigation

I'm using Magento-CE-2.1.7.and i want to use Layered Navigation.I have added an attribute from stores-->Product. catalog input type: Multiple select under manage options, I have added 4 Attributes (...
3 votes
1 answer
6k views

Magento 2 free shipping method not showing

I only set my shipping method to free shipping and only for one specific country like this: but the problem is this shipping method won't appear if the country value already selected first when the ...
3 votes
1 answer
4k views

Magento 2 adding multiple items to cart at one time

I am trying to add multiple products to Cart at one time, But i am facing issue while second product adding to cart as per attached screen shot. The second product showing in cart items but price is ...
4 votes
3 answers
4k views

Magento 2: Sorting is not working while adding custom column in Order Grid Using Ui Component

I want to add a custom column in order grid with sorting enabled in it. For now, I am including a column which shows the color attribute of the product in that order. This is the file ...
0 votes
2 answers
392 views

Magento 2 decrease coupon usage

I'm trying to decrease coupon usage, but it isn't applying. I created a coupon with a count of usage = 1, then I use the coupon to reach the limit. After that, I'm trying to set the usage value from 1 ...
0 votes
2 answers
1k views

Magento 2: Layout doesnt update

After clearing the cache default_head_blocks.xml doesn't update. How I clear the cache 1. php bin/magento setup:static-content:deploy 2. Flush Magento Cache in the admin What is the best way to ...
0 votes
0 answers
14 views

How to remove server side email validation only when group equals to agent while saving new customer . please help me

when i save my data i get this error .i need email field to accept the simple text when group is agent if not it should accept only email.
1 vote
2 answers
2k views

Show discount including tax, calculate discount excluding tax

I want to display the discount amount including tax on cart overview page (totals summary). Magento 2.1.8 Relevant settings: Catalog prices: Excluding tax Apply Customer Tax: After discount Apply ...
1 vote
1 answer
2k views

Minicart not working in magento 2.1.2

I am working on magento-2. After added the products into cart, minicart is not showing any products even if the added product exists in the checkout/cart page. After long refresh, this minicart ...
2 votes
1 answer
3k views

Knockout JS removes jQuery change event

I don't know if it is specific to Magento 2 but an already set up HTML node with jQuery change event attached to it will lose its change event when run inside a knockout component with attached VM (...
2 votes
2 answers
2k views

Add block in layout XML only for one store view

I have a Magento 2.1.x installation with two store views. I would like to show a particular block in the footer only for one store view. In Magento 1.9.x I would have done it in this way: <...
0 votes
1 answer
15 views

Adding campaign block to product page [Magento 2.0]

Whenever we're doing campaigns on our eshop we usually add campaign information on each SKU product page with URL re-directing traffic to our campaign deals page as well. The problem is that it ...
0 votes
1 answer
22 views

Magento2.4: How to save custom fields data into customer_entity table when saving customer programatically?

I'm creating a customer programmatically with a customer interface, and custom attributes are saving as expected, but I want those custom attributes value in the customer_entity table also. My code is ...
0 votes
1 answer
2k views

QuickSearch widget Magento 2. How to make closed search

I read a lot documentation and see code search. But don't understand how make an opening search by clicking on the icon. Mobile version have opening search by clicking on the icon. How make same for ...
1 vote
2 answers
2k views

Magento 2 product list page pagination not working

I am using Magento 2.1.5 and and on category listing page i have 48 products but its default display 12 products but not showing the pagination. how to solve it ? default value for product is set 12 ...

1
2 3 4 5
114