• The Forums are now open to new registrations, adverts are also being de-tuned.

shopping cart and paypal help (scripts etc)

guydewdney

MB Enthusiast
Joined
Feb 14, 2004
Messages
2,911
Location
Porlock, Zomerzet
Car
906 Sprinter 313cdi
got a 'simple' one... lol

Got nopcart as a shopping cart setup on my stepfathers website.

currently setup as 'print off order form' to order.

want to add paypal to it.

BUT - it appears that half of the nopcart.js file is missing - presumably as it wasnt needed - but i know nothing of this stuff, so i cant just add script in willy nilly..

this is the nopcart.js file:-


//=====================================================================||
// NOP Design JavaScript Shopping Cart ||
// ||
// For more information on SmartSystems, or how NOPDesign can help you ||
// Please visit us on the WWW at http://www.nopdesign.com ||
// ||
// Javascript portions of this shopping cart software are available as ||
// freeware from NOP Design under the GPL. You must keep this comment ||
// unchanged in your code. For more information contact ||
// [email protected] ||
// ||
// JavaScript Shop Module, V.4.1.0 ||
//=====================================================================||

//---------------------------------------------------------------------||
// FUNCTION: CKquantity ||
// PARAMETERS: Quantity to ||
// RETURNS: Quantity as a number, and possible alert ||
// PURPOSE: Make sure quantity is represented as a number ||
//---------------------------------------------------------------------||
function CKquantity(checkString) {
strNewQuantity = "";

for ( i = 0; i < checkString.length; i++ ) {
ch = checkString.substring(i, i+1);
if ( (ch >= "0" && ch <= "9") || (ch == '.') )
strNewQuantity += ch;
}

if ( strNewQuantity.length < 1 )
strNewQuantity = "1";

return(strNewQuantity);
}


//---------------------------------------------------------------------||
// FUNCTION: AddToCart ||
// PARAMETERS: Form Object ||
// RETURNS: Cookie to user's browser, with prompt ||
// PURPOSE: Adds a product to the user's shopping cart ||
//---------------------------------------------------------------------||
function AddToCart(thisForm) {
iNumberOrdered = 0;
iNumberOrdered = GetCookie("NumberOrdered");
iNumberOrdered++;




etc etc - does this make sense to anyone? If it does, and you can help an idiot out - ill post more of the problem.

guy
 

Users who are viewing this thread

Back
Top Bottom