Questions tagged [section]
The section tag has no usage guidance.
27 questions
0
votes
0
answers
156
views
“undefined” Appended to URL Causing 404 Page Not Found Error
I need a help regarding http request or ajax call,
I am trying to open forgot password page in popup,I have loaded widget model popup and it is working as expected.
Now I am trying to reset password, ...
1
vote
1
answer
51
views
custom Section data need to update on cart item delete in magento2
I have created custom section data called test
and create sections.xml file with below code
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
1
vote
0
answers
65
views
Js functions are not working when added Custom section
When i added a custom section. then other js functions( addtocart functionality and slider) is not working on that specific page/phtml
custom.phtml
<div class="od-qtysection"data-bind=&...
1
vote
2
answers
203
views
Showing customer eav attrribute in product page always shows cached data
I've created a customer EAV attribute and trying to show this attribute on the product details page but it always returns chaced data till I run bin/magento cache:flush full_page.
I've tried to use ...
0
votes
1
answer
15
views
remove additional sector in admin panel
after opening customer --> All customer --> edit --> addressees
so i want to remove this section
any ideas please ?
Thank you .
0
votes
1
answer
115
views
remove section from customer dashboard
iam very beginner in magento2 so how can i remove this section of page content
Thank you .
0
votes
1
answer
534
views
Magento 2 show/hide add to cart button based on section data
I need to show/hide the add-to-cart button based on some custom values. These values are stored in a product attribute. The values are updated at the time of order creation.
I am using sections.xml ...
0
votes
1
answer
546
views
Magento 2 - How to save data in to a customer data custom section
I have a form that the visitor fills in and based on that form submission (to a controller) I need to save some data in a custom section.
I have my custom section working correctly but only returning ...
-1
votes
1
answer
227
views
Append section data in ajax add to cart
How we can add our own section data after ajax add to cart and use it display in pupup.
I want to add my data here in the response.
https://prnt.sc/q9v5tq
and when add to cart done i want to show it ...
1
vote
0
answers
49
views
How to trigger without session access invalidate cart version
On backend action (e.g. saving cart rule) I'd like to invalidate customer/section/load cartVersion to force Magento to recalculate totals on frontend on cart page for those who has that rule applied ...
0
votes
1
answer
734
views
TypeError: sections is undefined in section-config.js:50:30 Magento 2
I am getting this error TypeError: sections is undefined in section-config.js:50:30 in firefox but not in chrome.
I added
<referenceContainer name="content">
<block name="customer....
0
votes
1
answer
406
views
I am getting Cannot read property 'sectionLoadUrl' of undefined in particular form in magento 2.3.0
This getting this error on a particular form in Magento 2.3.0. I think this error causes invalid form key sometimes when submitting the form. How to solve this following error.
Uncaught TypeError: ...
0
votes
1
answer
1k
views
What is the difference b/w cacheable="false" and Sections in Magento 2
I have developed an extension in magento 2.2.6. Now i am upgrade this in magento 2.3.1 but I am facing 1 issue.
In my phtml file $block->method() is called 1 time after cache:clean.
When I refresh ...
1
vote
0
answers
194
views
How to refresh minicart section from observer?
I am moving cart items to wishlist when store is switched using below code:
etc/frontnend/events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1
vote
1
answer
393
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
1
answer
2k
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
1
answer
3k
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 ...
1
vote
1
answer
3k
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
0
answers
24
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 ...
6
votes
1
answer
1k
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
0
answers
306
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 ...
4
votes
2
answers
7k
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
1
answer
527
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
2
answers
583
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
0
answers
276
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
1
answer
732
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=...
68
votes
4
answers
54k
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....