tkeats Posted November 27, 2002 Posted November 27, 2002 I've managed to muddle my way through most of this, however one part is giving me a hassle. 1. The read me states that I should add this 'products_upc varchar(12) Yes Null' to the database under products. I did this under phpMyAdmin. It seems to be present. 2. I have attempted a number of times to apply the next step to the database with no luck. INSERT INTO configuration VALUES ( '129', 'Display Product UPC', 'PRODUCT_LIST_UPC', '1', 'Do you want to display the product UPC?', '8', '11', '', '', '', ''); All I end up with is this returning.... mysql> INSERT INTO configuration VALUES ( '129', 'Display Product UPC', 'PRODUCT_LIST_UPC', '1', 'Do you want to display the product UPC?', '8', '11', '', '', '', ''); ERROR 1062: Duplicate entry '129' for key 1 mysql> (Yes, I do this via the shell access at the command line) I think I am missing something but unsure what. 3. Everything else seems to be added, I backed up the older files, and replaced them with the included 'php' files in this package. I dont see a UPC feild in the admin section for product additions.. Help? Thomas Keats --+-----------------------------------------------------------------------------+-- Guerrilla Marketing Bombshells. 28 Minutes a month to increasing your sales. http://www.gmktgb.com/pages/tkeats Quote A signature is something that reflects its user. - The dictionary The question is not, 'to code, or not to code' the question is, 'if we do not code, are we really alive?' -- anonymous
tkeats Posted November 27, 2002 Author Posted November 27, 2002 Ok, so I appearently am not even close to being done. I found one other issue.... I am double checking my work here. in catalog/includes/languages/english/default.php <?php /* $Id: default.php,v 1.18 2002/01/14 10:34:17 jan0815 Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'This is a demonstration online-shop, <b>any products purchased will not be delivered nor billed</b>. An$ define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); if ($category_depth == 'products' || $HTTP_GET_VARS['manufacturers_id']) { define('HEADING_TITLE', 'Let's See What We Have Here'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); // Added for UPC SKU on 11.26.2002 // define('PRODUCT_LIST_UPC' => PRODUCT_LIST_UPC, /*added 3/17/02 for upc*/ // End Mods // define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 ''); define('TEXT_NOW', '' now'); define('TEXT_ALL', 'All'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'What's New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> After applying this, I get an error on the main page. Parse error: parse error in /home/www/test.rainbowcomputers.ca/htdocs/catalog/includes/languages/english/default.php on line 24 Please note, that the information for modifying this file states this catalog/includes/languages/english/default.php - Find this section and make the additions highlighted<?php } elseif ($category_depth == 'products' || $HTTP_GET_VARS['manufacturers_id']) { // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, //for description to show in catalog 'PRODUCT_LIST_DESCRIPTION' => PRODUCT_LIST_DESCRIPTION, 'PRODUCT_LIST_UPC' => PRODUCT_LIST_UPC, /*added 3/17/02 for upc*/ 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); I simply want to know if I did this part right. (I have experience in some php, but never really delved into databases) Further, this is the last part of the modification instructions and I have NO CLUE where to put it. I assume as it claims no file, that it is the same as the above default.php, but there are no 'case' instructions in it. Find this section and insert the highlighted section case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model'; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name'; break; case 'PRODUCT_LIST_UPC': $select_column_list .= 'p.products_upc'; break; // Products Description Hack begins 3/22/02 case 'PRODUCT_LIST_DESCRIPTION': $select_column_list .= 'pd.products_description'; break; // Products Description Hack ends case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name'; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity'; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image'; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight'; break; I would like very much to have this modification completed today so I can keep on schedule (or damn close). Any help would be very much appreciated. Thomas Keats Quote A signature is something that reflects its user. - The dictionary The question is not, 'to code, or not to code' the question is, 'if we do not code, are we really alive?' -- anonymous
Guest Posted November 27, 2002 Posted November 27, 2002 mysql> INSERT INTO configuration VALUES ( '129', 'Display Product UPC', 'PRODUCT_LIST_UPC', '1', 'Do you want to display the product UPC?', '8', '11', '', '', '', ''); ERROR 1062: Duplicate entry '129' for key 1 mysql> (Yes, I do this via the shell access at the command line) I think I am missing something but unsure what. Help? Change the '129' to NULL and rerun the query. ;) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.