Print Page | Close Window

Commenting Out Code

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=1235
Printed Date: 22-April-2025 at 4:54am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Commenting Out Code
Posted By: Jackalope
Subject: Commenting Out Code
Date Posted: 17-November-2007 at 2:27pm

I was just checking our home page using the Searchwho spider utility just to see how our site looks to search engins. I noticed a bit of code that I wasn't sure should be there and should probably be commented out. Here's the code that showed in the spider results. It also showed when I viewed the source of our home page using Internet Explorer:

This file is part of ProductCart an ecommerce application developed and sold by Early Impact LLC ProductCart its source code the ProductCart name and logo are property of Early Impact LLC Copyright 2001-2003 All rights reserved You are not allowed to use alter distribute and/or resell any parts of ProductCart's source code without the written consent of Early Impact To contact Early Impact please visit www earlyimpact com Validate quantity field for product display option "m" */ function isDigit(s) { var test=""+s; if(test=="0"||test=="1"||test=="2"||test=="3"||test=="4"||te st=="5"||test=="6"||test=="7"||test=="8"||test=="9") { return(true) ; } return(false); } function allDigit(s) { var test=""+s ; for (var k=0; k 0) && (eval(fname value) != 0) && (type==1)) { TempValue=eval(fname value); TempV1=(TempValue/qty); TempV1a=TempValue*TempV1; TempV2=Math round(TempValue/qty); TempV2a=TempValue*TempV2; if ((TempV1a != TempV2a) || (TempV1 0) && (eval(fname value) != 0) && (type==0)) { TempValue=eval(fname value);

I thought that the first part was always commented out by Early Impact. I can't seem to find the file that is using this code to check if it is in fact commented like all the other files I see from Early Impact. Does anyone have any idea what file I should look at?

Thanks in advance.




Replies:
Posted By: RobertZ
Date Posted: 20-November-2007 at 12:14am

Hi Jackalope
Im no programmer but I recon you have a problem with having an extra % just above EI ecommerce stuff... Right here to be exact <script language="javascript"%>. It should be just <script language="javascript"> ( I had a quick look at your site to make this diagnoses).

 

I could be wrong, but  the % shouldnt be there.

 

Rob

 



Posted By: Jackalope
Date Posted: 20-November-2007 at 3:25am

Thanks Rob.

Well I've finally found the file containing the code that's not commented. It's in pcValidateQty.asp and it's within the PC directory. I've compaired it against some other PC javascript files and it doesn't appear to follow the convention of using <!--just beneath the <script language="JavaScript"> line, nor //--> just above </script> at the end of the file. I checked my backup files going back to v3.0 and this file was the same. Does that mean that everyone will have this showing up in their code when you view your PC home page code? I tried removing the offending % as you mentioned Rob, but that didn't do anything. I'll keep plucking away unless anyone has any other ideas.

Thanks again.



Posted By: RobertZ
Date Posted: 20-November-2007 at 10:20pm

Oh crap.... Your right... Its in ours as well...

Will have a look and report back...

EI this should be a fix on the next update..

Rob

Update... Couldnt find how to fix this either.. What Ive done is edited the file to get rid of the text, therefore its not shown on the home page and any other page.



Posted By: ProductCart
Date Posted: 21-November-2007 at 4:18am
Thanks for letting us know. That's really bizarre that it never came up as an issue. The browser must automatically ignore the % before the closing ">" as the code works properly. We've fixed it in our master files.

-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: Jackalope
Date Posted: 22-November-2007 at 1:39am

What change do I have to make to comment it correctly?

Thanks in advance.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net