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
1
vote
1answer
832 views

magento 2 how i ca override the config save controller adminhtml?

magento\vendor\magento\module-config\Controller\Adminhtml\System\Config\Save.php how can i override this controller in the magento 2
0
votes
1answer
8 views

Prevent “New Order” Notification Checkboxes from Being Re-Checked Automatically

I've edited the adminhtml template for these checkboxes (totals.phtml) and successfully removed the "checked" attribute that causes them to be checked by default. Now, when the New Order page first ...
0
votes
1answer
11 views

Adding a new Customer Group Programatically

I would like to know if it is possible from a public function to create a customer group? I would like, in my saveNewGroup function to crate a new customer group. I saw another example online but it ...
0
votes
1answer
15 views

How to fetch Product options label on Add To Cart button click?

I am trying to get the configurable product selected options value, option titles on clicking the Add to cart button. From the post content, I get the option_id but : How we can fetch the and Option ...
1
vote
2answers
123 views

Magento 2 - Don't want to remove wishlist items when click 'Add all to cart' button

I want to keep items in wishlist when user click "add all to cart" button. Have any idea how to fix it?
0
votes
0answers
4 views

Magento 2: How to allow updating a null value for a column having foreign key constraint?

I have 2 tables A and B A id name B id name a_id FK references A(id) I used the Magento's upgrade script to add both tables, everything was created correctly, however when i tried to setting a_id ...
0
votes
0answers
8 views

Styles aren't being applied on some pages. No errors

Some css styles aren’t applying on some pages, but applying everywhere else. I’ve removed view_preprocessed, cache, static/frontend and static/admin, run setup:upgrade, setup:di:compile, static-...
0
votes
0answers
18 views

Magento 2 - Relation between Block and Templates files [duplicate]

What is the Relations between blocks and templates ? Pick 3 options. A) - Single block can have multiple template files. B) - Multiple block can have single template files. C) - Single Block instance ...
6
votes
1answer
1k views

Magento2 : Extra Checkout Step after Review & Payments Section with Place Order Button

I have added custom checkout step after Review and Payment, all steps are working fine but issue is Place Order button display on Review and Payment. How to move Place Order button to last added ...
0
votes
2answers
31 views

Magento 2 - Add custom attribute to layout container

I try to add a new container to my layout. The container needs the attribute data-block='minicart' <container name="minicart-wrapper" htmlTag="div" htmlClass="minicart-wrapper" data-block='...
28
votes
21answers
9k views

Security Patch SUPEE-11155 - Possible issues?

Magento has released a new security patch for M1, and updates for M1 and M2. What common issues do you have to watch out for when applying this patch/upgrade? Magento 1 https://magento.com/security/...
3
votes
2answers
2k views

How to get processed email template using template id in Magento 2?

I wanted to load a particular processed email template by using its id. how to process this in magento 2. in magento 1.x the code is like $sTemplate = Mage::getModel('core/email_template') ->...
2
votes
2answers
2k views

How to set values in custom email templates?

I am trying to customize new order email template for that I have done below code. here is my email_templates.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
2
votes
3answers
2k views

How to create custom product image attribute in magento2.2.5?

I want to create custom product image attribute in magento2.2.5? Created a custom product image attribute but not able to save the image /var/www/html/magento2/app/code/Amy/ImageUploader/Model/...
0
votes
0answers
4 views

Magento 2 echo newsletter subscriber's email in frontend after subscription

How can we display a newsletter subscriber's email address in the frontend after they subscribe for a newsletter. Currently, Magento 2 displays a message "Thank you for your subscription". We need ...
1
vote
0answers
5 views

Magento 2 - Add Product Search functionality using Ajax in Custom Admin Form

I had created an admin form in Magento 2. I had taken a text field for the product search. I want to search for a product by entering Product Name / SKU / ID in the text field. How could I do it? I ...
0
votes
0answers
10 views

How to overwrite a payment method js renderer component?

Resolved: Seems the error has been caused by the requirejs and my lobster hands :) I rewrite a default Component and trying to extend it inside own component which rewrites a default component: ...
0
votes
4answers
5k views

Magento 2.1.1 An error occured on the server please try again at checkout

for a while we've been getting an error when checking out with Braintree using a sandbox account. we simply get the error 'An error has occurred on the server, please try again" The error occurs ...
5
votes
11answers
18k views

Magento 2: An error occurred on the server. Please try to place the order again

When user want to checkout sometimes i got below message. After correction of Billing & Shipping Address Sometimes user able to place order some times not. Due to this customer not able to order....
0
votes
1answer
13 views

Facebook Share Issue

In our website , We are using Facebook share code as follows. I tried multiple ways of calling Facebook share URL. <a href="fb://post=<?php echo urlencode($_product->getProductUrl());?>" ...
0
votes
0answers
8 views

Magento 2 - Extend core framework

I need to add a new attribute for layout containers. e.g.: customAttribute="data-block='minicart'" <container name="minicart-row" htmlTag="div" htmlClass="minicart-wrapper" customAttribute="data-...
0
votes
0answers
7 views

Warning: SimpleXMLElement::addAttribute(): Attribute already exists

Installed this Extenssion getting error like attached screenshot. It is almost impossible to reach what is causing issue.because it is from core files don't know how to debug.
0
votes
1answer
15 views

Need to remove collapsible for coupon code at cart page in magento 2

In the cart page, I need to display a simple input box and Apply button for the coupon section. For this, I need to remove the collapsible element. We need to work around <div class="block ...
0
votes
0answers
7 views

Very slow Product collection load

I have a custom product collection that takes about 120 sec to load. How can I fix this? I'm posting the functions related to collection (not the whole module code): Mymodule/Block/Products/Category....
1
vote
2answers
37 views

Is there a better practice than using Object Manager?

I was wondering if there was a better way to use the resources than object manager, here is how i'm currently using the category factory's. I am very new to Magento. <?php namespace XX\...
1
vote
1answer
27 views

How CDN works in Magento 2?

I am aware about the CDN and configuring it into Magento 2 from system configuration. I just want to know how CDN works internally in magento codebase? As I am developing an module to upload the ...
0
votes
1answer
132 views

Uploading product placeholder images through Magento2 Admin fails

While uploading the product placeholder images through Magento 2 Admin System throws this error message "Invalid parameter given. A valid $fileId[tmp_name] is expected". I cannot find any old ...
0
votes
0answers
13 views

How to display 'Shipping & Handling' in PDF if Shipping Amount is null?

Magento 2.3.2 In my invoice PDF if Shipping & Handling amount is null or 0 it hides that row like this: But I want to to display it as $0.00 if the price is null like this:
0
votes
0answers
17 views

How to show tier price in Magento 2 catalog listing page

Tier price is working fine on the product page, but when we try to show on the listing page then it's not working. <?php /* @escapeNotVerified */ echo ($block->getShowDetailedPrice() !== false) ...
0
votes
0answers
16 views

How can I create multi-language page in magento 2.3.2?

Please bear with me, I'm new to magento. I have one store with store views for German and the English, I can use the same block for both store views but not able to use the page. I'm looking for ...
0
votes
0answers
12 views

Magento 2: How to add external image url / CDN url for product images on category and product details pages?

I am using Magento 2.3.3. I need help to add CDN url only for product's images on category and product details pages. NOTE: Except product images, no images will come from CDN. Thanks in advance.
0
votes
1answer
2k views

Magento 2: Set Product Attribute Dynamically

How to set product attribute dynamically, I am using catalog_product_save_after event and catch the event using Observer. here is my observer <?php namespace Learning\HelloPage\Observer; use ...
0
votes
0answers
12 views

Is it possible to create “Assign customer group” option (dropdown) for my custom table in admin grid in magento 2?

Basically i have made a custom table in admin which has id,customer id,email,positon,department(custom column from custom table).Now i want to make customer groups from this custom table(in admin ...
2
votes
2answers
42 views

Magento 2.3: How to hide only free shipping methods based on postal code

In the below code, I am hiding all shipping methods based on postal code 2nd value is 0. In this case, all shipping methods are removing. but I want to remove only free shipping. Can you explain how I ...
1
vote
2answers
69 views

Magento2 Luma make special price show after original price

On magento 2.2.5 product detail page when I set a catalog price or or a special price what happens is the special price is shown first and then under it is the original price listed. i want to change ...
0
votes
2answers
22 views

Magento2: How to remove decimal points from price in product admin grid

I want to remove decimal points for price in product admin grid. I have follow this but it only remove the decimal from frontend.
0
votes
1answer
981 views

How to retrieve the filter options in Magento 2 REST API in category list?

How can we retrieve the filter options in a category with REST API? In the product category page, I have the filters as below and it depends on each category. Product Category Filter Filter by stock ...
1
vote
2answers
202 views

Incorrect theme identification key

Any time I run bin/magento setup:upgrade I get Incorrect theme identification key I understand the source is vendor/magento/framework/View/Design/Theme/FlyweightFactory.php so I had added echos to ...
0
votes
0answers
15 views

Magento 2 custom add to cart button on product page

I want to create a new Add to Cart button which takes the value based on the result of a calulator I've add the calculator to catalog_product_view.xml <block class="Magento\Framework\View\Element\...
0
votes
0answers
20 views

Include And Exclude Tax In Magento2

i added tax rule in my store but the issue is my exl price and incl price showing same in magento2.3.3 what is the bug. £210.00 £210.00 Exlude tax
0
votes
2answers
22 views

Get URL of Current Store View Store Magento 2

I have created multiple stores in one. Now when I change the store view it definitely changes and I have set the Base URLs for this store view accurately. But when I try to get the current store view ...
0
votes
0answers
16 views

SQLSTATE[42000] while creating categories using REST API?

I created categories using REST api by below code. <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $directory = $objectManager->get('\Magento\Framework\Filesystem\...
0
votes
0answers
12 views

Magento 2 - What is the role of the “label” attribute in a layout?

I wonder about the usage of the label attribute? e.g. <container name="header-row-col-a" label="Header Bootstrap Col-A" htmlTag="div" htmlClass="col-2"/> From the documentation: label: An ...
0
votes
0answers
10 views

TypeError: depMaps.slice is not a function

There is a error in my magento 2.3 in require.js TypeError: depMaps.slice is not a function How to resolve it? Further in require.js this.depMaps = depMaps && depMaps.slice(0); above ...
2
votes
1answer
24 views

How to convert layout block to cms block?

I have created a block programmatically which shows category name and image on home page. Following is my code: cms_index_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3....
0
votes
0answers
12 views

Magento 2 | Varnish cache pages per session

We have a magento 2.2.6 shop, with 20k products. We use varnish for fpc. It is configured properly, and we can verify by visiting a page two times. The second time the ttf is really low. Problem is ...
0
votes
0answers
17 views

Products orders list dose not show in (Items Ordered) Magento 2

placed orders store in database but not show in backend Error [2020-01-16 13:51:12] main.WARNING: Attempt to load value of nonexistent EAV attribute '191' for entity ...
4
votes
1answer
946 views

Render Javascript on customer_login event

I'm trying to render some javascript when the customer_login event fires by accessing a block on the layout from within the observer. I've successfully registered my observer to execute with the ...
0
votes
1answer
25 views

How can I move a block from homepage? I only know the identifier, but I can't find it in code

How can I move a block from homepage? I only know the identifier,it's "block-homepage", but when I search for "block-homepage" in the code I can't find anything .
0
votes
1answer
13 views

Magento2 How to set pretty url for advance search

i need to change the url patter in advance search in magento2 like : catalogsearch/advanced/result/name/simple/ in default is gives the as query string but i need to change this. how can i do this ? ...