2 / 22
Oct 2007

We really like your product, but there is a major drawback. When we click "Add to Cart", the screen displays a great big yellow Paypal button. Is there any way for us to replace that button with one of our own?

  • created

    Oct '07
  • last reply

    Oct '12
  • 21

    replies

  • 2.7k

    views

  • 5

    users

  • 18

    links

I went to the link above and the instructions are quite unclear.

It says for me to add (or replace):

function EJEJC_shown() {

// will change the PayPal checkout button image

jQuery("#btnPP").attr("src", http://yourdomain/yourimage);

}



But I cannot find the EJEJC_shown() function in the view cart or the add to cart buttons.

I added the code so that the View Cart code looks like this:



<ahref="1https://www.e-junkie.com/ecom/gb.php?c=cart&cl=9127&ejc=21"

target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return

EJEJC_lc(this);">

<img src="https://www.e-junkie.com/ej/ejview_cart.gif" border="0">

</a>

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

<!-- function EJEJC_lc(th) { return false; }

function EJEJC_shown() {

jQuery("#btnPP").attr("src",http://mydomain/myimage);

}

}

// -->

</script>

<script type="text/javascript"

src="1https://www.e-junkie.com/ecom/box.js1"></script>

But it still doesn't work.

You will need to add this before EJEJC_shown



function EJEJC_config() { // will call EJEJC_shown function after the cart has rendered

EJEJC_POSTCALL=true; }

You will need to add this before EJEJC_shown



function EJEJC_config() { // will call EJEJC_shown function after the cart has rendered

EJEJC_POSTCALL=true; }

OK, here's what I have:



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

target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return

EJEJC_lc(this);">

<img src="https://www.e-junkie.com/ej/ejview_cart.gif" border="0">

</a>

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

<!--function EJEJC_lc(th) { return false; }

function EJEJC_config() {

// will call EJEJC_shown function after the cart has rendered

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

jQuery("#btnPP").attr("src",http://mydomain/myimage);

}

}

// -->

</script>

<script type="text/javascript"

src="1https://www.e-junkie.com/ecom/box.js1"></script>



But it still does not work.

4 years later

Hello, I am having a similar problem, code here, but I am still getting the Paypal box:



<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=218441&ejc=2" target="ejejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="http://imageshack.us/a/img109/5444/viewcart.png" border="0" alt="View Cart"/></a>

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

<!--



function EJEJC_lc(th) { return false; }

function EJEJC_config() {

// will call EJEJC_shown function after the cart has rendered

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

jQuery("#btnPP").attr("src","http://imageshack.us/a/img195/989/checkout.png");

jQuery("#tdSell").attr("innerHTML",

"Thank you for supporting independent artists and for allowing US to do what we LOVE.

We can’t wait for you to get your delivery! Shannon and Juliet

");

}





// -->

</script>

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

Could you provide a link to your page where the problem is occurring?

Aha, the problem is with your lines of custom text/HTML, which must be all on one line starting with " and ending in "); -- or you can split it into separate lines by using a \ at the end of each line which should continue on the next line, like so:



<a href="1https://www.e-junkie.com/ecom/gb.php?c=cart&cl=218441&ejc=21" target="ejejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="1http://imageshack.us/a/img109/5444/viewcart.png1" border="0" alt="View Cart"/></a>

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

<!--

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

// will call EJEJC_shown function after the cart has rendered

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

jQuery("#btnPP").attr("src","http://imageshack.us/a/img195/989/checkout.png");

jQuery("#tdSell").attr("innerHTML",

"Thank you for supporting independent artists and for allowing US to do what we LOVE.

We can’t wait for you to get your delivery!

Shannon and Juliet");

jQuery("#imgHeader").attr("src", "2http://imageshack.us/a/img341/5448/yourshoppingcart.png2");

}

// -->

</script>

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

Awesome, that is exactly what I was looking for! Thank you so much for your help, very impressed with e-junkie. Can you use the same javascript to replace the credit card logo buttons on Authorize and TrialPay, or are they not changeable? Thanks again!

All our cart customization options are documented here:



E.g., to use a custom image for card-based direct payments using Authorize.Net or PayPal Payments Pro, you would add this line in your function EJEJC_shown(){} section:



jQuery("#btnCC").attr("src", "http://yourdomain/yourimage");



We don't document a customization for the TrialPay button, but looking at the cart's HTML code, it appears this should work:



jQuery("#btnTP").attr("src", "http://yourdomain/yourimage");

Okay cool. Thank you will check that out! And, final question, it looks like the changes made (eg. replacing the Paypal button, etc.) do not appear on the iPad, it looks like it goes directly into the unstyled ejunkie shopping cart, is that correct? Thanks so much you've been a big help!

Yes, our cart detects when it is being viewed in mobile browser such as a smartphone or Apple iOS device, and in that case it displays the cart in a separate window/tab to maximize usability and legibility, rather than displaying the cart overlay inside your page, and only the overlay-style cart can be customized.

1 month later

Hello, I am having the same problem again that I had above, trying to add a line of custom text to the checkout box. Code below:



<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=227007&ejc=2" target="ejejc"

class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);">

<img src="http://i592.photobucket.com/albums/tt3/shariknight/viewcart-7.png" border="0" alt="View Cart"/>

</a>

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

<!--

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

// will call EJEJC_shown function after the cart has rendered

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

jQuery("#btnPP").attr("src","http://i1201.photobucket.com/albums/bb350/littlebluedeer/littlebluedeers%20album%202/checkoutbutton.png");

jQuery("#tdSell").attr("innerHTML",

"If you cannot order the quantity/ you wish, please email theeverydayhome@yahoo.com /and we will let you know when the item is back in stock");

jQuery("#imgHeader").attr("src", "http://i1201.photobucket.com/albums/bb350/littlebluedeer/littlebluedeers%20album%202/checkoutheader.png");

}





// -->



</script>

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





Images are working fine but the text won't show up. Page where problem is occurring:

http://www.detailsforhomeandgarden.com/oef-cups.html

I would suggest removing this line of code from what you show above and then test your site:

// will call EJEJC_shown function after the cart has rendered

Hmmm, still not getting my line of text at the bottom of the checkout window. I removed that line of code, now I have:



<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=227007&ejc=2" target="ejejc"

class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);">

<img src="http://i592.photobucket.com/albums/tt3/shariknight/viewcart-7.png" border="0" alt="View Cart"/>

</a>

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

<!--

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

jQuery("#btnPP").attr("src","http://i1201.photobucket.com/albums/bb350/littlebluedeer/littlebluedeers%20album%202/checkoutbutton.png");

jQuery("#tdSell").attr("innerHTML",

"If you cannot order the quantity/ you wish, please email theeverydayhome@yahoo.com /and we will let you know when the item is back in stock");

jQuery("#imgHeader").attr("src", "http://i1201.photobucket.com/albums/bb350/littlebluedeer/littlebluedeers%20album%202/checkoutheader.png");

}





// -->



</script>

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