Product text changing when product edited

This topic has 8 replies, 3 voices, and was last updated 7 years, 11 months ago ago by Rose Tyler

  • Avatar: thegirlway
    thegirlway
    Participant
    December 23, 2016 at 12:29

    In my product description text I have the following code for a size chart button that, when clicked, opens up a new smaller new window with the size chart for that item.

    <button onclick=”myFunction()”>View Size Chart</button>

    <script>
    function myFunction() {
    var myWindow = window.open(“http://www.thegirlway.com.au/wp-content/uploads/2016/11/Screen-Shot-2016-12-08-at-6.25.50-PM-1-1024×528.png&#8221;, “”, “width=663,height=300”);
    }
    </script>

    The button works fine, however when I edit the product in any way (title, picture, price, quantity ect) it changes the first line of code to <button>View Size Chart</button>, so when you click the button it does nothing. If I change the code back to the original coding the button works again as normal.

    This is happening with every single one of my products that have a size chart. I also use a few different size charts and it is happening with all of them so doesn’t appear to be related to the image itself.

    Can you advise why this piece of code would be automatically changing when I edit the product and also how I can prevent this from happening every time I edit a product.

    Thanks

    7 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 24, 2016 at 10:14

    Hello,

    Please provide us with WP Dashboard credentials in private content.

    Best regards,
    Jack Richardson.

    Avatar: thegirlway
    thegirlway
    Participant
    December 26, 2016 at 10:14

    Hi, please see below.

    Thanks

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 27, 2016 at 16:25

    Hello,

    Please show a page where you added that code.

    Thank you.
    Best regards,
    Jack Richardson.

    Avatar: thegirlway
    thegirlway
    Participant
    December 27, 2016 at 23:32

    Oh, so sorry about that! I meant to include it for you and then got sidetracked and forgot!

    I’ve added the link to the private content

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 28, 2016 at 18:10

    Hello,

    I’ve updated the page several times and the button code wasn’t changed.
    Please check now.

    Best regards,
    Jack Richardson.

    Avatar: thegirlway
    thegirlway
    Participant
    December 28, 2016 at 20:19

    Yes, this seems to be working now. Thank you for your assistance.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    December 29, 2016 at 08:02

    Hello,

    You’re welcome!

    Regards,
    Rose Tyler.

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘product text changing when product edited’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.