johnglobal Posted September 16, 2002 Share Posted September 16, 2002 Hi all I want to add some extra fields to the product database so they are displayed in product_info.php eg. Qty in box: 1000 Length: 2 meters Adding the fields to the database is no problem I tried to get product_info to echo the info back out but I cant get it to work.... Anyone know how to do this? Thanks John Link to comment Share on other sites More sharing options...
♥olby Posted September 16, 2002 Share Posted September 16, 2002 I've added some extra fields to table products_description, and I retrieve them in products_info.php in this line: $product_info = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_weight, p.products_image, p.products_mimage, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, pd.products_wash, pd.products_dry, pd.products_fabric, pd.products_delivery from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'"); pd.products_wash is one of the extra fields. p.<field_name> = field from table products pd.<field_name> = field from table products_description All you need now is to echo them at the right places. Best Regards olby Link to comment Share on other sites More sharing options...
johnglobal Posted September 17, 2002 Author Share Posted September 17, 2002 Thanks olby I am almost there I managed to add the field to the db using phpmysql, and it now displays the extra field contents just fine on the catalog side. i.e product_info.php. (added product_length to table product_description) I now have a new problem: I tried to edit catogries.php in admin to allow the store owner to add different lengths for each product. Everything appears to work fine, however when it tries to insert the info into the database it only inserts the second letter or digit. It appears to be writing the other letters across the 3 language records. Anyone know how to fix this, I know I must have made a mistake in catrogies.php but I cant find it. Thanks John Link to comment Share on other sites More sharing options...
♥olby Posted September 17, 2002 Share Posted September 17, 2002 Cant help you there. I use myODBC and Access 2000 to create and edit products, so I havent made any changes in the admin-modules. Best Regards olby Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.