Forums / General Questions / Shopping gone after edit of Shopping_cart.php file

Shopping gone after edit of Shopping_cart.php file

Locked

Views: 1,705

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
4 Jan 2010, 4:06 PM
#1
pritchb avatar

pritchb

New Zenner

Join Date:
Dec 2009
Posts:
16
Plugin Contributions:
0

Shopping gone after edit of Shopping_cart.php file

I screwed up my shopping cart somehow while trying to comment out the default message. Could someone please look at this file? I'm sure there is a syntax error somewhere.

<?php/** * @package languageDefines * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: shopping_cart.php 3183 2006-03-14 07:58:59Z birdbrain $ */define('NAVBAR_TITLE', 'The Shopping Cart');define('HEADING_TITLE', 'Your Shopping Cart Contents');define('HEADING_TITLE_EMPTY', 'Your Shopping Cart');define('TEXT_INFORMATION', 'You may want to add some instructions for using the shopping cart here. (defined in includes/languages/english/shopping_cart.php)');define('TABLE_HEADING_REMOVE', 'Remove');define('TABLE_HEADING_QUANTITY', 'Qty.');define('TABLE_HEADING_MODEL', 'Model');define ('TABLE_HEADING_PRICE','Unit');define('TEXT_CART_EMPTY', 'Your Shopping Cart is empty.');define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');define('SUB_TITLE_TOTAL', 'Total:');define ('OUT_OF_STOCK_CANT_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock or there are not enough in stock to fill your order.<br />Please change the quantity of products marked with (' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '). Thank you');define('OUT_OF_STOCK_CAN_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock.<br />Items not in stock will be placed on backorder.');define('TEXT_TOTAL_ITEMS', 'Total Items: ');define('TEXT_TOTAL_WEIGHT', '  Weight: ');define('TEXT_TOTAL_AMOUNT', '  Amount: ');define('TEXT_VISITORS_CART', '<a href="javascript:session_win();">[help (?)]</a>');define('TEXT_OPTION_DIVIDER', ' - ');?>

Thanks

4 Jan 2010, 4:23 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Shopping gone after edit of Shopping_cart.php file

It looks like you have edited that file in some program that has stripped out all the newline formatting. If that is the case, there's no telling what other things it may have done. What did you use for editing?
The posted code is really hard to read, but I don't see any errors that would cause problems.

4 Jan 2010, 4:30 PM
#3
pritchb avatar

pritchb

New Zenner

Join Date:
Dec 2009
Posts:
16
Plugin Contributions:
0

Re: Shopping gone after edit of Shopping_cart.php file

I used notepad. When I opened it the 1st time it had the formatting. After I saved it the formatting was lost. I thought you could use notepad to edit php files.

4 Jan 2010, 5:15 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Shopping gone after edit of Shopping_cart.php file

You can, if the settings are right. I have seen Notepad turn all single-spaced files into double-spaced - I haven't used it in so long that I forget the exact word-wrap or whatever settings are ok. A much better tool is Notepad++, free from Sourceforge. It is built for editing files and will auto-highlight PHP or HTML syntax. It can show you if you have left out a closing quote (all the rest of the file after that will go gray) and much more.

4 Jan 2010, 5:40 PM
#5
pritchb avatar

pritchb

New Zenner

Join Date:
Dec 2009
Posts:
16
Plugin Contributions:
0

Re: Shopping gone after edit of Shopping_cart.php file

Thanks, I'll get the notepad ++