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
3 views

Load attributes on product page

I hope you can help me to find a solution. We're stuck ... We want to display on the product page a custom attribute. The custom attribute should show the expected delivery date (available, delivery ...
0
votes
0answers
4 views

Static files are missing after deploying Magento 2 in production mode

I'm using "push to deploy" method to deploy Magento 2 app with GIT. After pushing to master following commands are executed on the production server: git checkout master && git pull ...
0
votes
0answers
2 views

Update product details across the associated products

I want to build a custom module to update product title and price in customizable options of a product when the main product details are updated in the magento 2 backend. as shown in the below image i ...
0
votes
0answers
6 views

Get new created column from catalog_product_entity_media_gallery_value table to frontend

I have added a custom field to catalogue product image. I created a column called alt to the table catalog_product_entity_media_gallery_value. I am able to add/edit the value to this new column ...
0
votes
0answers
8 views

Regenrate url error in magento 2.3.3

I have changed the url key for my product https://nimb.ws/54OkFK. The url rewrite is also generated. I used https://github.com/olegkoval/magento2-regenerate_url_rewrites module to regenerate url. In ...
0
votes
1answer
12 views

Magento 2: How to get last inserted custom table Id without saving new item?

I want to get the last inserted id to my block without adding new data into the table. I want to use this value to automatically filled in my phtml file. I tried getId and it's not working. I just ...
0
votes
0answers
5 views

Magento 2.4.2 : Reorder issue with product custom option error “The product has required options. Enter the options and try again.” on cart Page

Preconditions (*) Magento 2.4.2 Reordering an order with products that have required custom options as checkbox type. Steps to reproduce (*) Install and Setup Fresh Magento 2.4.2 Create a product ...
0
votes
0answers
9 views

Magento 2 DI creates two instances of a class and can't control which is one is being injected

I'm quite new to Magento 2 (.4.2) and I'm debugging some strange issue I'm having. We're facing an issue that it's impossible to sort the search results by relevance and looking at the code and ...
0
votes
0answers
7 views

Magento 2 : Uncaught TypeError: value.map is not a function at UiClass.setInitialValue (file-uploader.js:79)

Uncaught TypeError: value.map is not a function at UiClass.setInitialValue (file-...
0
votes
2answers
14 views

how to fetch core config value in observer

Hi i am trying fetch core_config_table values in observer but i only want to fetch fields using below code but no success. kindly please take a look and tell me what am i missing. $showTemplateHint = ...
0
votes
3answers
10 views

Editing admin credentials after installation

I've just created my first M2 website, but I have made a silly mistake. When I ran bin/magento setup:install command, I've not changed any of the following lines: --admin-firstname=admin --admin-...
0
votes
0answers
7 views

Set optionsCaption as preselected option with knockout js in dropdown list at checkout

I am trying to set the OptionsCaption as the preselected option in a dropdown list during checkout That's what it gives me so far. It selects the first item on the list instead. This is my code in js ...
-1
votes
0answers
10 views

FIND: Parameter format not correct

Error occurred while executing the command Command: find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + Error: FIND: Parameter format not correct
0
votes
0answers
5 views

X-Magento-Vary Cookie Set Incorrectly?

Have noticed that sometimes my X-Magento-Vary cookie is set serving me up non cached pages. Removing this cookie allows the FPC to work fine again. Not entirely sure when these should be set but have ...
0
votes
0answers
11 views

Magento 2.4 doesn't send mail to admin on change order status from using Observer

In my Magento 2.4 store it doesn't send mail to admin on change order status from using Observer. By using this it just reload and show white screen when i change the order status from Admin. My ...
0
votes
0answers
5 views

Magento 2 Cloud - Re-Enable Special Price dates

In Magento Community there are two fields special_from_date and special_to_date that let you choose when a special price is applied. In Magento Cloud they have removed this feature and replaced it ...
0
votes
2answers
20 views

Logging in Magento 2.4+

What are the different way a developer can log messages in Magento 2.4+? Zend logger can't be used anymore either.
0
votes
1answer
7 views

Wrong static files loaded

I've just deployed a new env and I'm getting some strange thing. In the frontend, my static files load properly from my custom theme frontend/Website/default/fr_FR But once I come into the admin, all ...
0
votes
0answers
8 views

Magento 2 - Size of styles

I'm asking myself about performance on Magento 2 websites. Indeed, Google says to me that 95% of my styles-m or l files are unused on homepage. That's a normal behavior, I suppose, it's the aim of the ...
0
votes
0answers
10 views

How can i set wish list for guest user in magento 2?

i need set Wishlist for guest users also Guest can also able to add item in Wishlist. after add item guest login into account that time Wishlist must be marge. all Wishlist functionality must be ...
0
votes
1answer
18 views

how to get sku in template

I want get sku <?php echo __('Product code') . ": " . $item->getSku(); ?> This is my code, it not work <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING....
0
votes
0answers
5 views

Magento 2 pwa page cache

Is there any way that I can get the navigation menu data to PWA frontend from magento 2.4 page cache?i need to get navigation menu data directly from page cache through grapql.Please suggest.
0
votes
0answers
7 views

Magento 2.3 EE: Make reward points to not apply automatically

In Magento 2.3 EE, if a customer has reward points balance it is automatically applied to cart when the cart page is loaded and customer goes to the checkout process. I want to remove this ...
1
vote
1answer
31 views

Magento 2 : How to display cms_page custom attribute image in frontend?

After save image is store in pub/media/cms/page/attribute/my_image. And save image name in database cms_page table my custom column. So how to display image in frontend ? Backend image Fronted Image :...
0
votes
0answers
20 views

Magento 2: Custom customer image attribute image not uploading in custom directory while register customer

I have created customer custom Image attribute. When customer save image is uploading in pub/media/customer I have created custom grid and that grid showing customer image but that image is not ...
0
votes
0answers
10 views

Datepicker in custom widget Magento 2.3.4

Is there any chance to create a field in custom widget with datepicker? I have a field that means end of sale and now I can type there text in spcific format only. I want to have there a datepicker (...
0
votes
0answers
6 views

Change Bundle Product images based on option selection - Magento 2

I'm looking for some custom solution for Bundle Products. Where Product Gallery Images will populate according to the selection of the Bundle product Options Our requirement: On Products Detail page (...
0
votes
1answer
5 views

Change sequence of fields in the CSV while exporting it from admin

I have a module that exports some data from admin to CSV file. Everything works fine but now I need to rearrange the CSV columns. I need to change the sequence of some fields in the CSV. Here is the ...
0
votes
0answers
11 views

Adding custom link in the beginning of the top.links section using default.xml

I have created a custom link using default.xml and moved it inside the top.links reference block. This is my code <referenceBlock name="top.links"> <block class="Magento\...
0
votes
0answers
10 views

How can set the Tax for specific country in Magento 2?

I have set the TAX for UAE and that is working fine but it should work only for UAE but it has applied for all the countries. I need to enable this only for UAE and it should not apply if customer is ...
0
votes
0answers
7 views

Magento 2 - Show modal if no quote shipping address

I am trying to alert the user that they have not added a postcode into their session when clicking "Add to cart" I have created a mixin, "catalog-add-to-cart-mixin.js" within my ...
0
votes
0answers
4 views

Multistore website where one storeview has a path

I'm looking to set up a multistore website where a single store view will have a path within the URL. For example, website.co.uk will be the UK store view and website.com/en_US will be the US store ...
0
votes
1answer
11 views

Magento2: Products lists images - very poor quality

example: on products list is "small image". on product page is "base image". a) on the products list "small image" products in one line the quality is very poor due to ...
0
votes
1answer
10 views

Magento 2.4 how to call out Bundle item selection attribute values?

Bundle item drop down selection name is called out like this: $this->escapeHtml($selection->getName()) in Magento\Bundle\Block\Catalog\Product\View\Type\Bundle (Option.php) I want to call out ...
1
vote
2answers
26 views

In Magento2 does redis and elasticsearch need password protection

I'm new to Magento2. I'm using a dedicated server with 24core and 32GB ram with 1Gb/s net speed for my eCommerce website. As it is a very powerful server I'm running the databases locally on the ...
0
votes
2answers
15 views

RabbitMQ shared by live and staging installs using Magento 2?

Is it possible/recommended for 2 separate installs of M2 to share the same RabbitMQ install? Is there a way to separate their data like with Elastic Search where you define a separate prefix?
0
votes
0answers
7 views

How to send email only for Admin and Customer on changing the order status for 'On Hold' and 'Cancel' status?

I have created an observer to send mail and i have used $order = $observer->getEvent()->getOrder(); if ($order->getState() == 'canceled') { $_objectManager = \Magento\Framework\...
0
votes
0answers
11 views

How to Make Product Weight Attribute searchable in magento2.4.2?

Hello I am using magento2.4.2 in that when i try to enable Product Weight Attribute the search filed is stop to work and i got below error in exception, i want Product weight attribute searchable.
0
votes
0answers
11 views

Can we add pagination for a custom collection which get by passing parameter?

We can add pagination for a custom collection. Example - custom collectiom is getNews(). But can we add pagination if the collection get by passing parameter like getNews($id)? Here is the answer for ...
0
votes
0answers
16 views

How to make a marketplace with magento for my website vexagame.com?

I have a website that focuses on games, we will review various games and from all platforms. not only that, vexagame.com also provides information about technology, lifestyle, games & education. ...
0
votes
2answers
36 views

How to redirect to custom cms in magento2

When quote table or customer session destroy page is rediecting to cart empty page. I want to redirect to my custom cms page. how to do that? I used below code but not working: $this->...
0
votes
1answer
11 views

Getting issue while updating cart price

Hi i am trying to update cart price based on a system config option using observer but its not working below is my code.......... CheckoutCartProductAddAfterObserver.php class ...
0
votes
1answer
26 views

How can i set wish list for guest user also in magento 2?

i need set Wishlist for guest users also Guest can also able to add item in Wishlist. after add item guest login into account that time Wishlist must be marge. all Wishlist functionality must be ...
0
votes
0answers
23 views

Magento 2 : How to disable COD payment method for specific users?

I have Magento 2.3.1 and I want to disable the cash on delivery (COD) method for specific users on the checkout page. I have a list of users as email Ids. I want to prevent that all email ids from ...
0
votes
0answers
11 views

Magento 2 : Alter Category Child Product Positions

The Category Child Product Positions script pushes positions for every single product from the parent to the child (subs) effectively undoing the previous merchandising for all products of all child ...
0
votes
0answers
14 views

Magento 2 | Questions regarding taxes

With the beginning of the next month theres a reformation of the tax system in the EU and we need to adapt a few critical changes in order to comply to everything. Basically we need to charge the tax ...
0
votes
0answers
16 views

Magneto2: Your site contains scripts with similar behavior to typical malware code (217)

I am getting this issue after Site Scan on marketplace. Your site contains scripts with similar behavior to typical malware code (217). Suspected malicious code detected in these resources: /static/...
-1
votes
1answer
26 views

How to disable Magento 2 Content Security Policy with theme edit only

I have searched alot on the internet and I want to hide this error (magento 2.4) content security policy error , we don't have authority to disable magento_csp module and we can not create module, we ...
0
votes
0answers
11 views

Magento 2 export products via PHP WITH attribute text NOT id

I have created a module with Command which will export all products to CSV and do some custom business rules. It works - however I seem unable to find an efficient way to get select attributes text vs ...
0
votes
3answers
25 views

Missing css from source code magento 2.4.2

When upgrading to Magento 2.4.2 all of the core css is missing front both the back and frontends. Looking at the source I see no reference to such lines such as <link rel="stylesheet" ...

1
2 3 4 5
875