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
0answers
7 views

Magento 2: How to create custom validation method

I have 2 fields for Month (both fields type is number), first one is for "From Month" and second is "To Month". I want to restrict user to enter the less no. of month in "To Month" field as ...
0
votes
2answers
767 views

Magento2 - why header& footer is missing from checkout page?

Can anyone tell why header & footer is missing from checkout page. I have searched this on google, but didn't find anything useful except some folks saying that- For user experience, its not ...
0
votes
0answers
4 views

Magento 2 get selected value in custom validator

I'm trying to make vat_id required but only when the country in the billingaddress form is a european country. The validator itself works, i can validate the vat_id field itself, but when i try to ...
0
votes
0answers
8 views

How to add “Please go to Cache Management and refresh cache types.” Notification in Magento 2

Hello Everyone I have created a module the save changes only works when the cache is a refresh to I want to add a Notice on Save to Refresh Cache Something like that. How I can do this Need help
0
votes
2answers
273 views

Magento 2: Why Magento copy product images in pub static cache directory?

While I upload a image in Magento. Image path was like /001/21525-A-1000.jpg But Magento is rendering images on front-end from this directory: example.com/pub/media/catalog/product/cache/image/...
0
votes
1answer
10 views

how to set value to product attribute magento2

I've made a product attribute "inbound" and it has two options yes and no, i have assign "no" to it initially but when i'm checking out i'm using an observer to change its value to "yes" ...
0
votes
1answer
6 views

Magento2 getting error on Gift cart

Getting below error when applying giftcode in shopping cart page Error: Invalid Form Key. Please refresh the page.
0
votes
0answers
8 views

Magento2 serialize data before displaying in grid

How can i unserialize data before displaying in Grid public function _construct() { parent::_construct(); $this->setId('inquiryGrid'); $this->setDefaultSort('...
2
votes
1answer
2k views

Magento 2 - PayPal Payments Pro changed

In my old Magento 1.7 store, the PayPal Payments Pro configuration asks for api username, api password, and api signature which I can easily get from my paypal account page. In Magento 2, it has ...
0
votes
0answers
9 views

Magento2 : How to remove default selection of admin order view custom tab

i have created one custom tab and it showing perfect after "Information" Tab. but by default custom tab is selected, i want "Information" TAB should be selected . does anyone know how i can achive ...
2
votes
2answers
757 views

Grouped Products: Filter based on simple products

The problem I'm currently building a Magento 2 store which sells items in boxes and as singles (eg. a single item or a sealed box of 12). The product page has a grid which lets you add any number of ...
0
votes
0answers
8 views

Magento2 How to change sort order of admin order view custom tab

i have created one custom tab in admin order view page , and it is showing perfect before "Information" Tab but i want after "Shipement" Tab. does anyone know how i can achive this ?
0
votes
3answers
2k views

Magento 2: Add quantity 2 when add to cart from product view page

Add quantity 2 when adding to cart from product view page. For only one product because it calls 2-time post request for one product. After clearing cache and checking and some time that works, but ...
0
votes
2answers
36 views

Magento2 upgrade Getting error

after upgarde getting this error Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (au.#sql-40d4_c, CONSTRAINT ...
0
votes
1answer
8 views

Execute script in copyright block?

For some reason the little script we used to get the current year in the copyright block under Content/design/configuration/footer is not being executed. It is being treated as normal text in the ...
0
votes
1answer
164 views

Fotorama - change nav arrows in navigation?

I need my gallery to look like this: I struggle to find out, how I can change the navigation so that the arrows are not overlapping the thumbnails: It should be more like this: and how can I change ...
0
votes
0answers
11 views

Magento2 display configurable product price range on wishlist page?

I would like to display the configurable product Price Range on wishlist items from the customer dashboard. (Customer dashboard -> My wishlist & sidebar wishlist). Can you please advise how we ...
0
votes
1answer
29 views

Home page requires 'home' or index.php otherwise give autoload error

I installed Magento 2.3 successfully on one server and then moved it to another server by copying the files to public_html and uploading the database. It didn't work at first so I had to do various ...
0
votes
0answers
5 views

Need tax to be reduced from my product on checkout Magento2

I added a simple product including tax $9.99 as the price looks nice and rounded for an attractive market. As European countries like UK doesn’t vary by state and not like US(for US tax varies ...
0
votes
2answers
658 views

How to display contents of a .phtml template file in checkout

I've been trying to add some php logic to view the things I want. I found out that the proper way to do this using a block template in a .phtml file in the /view/frontend/templates folder of the ...
0
votes
0answers
3 views

Magento 2 custom cookie gets null , after order place

I've set custom cookie and set a value in it, but it gets null after order place. Any suggestions to prevent it from getting null ?
1
vote
1answer
30 views

How to add handler to \Magento\Catalog\Helper\Output

I'd like to display the unit of measurement after each product attribute with some dimension (mm, g, …). To prevent duplicated code in each PHTML template file that probably displays a product with ...
1
vote
2answers
3k views

Magento:2 How to Image upload in custom module

Image upload working fine in tmp folder, then store in DB. I want to after saving data image stored in the base folder pub/media/events var_dump($data); " ["events_url"]=> array(1) { [0]=> ...
0
votes
1answer
10 views

How to unserialize data in admin form

I need to unserialize data before displaying in admin [product_id] => a:2:{i:0;s:1:"2";i:1;s:1:"1";} My admin fieldset code $fieldset->addField( 'product_id', '...
0
votes
1answer
7 views

Override comment history order in backend

I'm trying to override the template for the comment history of a order (the part next to the total of the order). this is my path to layout .xml : app/code/Portail/Fournisseur/view/adminhtml/...
0
votes
3answers
876 views

Changing cart image based on cart item

I am trying to change the cart image based on my cart item configuration. But it seems like Magento\Checkout\Block\Cart\Item\Renderer::getImage receives the original Product model class and not the ...
0
votes
0answers
5 views

Magento2: Adding product including tax and show reduced tax from product on checkout?

I want to reduce tax for all the products on checkout with 20% based on shipments as my product is already added with the tax on admin catalog simple product please suggest me any idea of ...
0
votes
2answers
15 views

Magento 2 combine two functionality s using a single mixin js file?

I would like to override Magento_Swatches/js/swatch-renderer.js file using mixins concept. I would like to club two functionalities in a single file. here is the code I have written please Note 2nd ...
0
votes
0answers
8 views

Change payment method base on some condition in checkout page magento 2

Need to set payment method in payment options , in checkout page. I want to set the last (previous order payment method ) as default payment option for the next order.
0
votes
2answers
50 views

MAGENTO 2: HOW TO DISABLE MSI in MAGENTO 2.3.0

How one can disable the MSI module in Magento 2.3.0 if not in use.
0
votes
1answer
13 views

Custom form in cart summary is added multiple times based on no of products added to cart

I am facing a strange issue where my custom form in phtml file is added multiple times as per no of products in cart. Layout <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
0answers
8 views

Magento2.3.4 Compilation Error: MiBPHP Fatal error

I'm trying to upgrade an existing Magento 2.2.4 installation to 2.3.4. The initial step performed was to update to 2.3.0 first, which went fine and without any errors, but when I'm trying to update ...
4
votes
3answers
3k views

Magento 2 PHP Fatal error: Class not found when compiling

When I compile I get this error: PHP Fatal error: Class 'Magento\Catalog\Controller\Adminhtml\Category\Image\Upload' not found in /var/www/html/magento/app/code/Plazathemes/Override/...
0
votes
0answers
7 views

Magento2 how to define theme in my themes.js

What is the correct way to define theme in theme.js dev/tools/grunt/configs/themes.js My theme in app/design is Hose/Fit <theme>: { area: '<area>', name: '<Vendor>/<...
0
votes
0answers
5 views

API Orders Search not accepting value

Doing an order search via API as follows: {{magentoEndpoint}}/rest/default/V1/orders?searchCriteria[filterGroups][0][filters][0][field]=status&searchCriteria[filterGroups][0][filters][0][value]=...
0
votes
0answers
6 views

What is the best solution for mail(SMTP) server?

I want to setup Magento 2 SMTP server for sending mail for invoices and such. I have temporarily setup all mails on store domain on MxRoute. I know it is too limited with space. Thats why I am ...
0
votes
2answers
758 views

Magento2: Many .js requests. How do I merge js files?

I see over 130 requests to retrieve .js files, and I think it is a reason why the magento2 site is so slow. How can I optimize it? I've already set merge and bundle js files in admin, but it's not ...
0
votes
4answers
922 views

Custom magento 2 theme not showing up up on content/design/configuration

Hello Developer community, I have been trying for two day to figure out how I can customize my magento template. Recently I have become stuck on being able to pull up my new magento theme in the ...
0
votes
0answers
10 views

warning generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php

This is killing me. When I run bin/magento setup:upgrade it throws this: Warning: include(/vendor/composer/../../generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php): ...
0
votes
0answers
4 views

Access to font at '/fonts/fontawesome-webfont.woff?v=4.7.0' from origin 'https://www.origin.com' has been blocked by CORS policy

Access to font at '/fonts/fontawesome-webfont.woff?v=4.7.0' from origin 'https://www.origin.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested ...
1
vote
2answers
1k views

how to trigger click event in M2

In my header section I have user name and if user have access to different location then he has button saying click me. I want to send ajax call on this button. But JS is not working. Can anybody help ...
0
votes
0answers
8 views

how to increase sku 64 symbols to be 255 symbols at magento 2.3.2

how to increase sku 64 symbols to be 255 symbols at magento 2.3.2 the below image https://i.imgur.com/MaWo0Qo.jpg i did this solution but still same issue any advice set "const SKU_MAX_LENGTH = ...
1
vote
1answer
1k views

Magento 2: `magento app:config:import` doesn't import system configuration

I'd like to import system config through the app:config:import command. I have update app/etc/config.php file with described customer/captch/enable config path: <?php return array ( 'system' =&...
0
votes
0answers
9 views

tring to filter products with value_id

tried filtering with option_id and value_id but it is looking for value and when I change it to catalog_product_entity_int.value_id or at_manufacturer.value_id it returns syntax error. trying to ...
2
votes
1answer
2k views

Magento 2 Component Manager Won't Load componentGrid/components Times Out

Magento is version 2.1.2 the issue is on the system > web setup wizard > component manager the page loads forever (ajax loading icon spins). My server is: Litespeed 5.0.9 PHP version 7.0.12 (all ...
10
votes
8answers
7k views

Cannot process definition to array for type tinytext in Magento 2.3.0

I'm getting following error "Cannot process definition to array for type tinytext" on Magento 2.3.0 when executing php bin/magento setup:upgrade command. Thanks
0
votes
0answers
15 views

Issue while running install npm in magento2

npm install npm WARN deprecated browserslist@0.4.0: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated http2@3.3.7: Use the built-in module in ...
1
vote
1answer
9 views

Best approach the load differentiated prices for products per customer?

I would like to have suggestions what a good approach might be for below scenario. Our client has: an external system with product prices in it the catalog has ~ 50k products product prices differ ...
0
votes
1answer
672 views

Magento 2 Modify search result collection

What is the proper way of changing what is in a search and category product colleciton? Interceptors? I've kinda tried this but it messes with the pagination of the search result. For context. I ...
3
votes
1answer
1k views

How to add a link in a grid column if the records are not found

I created a custom module.In grid if data is available then in action column edit option is there. If there is no data, then no edit option is displayed. So, I cannot enter into edit page if no data ...

1
2 3 4 5
773