Jump to content

emikeu

Members
  • Content count

    14
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Emile
  1. emikeu

    [Addon} Theme Switcher

    Hello, Some people complaining about cart contents etc. displaying wrongly. Probably you had deselected everything and just downloaded the theme (at least that is what I did). Compare a working jquery-ui-x.x.x.css with the new css, you can copy/past all the missing lines .at the end of the file to the new theme. (probably all the lines under: ui-widget-shadow) Greetz
  2. OK, lets forget my first two posts. In responce to Dutchman's post (no 97) For this to function (I think) you need less lines to change? If you add a column to the database table products_description and want to make it editable in the admin area: You can use tab[1] as an example (change products_description in whatever (you like)). (I have shortened the codelines) GO TO: Catalog\product_info.php In Line 37 (on clean install) ad: " pd.whatever,"): $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.whatever, p.products_model, p.products_quantity, GO TO: catalog\admin\includes\functions\general.php Copy (and place under) line 545 to 550 (on clean install) and change products_description (second long line) in whatever (3x) function tep_get_whatever($product_id, $language_id) { $product_query = tep_db_query("select whatever from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and langua $product = tep_db_fetch_array($product_query); return $product['whatever']; } GO TO: catalog\admin\categories.php Copy (and place under) line 252 (on clean install) and change products_description in whatever (2x) 'whatever' => tep_db_prepare_input($HTTP_POST_VARS['whatever'][$language_id]), Copy (and place under) line 564 to 574 (on clean install) and change products_description (second long line) in whatever (4x) <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image' <td class="main"><?php echo tep_draw_textarea_field('whatever[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($whatever[$languages[$ </tr> </table></td> </tr> <tr> <td colspan=2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> OPTIONAL: If you want to make the content searchable: GO TO: catalog\advanced_search_result.php In Line 232 on (clean install) ad: " or pd.whatever"): if (isset($HTTP_GET_VARS['search_in_description]) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description or
  3. Sorry, just copied and past the code from a search, so now all lines are double, read through it. I did not put in the code as supposed, what is the coorrect way?
  4. Hello. I'm new here, my knowledge of PHP SQL etc. is very basic, so have mercy. Read through this forum and could not realy find the same issue/question. After trying several different approaches I did not manage to get this work the way I wan't to. Added fields to the database and all works. I managed to get it to work in admin, the problem is that the layout of the admin pages is now destroyed. About: "Tab menu section (TMS)" I managed to ad the extra fields to the admin products page, naming of the tms tabs products_description1 to 3. Like this. [codebox $TMS->tab[1]['content'] = $product_info['products_description1']; $TMS->tab[2]['content'] = $product_info['products_description2']; $TMS->tab[3]['content'] = $product_info['products_description3']; ITested what was needed for basic input and output. These are the changes needed: (searched: products_description1) [codebox] C:\server\www\myserver.dev\public_html\oscom1\oscom2\categories.php (10 hits) Line 271: 'products_description1' => tep_db_prepare_input($HTTP_POST_VARS['products_description1'][$language_id]), Line 271: 'products_description1' => tep_db_prepare_input($HTTP_POST_VARS['products_description1'][$language_id]), Line 625: $TMS->tab[$tabNo]['content'] = tep_draw_textarea_field('products_description1[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description1[$languages[$i]['id']]) ? stripslashes($products_description1[$languages[$i]['id']]) : tep_get_products_description1($pInfo->products_id, $languages[$i]['id']))); Line 625: $TMS->tab[$tabNo]['content'] = tep_draw_textarea_field('products_description1[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description1[$languages[$i]['id']]) ? stripslashes($products_description1[$languages[$i]['id']]) : tep_get_products_description1($pInfo->products_id, $languages[$i]['id']))); Line 625: $TMS->tab[$tabNo]['content'] = tep_draw_textarea_field('products_description1[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description1[$languages[$i]['id']]) ? stripslashes($products_description1[$languages[$i]['id']]) : tep_get_products_description1($pInfo->products_id, $languages[$i]['id']))); Line 625: $TMS->tab[$tabNo]['content'] = tep_draw_textarea_field('products_description1[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description1[$languages[$i]['id']]) ? stripslashes($products_description1[$languages[$i]['id']]) : tep_get_products_description1($pInfo->products_id, $languages[$i]['id']))); Line 711: <td class="main"><?php echo tep_draw_textarea_field('products_description1[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description1[$languages[$i]['id']]) ? stripslashes($products_description1[$languages[$i]['id']]) : tep_get_products_description1($pInfo->products_id, $languages[$i]['id']))); ?></td> Line 711: <td class="main"><?php echo tep_draw_textarea_field('products_description1[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description1[$languages[$i]['id']]) ? stripslashes($products_description1[$languages[$i]['id']]) : tep_get_products_description1($pInfo->products_id, $languages[$i]['id']))); ?></td> Line 711: <td class="main"><?php echo tep_draw_textarea_field('products_description1[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description1[$languages[$i]['id']]) ? stripslashes($products_description1[$languages[$i]['id']]) : tep_get_products_description1($pInfo->products_id, $languages[$i]['id']))); ?></td> Line 711: <td class="main"><?php echo tep_draw_textarea_field('products_description1[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description1[$languages[$i]['id']]) ? stripslashes($products_description1[$languages[$i]['id']]) : tep_get_products_description1($pInfo->products_id, $languages[$i]['id']))); ?></td> C:\server\www\myserver.dev\public_html\oscommerce\admin\includes\functions\general.php (3 hits) Line 552: function tep_get_products_description1($product_id, $language_id) { Line 553: $product_query = tep_db_query("select products_description1 from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'"); Line 556: return $product['products_description1']; C:\server\www\myserver.dev\public_html\oscommerce\product_info.php (2 hits) Line 37: $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_description1, pd.products_description2, pd.products_description3, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); Line 216: $TMS->tab[1]['content'] = $product_info['products_description1']; [codebox] (Don't realy know what I have done, only copied some code where I found products_description.) config: oscommerce 2.3.1 Windows 7 Ultimate Edition Service Pack 1 (64bit) Apache/2.2.21 (Win32) PHP/5.3.8
×