Question:
good morning, i need to have customers (club members) view their personalized statement. i was thinking of adding a link or button field to the profile and member account fields. how can i do this?
thank you for any help you would like to give me.
Marco
Product:
Wix Editor
What are you trying to achieve:
[Explain the details of what you are trying to achieve. The more details you provide, the easier it is to understand what you need.]
What have you already tried:
[Share resources, forum topics, articles, or tutorials youâve already used to try and answer your question.]
Additional information:
[Include any other pertinent details or information that might be helpful for people to know when trying to answer your question.]
Thank you very much for your response and availability.
I tried to find the solution with the Wix Member API, but I canât figure out how to read the URL data contained in the âestrattocontoâ field that I created for each member.
Could you give me a Christmas present by helping me solve it?
I would like to insert a button in the profile to which I can link the URL to open a new page.
I thank you in advance for your availability and kindness.
happy new year
Thanks for your suggestion but I had already tried to link the button to the tadaset of the members and to the URL field, but it returns the data only of the first member and not of the logged one.
I donât understand, therefore, what the personal page of the members is for.
Thanks and Happy New Year
hello, i tried to insert this code to display the value of the âcustom_ecâ that i need to open a dedicated url for each member. i canât extract the âvalueâ of the âcustomFieldsâ and insert it into a variable.
can you help me please?
import { currentMember } from âwix-members-frontendâ;
$w(â#button1â).onClick((event) => {
$w.onReady(() => {
currentMember.getMember({ fieldsets: [âFULLâ] })
.then((member) => {
if (member) {
const customFields = member.contactDetails.customFields;
const customFieldValue = customFields[âcustom_ecâ]?.text; // Replace âyourCustomFieldKeyâ with your custom field key
console.log("Campo personalizzato: ",customFields)
console.log(âLink estratto conto:â, customFieldValue);
$w(â#text26â).text = customFieldValue || âNo value foundâ;
} else {
console.log(âNo member is logged in.â);
}
})
.catch((error) => {
console.error(âError retrieving member:â, error);
});
});