Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [section]

The tag has no usage guidance.

0
votes
1answer
20 views

Custom section is ignored on Magento 2

I am trying to create a custom section with private content to not cached. I follow this article: https://webkul.com/blog/sections-magento-2/ I did the first two steps: di.xml <?xml version="1....
2
votes
1answer
25 views

Unable de reload customer data section

I discover that some native route are listed in the section xml file without any section : <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0
votes
1answer
51 views

Magento2: Unable to reload customer cart section

I am using welpixel quick view extension for quick view on product listing, but due to some customizations I am unable to use it as it is. So I just used its url to get html and appended data using ...
0
votes
1answer
118 views

Magento 2 :What is the different between invalidate and reload if they both update the sections?

If some section should be updated then customerData.invalidate(sections) if you sure, that you really need update some section you can always do something like this: customerData.reload(['cart'], ...
0
votes
0answers
223 views

Magento 2 - Reload page after customer data section

I'm trying to realize the following behaviour (f.e. on the catalog page): If a logged in user opens the catalog page of my shop I want to change the style of the "add to wishlist" heart icon if the ...
0
votes
0answers
21 views

Make a module that allows admins to upload file to web dir, from administration area?

I am new to magento2, and I was put on a task to make a new section, or to somehow allow admins to upload a file from administration area, and save it to web folder, always under same name. File is in ...
3
votes
1answer
208 views

Section reload not working on specific REST request

I have created my custom section which reloads when cart data are updated. For this I have created sections.xml file with below code. <action name="rest/*/V1/carts/*/payment-information"> &...
1
vote
0answers
107 views

Flash messages always are empty after call AJAX POST

I used Full Page cache for my page. After I register newsletter I get flash message "successfully" and its ok But after I installed some modules, they can ajax POST and the private-cache-content via ...
1
vote
1answer
556 views

Magento2 RequireJS CustomerData is empty at page load, but populated once page finishes loading?

I'm trying to access some data stored in the Magento_Customer/js/customer-data object I have the following files: --- garage.js --- define([ 'Magento_Customer/js/customer-data' ], function(...
0
votes
1answer
112 views

Update Mini Cart count Magento 2

I want to update minicart count. I was found some code regarding mini cart on sections.xml but it works with products not for item count on toplink with cart item. Now you can see below code what I'm ...
0
votes
2answers
318 views

Admin left menu (System -> Configuration) - How can I make two different sections (one for each module) under the same tab in admin menu?

I want to make several different sections in the left admin menu. I want one section for each module. I have two modules. Just like there is tab General, and under General, there is General, Web, ...
2
votes
0answers
229 views

Magento 2 : How to make/call section ajax to show popup after cart update?

I want to make a new section popup like minicart. And need to update that on any cart action like addtocart, delete item from cart. For this I am thinking to make a section ajax call. How can I do ...
0
votes
1answer
477 views

How to update header login link using ajax Magento 2

I have created sections.xml as below: <?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi=...
38
votes
4answers
15k views

Magento 2: how do customer sections / sections.xml work?

I recently came accross a new concept in Magento 2 that I found interesting: customer sections Some of you may have notice the presence of sections.xml files that look like this: <?xml version="1....