Most Popular

1500 questions
11
votes
2 answers

How can i override the PriceCurrencyInterface in Magento 2?

In \magento\framework\Pricing\PriceCurrencyInterface, I want to change the constant in that php interface file from this: /** * Default precision */ const DEFAULT_PRECISION = 2; to this: /** * Default precision */ const DEFAULT_PRECISION =…
wingski
  • 111
  • 1
  • 3
11
votes
1 answer

Magento 2 - Update quantity and totals of cart page without page reload?

In Magento2 - We need to update main cart on change of quantity by Ajax without click on "Update Cart Button" and without reloading the page, Below my code in this code only update cart subtotal but not updated cart page summery sidebar subtotal. …
11
votes
6 answers

Magento 2 customer-data.js:90:23 [object Object]

I'm using Magento 2.2 with Porto theme and getting an [object Object] javascript error at customer-data.js line 90 in the console after logging into the store and refreshing the page or switching to another page. I tested this in Firefox, Chrome, IE…
Lez
  • 2,907
  • 2
  • 23
  • 51
11
votes
3 answers

Magento2: How to add multiple AND and OR conditions to filter/filterGroups?

The question is too close to this topic: Magento 2: Product Repositories, Filter Groups, and `AND` but is it possible to create criteria with multiple OR and AND? In my case i would like to create alternative to this code: /** @var $collection…
Anthony
  • 784
  • 2
  • 13
  • 28
11
votes
2 answers

Magento 2.2.0 upgrade, error attribute type is not allowed

I was able to upgrade a Magento store from 2.1.6 to 2.2.0. The backend is working very good, but I am encountering an exception on the front office. The exception message says: Element 'block', attribute 'type': The attribute 'type' is not…
user60246
11
votes
3 answers

Magento 2.1.9: How to remove sale price in multi store?

Is there any way to removing sale prices in different stores? using any script ? or using any other way except admin? I'm using five different stores, default store is easy but other multi stores take ages as you can only change simple products…
Aasim Goriya
  • 5,444
  • 2
  • 28
  • 53
11
votes
4 answers

Magento 2: How to configure Nginx to use multiple websites with sub-folder

We would like to create multiple websites in Magento 2. There is an article about this topic in the Official Magento 2 Documentation, but the way they describe is not suitable for our case. They are suggesting to use sub-domains in order to…
Bunyamin Inan
  • 2,502
  • 4
  • 20
  • 34
11
votes
6 answers

Magento2: what is the best way to detect mobile device?

I have used below code to detect mobile in magento1. $isMobile = Zend_Http_UserAgent_Mobile::match( Mage::helper('core/http')->getHttpUserAgent(), $_SERVER ); I am not sure if there is something available for Magento2 as well. Anyone have…
Kul
  • 1,777
  • 5
  • 29
  • 54
11
votes
3 answers

Magento 2: Disable all custom and Third Party Module in single Command

Is there is any way that we can disable all custom and third party Module in a single command? Currently, I am using below command to disable multiple modules php bin/magento module:disable module1 module2 module3....moduleN Currently I am…
akgola
  • 2,927
  • 1
  • 26
  • 57
11
votes
7 answers

Magento 2: Set Custom product attribute value programmatically on product save

How to set a product's custom attribute on save? I have used the event/observer way but nothing works.
Jay Kapoor
  • 603
  • 2
  • 12
  • 30
11
votes
3 answers

ReflectionException error on Magento 2

I tried to install MailChimp module for Magento 2. After I put all the files in the app/code/[vendor]/[module] and I run php bin/magento setup:upgrade, I received this error: [ReflectionException] Class Mailchimp does not exist I tried with…
Alin Lupoiu
  • 2,662
  • 5
  • 40
  • 76
11
votes
3 answers

Magento 2 Product Edit/Add admin form custom section

I'm learning UI component. I want to add custom section in product edit/add backend form so for that I've created following files. vendor/module/view/adminhtml/ui_component/product_form.xml
Kaushal Suthar
  • 3,227
  • 5
  • 31
  • 57
11
votes
3 answers

Magento 2 : How to remove and change My Account Navigation

I'm trying to remove some tabs and change the navigations title : As you can see above navigation How to remove some navigation and change the title ? For example removing Address Book change NewsLetter Subscriptons to Subscription I was looking…
Gujarat Santana
  • 583
  • 2
  • 6
  • 18
11
votes
1 answer

How to automatically add a comment on order when is placed

I have the following situation: I am on the checkout page, and i have 3 Shipping methods. If i select a specific method form all 3 and i finish the order, i want a comment to be added automatically on the orders view from backend in this area:…
Alin Lupoiu
  • 2,662
  • 5
  • 40
  • 76
11
votes
1 answer

Admin config: show field depending on selected multiselect values

I want to display fields based on selected multiselect input ... following code just works, if only one value is selected. If I select more then one value it shows only one field (first selected from source model)
sv3n
  • 11,657
  • 7
  • 40
  • 73
1 2 3
99
100