4 / 4
Sep 2011

Hi!



I'm trying to make the popup E-junkie cart work inside my WordPress install. However, the layout of the box is not as it is supposed to be. In addition, I'm not able to edit any of the EJEJC_shown()-items (such as using another image).



I've tried EJEJC_PLAYNICE=true & EJEJC_INITCSS = false without any luck.



I got a demo page live at http://digital-imagination.nl/pricing/. Click on the "add to cart"-button at the very top.



Any thoughts on how to fix this? I'd like to make the box 1) show correctly and 2) customize it using EJEJC_shown as shown at http://www.e-junkie.com/ej/help.custom-cart.htm.



Thanks!

  • created

    Sep '11
  • last reply

    Sep '11
  • 3

    replies

  • 1.2k

    views

  • 2

    users

  • 8

    links

The trouble appears to be caused by a conflict between the versions of jQuery included in our cart vs. that used in your site. I'm guessing you found the EJEJC_PLAYNICE parameter in this forum thread:

http://www.e-junkie.com/bb/topic/4067



They key thing there is that when our cart detects a jQuery version conflict, or when you explicitly use "EJEJC_PLAYNICE=true;", your cart customization code must reference "ejejc_jQuery" rather than "jQuery" -- e.g., the script portion of our View Cart code in your site should look like this:



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

<!--

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

EJEJC_PLAYNICE=true;

EJEJC_INITCSS = false;

EJEJC_OPACITY = 70;

EJEJC_WIDTH = 920;

EJEJC_HEIGHT = 550;

EJEJC_POSTCALL = true;

}

function EJEJC_shown() {

ejejc_jQuery("#btnContShop").remove();

ejejc_jQuery("#country1").attr("innerHTML", "Your Country");

ejejc_jQuery("#tdPmnt").attr("innerHTML",

"<a href='https://www.e-junkie.com/ecom/gb.php?c=cart\&i=YYYYYY\&cl=XXXXXX\&ejc=2'

target=ej_ejc class=ec_ejc_thkbx onClick='javascript:return EJEJC_lc(this);'>

Add our bonus widget to your order for only $5.00!</a>");

}

// -->

</script>

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



BTW, you may notice I also omitted "EJEJC_CPOP=true;" there. That parameter would open PayPal checkouts in a popup window, but we recommend against using that anymore because modern browsers with popup blockers tend to suppress that window, preventing the buyer from reaching checkout. We only document it anymore for historical purposes, in case anyone who'd been using it in their site wonders what it was for.

Thanks! That solved most of it indeed.



However, the PayPal-button is still not where it should be (see updated version at http://digital-imagination.nl/pricing/). How can I make sure that will be shown below "Update Cart" instead of on the left-side?

That appears to be caused by the "float:left;" declaration in this CSS rule:



table { border-collapse:collapse; float:left; clear:both; margin:0px 0px 0px 0px; }



...which is in this CSS file in your WP theme:

http://digital-imagination.nl/wp-content/themes/theme-mingle/style-default.css



You could try just deleting that "float:left;" and see if that makes any visible difference in your site layout.



Otherwise, you could override that rule just for that one table in the cart. I think the effect you'd want can be accomplished by adding these lines to your cart customization, in the function EJEJC_shown() section (note these should be just two long lines, pardon the line-wrapping here):



ejejc_jQuery("#tdPmnt").attr("style","text-align:left;width:100%;");

ejejc_jQuery('table[align="right"]').attr("style","border:0;padding:0;margin:0;width:100%;float:right;");