E-Junkie Forum http://www.e-junkie.com/bb/ E-Junkie Forum RSS en-us Copyright 2013, 19.5 Degrees. All rights reserved. webmaster@e-junkie.com webmaster@e-junkie.com Tue, 23 Jun 2009 18:56:23 GMT Tue, 21 May 2013 05:02:23 GMT 681 E-JUNKIE 5 E-Junkie Forum http://www.e-junkie.com/bb/ http://www.e-junkie.com/ej/logo.gif 290 104 Post #4 http://www.e-junkie.com/bb/topic/3456/pg/0#post10459 http://www.e-junkie.com/bb/topic/3456/pg/0#post10459 Tue, 23 Jun 2009 18:56:23 GMT
I cannot say I know off anyone else trying to do any custom stuff like this.]]>
E-junkie Discussions; E-junkieNinja
Post #3 http://www.e-junkie.com/bb/topic/3456/pg/0#post10459 http://www.e-junkie.com/bb/topic/3456/pg/0#post10459 Wed, 17 Jun 2009 18:11:45 GMT
http://soigeneris.com/invoice.aspx?i=W9-SmStep&i=W9-LPH262LPH26&i=W9-LH262DB25$quantity=2

It would be nice to be able to generate a form to list all the products that were going to be added and display that too. The script would need to have access to a database or XML file to match the product ID and retrieve the description.

Is anybody else doing any custom stuff like this with E-junkie?]]>
E-junkie Discussions; Jeff_Birt
Post #2 http://www.e-junkie.com/bb/topic/3456/pg/0#post10459 http://www.e-junkie.com/bb/topic/3456/pg/0#post10459 Tue, 16 Jun 2009 23:54:39 GMT
I'll get this cleaned up and post an example.]]>
E-junkie Discussions; Jeff_Birt
Post #1 http://www.e-junkie.com/bb/topic/3456/pg/0#post10459 http://www.e-junkie.com/bb/topic/3456/pg/0#post10459 Tue, 16 Jun 2009 21:23:21 GMT
So you use a URL like this to go to the invoice page: www.mysite.com/invoice.htm?prd1&prd2 etc.

A bit of javascript gleans the seperate product numbers and makes a URL for each product which is saved in an array. If I just statically create an array with a few URLs multiadd will work fine. When I dynamically generate the URLs then nothing happens. My test code is below. If you click on 'Click Me! 1' it will use the urlArray as it was instantiated. If you click on 'Click Me! 2' it generates the array from the product IDs passed and multiadd does not work. I have used EJEJC_lc in a function in a similar manner and that works fine.

Any tips would be most appriciated.

<html>
<head
<META NAME="Author" CONTENT="Jeffrey T. Birt">
</head>

<body>

<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>

<script language="javascript" type="text/javascript">
<!--
var urlArray = ['https://www.e-junkie.com/ecom/gb.php?c=cart&i=CamBam-License&cl=56989&ejc=2','https://www.e-junkie.com/ecom/gb.php?c=cart&i=W9-SmStep&cl=56989&ejc=2'];

function getQueryVariables() {
var query = window.location.search.substring(1);
var vars = query.split("&");
//var urlArray = new Array();

if (vars.length > 1) {
for (var i=1;i < vars.length; i++) {
urlArray[i] = "https://www.e-junkie.com/ecom/gb.php?c=cart&" + vars[i]+ "&cl=56989&ejc=2";
document.write(urlArray[i] + "<br>");
}
//return EJEJC_multiAdd(urlArray);
}

return EJEJC_multiAdd(urlArray);

}
// -->
</script>

<br /><br />

<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=56989&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);">
<img src="http://www.e-junkie.com/ej/ej_view_cart.gif" border="0" alt="View Cart"/></a><br /><br />
<a onclick="javascript:EJEJC_multiAdd(urlArray);">Click Me! 1</a>
<a onclick="getQueryVariables()">Click Me! 2</a>

</body>
</html>]]>
E-junkie Discussions; Jeff_Birt