Jump to content

wdepot

Members
  • Content count

    53
  • Joined

  • Last visited

Posts posted by wdepot


  1. I've finally gotten MariaDB 10.5 working on my test server so I could install the database for osCommerce 4. I got past that, set up the company information, loaded the sample data and got to the final page of the install where the middle of the screen shows a 404 Error but you have links to go to the site or admin so I'm assuming everything was set up properly.

    However all I get when I go to either the catalog site or the admin page is an error message that says an internal server error occurred. Or a least that is all I get when I use PHP 8.0 or 7.4. If I use PHP 8.1 I get the following:

    Quote

    An internal server error occurred.
    Deprecated: Return type of yii\web\HeaderCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/e-smith/files/ibays/osc4/html/lib/vendor/yiisoft/yii2/web/HeaderCollection.php on line 37

    Deprecated: Return type of yii\web\HeaderCollection::offsetExists($name) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/e-smith/files/ibays/osc4/html/lib/vendor/yiisoft/yii2/web/HeaderCollection.php on line 193

    Deprecated: Return type of yii\web\HeaderCollection::offsetGet($name) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/e-smith/files/ibays/osc4/html/lib/vendor/yiisoft/yii2/web/HeaderCollection.php on line 206

    Deprecated: Return type of yii\web\HeaderCollection::offsetSet($name, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/e-smith/files/ibays/osc4/html/lib/vendor/yiisoft/yii2/web/HeaderCollection.php on line 219

    Deprecated: Return type of yii\web\HeaderCollection::offsetUnset($name) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/e-smith/files/ibays/osc4/html/lib/vendor/yiisoft/yii2/web/HeaderCollection.php on line 231

    Deprecated: Return type of yii\web\HeaderCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/e-smith/files/ibays/osc4/html/lib/vendor/yiisoft/yii2/web/HeaderCollection.php on line 48

    So it would appear that osCommerce 4 is either not safe of PHP 8.1 or something about the internal server error is also causing the deprecated warnings. I'm not sure where to go from here since I have no idea what is causing the error. I was really hoping to try osCommerce 4 out but so far I'm not having much luck.


  2. After I realized that I had forgotten to turn on display_errors for my test ibay I discovered the source of the problem. I get a fatal error every time the database creation gets to the first table that has a default of CURRENT_TIMESTAMP on a datetime field. Apparently the check for a MySQL database fails to check the version of MySQL installed on the server. My test server has MariaDB 5.5.8 installed. Some research showed that MariaDB doesn't support CURRENT_TIMESTAMP as a default on a datetime field until version 10. The install program step 2 should have flagged MySQL as not being a recent enough version. Now I need to see if I can update the version of MariaDB on my test server.


  3. Okay after looking at the initial install code I noticed the die() command at the end of the ajax_unpack function. I took a look at the ibay and everything seemed to be unpacked properly and so I simply pointed my browser to the ibay again to see what would happen. That got me to the beta licensing agreement and from there I can get through step 3 creating the database but once it loads that I got to a totally blank page and never get step 4 settings or step 5 admin account. What do I do next?


  4. Now that things are beginning to slow down at work I finally have a bit of time to try and check out osCommerce 4 beta 2 to see what I'm going to have to do to update our highly modified osCommerce 2.3 web site. I'm trying to install it on our test server (SMEServer 10 in a new ibay set to run PHP 8.1) but I'm getting stuck at the Unpacking Installation Files stage. It has been sitting on that step 2 page with the spinning wheel for well over a half hour and the disk access light on the test server computer is not blinking any longer so I would assume the zip folder should have been unzipped by now. What do I do next?


  5. I'm very glad to see that osCommerce 4 is apparently going to include size information to use on products for shipping purposes since basically all carriers now charge dimensional weight if a package is large but light. I assume that there will be some setup for available boxes to use for shipping to go with this. I would interested in knowing if osCommerce 4 will allow for single products that come in multiple packages for shipping purposes, like the split products portion of the dimensional weight contribution that is available for osCommerce 2.3.x. I would also hope that the packaging routine for osCommerce 4 doesn't do like the one in the aforementioned dimensional weight contribution and add products to a box based solely on the calculated remaining volume. We have had more than one instance of our 2.3.4 packager using a particular size box for a rate quote that the products won't all physically fit in to because of the dimensions of the products even though the total product volume is less than the volume of the box. Each product is checked to be sure it will fit in the box individually, but it doesn't check to see if they will fit in the box together with the other products based on their dimensions.


  6. 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.


  7. Hi.

     

    I've just installed this add on, and as it said in its description, it's a very easy install. However I have a couple of questions about it. In the install.txt the instructions say edit the file catalog/includes/general.php. This file doesn't exist in my install - there is however a general.php in catalog/includes/functions - is this the file I should edit, and if not should I create a general.php in catalog/includes? When I did install by editing the functions/general.php, the resulting categories box is very untidy, with every category and sub-category listed, the list not keeping inside the box. Thanks in advance.

     

    Yes, the new function should be added to catalog/includes/functions/general.php as you suspected.


  8. 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.


  9. Hi, just an idea for a modification for the bundled products contrib:

    I want to use this contrib for selling product variations (just like options) not bundles.

    There would be a master product that contains sub-products that can be bought. For example,

    the master would be an apple, the sub-products would be a green apple, a red apple and a yellow apple.

    The difference to product attributes is, that every sub-product is a product for itself (e.g. model no., picture, price, title, stock...).

    I need that, because our facturing system and some export tools (like amazon, shopping.com) can't handle attributes.

     

    Has anyone used the contrib in that way or has anyone an idea how to modificate it?

     

    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.


  10. 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.


  11. OK I think I found where the problem is, but it is beyond my knowledge. This is the code from catalog/admin/prod-img-manager

     

     

    Also I found that I'm not able to delete a image that was already uploaded.

     

    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.


  12. Hi there all.

     

    I'm using Product Extra fields to add ISBN, Author, etc, to the products for a store I'm setting up. I've run into a situation where there are a limited number of options for one field (Ex. Binding: Hardcover, Softcover, Spiral). Is there an add-on that would allow me to create extra fields, but use radio buttons or a select field to choose the option? I have visions of the store admin going mad as they add new products and have to type the attributes each time.

     

    This is purely for the admin side, customers would only see the text value.

     

    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.


  13. Maybe I wasn't very clear last time :s

     

    Everything works, no problems with this contribution.

    The only thing I want to do is, is being able to have a new field only visible in the admin section and not on the catalog side.

    While some other new fields should be visible in the admin and in the catalog section.

     

    In this way I can add extra information which I can use (like adding the supplier for a specific product), but is not relevant for my customers

     

    Does someone know a solution for this? Maybe something hardcoded in this section?

     

    Kind regards

     

    Version 2.2 of the contribution addresses this request.


  14. 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.


  15. 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 //-->

    Very nice contrib!

     

    I would like to know if there's a way to put these variables to the advanced search box contrib. (advsearch.php)

     

    Maybe it is very easy to do so, but....

     

    The code of advsearch.php is:

     

     

    The code of advanced_search.php with the Extra Product Fields 1.0 is:

     

     

    Is there a way to integrate this in advsearch.php box?

     

    Please help


  16. Oops, got the wrong type of link. The contribution is found at:

    http://addons.oscommerce.com/info/6856

    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.


  17. 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.

     

    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,

  18. 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.

     

    :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.


  19. :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.

     

    Extra Product Fields 1.0

     

    First of all, thanks a bunch to “wdepot” for this great contribution! This is exactly what I am looking for.

     

    After carefully following the installations procedures I encountered a major problem which I hope someone can help me get around:

     

    When I click “Create New Extra Field” under the Extra Product Fields nothing happens at all.

     

    I went through the installation procedure twice under two different environment thinking that maybe with a fresh installed osCommerce would work but not luck.

     

    Any ideas please??

     

    Thanks in advance!

     

    Mrstech.

     

    P.S.: Here is the link to the contribution: http://addons.oscommerce.com/info/6856


  20. 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:

     

    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.

×