Jump to content

wdepot

Members
  • Content count

    47
  • Joined

  • Last visited

Everything posted by wdepot

  1. 1. filenames.php is active through all versions of osCommerce 2.3. Maybe in 2.4 they are removing it but the contribution wasn't updated for 2.4 but for 2.3 2. I thought I had updated the instructions to say that the htaccess (or httpd.conf) needed to point to the actual location of the http_error.php file. 3. The pop up search comes directly from the advanced_search.php file since the search portion of the error document was copied directly from the advanced_search.php file that came with osCommerce 2.3.4. Download a copy of osCommerce 2.3.4 and use the pop up search file from that if your version is missing the file.
  2. Yes, the new function should be added to catalog/includes/functions/general.php as you suspected.
  3. I've just posted an update to the Extra Product Fields contribution at http://addons.oscommerce.com/info/6856 which adds the ability to restrict extra fields to being available only to products which exist in certain categories.
  4. I've just posted an update to the Extra Product Fields contribution at http://addons.oscommerce.com/info/6856 which fixes a small bug during field creation where a question related only to text fields was being required during the creation of a list type field. I also added an install instruction so that existing Extra Fields are properly handled if a language is added or deleted using Admin/Localization/Languages.
  5. I've just posted an bug fix to the Extra Product Fields 2.3 contribution at http://addons.oscommerce.com/info/6856 which fixes a failure to hide a restricting field dropdown if that field is set as not applying to the category being browsed.
  6. wdepot

    Bundled Products

    Bundled Products version 2.0 has been posted to the contribs. New features include: --Changed database definitions of the fields so that the type of the ids in the product_bundles table is the same as the products_id in the products table. Also changed the products_bundles definition from tinytext to enumerated to save database space. --Replaced hardcoded language in categories.php with defined language. --Added capability of properly duplicating product bundles in categories.php. --Added instruction for properly deleting a bundle. --Added preview of bundle information in categories.php to match the one in product_info.php. --If the same product is added to a bundle twice the quantities are combined so that only one line per subproduct exists in the product_bundles table which enables PRIMARY indexing on this table. --Added headings for the Bundled products columns during edit, hid the fields for the subproduct ids, and disabled entry in the subproduct name fields to prevent possible errors that might be caused by tampering with these fields during entry/editing. --Changed code that only allowed bundles to be nested one level to allow nesting to any level. --Added code to prevent adding to a bundle another bundle that, directly or via nested bundles, contains the bundle being edited. --Added code for checking bundle stock that was missing from checkout_payment.php. --Added code to verify that a product marked as a bundle actually is one. If a product is marked as a bundle during editing in categories.php but no products are added to it the bundle will be changed to "no" while saving the product in the database. --Bundle weight is calculated automatically from the products it contains when saving the bundle to the database. --Added code for the packaging routines added to the shopping cart class by the UPSXML contribution so that information for bundle products comes from the products contained in the bundle.
  7. wdepot

    Bundled Products

    It sounds to me like you just need to create entirely new products instead. Use the Copyto/Duplicate function if most of the information will remain the same and you could save yourself some typing.
  8. I suspect you may be running into a permissions problem here. In order to create a thumbnail image the product_thumbnails directory and every product image directory that it contains must be able to be read AND written by your web site. Assuming you were previously using osCommerce, set the permissions the same as you had on the original catalog/images folder. This holds true for all of the new folders for this contribution. The same problem is probably causing the problem with deleting an image. Both the image file itself AND the directory that contains it must be writable by your web site in order for the prod-img-manager program to be able to delete the file. Normally the directory permissions should be set to the minimum required to allow your admin site to write to the image directories. If your site directories are owned by PHP you should be able to set the directory permissions to 755. If PHP is in the same group as the owner of your site directories then permissions would have to be 775. And if PHP is merely considered a guest user of your site directories then you would have to set permissions on all of the image directories to 777. The default permissions on new image files uploaded by osCommerce is 777 so it is probably a directory permission problem that is causing the delete to fail.
  9. The Extra Product Fields contribution version 2 and higher allows you to easily create fields that use radio buttons, drop down lists or check boxes. It even includes a utility to convert data from Product Extra Fields to Extra Product Fields.
  10. You missed installing the code at the beginning of index.php that loads the $epf array with the extra field information. Since $epf doesn't get defined as an array the foreach ($epf as $e) creates an error.
  11. wdepot

    Extra product fields

    Version 2.2 of the contribution addresses this request.
  12. I haven't heard of the customer extra fields contribution. If the conflicting file names are simply the administration maintenance files like extra_fields.php you should be able to get by with renaming the file (don't forget to rename it's language file the same) and adjusting the define in filenames.php to match. If they use the same defined name (FILENAME_EXTRA_FIELDS) then things will be much more complicated and you would need to edit one of the contributions to use a totally new defined name. If the conflict is a database table (doubtful) then rename one table and adjust the define in database_tables.php. If there is a conflict in the defined name (TABLE_EXTRA_FIELDS) then once again you would need to totally edit one contribution. Best of luck to you.
  13. I had someone ask about integrating Extra Product Fields into the categories box but found it easier to put into the quick search box. Since this box isn't likely to have other modifications made to it I just posted the new search box file with extra fields integrated into it as part of the contribution. http://addons.oscommerce.com/info/6856
  14. For a text type Extra Product Field check the box for NO on the Uses List of Values question while creating your new field. You should then also set the maximum numbers of characters for the field as appropriate.

  15. wdepot

    Extra Product Fields 1.0

    It should be easy enough. The first section of code that builds the epf array you will copy directly from advanced_search.php since no changes need to be made to it. The section that displays the fields will need to be modified somewhat to work in the info box. I would probably do it as follows: $extras = ''; foreach ($epf as $e) { $extras .= '<tr><td class="infoBoxContents valign="top" colspan="3">' . $e['label'] . '</td></tr><tr><td class="infoBoxContents valign="top" colspan="3">'; if ($e['uses_list']) { $extras .= tep_draw_pull_down_menu($e['field'], tep_build_epf_pulldown($e['id'], $languages_id, array(array('id' => '', 'text' => TEXT_ANY_VALUE)))); } else { $extras .= tep_draw_input_field($e['field']); } $extras .= '</td></tr>'; } Then all you need to do is splice the $extras variable into the statement that sets $info_box_contents[] in the postion where you want it to appear. If you want the extras at the end break the: '</td></tr></table>' into '</td></tr>' . $extras . '</table>' If you want it to appear somewhere in the middle then break any </tr><tr> pair into this: </tr>' . $extras . '<tr> If you insert the extra fields before the price as I did in advanced_search.php then your final file would look like this: <!-- search //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_ADVSEARCH); new infoBoxHeading($info_box_contents, false, false); // begin Extra Product Fields $epf_query = tep_db_query("select e.epf_id, e.epf_uses_value_list, l.epf_label from " . TABLE_EPF . " e join " . TABLE_EPF_LABELS . " l where e.epf_status and e.epf_advanced_search and (e.epf_id = l.epf_id) and (l.languages_id = " . (int)$languages_id . ") and l.epf_active_for_language order by e.epf_order"); $epf = array(); while ($e = tep_db_fetch_array($epf_query)) { $epf[] = array('id' => $e['epf_id'], 'label' => $e['epf_label'], 'uses_list' => $e['epf_uses_value_list'], 'field' => 'extra_value' . ($e['epf_uses_value_list'] ? '_id' : '') . $e['epf_id']); } $extras = ''; foreach ($epf as $e) { $extras .= '<tr><td class="infoBoxContents valign="top" colspan="3">' . $e['label'] . '</td></tr><tr><td class="infoBoxContents valign="top" colspan="3">'; if ($e['uses_list']) { $extras .= tep_draw_pull_down_menu($e['field'], tep_build_epf_pulldown($e['id'], $languages_id, array(array('id' => '', 'text' => TEXT_ANY_VALUE)))); } else { $extras .= tep_draw_input_field($e['field']); } $extras .= '</td></tr>'; } // end Extra Product Fields $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'text' => '<table border="0" width="100%" cellspacing="0" cellpadding="1"><tr><td class="infoBoxContents" valign="top" colspan="3">' . BOX_ADVSEARCH_KW . '</td></tr><tr><td class="infoBoxContents" valign="top" colspan="3">' . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="15" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . tep_image_submit('button_quick_find.gif', BOX_HEADING_ADVSEARCH) . '</td></tr>' $extras . '<tr><td class="infoBoxContents" valign="top" colspan="3">' . BOX_ADVSEARCH_PRICERANGE . '</td></tr><tr><td class="infoBoxContents" valign="top" colspan="3">' . tep_draw_input_field('pfrom','','size="3" maxlength="4"') . BOX_ADVSEARCH_PRICESEP . tep_draw_input_field('pto','','size="3" maxlength="4"') . '</td></tr><tr><td class="infoBoxContents" valign="top" colspan="3">' . BOX_ADVSEARCH_CAT . '</td></tr><tr><td class="infoBoxContents" valign="top" colspan="3">' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ADVSEARCH_ALLCAT)))) . '</td></tr></table>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- search_eof //-->
  16. wdepot

    Extra Product Fields 1.0

    Oops, got the wrong type of link. The contribution is found at: http://addons.oscommerce.com/info/6856
  17. wdepot

    Extra Product Fields 1.0

    Hooray! I found the solution to the buttons not working in Internet Explorer. I've posted the updated and now working version to the contributions. You can download it at: http://addons.oscommerce.com/info/6856 Those who have already installed Extra Product Fields 1.0 need only replace the admin/extra_fields.php and admin/extra_values.php files. Everything else is the same. As a freebie I fixed a bug that I discovered when testing the new delete extra field value confirmation buttons.
  18. wdepot

    Extra Product Fields 1.0

    Okay, I've determined that the problem lies with Internet Explorer (or at least with version 8). The button works properly under Safari and Firefox. I'll see if I can figure out how to code it so that it will work properly under Internet Explorer as well and post an update, but for now you can get around the problem by replacing any tep_draw_input_field inside an <a> tag that has the last two parameters as "false, 'button'" with just the value of the second parameter. To give an example, for the Create New Extra Field button, on line 328 of extra_fields.php replace tep_draw_input_field('new', BUTTON_NEW, '', false, 'button') with BUTTON_NEW It won't look as nice as the button but at least you will be able to use the contribution.
  19. wdepot

    Extra Product Fields 1.0

    :huh: I'm afraid I'm not sure what the problem might be. I extensively tested the contribution before I ever posted it online. I used the standard tep_href_link function to create the link around the Create New Extra Field button so the link should work properly no matter where you have your admin folder. Just a thought: double check to make sure you followed step 14 in the instructions and make sure you did it on the right filenames.php file. You need to modify the ADMIN/includes/filenames.php file and not the catalog/includes/filenames.php. You may want to check the link by running the extra_fields.php file and then View Source Code in your browser. Scroll the source down to the beginning of the body_text. It should look something like this: <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading">Extra Product Fields</td> <td class="pageHeading" align="right"><img src="images/pixel_trans.gif" border="0" alt="" width="57" height="40"></td> </tr> <tr> <td colspan=2 align="right"><a href="http://PATH_TO_YOUR_ADMIN_SITE/extra_fields.php?action=new"><input type="button" name="new" value="Create New Extra Field"></a> </td> </tr> Check the href in the <A> tag and make sure that it is correct for your web site. In particular make sure that it is showing the correct path and that the file name and action are as shown above. If you use search engine friendly links it might show as "/extra_fields.php/action/new" instead (I'm not sure if osCommerce does this on the admin side or not). If the link is correct then the contribution SHOULD work as intended. If this still doesn't work you might try replacing the tep_draw_input_field('new', BUTTON_NEW, '', false, 'button') on line 328 of the extra_fields.php file with just BUTTON_NEW instead and see what happens. If the source code shown by your browser is correct but the link around the button doesn't work then I suppose the problem might be that your browser doesn't allow links to contain buttons.
  20. wdepot

    Newsletter products, HTML email

    I found the problem. It had to do with the fact that our html_output.php had an old version of the function for drawing pull down menus.
  21. wdepot

    Newsletter products, HTML email

    I'm trying to install Newsletter products 2.0 and am having trouble when trying to create or edit a newsletter. The page displays everything down to the Contents box and then quits. When I view the last lines of the source for the pages I see the following: <tr> <td colspan="2" class="main" align="center">You need only select products and a template if you are using the newsletter_products module</td> </tr> <tr> <td></td> <td class="main"> I've traced the point of stoppage down to line 313 in the new newsletters.php which reads as follows: <td class="main"><?php echo $products->choose_products(); ?></td> Can anyone tell me why the $products->choose_products() would be causing PHP to suddenly quit? Just in case it matters I did use a search and replace to convert all instances of $HTTP_GET_VARS to $_GET and all instances of $HTTP_POST_VARS to $_POST in this contribution before I installed it so it would match the rest of our site and I changed the three comma joins in newsletter_products.php to the word join so that it would work with MYSQL5. Otherwise I haven't changed anything in the contribution source code so I am at a loss to explain why this contribution would work for other people but not for us.
×