7 / 7
Jul 2015

Hi,



I have just noticed that the custom text that I have added to the HTML has stopped displaying in my cart.



From my source code...



// Add custom text or HTML below checkout buttons in the cart:

jQuery("#tdSell").attr("innerHTML", "Don't have a Paypal or Google Checkout account? Choose Paypal and pay as a guest");

}



I am sure that it was displaying before. Has there been a change to the cart that means custom text can no longer be displayed.



Site: ovendoorglue.co.uk



Edit: I notice that I need to update the text when it is working, to remove the Google Checkout reference.

  • created

    Jul '15
  • last reply

    Jul '15
  • 6

    replies

  • 1.6k

    views

  • 3

    users

  • 2

    links

It looks like your page is loading its own version of jQuery, which is probably conflicting with the version of jQuery our cart uses for cart customization; this conflict particularly affects customizations using the innerHTML property, such as your custom text. Fortunately, we have a workaround documented here:

4http://www.e-junkie.com/ej/trouble.custom-cart.jquery.htm4

Thank you for your reply.



I have tested the workaround on my sandbox site, as you will see in the source code:



http://sandboxovendoorglueuk.ovendoorglue.co.uk/



effectively I have changed all of the customisation "jQuery" calls to "ejejc_jQuery" in the lower part of the script.



I also added the "EJEJC_PLAYNICE=true;" part to the top part of the script.



However the customisations are still not working.



I am not sure if I have missed something or misunderstood the workaround, but it isn't working for me. Any advice would be appreciated.

Hmmm, have you tried using ("#tdPmnt") instead of ("#tdSell")? It would put the text in a different area but it may display better there.

Thanks for the reply...



Just tried the ("#tdPmnt"), still no success.



It is not just the Custom Text under the Paypal button that does not work, none of the customisations are working.

"Post to country", rather than "Ship to country"

"Post Code" rather than "Zip code"



Though the shipping cart header image is working.



Any more ideas?

Your sandbox page still has a copy of the non-workaround code, further down in the page source, which is still causing the conflict. BTW, you only need one copy of the <script ...etc.> portion of your View Cart code in each page. I pasted the workaround version of your View Cart script code into a test page, where I confirmed your customizations worked for me (but note the custom #imgHeader needs the correct, complete URL for that image).

Thank you for that further information.



I see what you mean about the duplicated code (albeit with one set without the workaround).



The first code is being pulled in by my functions.php file as part of the header and the top "View Cart" button, and it was in functions.php that I changed the code for the workaround. The fact that there is a second set of code being pulled in had passed me by, and I see that this has not got the workaround which means that it must be being pulled in for a second time, from a separate file somewhere... now I just need to find where!



I will need to look into this further, as a cursory scan around failed to find the source.



I suspect that it must be loading automatically with the footer, for the bottom "View Cart" button, but have not been able to find where so far.



Thank for your help, I am sure that once I can find the second source and remove it, it will be fine.