/    Sign up×
Community /Pin to ProfileBookmark

Linux to Windows Rollover Problem

Hi, I am migrating what was a Linux hosted web site to Windows hosting.

I have managed to modify the HTML to execute the cgi scripts, but can’t get the random featured product on the home page to be added to the shopping cart when anyone clicks on “add”.

The URL is : [URL=http://www.neon.riverlandpages.com/index.shtml]http://www.neon.riverlandpages.com/index.shtml[/URL]

The Shopping Cart is the free NOPDesign Shpping Cart.

If you use the menu and navigate Products or Prices and add to the shopping cart, the script adds the product.

I have a feeling that it has something to do with the way it is being called (<!–#exec cgi=”/cgi-bin/csvread.cgi?display=random&mytemplate=tp1″ –>) that is the problem.

Unfortunately, programming is not my forte!

All assistance will be appreciated and I thank you in anticipation.

Regards

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@devnullseoJan 28.2006 — What is the web server on Windows and Linux? Apache?

[URL=http://party-sign-up-bonus.com]_________________[/URL]

Live long, play good!
Copy linkTweet thisAlerts:
@JardryauthorJan 28.2006 — Web server is Apache on Linux.

Web server is Windows 2003 (I think).
Copy linkTweet thisAlerts:
@JardryauthorJan 29.2006 — Can someone please check out my web page and provide some explanation as to why my "add" button does not work.

Thanks in anticipation.

BUMPed up to the top of the que.
Copy linkTweet thisAlerts:
@JardryauthorJan 30.2006 — BUMPed up to the top of the que.
Copy linkTweet thisAlerts:
@MstrBobJan 30.2006 — This isn't a Javascript issue.

Your HTTP server isn't Windows - windows is an operating system. Using IIS?

At any rate, we can't be of much help without seeing your code to help you fix your errors. It could be any number of things.
Copy linkTweet thisAlerts:
@JardryauthorJan 30.2006 — For further clarification, the "add" button does not work on the home page ([URL=http://www.neon.riverlandpages.com/index.shtml]http://www.neon.riverlandpages.com/index.shtml[/URL] ), but works from any products page ([URL=http://www.neon.riverlandpages.com/cgi-bin/csvread.cgi?order_by=ID&order=123]http://www.neon.riverlandpages.com/cgi-bin/csvread.cgi?order_by=ID&order=123[/URL] )

The following is the code for the "add" button.

[CODE]<img name="add" id="add" onmouseout="this.src='/images/neon_add.gif'" onmouseover="this.src='/images/neon_add_over.gif'" src="/images/neon_add.gif" border="0" onClick="AddToCart(document.myForm); return false" style="cursor:pointer">[/CODE]

The following is the code from NOPCart for the javascript "AddtoCart" function.

[CODE]
//---------------------------------------------------------------------||
// 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) {
var iNumberOrdered = 0;
var bAlreadyInCart = false;
var notice = "";
iNumberOrdered = GetCookie("NumberOrdered");

if ( iNumberOrdered == null )
iNumberOrdered = 0;

if ( thisForm.ID_NUM == null )
strID_NUM = "";
else
strID_NUM = thisForm.ID_NUM.value;

if ( thisForm.QUANTITY == null )
strQUANTITY = "1";
else
strQUANTITY = thisForm.QUANTITY.value;

if ( thisForm.PRICE == null )
strPRICE = "0.00";
else
strPRICE = thisForm.PRICE.value;

if ( thisForm.NAME == null )
strNAME = "";
else
strNAME = thisForm.NAME.value;

if ( thisForm.SHIPPING == null )
strSHIPPING = "0.00";
else
strSHIPPING = thisForm.SHIPPING.value;

if ( thisForm.ADDITIONALINFO == null ) {
strADDTLINFO = "";
} else {
strADDTLINFO = thisForm.ADDITIONALINFO[thisForm.ADDITIONALINFO.selectedIndex].value;
}
if ( thisForm.ADDITIONALINFO2 != null ) {
strADDTLINFO += "; " + thisForm.ADDITIONALINFO2[thisForm.ADDITIONALINFO2.selectedIndex].value;
}
if ( thisForm.ADDITIONALINFO3 != null ) {
strADDTLINFO += "; " + thisForm.ADDITIONALINFO3[thisForm.ADDITIONALINFO3.selectedIndex].value;
}
if ( thisForm.ADDITIONALINFO4 != null ) {
strADDTLINFO += "; " + thisForm.ADDITIONALINFO4[thisForm.ADDITIONALINFO4.selectedIndex].value;
}

//Is this product already in the cart? If so, increment quantity instead of adding another.
for ( i = 1; i <= iNumberOrdered; i++ ) {
NewOrder = "Order." + i;
database = "";
database = GetCookie(NewOrder);

Token0 = database.indexOf("|", 0);
Token1 = database.indexOf("|", Token0+1);
Token2 = database.indexOf("|", Token1+1);
Token3 = database.indexOf("|", Token2+1);
Token4 = database.indexOf("|", Token3+1);

fields = new Array;
fields[0] = database.substring( 0, Token0 );
fields[1] = database.substring( Token0+1, Token1 );
fields[2] = database.substring( Token1+1, Token2 );
fields[3] = database.substring( Token2+1, Token3 );
fields[4] = database.substring( Token3+1, Token4 );
fields[5] = database.substring( Token4+1, database.length );

if ( fields[0] == strID_NUM &&
fields[2] == strPRICE &&
fields[3] == strNAME &&
fields[5] == strADDTLINFO
) {
bAlreadyInCart = true;
dbUpdatedOrder = strID_NUM + "|" +
(parseInt(strQUANTITY)+parseInt(fields[1])) + "|" +
strPRICE + "|" +
strNAME + "|" +
strSHIPPING + "|" +
strADDTLINFO;
strNewOrder = "Order." + i;
DeleteCookie(strNewOrder, "/");
SetCookie(strNewOrder, dbUpdatedOrder, null, "/");
notice = strAdded + "n-------------------------------------n" + "Quantity : " + strQUANTITY + "nProduct : " + strNAME;
break;
}
}


if ( !bAlreadyInCart ) {
iNumberOrdered++;

if ( iNumberOrdered > 12 )
alert( strSorry );
else {
dbUpdatedOrder = strID_NUM + "|" +
strQUANTITY + "|" +
strPRICE + "|" +
strNAME + "|" +
strSHIPPING + "|" +
strADDTLINFO;

strNewOrder = "Order." + iNumberOrdered;
SetCookie(strNewOrder, dbUpdatedOrder, null, "/");
SetCookie("NumberOrdered", iNumberOrdered, null, "/");
notice = strAdded + "n-------------------------------------n" + "Quantity : " + strQUANTITY + "nProduct : " + strNAME;
}
}

if ( DisplayNotice )
alert(notice);
}[/CODE]


Any assistance to resolve the problem of the "add" button not adding products from the home page.

As stated, the site has been migrated from a Linux server to a Windows server. I'm new using Windows Server, so have no idea where to look to find out what type of Windows Server is being used would also be helpful.

Thanks for your assistance.
×

Success!

Help @Jardry spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...