Questions tagged [magento2]

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'Magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

Filter by
Sorted by
Tagged with
0 votes
0 answers
303 views

Magento2 top header section change layout

Currently in my site display this I need search section move to top as look wise below If anyone idea reply me how to search section move in magento2
Rv Singh's user avatar
  • 1,617
0 votes
1 answer
1k views

Forgot password API is not working in magento 2.x

I need to reset the password[Forgot Password] using below REST API, URL : {{base_url}}/index.php/rest/V1/customers/password Method : PUT body : { "email": "[email protected]", "template": "...
Muhsin's user avatar
  • 353
0 votes
0 answers
595 views

Format for adding custom attributes in additional_attributes column

I have few attributes which have to be mapped to specific attribute set. How to achieve the same in Magento 2x csv template. Eg: My attribute set : Desktop Has 4 products . Attributes are: Brand ...
Sushivam's user avatar
  • 2,629
0 votes
1 answer
235 views

show a custom attribute instead of full name if customer logged in M2

I want to display in top menu my custom attribute instead of full name customer, I tried to override customer.phtml under design my theme but no result please any help <? $objectManager =...
Developper Magento 's user avatar
0 votes
2 answers
344 views

Load Custom Template file with argument as product id or sku in magento2

I have created a custom module and calling that template file from the CMS page as like below. {{block class="Vendor\Module\Block\Custom" template="Vendor_Module::custom.phtml"}} In templates/...
Jafar Pinjar's user avatar
  • 1,929
0 votes
1 answer
279 views

How to remove decimal points from price in Magento 2? [duplicate]

In app/design/frontend/Vendor/Theme/Magento_ConfigurableProduct/templates/product/price/final_price.phtml of listing page price is appearing like ₹50.00 . I want to show it as ₹50. I tried using ...
amitshree's user avatar
  • 7,006
0 votes
1 answer
1k views

Migration tool causing url_rewrite duplicates in Magento 2 leading to missing categories in Navigation

I am currently attempting to Migrate data from Magento 1 to Magento 2. I ran the Ubertheme Magento "Data Migration Pro" tool several times in the course of trying to Migrate our information over from ...
CJNotts's user avatar
  • 402
0 votes
1 answer
829 views

adding save button with ui_component not working

after adding the button in ui_component. i give error 500 Internal Server Error not going to post values on save controller. It posting on current url. Example i am using for adding the button. ...
Qaisar Satti's user avatar
  • 32.5k
0 votes
3 answers
9k views

How do i remove remove SORT BY Price, Position, Name in Magento 2.1?

How do I remove the SORT BY Price, Position, Name in Magento 2.1?
KiD Cajes's user avatar
  • 375
0 votes
0 answers
399 views

undefined rest api checkout cart

We've multiple websites in Magento (magento2.2.4) and we've got an issue at checkout cart and checkout page. We have also enable guest checkout. "/checkout/undefinedrest/buy/V1/guest-carts/.../buy/V1/...
Anil Prajapati's user avatar
0 votes
1 answer
2k views

Magento 2 Get Order Billing Details

So I am working on this export for a SOAP web service, I am currently getting the order information from the following namespace \Magento\Sales\Api\OrderRepositoryInterface but the thing is it doesn't ...
André Ferraz's user avatar
0 votes
0 answers
392 views

magento 2 logout customer after successful registration works only first time

I have implemented this logic to logout customer after registration, Its only working before logging in a new user. After clearing cache and when I register a user it logout the user and for second ...
fernandus's user avatar
  • 484
0 votes
3 answers
2k views

magento 2 logout customer after successful registration

I need to logout the user after successful registration. How can I achieve this, Is there a admin settings in backend to do this.
fernandus's user avatar
  • 484
0 votes
1 answer
2k views

Add a custom fields account information section magento2 dashboard

We would like to a custom text field in my account dashboard account infomation section using custom module in magento2 Please find the screenshot below: Thanks
shivashankar m's user avatar
0 votes
3 answers
2k views

Magento 2: RuntimeException it is being used by another process

When I do clear cache using command line & refresh page on Frontend 1st time it gives below exception. 1 exception(s): Exception #0 (RuntimeException): The path "D:/wamp/www/magento2/var/...
Jackson's user avatar
  • 9,909
0 votes
1 answer
2k views

Error after creating boolean attribute magento2

I have created a boolean attribute using below code. $setup = $this->_objectManager->get('Magento\Framework\Setup \ModuleDataSetupInterface'); $eav_setup_factory = $this->...
Jafar Pinjar's user avatar
  • 1,929
0 votes
1 answer
281 views

How to extend private function getTierPriceStructure($tierPricePath) in class AdvancedPricing

I am having some trouble here. I need to extend private function getTierPriceStructure($tierPricePath) in class \Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AdvancedPricing. How do I ...
Adarsh Khatri's user avatar
0 votes
1 answer
944 views

Set an active class for magento2.1 wishlist [duplicate]

I can add product to my Wish-list on product page Magnnto2.1, but after refresh the product page,I want to see this product already added to wish-list by changing color of wish-list icon (set active ...
MGPM's user avatar
  • 741
0 votes
1 answer
665 views

Remove annoying calculate button from Magento 2 Bundle Page layout

I have set up a bundle product and its working but can I disable the javascript that forces me to click on calculate every time I use it? I want it to open in "calculate mode". I dont know what Im ...
Kaki Sami's user avatar
  • 327
0 votes
1 answer
666 views

Can't set watermark in Magento2 / How to change footer links?

I tried to set watermark and thumbnail in Magento2, but its not adding the watermark / thumbnail to the productimages. I did reindex everything, I did delete / flush every single cache (also image ...
N1njaWTF's user avatar
0 votes
2 answers
6k views

Magento 2 Override minicart.phtml template?

This is the Magento core template path: vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml I would like know how to override this template with my theme.
Riyas Muhammed's user avatar
0 votes
4 answers
781 views

Cannot overwrite product list template in catalog_category_view

I am trying to overwrite this template from a custom module but nothing at all is working. I've tried arguments to set the template... I've messed with sequence. Below is the code in Vendor/Module/...
LM_Fielding's user avatar
  • 1,533
0 votes
1 answer
6k views

How to "override" default Magento2 "Luma" Theme with a Custom Theme

I created a custom Theme with "Luma" as its parent. Now I want to override .less / css stylings. (for example "header" background color) Thats the Folder structure I have: I did copy "_module.less" ...
N1njaWTF's user avatar
0 votes
2 answers
2k views

Fatal error: Uncaught Error: Call to a member function setProductCollection() on boolean in

( ! ) Fatal error: Uncaught Error: Call to a member function setProductCollection() on boolean in /var/www/html/magento2/ShopQuary/app/code/MagentoCoders/Manufacturer/Controller/Index/Index.php on ...
Birjitsinh Zala's user avatar
0 votes
1 answer
2k views

Magento 2 : How do we add zipcode validation on COD payment method?

I need to show COD payment method for some zip-code only. How do I add filter in COD payment method for zip-code in Magento 2 ? How to add my custom condition in cashondelivery.html
Ashish Jagnani's user avatar
0 votes
2 answers
2k views

Get Product Collecton by category with filters in magento 2

I need to filter category product collection with Instock items and only simple products. I have used below code to implement it.But the out of stock products also fetching with the collection. ...
Jafar Pinjar's user avatar
  • 1,929
0 votes
3 answers
8k views

Adding CSS & Target attribute to custom top links in default.xml Magento 2

I've searched all over google and I found a few tutorials that seems straight forward but I can't get it to work in my default.xml. Majority of the tutorials uses local.xml but I'm not sure where to ...
Amy Ling's user avatar
  • 390
0 votes
1 answer
836 views

Magento 2: Include Product url in custom js file

How to include product url in Custom js file, In Magento2. I am using below code in template file: $_product = $block->getProduct(); $_product_url= $_product->getProductUrl(); echo $...
shivashankar m's user avatar
0 votes
1 answer
2k views

Failed to import .csv to magento

I'm trying to import my .csv file to magento using magento import (system-import). When i choose my .csv file and click check data, it says file is valid and it gives me option to import. So i click ...
aiden87's user avatar
  • 101
0 votes
2 answers
4k views

Error in Magento 2 when trying to deploy

I have this error: Fatal error: Class 'Locale' not found in vendor/magento/framework/Locale/Bundle/DataBundle.php on line 64 in Magento 2 when I try do use this command to clear the cached ...
Mihai Ilie's user avatar
0 votes
1 answer
3k views

magento 2 unable to redirect to external url from observer

I made modules that work fine but unable to redirect to another url when event fired what code does when adding to cart is pressed I want to redirect to other URL say google.com my module works as a ...
mcoder's user avatar
  • 713
0 votes
1 answer
563 views

Extend model file

I'm trying to extend model file from \Magento\Sales\Model\ResourceModel\Report\Bestsellers\Collection so I can change the $_ratingLimit = 10; Based from example Overriding Block, Model, Controller in ...
crashtestxxx's user avatar
0 votes
1 answer
830 views

Magento 2.3: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)

I'm very new to magento 2.3, I'm facing some error maybe from DB side.... Here is my code: /app/code/EC/Customimport/Controller/Adminhtml/Index/Import.php <?php namespace EC\Customimport\...
Partab Saifuddin Zakir's user avatar
0 votes
1 answer
883 views

How to reuse Block Product Video in magento 2

From Product edit tab in backend. I would like want to re-use this block for custom extensions block location vendor\magento\module-catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content.php ...
mrtuvn's user avatar
  • 3,273
0 votes
3 answers
541 views

Add jQuery plugin waypoint.js, but file does not apear in static folder (Magento 2)

I am trying to add a jQuery Plugin waypoint.js to my theme. I did the following: File: app/design/frontend/name/themename/requirejs_config.js var config = { map: { '*': { ...
Oliver Schmid's user avatar
0 votes
1 answer
11k views

Magento 2 Call breadcrumbs on Category & Product pages

I have my site running on Magento CE 2.0.2 version and I have breadcrumbs block code handy. But I don't get how to call those breadcrumbs on Category and Product pages. I tried putting the code into ...
Vicky Dev's user avatar
  • 1,992
0 votes
2 answers
268 views

undefined index in $cookie['test'] in Magento 2 checkout observer

The shipping method custom module's observer shows error checkoutobservershipping.php if ($_COOKIE['pickupStoreVal']) { $id = $_COOKIE['pickupStoreVal']; $collection =...
prabhakaran7's user avatar
  • 1,087
0 votes
0 answers
396 views

How to create custom module after installing Magento 2 Docker Image?

I have installed Magento docker Image and frontend, backend is working fine. The directory structure of Magento docker Image installed is: Now I am looking how to start my first module. I have these ...
Ajwad Syed's user avatar
  • 1,591
0 votes
1 answer
2k views

How to create custom sticky admin system messages?

In my Magento2 module I want to create admin system messages that are sticky and show up on every page in the adminhtml until the problem is solved. It's something important that the admin needs to ...
peedee's user avatar
  • 713
0 votes
1 answer
3k views

magento 2 header

I have a fresh Magento2 working and I am using Luma as my template. I want to add a costume image on the header that goes across the template, behind the logo. Firebug directs me to: page-...
roger's user avatar
  • 551
0 votes
1 answer
2k views

Get Product info from afterAddProduct Plugin in magento 2

I have a custom functionality for add to cart in product detail page. Once button clicked, sending product id and adding product to the cart. Used below code to implement it. <input type="hidden"...
Jafar Pinjar's user avatar
  • 1,929
0 votes
1 answer
123 views

Can't create custom attribute for order_address

I need to create a custom attribute on the order address to stock my ERP id of the address for a syncing purpose. I've tried to create a Eav in Maru3l/SyncOrchestra/Setup/InstallData.php. I don't see ...
maru3l's user avatar
  • 145
0 votes
1 answer
594 views

How to create a Product Template

I'm trying to create a Configurable Product The doc says to first create a Product Template: http://docs.magento.com/m2/ce/user_guide/catalog/product-templates.html?Highlight=product%20template ...
H. Ferrence's user avatar
  • 1,041
0 votes
1 answer
2k views

How to enable Error Messages $this->_messageManager->addError(__('Error')); in Custom Checkout Module Magento 2?

app\design\frontend\Vendor\theme\Magento_Theme\templates\messages.phtml <div data-bind="scope: 'messages'"> <div data-bind="foreach: { data: cookieMessages, as: 'message' }" class="...
Hitesh Balpande's user avatar
0 votes
1 answer
4k views

Insert, Update values in existing custom table and Select values from that table. Magento2

How can i Insert, Update values in existing custom table and Select values with Magento methods not sql requests ?
Robinio's user avatar
  • 771
0 votes
1 answer
2k views

How to refresh page cache type in magento2

I updated price by raw sql queries.but its not reflecting in front end.but its reflecting admin side. If i refresh page cache then its reflecting in the front end. Mage::app()->getCacheInstance()-&...
Sivakumar K's user avatar
  • 2,013
0 votes
2 answers
587 views

fully customize theme or inherit from parent theme in magento2.0.1?

My requirement is making one eCommerce site which totally different from magento luma/blank . I stuck with how to utilize theme in magento 2. In most of the tutorial inherit parent theme. which is ...
Bilal Usean's user avatar
  • 9,977
0 votes
1 answer
2k views

Passing the Product id and form key but not adding to cart in magento2

passing product id and form key through url but product not added to cart in magento2. http://127.0.0.1/magento2.3/checkout/cart/add/uenc/...
venkata prasad's user avatar
0 votes
1 answer
997 views

Getting disabled products in a collection for Magento 2.3.1

I have the following code to get all disabled products $products = $this->productCollectionFactory->create() ->addAttributeToSelect('sku') ->addAttributeToSelect('name'...
Goose84's user avatar
  • 2,611
0 votes
1 answer
1k views

How to change the label of region_id field in checkout form [closed]

I need to change the label for region_id element in checkout page. For that, I have copied checkout_index_index.xml to my own theme folder and then change this: <item name="region_id" xsi:type="...
jstuardo's user avatar
  • 609