fsiano Posted January 27, 2003 Posted January 27, 2003 Hello Everyone, I was wondering if anyone has ever added a feature where you can put an additional price information feature. For instance, You can put a Regular price of an item and have a sale price on each item. Kind of like saying regular price is $X dollars, but our price is $X2 dollars. It basically has no function other than being viewable when reading the product's information. I know my wording is a bit unclear, it is late and I am too tired to think hard. Let me know if anyone has ever done this Thanks Frank S
burt Posted January 27, 2003 Posted January 27, 2003 Hmmmn, not sure I'm understanding fully, but it sounds much like the "Special Offers" feature ?
gdfwilliams Posted January 27, 2003 Posted January 27, 2003 I am planning on implementing something like this soon. To clarify, I have to display Newsstand Price vs. Our Price. It should be as easy as adding an additional field to the product table and making the necessary changes to display/edit in admin/catalog. If you'd like to get started, I was going to start by looking at the [u=http://www.oscommerce.com/community/contributions,126]Add UPC numbers, SKUs, ISBN/ISSN, etc[/u] contribution. We may have to change the field name and type on install, but otherwise this should allow us to add an additional field, edit it in admin and display on product_info and elsewhere. Let me know how it works out. - GDW
gdfwilliams Posted January 27, 2003 Posted January 27, 2003 The readme file from the above contribution describes what has to be done. It's worth grabnbing the contribution for the sql files... This example uses prodct UPC. you can change it to use SKU, ISBN, or whatever you choose. You can adjust the length of the number of characters in the varchar from 12 to whatever you choose. If you use something other than UPC, you will also have to alter the "insert" statement and replace UPC with whatever. First - the following needs to be added to the Database under the products table. Or you can just use the upc.sql file. You can adjust the varchar value depending on what you need products_upc varchar(12) Yes Null To be able to toggle this feature on and off in admin - this will show up under the product listing category in the My Store section. It is already in the upc.sql file. INSERT INTO configuration VALUES ( '', 'Display Product UPC', 'PRODUCT_LIST_UPC', '1', 'Do you want to display the product UPC?', '8', '11', '', '', '', ' The following files will need changes admin/categories.php admin/includes/languages/english.php catalog/product_info.php catalog/includes/languages/english/default.php catalog/includes/modules/product_listing.php Changes admin/categories.php - search for any lines with "products_model" and right after it put "products_UPC" or ISBN or SKU YOu will see some statements like this 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), You would, on the line under that put 'products_UPC' => tep_db_prepare_input($HTTP_POST_VARS['products_UPC']), For this line tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, You would change it like this tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_UPC, products_image, And so on until the changes are done admin/includes/languages/english.php - search for define('JS_PRODUCTS_MODEL', '* The new product needs a model valuen'); and after that line add define('JS_PRODUCTS_UPC', '* The new product needs a upc valuen');/*added for upc*/ catalog/[product_info.php - file included. Make sure to check the file version number and if they differ then I would suggest the manual method. YOu can use the inlcuded file. However, if you have made previous changes to this file, then you can manually do the changes by searching for "products_model" and adding "products_UPC" after it. So you would search and find something like p.products_model, and would change it so it would look like p.products_model, p.products_UPC, catalog/includes/modules/product_listing.php - file included. Make sure to check the file version number and if they differ then I would suggest the manual method. You can manually make changes to this like listed above. catalog/includes/languages/english/default.php - Find this section and make the additions for the UPC <?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); Then find this 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_DESCRIPTION': $select_column_list .= 'pd.products_description'; break; 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'; and replace it with 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; case 'PRODUCT_LIST_DESCRIPTION': $select_column_list .= 'pd.products_description'; break; 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; or look for this line case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model'; break; and add the fllowing after it case 'PRODUCT_LIST_UPC': $select_column_list .= 'p.products_upc'; break;
Recommended Posts
Archived
This topic is now archived and is closed to further replies.