Huh, jeez (fake code huh) I said right at the beginning I have a little script - the script says window.onload = function( ){document.PayPalForm.submit();}
and all I metioned after that was the same....
if I use it in a seperate page it works - as shown above - but if I add it to the cart - it breaks - not fake - just broken - not trying to be obtuse, just trying to work (within) the limitations of the cart code. From what I can figure it doesnt care about the forms actual name - care to see...
<form target="paypal" name="PayPalForm" action="
method="post">
<script type='text/javascript'>
<!--
window.onload = function( ){
document.PayPalForm.submit();
}
//-->
</script>
<input type="hidden" name="cmd" value="_ext-enter">
<input type="hidden" name="redirect_cmd" value="_xclick">
<input type="hidden" name="business" value="$config">
<input type="hidden" name="item_name" value="[$aList[iQuantity]] x $aList[sProduct] | Options:$aAttributes[basketList] | Date/Time Ordered:$aData[sDate]"><!-- adds volume of order -- adds last item to cart - also adds attributes if turned on, also adds date and time of order -->
<input type="hidden" name="item_number" value="$iOrder | Price:$aList[fPrice] ea | Sub Total:$aList[fSummary] | Shipping Cost:$aData[fCourierPrice] | Via: $aData[sCourier] | Comment on order: $aData[sComment]"><!-- adds last product name, order id number, price, subtotal, shipping cost and comment if entered to comment field -->
<input type="hidden" name="amount" value="$aData[fSummary]"> <!-- adds costing here -->
<input type="hidden" name="shipping" value="$aData[Delivery_cost]"> <!-- adds price of shipping -->
<input type="hidden" name="shipping2" value="">
<input type="hidden" name="currency_code" value="GBP"><!-- Sets the shipping and billing country. -->
<input type="hidden" name="first_name" value="$aData[sFirstName]">
<input type="hidden" name="last_name" value="$aData[sLastName]">
<input type="hidden" name="address1" value="$aData[sStreet]">
<input type="hidden" name="address2" value=""><!-- add fields if this is needed -->
<input type="hidden" name="city" value="$aData[sCity]">
<input type="hidden" name="state" value="$aData[sState]"> <!-- added state field to accomodate the US - remove if not neeed/used -->
<input type="hidden" name="zip" value="$aData[sZipCode]"> <!-- this could also be postcode or ....? -->
<input type="hidden" name="lc" value="UK"> <!-- Locale. This is the buyer's checkout flow language. -->
<input type="hidden" name="email" value="$aData[sEmail]"> <!-- Email address. (Max. length = 127) -->
<input type="hidden" name="no_note" value="1">
<input type="image" src="[URL unfurl="true"]http://www.paypal.com/en_US/i/btn/x-click-but06.gif";;;;[/URL] name="submit" alt="Make payments with PayPal" width="62" height="31" border="0" onClick="top.location.href='index.php?p=ordersBasket'"> <!-- added last -->
</form>