Forum Moderators: open
The problem is on the www.sonyplaystation.fsnet.co.uk/order.htm page.
The title is defined in the array but then not output in the form. I have tried to do it but it mucks-up the table. I have been testing by saving the product.htm page and the order.htm page to disk then changing the form action to mailto: self@self.com.
Please note the site is live!
Many thanks
Edited by: Paul
The problem is that when the FORM is submitted the data sent does not include the product 'title'. The price, quantity and grandtotal come through fine but as it stands I have to use a unique price inorder to identify which product has been ordered. The problem relating to the table has been that when I have tried to insert an 'input title' type of command this has shunted the other data out of the table.
Here is the FORM cut from the www.sonyplaystation.fsnet.co.uk/order.htm page.
document.write('<form method="POST" name="BigForm" action="https://select.worldpay.com/wcc/purchase">');
for( var i=1; i<maxLineItems; i++ ) {
var rawCookie = GetCookie( "sku"+i );
if( rawCookie == null )
break;
document.write( "<tr><td>"+GetUserSKUFromSKU(GetSKUFromCookie(rawCookie))+"</td>" );
document.write( "<td>"+GetTitleFromSKU(GetSKUFromCookie(rawCookie))+"</td>" );
document.write( "<td><input name=\"M_qty"+i+"\" onChange='UpdateExt("+i+")' size=2 value="+GetM_QtyFromCookie(rawCookie)+"></td>" );
document.write( "<td>"+currency+"<input name=\"M_price"+i+"\" onChange='UpdateExt("+i+")' size=5 value=''></td>" );
document.write( "<td>"+currency+"<input name=\"M_ext"+i+"\" onChange='UpdateExt("+i+")' size=7 value=''></td>" );
document.write( "<td>" );
document.write( "<a href=\"javascript:RemoveFromCart('"+GetSKUFromCookie(rawCookie)+"');OrderLink()\"><img src=\"images/delete.gif\" border=\"0\"></a>" );
document.write( "</td></tr>" );
}
document.write('</TABLE>');
document.write('<P>');
document.write('SubTotal: <INPUT TYPE="TEXT" NAME="subtotal" SIZE="7" onChange="ComputeSubtotals()"><BR>');
document.write('Delivery: <SELECT NAME="baseshipping" onChange="ComputeSubtotals()">');
document.write('<OPTION value="0">Free 3-5 Days</OPTION>');
document.write('<OPTION value="10">First Class 1-3 Days</OPTION>');
document.write('</SELECT>');
document.write('Delivery Total: <INPUT TYPE="TEXT" NAME="M_shiptotal" SIZE="7" onChange="ComputeSubtotals()"><BR>');
document.write('Tax Rate: <SELECT NAME="taxrate" onChange="ComputeSubtotals()">');
document.write('<OPTION value="0">V.A.T.</OPTION>');
document.write('</SELECT>');
document.write('Tax: <INPUT TYPE="TEXT" NAME="tax" SIZE="7"><BR>');
document.write('Grand Total: £<INPUT TYPE="TEXT" NAME="grandtotal" SIZE="9">');
document.write('<BR>');
document.write('</DIV>');
document.write('<CENTER>');
document.write('<P>');
document.write('<HR>');
//worldpay
document.write('<INPUT TYPE="HIDDEN" NAME="instId" value="22020">');
document.write('<INPUT TYPE="HIDDEN" NAME="cartId" value="1001">');
document.write('<INPUT TYPE="HIDDEN" NAME="amount" value="amount">');
document.write('<INPUT TYPE="HIDDEN" NAME="currency" value="GBP">');
document.write('<INPUT TYPE="HIDDEN" NAME="desc" value="Playstation 2 Products">');
document.write('<INPUT TYPE="HIDDEN" NAME="M_recipient" value="sales@sonyplaystation.fsnet.co.uk">');
document.write('<INPUT TYPE="HIDDEN" NAME="M_subject" value="Playstation 2 Products Order">');
document.write('<INPUT TYPE="submit" NAME="submit" value="Secure Payment Checkout" >');
document.write('</FORM>');
Edited by: tedster
Here is the data I get if several items are currently ordered.
M_qty1=1
&M_price1=310.00
&M_ext1=310.00
&M_qty2=1
&M_price2=19.99
&M_ext2=19.99
&M_qty3=1
&M_price3=38.98
&M_ext3=38.98
&M_qty4=1
&M_price4=38.95
&M_ext4=38.95
&subtotal=407.92
&baseshipping=0
&M_shiptotal=0.00
&taxrate=0&tax=0.00
&grandtotal=407.92
&instId=22020
&cartId=1001
&amount=407.92
¤cy=GBP
&desc=Playstation+2+Products
&M_recipient=sales@sonyplaystation.fsnet.co.uk
&M_subject=Playstation+2+Products+Order
&submit=Secure+Payment+Checkout
[broke lines at each ampersand - tedster]
Edited by: tedster
The thing is, without pulling this code apart totally, I'd be wary of introducing some kind of conflict. The value you need to pass on was in the cookie, and it was retrived by the javascript function GetSKUFromCookie. Now it needs to be written into the form.
I also noticed a comment at the top which talks about using WebDNA to fill in product information. Maybe that's a clue?
I do not know what webDNA is. Do you think this is an editing tool ?
I'd get on them as best you can -- they should make good on your modest investment.
One last thought -- maybe go back to your original code, the way they provided it, and just make sure that something didn't get lost somewhere while you were setting things up? Seems like this functionality just has to be there.
Thanks for taking a look. I think if my shop goes o.k. over the next month I will invest in a better cart. I have heard good things about 'Actinic Catalog 4' at www.actinic.co.uk
Thanks again
Paul