Here is an example of a multi item shipping calculator, it assumes you have the SKU for each product
prominently featured on each listing, or the customers somehow know the SKU. It also assumes that the listings
are not WEIGHT based, since you would have to have the user enter the weight for each listing, or include
some sort of lookup table.
<script>
<!--
//
// NOTE: The following code may NOT be legal at eBay - some javascript is blocked.
//
// in the example below you can only do fixed price shipping, NOT weight based, since it's not possible to
// lookup the weight for each item. (unless you used some other script-fu)
//
//
function buildCart() {
thisFrm.CART.value = "<cart>";
if ( thisFrm.prod1.value != '' ) {
thisFrm.CART.value = thisFrm.CART.value +
"<product><id>" +
thisFrm.prod1.value +
"</id><qty>" +
thisFrm.qty1.value +
"</qty><wt>0</wt><title>Item 1</title></product>";
}
if ( thisFrm.prod2.value != '' ) {
thisFrm.CART.value = thisFrm.CART.value +
"<product><id>" +
thisFrm.prod2.value +
"</id><qty>" +
thisFrm.qty2.value +
"</qty><wt>0</wt><title>Item 2</title></product>";
}
if ( thisFrm.prod3.value != '' ) {
thisFrm.CART.value = thisFrm.CART.value +
"<product><id>" +
thisFrm.prod3.value +
"</id><qty>" +
thisFrm.qty3.value +
"</qty><wt>0</wt><title>Item 3</title></product>";
}
thisFrm.CART.value = thisFrm.CART.value + "</cart>";
thisFrm.submit();
}
//-->
</script>
<form name="thisFrm" target="_blank" method="POST" action="http://%USERNAME%.zoovy.com/shipquote.cgis">
<input type="hidden" name="CART" value="">
<input type="hidden" name="ATTRIBS" value="">
<table>
<tr>
<td>ITEM</td>
<td>QTY</td>
</tr>
<tr>
<td><input type="textbox" name="prod1" value="%SKU%"></td>
<td><input type="textbox" name="qty1" value="1"></td>
</tr>
<tr>
<td><input type="textbox" name="prod2" value=""></td>
<td><input type="textbox" name="qty2" value="1"></td>
</tr>
<tr>
<td><input type="textbox" name="prod3" value=""></td>
<td><input type="textbox" name="qty3" value="1"></td>
</tr>
</table>
<input type="button" value=" Calculate Shipping "
onClick="buildCart();">
</form>