Change an expression in the browser

Hello,

I have an online store with Square on my Weebly site. In the browser of my site there is the expression "Identify" so that the customer opens an account if he wants. I would like to change this expression to "Open an account". How can I reach this item through Weebly?  I know how to change the words in the browser but I cannot reach this one with the normal command.

image

Thank you for helping me!

Sakxo

924 Views
Message 1 of 12
Report
11 REPLIES 11

@sakxo 

Here's what Weebly have posted....

"For Square Online Store Sellers, please use our new Square Online Store Discussion Board."

916 Views
Message 13 of 12
Report
Square

It looks like your site was made with the original editor, however, it is not possible to change the text for the login link. I'm sorry for any inconvenience. 

910 Views
Message 13 of 12
Report

It really bothers me... Peut-on cacher le texte? Je ne veux pas que les gens s'identifient!
881 Views
Message 13 of 12
Report

@sakxo If you are using the original Weebly site editor (rather than the Square site editor), try the following:

  1. In the Site Editor, click on "Settings" in the top navigation bar.
  2. Click "SEO" in the left-hand sidebar.
  3. Scroll down to the "Footer Code" input box and insert the code below. Change "New Text" (highlighted in red below) to the text you'd prefer for the login button label (instead of "S'identifier").
  4. Click the Publish button in the upper-right corner of the page when done.
<script>
document.getElementById("customer-accounts-menu-item-0").textContent="New Text";
</script>
879 Views
Message 13 of 12
Report

Hi

Thank you for your help but it doesn't work...

This is the top of first page (accueil) with the bowser.  I can control all the items except "S'identifier".

image

This is the link to the site: www.studiolancolie.com 

I know nothing in programmation but I think your suggestion is not far from the solution... Can we place this code in the header code box instead of the footer code box?

Thanks

Sakxo

877 Views
Message 13 of 12
Report

@sakxo I think there was an omission in my code that would have lost the link capacity of the login label but, notwithstanding that, if the code (updated below) doesn't change the login text label then the login is being loaded after the code executes. The reason the code needs to be in the footer is that you want to execute the code as late as possible. We want the login menu item to be loaded on the page so that the code can then act to modify the label text. If this doesn't work then the login button may be dynamically loaded after the entire page is loaded and footer scripts have already executed. I didn't see the script on your home page so I guess you added it, tested it, and then removed it.

<script>
document.getElementById("customer-accounts-menu-item-0").getElementsByTagName('a')[0].textContent = "New Text"
</script>
873 Views
Message 13 of 12
Report

Hi!

I've try this new code with the same instructions and it doesn't work. You write:

" the login button may be dynamically loaded after the entire page is loaded and footer scripts have already executed"... How can I do that?

I let the code there this time. Thanks for checking it!

image

868 Views
Message 13 of 12
Report

@sakxo Ah, okay, thanks for checking that. While the login button appears to just be another navigation link item, it is in fact not the same as the other menu items. Each of the regular menu items is standard html on the page. The login button is generated separately and can't be modified by footer script unfortunately. Sorry, I can't be of more help with this.

865 Views
Message 13 of 12
Report

Hi PaulMathews, 

I tried something... 

As I said, I don't know a lot in programmation. Il inspected the "element" in my index page.  Here's what I found, in the blue section, I've changed the words "S,identifier" for "Créer un compte" and when I close the inspect window and refresh the page, IT WAS THERE! No more "S'identifer" but "Créer un compte".  Naturally, it didn't register because I was not in the editor.  Can you help me to put the new code in the editor?  Thanks!

image

857 Views
Message 13 of 12
Report

@sakxo Yes, in the Chrome inspector, you will actually see the login button as though it is regular html. However, this item is actually generated subsequent to all elements loading on the page and any script execution. It is not standard page html like the other menu items in your navigator. Here's what you see when you inspect the code elements around the login button in Chrome and it does appear that the login item is part of the page code (the link labeled "S'Identifier").

image

However, if you view the page source code (right-click on your home page and select "View page source"), you'll see that the login button is in fact not part of the page's static html (the last menu item is in fact, "Livraison et retours") but is instead generated dynamically after the page loads. As such, that login item is not amenable to modification via footer scripts:

image

793 Views
Message 13 of 12
Report

Thanks for the explanations!

Sakxo

787 Views
Message 13 of 12
Report
This thread has been archived and locked. Please start a new thread if you would like to continue the conversation.
grz-custom-initialLetter