Onit Posted June 29, 2022 Share Posted June 29, 2022 Hey. I'm currently trying to work out how I can customise some text elements inside a store page. The default HTML code is: <div class="product-price"> from <span class="sqs-money-native">216.00</span> every month </div> Now my thinking was to replace "every" with "per" via Store Settings > Advanced > Page Header Code Injection. My desired result should look like: <div class="product-price"> from <span class="sqs-money-native">216.00</span> per month </div> I was trying to inject the following JavaScript code without any result: <script> let str = document.getElementsByClassName("product-price").innerHTML; let res = str.replace("every", "per"); document.getElementsByClassName("product-price").innerHTML = res; </script> Any helping thought is much appreciated :) Link to comment
tuanphan Posted June 30, 2022 Share Posted June 30, 2022 Can you share link to store page? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment