Jump to content


  • Content count

  • Joined

  • Last visited

Everything posted by Butch

  1. This is the support thread for the Advanced Categories Admin (ACA) contribution that can be found here: www.oscommerce.com/community/contributions,2611 What is does: - Instead of modifying categories.php for each contribution, modifications are inside modules. - Installing a contribution that have a module is now as simple as copying a file. - Very fast update and installation accross projects having different contributions installed. - 'Old style' installation is still possible. - Works with osC 2.2 MS2 Please note: - The basic ACA package does not give more functionalities than the stock osC, modules need to be installed for that. - Modules can be found with their respective contribution.
  2. Yes you can install this contribution: from the contribution you mention, follow the instructions to install the html editor for the email and newsletter (and mainpage?) but not for the product description (do not modify categories.php). In the ACA instructions you can find how to switch on the html editor (one line to change in categories.php if not already done). It works? Chris
  3. Put configure.php in the /includes folder (rename the existing one before that of course). I had a problem once with this configuration, can be same here. Chris
  4. Comment the following line and you should see the original editor: //$products_modules-> register_module ('html_area.php','products_ms2'); Do you? If not then the problem is not with htmlarea. Do you have a configure.php file in your admin/includes/local folder? Chris
  5. Do you have this in your "new" categories.php? $products_modules-> register_module ('products_ms2.php'); // Add htmlarea 1.7 functionality $products_modules-> register_module ('html_area.php','products_ms2'); From which contribution did you take htlmarea? is it verison 1.7? Is it so that with the new categories.php you don't have any editor? That sounds weird as if there is a problem with htmlarea, at least the old editor should show up. Please note also that htmlarea works only with Internet Explorer >=5.5! Chris
  6. In the admin side, under "Configuration", you should now have a new section "WYSIWYG Editor 1.7" where you can set many parameters. First one should be "Product descriptions use wysiwyg htmlarea?", enable it and it should work. Chris
  7. The parts of contributions that does not involve categories.php must be installed like usually. It means that you have to copy the htmlarea folder to your admin folder and process the SQL file with for example phpMyAdmin. After that you can turn htmlarea on from the admin panel and see it in the product editor. Chris
  8. The ACA module has been added today, check the Margin Report contribution (1594). Chris
  9. Just follow the instructions given in Master Products, here a the file where to do the modifications: When it says: FIND THE FIRST OCCURANCE OF switch ($action) { => this is in admin/categories.php When it says: FIND THE SECOND OCCURANCE OF switch ($action) { => this is in admin/includes/categories_right_panel.php When it says: FIND THIS default: if ($rows > 0) { => this is in admin/includes/categories_right_panel.php
  10. The contribution has been updated to v1.0a, here is the changelog: v1.0a, 7 dec 2004: - Removed registration of categories description module in categories.php as it is not included in the package. (Was giving an error because of missing module) - Added htmlarea 1.7 in the package, no need to dowload it separately. This is used by image_upload category module and html_area product module (which are included in ACA). - Updated install instructions. Known modules at this time: Category modules: - Jpsy image uploader for category image: included. - Category Description (contribution 1373): Find it here Product modules: - htmlarea wysiwyg editor for product description: included. - Jpsy image uploader for product image: included. - Product Extra Fields (contribution 2202): Find it here - Header Tags Controller (contribution 207): Find it here
  11. Butch

    ACA and Modules

    Few answers: - With ACA, the look of the product/category editor is quite same as the original, some lines are added with each contribution installed. - You can find the modules with their respective contribution. - To use a module, it must be registered at the beginning of categories.php, otherwise nothing will show up in the product editor (That's probably why you don't have Extra Fields and no image uploader). See install instruction given with the modules. - Version 2.3.5 seems to be a valid full package for header tags controller.
  12. Here are some answers: - Empty fields are not displayed in the product info. - If fields are not empty but do not show up, check if they are saved in the database, it can be a problem in the admin installation. - If you use the friendly URL option, take version 2.0b - To have the extra fields showing somewhere else in the product info page, take the code added by extra fields contribution and put it after the "product_description" instead of before. - If you use ACA and have an error with the a line like "register ... category_description.php", just comment the line and read the install instruction to register the Product Extra Fields module inside categories.php
  13. Just comment the line if you are not using the Category Description contribution. This is a mistake in the package. Modules are not included in the ACA contribution because it would be difficult to maintain, but are included with their own contribution. The modules you use must be registered in categories.php, so in your case you must do it for the Products Extra Fields.
  14. Butch

    [Contribution] Extra Fields

    It seems that a previous modification (master products?) eats the $products_id variable. Look at the SQL query: WHERE ptf.products_id= and ptf.products_extra_fields_value<>'' There is no product ID after ptf.products_id= Extra fields won't work without this ID.
  15. Butch

    [Contribution] Extra Fields

    I've just posted version 2.0 of this contribution, which finally supports multi languages. You now have the choice to display the fields in all languages, like before, or only in one. (I mean that each field can be separately configured). Update is quite easy. Post here if any problem.
  16. Butch

    [Contribution] Extra Fields

    To KiLLah: In your $HTTP_POST_VARS listing, you can see that there is one extra field: ["extra_field"]=> array(1) { [2]=> string(4) "Testing extra". If it is not in database, error is in the switch ($action), case 'update_product'. Here is the code I have in this section: // START: Extra Fields Contribution (Chapter 1.2) $extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id = " . (int)$products_id); while ($products_extra_fields = tep_db_fetch_array($extra_fields_query)) { $extra_product_entry[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value']; } if ($HTTP_POST_VARS['extra_field']) { // Check to see if there are any need to update extra fields. foreach ($HTTP_POST_VARS['extra_field'] as $key=>$val) { if (isset($extra_product_entry[$key])) { // an entry exists if ($val == '') tep_db_query("DELETE FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " where products_id = " . (int)$products_id . " AND products_extra_fields_id = " . $key); else tep_db_query("UPDATE " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " SET products_extra_fields_value = '" . tep_db_input($val) . "' WHERE products_id = " . (int)$products_id . " AND products_extra_fields_id = " . $key); } else { // an entry does not exist if ($val != '') tep_db_query("INSERT INTO " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " (products_id, products_extra_fields_id, products_extra_fields_value) VALUES ('" . (int)$products_id . "', '" . $key . "', '" . tep_db_input($val) . "')"); } } } // Check to see if there are any need to update extra fields. // END: Extra Fields Contribution Try to 'echo' some values inside this code, to see what is really processed (and keep the tep_redirect commented). I have started the multi-language version, ready soon...
  17. Butch

    [Contribution] Extra Fields

    So problem should be with the update of fields in database. In the switch ($action) near begining of categories.php, find case 'update_product': and add this right after: var_dump ($HTTP_POST_VARS); and comment the last line of this case, just before the break: // tep_redirect (... Try to insert or update a product having extra fields. The var_dump instruction will display on the screen the variables that have been posted. Extra fields should be there. If they are, check the extra fields code for the update (chapter 1.2). If they are not, problem is with the re-posted values that we discussed previously.
  18. Butch

    [Contribution] Extra Fields

    Sounds like the extra fields parameters are not going from preview page to database. Values are probably not posted correctly: $HTTP_POST_VARS['extra_field'] is empty and therefore values are not saved to database and you get the error message when trying to view it as preview "read only" (preview from product list). The code to check is in categories.php of course, chapter 1.6 of the installation procedure. The location of the modification is maybe confusing in the doc, try to find the comment /* Re-Post all POST'ed variables */ and some lines more down you find the code that the chapter 1.6 speaks about. My code looks like that: <?php /* Re-Post all POST'ed variables */ reset($HTTP_POST_VARS); while (list($key, $value) = each($HTTP_POST_VARS)) { if (!is_array($HTTP_POST_VARS[$key])) { echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value))); } } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']]))); echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']]))); echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']]))); } echo tep_draw_hidden_field('products_image', stripslashes($products_image_name)); // START: Extra Fields Contribution (chapter 1.6) if ($HTTP_POST_VARS['extra_field']) { // Check to see if there are any need to update extra fields. foreach ($HTTP_POST_VARS['extra_field'] as $key=>$val) { echo tep_draw_hidden_field('extra_field['.$key.']', stripslashes($val)); } } // Check to see if there are any need to update extra fields. // END: Extra Fields Contribution echo tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . ' '; Good luck
  19. Butch

    [Contribution] Extra Fields

    There is no language files for this contribution as all informations are in database. The best way, for me, would be to add a language dropdown box in the admin part, so for each extra field we could choose the corresonding language or "all languages" if the field name and values are same in all the languages of the shop (for example: forum - http://forum.oscommerce.com.....). It means one more field in the products_extra_fields table, modifying the categories.php for editing and updating the fields, modifying product_info.php to retrieve the correct language fields. That's it. This is something I can do but not today... Chris
  20. Butch

    [Contribution] Extra Fields

    Hi, I suppose the error comes because there is no extra fields defined for the product you want to preview (fields are empty), and the foreach loop does not like empty arrays => you can try to replace the foreach loop by this one: reset ($extra_fields_array); while (list ($key, $val) = each ($extra_fields_array)) { Chris
  21. Butch

    Cash On delivery

    There is a COP module (cash on pick-up), contribution 1041 which does exactly same as COD but with different texts. Like that you can have COD and COP same time. There is also a Store Pickup shipping module (contribution 164) that can be interesting or you probably already have it. With COP you can choose with which shipping method it will show up. Same with COD if you take the module from contribution 1633 (COD module from 18. november 2004 update). Modules work fine in my shop. Chris
  22. Seems that I like to post today... One detail, maybe somebody pointed it out already but I didnt see: allprods.php line 20, NAVBAR_TITLE must be used instead of HEADING_TITLE for the $breadcrumb.
  23. Sorry I wrote too fast the previous post. To get the product list only in the selected language, see the following code, it starts at line 84 for me: - WHERE clause added in $languages_query - for loop as comment. - $i=0 added to point to the only row of $languages_array $languages_query = tep_db_query("select languages_id, name, code, image, directory from " . TABLE_LANGUAGES . " WHERE languages_id=".(int)$languages_id." order by sort_order"); while ($languages = tep_db_fetch_array($languages_query)) { $languages_array[] = array('id' => $languages['languages_id'], 'name' => $languages['name'], 'code' => $languages['code'], 'image' => $languages['image'], 'directory' => $languages['directory']); } // Next line commented to get a product list according to selected language. // for ($i=0; $i<sizeof($languages_array); $i++) { $i=0; $this_language_id = $languages_array[$i]['id']; $this_language_name = $languages_array[$i]['name']; $this_language_code = $languages_array[$i]['code']; $this_language_image = $languages_array[$i]['image']; $this_language_directory = $languages_array[$i]['directory']; echo " <tr>\n";
  24. If you want to display only one language at a time, then forget the modification of the precedent post and just put the line 91: for ($i=0; $i<sizeof($languages_array); $i++) as comment. Like that only the current language will be processed, no more loop. You can also get rid of some more lines if you don't want the loop, but let's keep it simple for now.
  25. I'm using v2.61 and the Spacecowboy's patch for multiple languages did not work for me: I have 3 languages configured, and the patch displays 3 times each product, but all with same language. Solution is in the allprods.php, line 107, $products_query: replace $languages_id by $this_language_id. Now it works...