3 / 25
Jul 2010

How to customize shopping cart window ?

I would love to get a french shopping cart window ! How to do that ?

I know about buttons and Thank you page but how to modifiy the shopping cart window ?



Thanks

At present, our cart is only available with text labels in English, and we are planning to add a language Localization option sometime later this year. Meanwhile, you can at least manually customize the text labels in the lower half of the cart (below the itemized order contents) however you wish. Just copy the code below, customize the text label at the end of each line (e.g. "Ship to Country" etc.) and paste that into your View Cart code on every page, just before the "// -->" line in the standard code we provide:



function EJEJC_config() {

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

jQuery("#country1").attr("innerHTML", "Ship to Country");

jQuery("#state1").attr("innerHTML", "Ship to Postal Code");

jQuery("#state2").attr("innerHTML", "(Update Cart after entering)");

jQuery("#dscnt_cd").attr("innerHTML", "Discount Code");

jQuery("#discount2").attr("innerHTML", "(Update Cart after entering)");

jQuery("#btnContShop").attr("value", "Continue Shopping");

jQuery("#btnUpdtCart").attr("value", "Update Cart");

jQuery("#tdPmnt").attr("innerHTML", "<b>Checkout:</b>");

jQuery("#EJEJC_closeWindowButton").attr("innerHTML", "<b>Close</b>");

}

1 year later

I've tried to make these changes and nothing seems to be happening.



Here's the page in question:

http://portlandafoot.org/subscribe/



And here's the code I've entered in my attempt to customize the cart:



<p><a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=110480&ejc=2" target="ejejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img align="right" src="http://www.e-junkie.com/ej/ejview_cart.gif" border="0" alt="View Cart"/></a><br />

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

<--

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

jQuery("#country1").attr("innerHTML", "Ship to Country");

jQuery("#state1").attr("innerHTML", "Ship to Postal Code");

jQuery("#state2").attr("innerHTML", "We'll get the full address from PayPal");

jQuery("#dscnt_cd").attr("innerHTML", "Discount Code");

jQuery("#discount2").attr("innerHTML", "(Update Cart after entering)");

jQuery("#btnContShop").attr("value", "Continue Shopping");

jQuery("#btnUpdtCart").attr("value", "Update Cart");

jQuery("#tdPmnt").attr("innerHTML", "For gifts or multiple addresses, enter a 'note to seller' on PayPal");

jQuery("#tdPmnt").attr("innerHTML", "<b>Checkout:</b>");

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

jQuery("#EJEJC_closeWindowButton").attr("innerHTML", "<b>Close</b>");

}

// -->

</script><br />

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



What's going wrong here?

Hm, there does seem to be something not right with the jQuery-based cart customization function in our cart, and I know Development had updated something pertaining to the cart's jQuery just recently, so I'm asking them to look into that.



Aside from that, you only need to include jQuery lines for the labels you're customizing to say something different than the standard cart, and you seem to have some duplicates which could be causing a problem, so try this View Cart code instead:



<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=110480&ejc=2" target="ejejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img align="right" src="http://www.e-junkie.com/ej/ejview_cart.gif" 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("#state2").attr("innerHTML", "We get the full address from PayPal");

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

"For gifts or multiple addresses, enter a 'Note to Seller' on PayPal");

}

// -->

</script>

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

Thanks. I figured as much on the jQuery lines, but decided to play it safe and throw in the whole shebang.



I've now entered your slimmed-down code, but the changes <a href="http://portlandafoot.org/subscribe/">still don't appear</a>. Obviously I'm hoping this can be fixed ASAP.

You cannot change the name of the columns, other aspects can be changed. Can you let us know what one of the changes you want to make. I looked at your site and I did not see any changes to have the cart in French.

I'd like to change the text after the ZIP code box from "update cart after entering" to "We get the full address from PayPal". I'd also like to add a sentence of text that says "For gifts or multiple addresses, enter a 'Note to Seller' on PayPal."



I don't understand your comment about French -- I didn't ask to make any changes in French. Was this comment posted on the correct thread?

Sorry about that, I did not notice that the first comment on the thread was from a different E-junkie client. As for the code you are trying to add. I have looked at your code and there is no reason I can find that it should not work I am going to check with development and see if we can find out why the text is not being replaced.

Aha, I've found the problem, which was repeated in my "fixed" code suggestion above, as I was just taking your code and paring it down there. Where you have this line:



<--



...that line needs to be like this:



<!--

1 year later

Hello:



I'm trying to customize the test labels, to translate them into Spanish.



The innerHTML values don't show the new intended value. This is the problem. For instance:



jQuery("#state1").attr("innerHTML", "Código Postal");



should show Código Postal instead of



ZIP/Postal Code



For other non "innerHTML" values, the customization works fine. I use the following code:





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

<!--

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

// Not working, displaying 'Your Country' instead

jQuery("#country1").attr("innerHTML", "País");

// Not working, displaying 'ZIP/Postal Code' instead

jQuery("#state1").attr("innerHTML", "Código Postal");

// Working OK

jQuery("#btnContShop").attr("value", "Continuar comprando");

// Working OK

jQuery("#btnUpdtCart").attr("value", "Pulsar en 'Actualizar Carrito'");

}

// -->

</script><br />

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



Other detail:

- I'm using this on a Wordpress(.org) blog



Any ideas will be very welcome.



Thank you. Regards,

Luis

I've already responded to your related inquiry here:

http://www.e-junkie.com/bb/topic/4522/pg/0#post19751



However, your site appears to be using its own jQuery which may be conflicting with the jQuery in our cart that's used for customization; in this case, you can use 'ejejc_jQuery' in place of 'jQuery' for our cart customization code, like this (for the example code provided in my other forum reply to you):



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

function EJEJC_config() {

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

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

ejejc_jQuery("#state1").attr("innerHTML", "ZIP/Postal Code");

ejejc_jQuery("#state2").attr("innerHTML", "Update Cart after entering");

ejejc_jQuery("#dscnt_cd").attr("innerHTML", "Discount Code");

ejejc_jQuery("#discount2").attr("innerHTML", "Update Cart after entering");

ejejc_jQuery("#btnContShop").attr("value", "Continue Shopping");

ejejc_jQuery("#btnUpdtCart").attr("value", "Update Cart");

ejejc_jQuery("#EJEJC_closeWindowButton").attr("innerHTML", "<b>Close</b>");

}

</script>

E-junkieGuruI've already responded to your related inquiry here:

http://www.e-junkie.com/bb/topic/4522/pg/0#post19751



However, your site appears to be using its own jQuery which may be conflicting with the jQuery in our cart that's used for customization; in this case, you can use 'ejejc_jQuery' in place of 'jQuery'





Hello:



That was it! Thank you very much. The issue is solved by replacing all the occurrences of 'jQuery' by 'ejejc_jQuery'



Thank you. Best regards,

Luis Garcia

2 months later

PLEASE add this fix (replacing all the occurrences of jQuery with ejejc_jQuery) to the http://www.e-junkie.com/ej/help.custom-cart.htm page in the troubleshooting section!



I wasted a lot of time trying to figure out why it was not working and if it was in the troubleshooting section, I would have figured it out right away.



Thanks!!

10 months later

Hello,



I have made the changes suggested above but the shopping cart is still being shown as default.



Here is my code:



<a class="ec_ejc_thkbx" onclick="javascript:return EJEJC_lc(this);" href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=1175276&cl=232553&ejc=2" target="ejejc"> <img src="http://www.e-junkie.com/ej/ejadd_to_cart.gif" alt="Add to Cart" border="0" /> </a>



<a class="ec_ejc_thkbx" onclick="javascript:return EJEJC_lc(this);" href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=232553&ejc=2" target="ejejc"> <img src="http://www.e-junkie.com/ej/ejview_cart.gif" alt="View Cart" border="0" /> </a>



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

<!--

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

ejejc_jQuery("#state2").attr("innerHTML", " Actualiza el Carrito Despues de Ingresar el Codigo ");

ejejc_jQuery("#dscnt_cd").attr("innerHTML", " Codigo de Descuento ");

ejejc_jQuery("#discount2").attr("innerHTML", " Actualiza el Carrito Despues de Ingresar el Codigo ");

ejejc_jQuery("#btnContShop").attr("value", " Sequir Comprando ");

ejejc_jQuery("#btnUpdtCart").attr("value", " Actualizar el Carrito ");

ejejc_jQuery("#EJEJC_closeWindowButton").attr("innerHTML", "<b>Cerrar</b>");



}

// -->

</script>

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



Your help is greatly appreciated.



Regards,

Daniel

Hm, that customization code appears to work fine when I copy and paste it into a test page.



You may need to force-refresh the page in your browser to make sure it's downloading the most current page direct from your server, rather than showing you an older copy of the page it cached from a previous visit. To force a full reload of the page, hold down the Ctrl key (on PC) or Shift key (on Mac) while you click the Reload/Refresh button.



If the page still doesn't show your customizations after that, please provide a link to the page where you've added this customization code, so we can have a closer look at what might be going on there.

Your customizations currently appear to be working fine on that page, so perhaps you have sorted this out already? Note the customization only works with E-junkie Cart buttons. The other Buy Now buttons you are using elsewhere on that page would bypass our cart entirely to take buyers directly to instant checkout for just one item at a time, so in that case there is no cart to customize.

Thank for the reply I did figure it out. It was a white space issue.



On another note. How can I ensure that when a buyer clicks the check out button in the cart, the order summary page is displayed in Spanish?