The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [customer-data]

Use this tag on the questions about the customer-data.js library used in the Magento 2

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Firefox TypeError: options is undefined in customer-data.js with Weltpixel pearl theme 1.5.5

Getting TypeError: options is undefined in customer-data.js with firefox, With chrome it's working good no issue. Using Magento 2.2.0 & Wetpixel pearl theme1.5.5 This issue is not coming for all ...
3
votes
2answers
24 views

Javascript customer data, options is undefined in Firefox

I have tis issue with the customer-data Javascript object. Her is (a par of my code) define([ 'jquery', "Magento_Customer/js/customer-data" ], function ($, customerData) { 'use strict'; ...
2
votes
1answer
30 views

How to call customerData js in phtml on a specific page after page load

I need to call some js in a phtml file only on product details page. I need to check some customer attribute there and show a popup accordingly. The issue I am facing is that somehow I am unable to ...
0
votes
1answer
28 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
0answers
38 views

Magento 2 TypeError: options is undefined in firefox

After working for few day I noticed that I am getting this issue in my Firefox and not in Chrome. TypeError: options is undefined If I do cache clean and check in Firefox it works for the first ...
1
vote
1answer
64 views

How to Override WishList Customer Data in magento 2

i Want to Override Magento\Wishlist\CustomerData\Wishlist public function getSectionData() { $counter = $this->getCounter(); return [ 'counter' => $counter, ...
0
votes
1answer
26 views

How do you pass more / custom parameters to the customer bind / private data in knockout

So this is an extension of this question Magento 2.3 display logged in/out message using private content Default behavior is that data-bind="scope: 'customer' has a few properties eg data_id: ...
1
vote
2answers
50 views

Magento 2.3 display logged in/out message using private content

Does anyone have an example on how to display a logged in vs logged out message on frontend to customer that's not affected by cache without using the cache=false tag and hole punching the whole page ...
0
votes
1answer
31 views

sectionLoadUrl error while updating cart price total Magento 2

I am updating the cart total price dynamically without page reload. I wrote code in js file require( [ 'Magento_Checkout/js/model/cart/cache', 'Magento_Checkout/js/model/cart/totals-processor/...
0
votes
1answer
29 views

Overriding CustomerData/Cart.php removes Total from MiniCart Magento 2

I have overridden \vendor\magento\module-checkout\CustomerData\Cart.php file in my custom plugin using di.xml using below code: <preference for="Magento\Checkout\CustomerData\Cart" ...
0
votes
1answer
27 views

Questions about using knockout

I would like add a feature to show a data like the "Welcome username". So i searched about how it works and i followed this tutorial I'm blocked because i'm always getting the error unable to process ...
0
votes
2answers
80 views

Magento 2 origData null in customer_save_before

I have created an observer on the customer_save_before event. Surprisingly $observer->getEvent()->getCustomer()->getOrigData() is null. Is my expectation wrong? This is also happening for ...
0
votes
1answer
20 views

Show product catalog based on Customer

how can I show catalog products based on customer custom field ? I've done di.xml I've done this but is doesn't filter . This is what I have in ListProduct.php (used in di.xml) protected function ...
1
vote
1answer
60 views

Magento2 : Getting error in console customer-data.js:86

I am using Magento2.1.9 getting this error in our console i am trying to different solutions but not fix it.please if any one know reply me
2
votes
1answer
134 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
84 views

How to render HTML entities in the wishlist sidebar

I have added the © symbol to product names in Magento 2. These all appear fine on the category and product pages, however when I add an item to my wishlist the product name appears with the text &...
0
votes
2answers
179 views

Unable to call function in ajax success in magento2

I have found below error: > Uncaught TypeError: Cannot read property 'set' of undefined. Code: <script> require(['jquery','Magento_Customer/js/customer-data','domReady!'], function ($, ...
0
votes
1answer
231 views

In magento 2 How to get all customer data without using object manager? [closed]

In customer module need to show all customer data whatever I want?
0
votes
1answer
305 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'], ...
4
votes
4answers
727 views

Get wishlist item's array

I made an add to wishlist with ajax module and I want to indicate if the product is already in wishlist without breaking the full page cache. I know the wishlist object is in customer-data but I can't ...
1
vote
2answers
3k views

customer-data.js error: …/section/load/?sections=instant-purchase&… JS error

I keep getting a JS error in my site, it's an ajax get request to http://domain.com/customer/section/load/?sections=instant-purchase&update_section_id=false&_=1517327157790 which results in a "...
2
votes
2answers
5k views

How to force reloading of a customer data section?

I'm using CustomerData library to display private content (Magento docs). I see that in etc/frontend/sections.xml I can configure which requests would result in requesting the data from the server ...
8
votes
4answers
11k views

Magento 2 customer-data.js:90:23 [object Object]

I'm using Magento 2.2 with Porto theme and getting an [object Object] javascript error at customer-data.js line 90 in the console after logging into the store and refreshing the page or switching to ...