custompilotshirts Posted October 10, 2008 Posted October 10, 2008 I'd like to add some text to my shopping cart that reminds customers to press the update button when changing item quantity. This is a little confusing to some. My question is which file would take the text and what is the code that needs to come before and after the text. I tried the following line...... define('TEXT_INFORMATION', 'blah blah blah'.'); in the file includes/languages/english/shopping_cart.php. I put it on the last line and got an error on the site when I saved it. I put it back to the way it was and thought I'd ask the community for help. Thanks. Here is the entire shopping_cart.php file.... <?php /* $Id: shopping_cart.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ define('NAVBAR_TITLE', 'Cart Contents'); define('HEADING_TITLE', 'What\'s In My Cart?'); define('TABLE_HEADING_REMOVE', 'Remove'); define('TABLE_HEADING_QUANTITY', 'Qty.'); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product(s)'); define('TABLE_HEADING_TOTAL', 'Total'); 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 . ' dont exist in desired quantity in our stock.<br>Please alter 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 . ' dont exist in desired quantity in our stock.<br>You can buy them anyway and check the quantity we have in stock for immediate deliver in the checkout process.'); define('TEXT_ALTERNATIVE_CHECKOUT_METHODS', '- OR -'); ?>
failsafe Posted October 10, 2008 Posted October 10, 2008 Perhaps... define('TEXT_INFORMATION', 'blah blah blah'.'); should have been... define('TEXT_INFORMATION', 'blah blah blah.'); Otherwise all should have been fine. Sometimes it's the smallest of errors that cause the most trouble! :) It doesn't matter where in the file you put the line. Just choose a suitable looking place.
custompilotshirts Posted October 10, 2008 Author Posted October 10, 2008 Thanks... I put the code in the includes/languages/english/shopping_cart.php and the text is not showing up on the site. Any ideas? It's fun and frustrating learning this stuff. Rob CustomPilotShirts.com
failsafe Posted October 10, 2008 Posted October 10, 2008 Thanks... I put the code in the includes/languages/english/shopping_cart.php and the text is not showing up on the site. Any ideas? It's fun and frustrating learning this stuff.Rob CustomPilotShirts.com Errrrr, you have included the reference TEXT_INFORMATION in the original shopping_cart.php file too haven't you? Just putting it in the language file isn't enough. You need to actually use it somewhere in your code. Silly question I know, but... :)
custompilotshirts Posted October 10, 2008 Author Posted October 10, 2008 I think you may be on to something here. I didn't include it in my main shopping_cart.php file because I didn't know I had to. That's what your dealing with here. I'm looking at other files in the main directory that would accomplish the same thing and I can't figure out the exact code and exactly where to put it. I do feel, if I learn it now I'll be that much more prepared to do the same thing in the future and not bug everyone on this list. Rob www.CustomPilotShirts.com
Guest Posted October 10, 2008 Posted October 10, 2008 You could add it like this. Make sure to backup your file first. In shopping_cart.php find <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> Right after that add <tr> <td class="main"><?php echo TEXT_INFORMATION; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr>
custompilotshirts Posted October 10, 2008 Author Posted October 10, 2008 Outstanding! That did it. Thank You Very much.
mimeini Posted October 26, 2009 Posted October 26, 2009 So funny I found this. Custumpilotshirts question "I'd like to add some text to my shopping cart that reminds customers to press the update button when changing item quantity" was to the point what I was looking around for an solution to :-)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.