Jump to content

Greg_pns

Member
  • Posts

    25
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Greg_pns's Achievements

  1. Thanks for your reply ! I ended up asking chatgpt to write me a javascript snippet that detects if there is "fr" in the URL, and then change the fields through css - as I have a multilingual website. Here it is if it can help someone else : <script> // Get the current URL var currentUrl = window.location.href; // Check if the URL contains "/fr/" if (currentUrl.includes("/fr/")) { // Create a new style element var style = document.createElement('style'); style.type = 'text/css'; // Define the CSS rules with !important var css = ` /* First name - for /fr/ */ .field.first-name .caption-text { visibility: hidden !important; } .field.first-name .caption-text:before { visibility: visible !important; content: "Prénom" !important; } /* Last name - for /fr/ */ .field.last-name .caption-text { visibility: hidden !important; } .field.last-name .caption-text:before { visibility: visible !important; content: "Nom" !important; } `; // Add the CSS rules to the style element if (style.styleSheet) { style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } // Append the style element to the document's head document.head.appendChild(style); } </script>
  2. Hello, Do you happen to know the new selectors ? It seems like they're hidden, because the translation with javascript does not work when using the selectors that the 'inspect' function of my brower gives me.
  3. Hello, I worked on my url mapping recently and changed the URLs, so that's why the link doesn't work anymore. Here is a correct one : https://gregoirepansu.com/fr/tirages-art/p/reflets-dor I managed to translate some stuff, but for other words I just can't find a solution... Thank you so much !
  4. Hello everyone, Is there a way for me to translate some pieces of text on my shop ? I have a bilingual website built thanks to BradGood's guide. On this product : https://gregoirepansu.com/fr/tirages-dart/p/eclaircie-au-cur-de-lorage you can see that, even though it is in the french version of the website, it still says "size" "select size" "frame" "select frame". Is there a way to target and translate those for all the products, but using Java ? So that I can insert the code in the Javascript language loop, which will allow it to only work on the french products (If lang=fr ... etc). Thank you so much !
  5. Hello, I have translated my website into french using BradGood's method and code. Everything works fine except the checkout (obviously, as I know it is not really possible to modify this one). However, I am certain about being able to modify some of the shop's front end strings of text, to have a more seamless experience in french. For example, on this product (https://gregoirepansu.com/fr/tirages-dart/p/chemin-sinueux), in the french version of the website, the price still states "from XX€" instead of "A partir de XX€", "Size" instead of "Format" etc... I have already translated a string of text in the email address box by example, with this code : if (lang == "fr") { $('.email input').attr('placeholder','Adresse email'); } I also translated the "add to cart button" using the same code. (Even though it goes back to "add to cart" after you click it once). Is there any way for me to target those strings of text and translate them ? By example, targeting in French any "size" word and translate it to "Format" ? Thank you so much !
  6. Hello everyone, I have managed to make the header of my website transparent on the main page. I also found a snippet of css that makes it change color when scrolling down (you can check it at https://gregoirepansu.com/ - the header becomes dark gray when scrolling down). I have tried to replicate both of these things on my portfolio project pages. I managed to make the header transparent, but unfortunately can't seem to be able to make it change color when scrolling down. (see it on https://gregoirepansu.com/en/gallery1/landscapes - when scrolling down, the header stays transparent). The bit of code i use for the homepage is the following : .tweak-fixed-header .shrink.header { background: #2A2829 !important; } I tried using the item ID for the pages in order to target them directly, but it didn't work. I then tried adding this bit of code as a code block, no results either. And I can't inject it in the portfolio project pages, because they don't have that option. Does anyone have an idea about what I'm doing wrong ? I feel like it is a simple mistake which i'm overlooking lol Thank you so much !
  7. Site URL: https://gregoirepansu.com/ Hi, I'm currently setting up my shop on squarespace, in order to sell prints. Is there any way I can individually price sub-options within options ? By example, i'd like to have three drop-down menus on a product, each being a kind of paper. So customers choose their kind of paper first, then they roll down the menu of said paper and choose a size for the print (30x90, 15x45.... etc). And depending on the size they choose, the price is set accordingly obviously. Unfortunately, i think it is only possible to price an option in general, right ? (here a kind of paper, without being able to price each print size individually in each paper drop-down menu) Is there any way for me to achieve what i've mentioned ? (I can re-explain if I wasn't clear) Thanks,
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.