2 / 35
Apr 2008

Everytime I try to insert the paypal code into my Wordpress e-commerce/blog, and I try and save the page, it "eats" the javascript. Is this a known problem, and is there a workaround?

  • created

    Apr '08
  • last reply

    Jan '12
  • 34

    replies

  • 2.6k

    views

  • 16

    users

  • 19

    links

I will suggest replacing their WYSIWYG editor with the one which supports JS

Hi, I just signed up today on the free trial but intend to convert to paid. I am going to be installing E-Junkie on Wordpress.



Heathert, is your situation resolved? My e-book is going to be part of a marketing Campaign and I need to have things Functional within a week. Any words of wisdom?



Thank you!

-Denise

Hi Denise--



I managed to get it to work by making sure I only used the non-javascript coding for Paypal. The word editor (what you get with the non-paying WordPress account) turns all the ampersands into html ampersands, but it seems to work nonetheless...



Good luck!



Heather

=)

Thanks Heather!



I have a paid theme on WordPress for this particular site, which I have on my own domain (only WP, no website or anything else). I'm really hoping this will work because I love the e-junkie concept. Thanks so much for your reply, I appreciate it!



Best of luck to you too. =)



Denise

1 month later

Update:

We have confirmed that the standard (Javascript-enabled) version of our button codes will indeed work with Wordpress to enable the nice cart overlay screen, even if WP deletes the actual raw-script portions of our code. It should work, just as long as you can get this line to stay in your View Cart code:



<script src='1http://www.e-junkie.com/ecom/box.js1' type='text/javascript'></script>



(...which is not actual script, but only points to script files residing on our own server).



BTW, you can find more WordPress Javascript advice here:

http://codex.wordpress.org/UsingJavascript

4 months later

Hey Tyson (or any other E-Junkie team member),



I am using WordPress 2.6.3, and for some reason I cannot get the lightbox version to work with the code that is presented with each item.



However, I am able to get it to work properly with the test code.



Any suggestions?

5 months later

Yes, the best way to implement e-junkie in Wordpress is to put the main javascript in the header.



We have written a Wordpress WYSIWYG which is much more javascript friendly and far better with images than the built-in version. We've just added FTP cross-compatibility as well (you can manage the images with both the built-in editor and with FTP now.



http://foliovision.com/seo-tools/wordpress/plugins/wysiwyg

<script type="text/javascript" src="https://www.e-junkie.com/ecom/box.js"></script>



When we began with e-junkie, we placed our "Add to Cart" and "View Cart" buttons in the WordPress sidebar and the javascript didn't work so we put the javascript code in the <head> section and it worked BUT...the script appears to be causing loading problems in both IE7 and Firefox. All the pages of the site exhibited this problem until I removed the script from the head of all pages and put it on the product pages only.



IE7 reports an "Error on Page" but only on the pages where I have included the script, not on the other pages.



Firebox "hangs" at the point where the script loads. If I put it in the head of a page, it hangs before the page loads. If I put it at the beginning of the content, it hangs there. If I put it at the end of the content, it loads the content but hangs before loading the sidebars. When it hangs, a page refresh will cause the page to load correctly. The problem will not reoccur until you leave that page for another one where the script is located.



We're running WP 2.71. and Thesis 1.4.2. The site is blueyonderranch.com and the script is only located on the "Shop" product pages where the "Cart" buttons appear. I would really like to be able to eliminate this problem. Any ideas?

I had a look at your page source; one thing I found was that you have this line all by itself:



<script type="text/javascript" src="https://www.e-junkie.com/ecom/box.js"></script>



...then further down, you have these lines appearing separately:



<!--

function EJEJC_lc(th) { return false; }

// -->

</script>





You should actually have all those lines together like this, and in this order:



<script language="javascript" type="text/javascript">

<!--

function EJEJC_lc(th) { return false; }

// -->

</script>

<script src='http://www.e-junkie.com/ecom/box.js' type='text/javascript'></script>



You can place that complete block of code anywhere in your page or template files where the code won't get jumbled up at all nor cause any other problems.



If you attend to that and are still seeing errors in your page, that would indicate some kind of conflict between our code and other javascripts you're uisng in your page. You may need to rearrange where our script lines (the block of code above) appear in relation to any other javascript lines; usually such conflicts are a matter of having one script load before or after another to eliminate the conflict, and that's just a matter of trial and error until you find an order that works.

1 month later

I'm having this hanging problem too, also running Wp 2.7 and Thesis. What's strange is that it doesn't happen EVERY time I load a page, but probably about every 3rd time. You can see an example on this page:

http://www.chiagu.com/knotology/



I'm at the point where I'm going to ditch the javascript "view cart" code and just go with the plain version . . . anyone have any advice for me?



Thanks in advance!

Hm, it might be that our View Cart javascript and some other javascript in your page aren't playing nice together. Try moving the View Cart code into different places before or after other javascripts your page is using, or really just move the second half of the View Cart code -- from the first <script... to the last </script> -- around in your page or template files wherever you can (up in the HEAD section or just before the </body> tag are good places to try first).

1 month later

HELP! I still cannot get my ADD TO CART/VIEW CART buttons to open up in the same window with the lightbox effect. They still open in a new window.



http://www.abmiration.com/ejunkie-test/



Things I have tried:

1. Read every forum post on this site pertaining to Wordpress integration

2. Read the Wordpres codex on Javascript

3. Placed in my header:



<script language="javascript" type="text/javascript">

<!--

function EJEJC_lc(th) { return false; }

// -->

</script>

<script src='http://www.e-junkie.com/ecom/box.js' type='text/javascript'></script>



4. Downloaded the FolioPress WYSIWYG editor

5. Disabled Rich Text Editor in WP

6. Downloaded multiple plugins claiming to allow javascript in WP posts

7.Tried several plugins that claimed to disable unnecessarycharacter formatting.



And it still doesn't work. Does ANYONE have any ideas??



Also, I am using a Picassa Web Album Plugin that utilizes "Slimbox" with Lightbox type pop-ups. Could this be conflicting?



Thank you for your help.

Currently, it appears that both Add to Cart buttons and your lower View Cart button on that page are showing the cart properly as an overlay. BTW, since you have our View Cart SCRIPT lines placed separately up in your header template, your code for the actual View Cart buttons down in the page only needs to have the first half of the full View Cart code, from <a href...> to </a>.

2 months later

Thanks for the quick response:) I will go through it

1 month later

I have successfully created "add to cart" buttons for standard products, without variants or size options, but am having an issue with products that offer a drop-down list or with size options with a new wordpress.com site.



Is it possible to have product drop-down menus on WordPress?



Please advise...