Jump to content

fourmat

Members
  • Content count

    82
  • Joined

  • Last visited

Everything posted by fourmat

  1. fourmat

    [Contribution] - USPS Methods

    I have a question about the following option: Int'l Package Sizes - Standard package dimensions required by USPS for international rates Width Length Height Girth How does his affect international quotes? My clients don't have any one size of box that they ship, so what kind of guidance can I give them as to how to fill these options in? If the size is over or under, how will that affect the final quote? Will it be high or low?
  2. fourmat

    [Contribution] - USPS Methods

    wkdwich: I'm in the same boat you are. I have many clients and each has their own special way they want to ship things. BE CAREFUL with the spending too much time and effort tuning the FedEx module because as of the middle of this year, that module will no longer work. Just as USPS is phasing out their API version, so is FedEx. I don't have the date at hand right now, but we're all going to have to pitch in to get a new module built for FedEx also. My next major addition to my system (I also used oscMax as a base) will be the MVS system. this will be a large undertaking, but I believe that it will be the only way to satisfy a lot of the issues that are brought up with a large number of varying product types. I could be wrong, and it could be a huge failure, but it's about the only option I have right now. The separate shipping option has been a huge pain in my backside for a while, and the UPS module seems to be the only shipping method that has fully implemented that successfully, which is why USPS is only being used for international shipments, and why I haven't implemented FedEx fully yet for the majority of clients. It would really be nice if there was a convergence of shipping methods/modules that would all use the same basis for handling 1) oversize packages, 2) single items that ship in multiple boxes 3) items that can't ship via a particular method (hazardous/aerosol) 4) etc etc. and each method/module could tap into the same base basic product designations, rather than have custom designations for each shipper. My hope is that MVS is at least part way there. To all on this forum. Thank you for the hard work in getting USPS fixed. This is truly what the community is all about.
  3. fourmat

    [Contribution] - USPS Methods

    I have installed 5.0.1 and everything seems to be working. The issue I have is the debug mail that gets generated on each query to USPS. It seems to be located in this area if ($http->Connect($usps_server, 80)) { $http->addHeader('Host', $usps_server); $http->addHeader('User-Agent', 'osCommerce'); $http->addHeader('Connection', 'Close'); if ($http->Get('/' . $api_dll . '?' . $request)) $body = $http->getBody(); mail('user@localhost.com','USPS rate quote response',$body,'From: <user@localhost.com>'); if ($transit && is_array($transreq) && ($order->delivery['country']['id'] == STORE_COUNTRY)) { while (list($key, $value) = each($transreq)) { if ($http->Get('/' . $api_dll . '?' . $value)) $transresp[$key] = $http->getBody(); } } $http->Disconnect(); } else { return false; } Can I just comment out the line with the mail function without adversely affecting anything? I'm getting flooded with bounces from the server...
  4. fourmat

    FEDEX WSDL for v3 to v2.2

    I agree, this module needs to be created to work reliably as FedEx will phase out support for the current version. I did some digging, and found this module for ZenCart: http://www.numinix.com/zen-cart-modules/shipping/fedex-smartpost-shipping-module I can't verify that it works for them, but in examining the underlying code, it appears that it is more feature rich, and is using the RateService_v9.wsdl which should support Smartpost. Hope this help someone...
  5. fourmat

    [Development] Products Specifications

    OK, I got it figured out right before your last post. I added filter ranges to the prices, and I saw that there is an option to import the manufacturers in the filters, which I didn't see documented anywhere. Seems to work well now. I went back through the PDF and looked for clues as to exactly how to set up the different fields but I didn't find anything that said explicitly how to set up different scenarios. I'm dense and sometimes I need more of a clue. We definitely need to write up some example filter scenarios to help newbies. With that being said, you have produced a well documented contribution that rivals any that I have ever installed in the 10 years I have been working with OSC, (I lost count as to how many are integrated into my latest system). You've done an extraordinary amount of work to get this to where it is. Maybe the rest of us can come up with a set of example scenarios to add to the docs to help you out. Lord knows I've utilized the OSC resources enough, and appreciate the work that everyone puts into this. Time to pay back.
  6. fourmat

    [Development] Products Specifications

    OK, next issue. I'm trying to get the specifications working with an existing database field, and I am having an issue getting any values to show up in either of the filter boxes (column left or subheader). Have tried manufacturer, price and retail price (my addition) columns without success. For instance, I am trying to create a filter based on products_price, and setting it to filter by range. I know it's picking up the specification and trying to create the filter because I have set the minimum filter number to 0 and it shows the Show All(#) and an initial range value of $0 as a valid filter in the column_left and subheader areas. But there are no other price value showing up. I have 30+ products with various dollar amounts in a single category. I need a little bit of clarification to make sure that I'm doing things correctly. 1) I am assuming that there doesn't need to be a specific filter value or a specification value created for the filter to show up. Is this correct? 2) Does there need to be a specific value entered in the "Enter Specification Values as" dropdown? I've been through several and haven't been able to get any values to show up 3) Is there a specific debug location that I can target a print or echo statement to try to get it to spit out the values or a clue? I have tried a few but so far I haven't been able to come up with anything specifically wrong. 4) Any other bit of wisdom would be appreciated. Thanks. Matt
  7. fourmat

    [Development] Products Specifications

    I just realized why I had an issue with the Get All Image. The SQL statement is not included in the products_specifications.sql file, so it isn't an option that is available in the admin configuration. I downloaded and checked the 1.0.1 and 1.0.2 versions and neither contains the sql statement. Jim, can you post the proper SQL statement to install that? I'm sure it was just an oversight.
  8. fourmat

    [Development] Products Specifications

    Ah yes, ok, I remember seeing that in the manual. And Yes I RTFM as you requested, but the complexity and detail of this contribution is a bit overwhelming at first. Awesome, but overwhelming. I'm getting it slowly...thanks again..
  9. fourmat

    [Development] Products Specifications

    Yes, The Filter Show All was set and it is being triggered correctly, but there wasn't anything being displayed, which is why I added the modification in the previous post. I actually use the SPECIFICATIONS_GET_ALL_IMAGE to trigger the mod. Was there supposed to be an actual image that is displayed to signify "Show All"? There are no images in the downloaded package that I can find and no reference to one int he code (I could be missing it if it's there). Have you experienced the issue that I had highlighted in the previous post with the out of order box labels?
  10. fourmat

    [Development] Products Specifications

    I found another issue the may be considered a bug, or just one of proper instruction. When I tested the specs system I created a bunch of generic specifications and populated all of the fields the same way. Because I was just adding specs, without knowing all of the ramifications, I added prefixes and suffixes to all the values. Though, I don't believe anyone would knowingly add those for an image, it does break the Image specification filter functions because it adds the prefix and suffix to the image filename in the temp_draw_images_menu function in includes/functions/products_specifications.php . Also there doesn't seem to be a way to add the TEXT_SHOW_ALL link for an image spec, so I modified the following function (default case) to add a text link: Original: function tep_draw_images_menu ($name, $values, $target, $default = '') { $field = ''; foreach ($values as $link_data) { if ($link_data['id'] == '0') { $link_data['text'] = SPECIFICATIONS_GET_ALL_IMAGE; } switch (true) { case ($link_data['count'] != '' && $link_data['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'none'): break; case ($link_data['count'] != '' && $link_data['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'grey'): //if ($link_data['text'] == ) $field .= '<span class="no_results">'; $field .= tep_image (DIR_WS_IMAGES . trim ($link_data['text']), $link_data['text'], SPECIFICATIONS_FILTER_IMAGE_WIDTH, SPECIFICATION_FILTER_IMAGE_HEIGHT, ' class="image_filter"'); $field .= '</span>'; break; default: $field .= '<a href="' . tep_href_link ($target, tep_get_array_get_params (array ( $name, 'page') ) . ($link_data['id'] == '0' ? '' : $name . '=' . tep_output_string ($link_data['id']) ) ) . '">'; $field .= tep_image(DIR_WS_IMAGES . trim ($link_data['text']), $link_data['text'], SPECIFICATIONS_FILTER_IMAGE_WIDTH, SPECIFICATION_FILTER_IMAGE_HEIGHT, ' class="image_filter"'); $field .= '</a>' break; } // switch (true) } Changed: function tep_draw_images_menu ($name, $values, $target, $default = '') { $field = ''; foreach ($values as $link_data) { if ($link_data['id'] == '0') { $link_data['text'] = SPECIFICATIONS_GET_ALL_IMAGE; } switch (true) { case ($link_data['count'] != '' && $link_data['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'none'): break; case ($link_data['count'] != '' && $link_data['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'grey'): //if ($link_data['text'] == ) $field .= '<span class="no_results">'; $field .= tep_image (DIR_WS_IMAGES . trim ($link_data['text']), $link_data['text'], SPECIFICATIONS_FILTER_IMAGE_WIDTH, SPECIFICATION_FILTER_IMAGE_HEIGHT, ' class="image_filter"'); $field .= '</span>'; break; default: //added TEXT_SHOW_ALL if ($link_data['text'] == SPECIFICATIONS_GET_ALL_IMAGE){ $field .= '<a href="' . tep_href_link ($target, tep_get_array_get_params (array ( $name, 'page') ) . ($link_data['id'] == '0' ? '' : $name . '=' . tep_output_string ($link_data['id']) ) ) . '">'; $field .= TEXT_SHOW_ALL; $field .= '</a><br clear=all>'; } else { $field .= '<a href="' . tep_href_link ($target, tep_get_array_get_params (array ( $name, 'page') ) . ($link_data['id'] == '0' ? '' : $name . '=' . tep_output_string ($link_data['id']) ) ) . '">'; $field .= tep_image(DIR_WS_IMAGES . trim ($link_data['text']), $link_data['text'], SPECIFICATIONS_FILTER_IMAGE_WIDTH, SPECIFICATION_FILTER_IMAGE_HEIGHT, ' class="image_filter"'); $field .= '</a>'; } break; } // switch (true) } Hope this help someone.
  11. fourmat

    [Development] Products Specifications

    On the issue of the box labels being displayed out of order, I think I found where the issue is happening. I still don't understand why. Conventional wisdom says that it should work. I went back to V 1.0 and installed that filter box, and it was working fine for the input fields that I have tested. I then compared it to the changes made in the 1.0.2 version and it appears that there was some added functionality that was made to accommodate the <br clear=all> when some the input fields were being drawn in includes/functions/products_specifications.php The new version adds the $box_label variable, and appends it to the $box_text toward the bottom of the file here: if ($box_text != '<br clear=all>') { $box_text = $box_label . $box_text; } For some reason, this is making the labels for the input field show out of order. If changed the line: $box_label .= '<b>' . $specs_array['specification_name'] . '</b><br>'; to $box_label = ''; $box_text .= '<b>' . $specs_array['specification_name'] . '</b><br>'; it seems to have solved the issue. This is just a kludge to get it working, but probably isn't the right approach, as I'm certain it's breaking another feature that I haven't started using yet. Maybe this will help point someone in the proper direction to create a fully validated fix for this. that is, assuming anyone else can reproduce my original issue.
  12. fourmat

    [Development] Products Specifications

    Hello all, I am working with Product Specifications V1.0.2. I think I have found a couple of bug in the /catalog/includes/boxes/products_filter.php I was getting multiple copies of filter box labels showing up, and was able to eliminate that issue by changing this line: $box_label .= '<b>' . $specs_array['specification_name'] . '</b><br>'; to $box_label = '<b>' . $specs_array['specification_name'] . '</b><br>'; Now when the box is building the filter input boxes and box labels, everything seems to be out of order. For instance, when it builds the filter box label/input box list, this is what I get: Box Label 3 Box Label 2 Box Label 1 Input Box 1 Input Box 2 Input Box 3 I'm not sure why it's not building the list sequentially, as it appears that is what is happening in the code, but the result seems to stack things out of order. Has anyone else come up against and or can you reproduce this issue?
  13. Kymation, Thank you for creating this system. This will be such a great addition to several stores I run. I am in the beginning stages of getting this installed an I have most of the functions working. I have a few questions though about populating the Specifications and the Filters. Why is it necessary to double enter the data fields for each filter and specification. Am I missing something? The procedure as I see it is to enter the specs for the admin section, then separately enter the exact same information for the filter side, and they have to match perfectly. I can see that there might be a need to have some information in a spec that was not in a filter, but would you ever have a filter than was not a spec? It doesn't appear that the system is set up for that. I know they are stored in separate tables, but to reduce the amount of entries needed for each Product Specification, it would be nice to combine them somehow, possibly adding a check box field to each spec that says something like "add to filter list also" or "Use as filter". Just some suggestions. Thanks for all the hard work.
  14. fourmat

    [Contribution] Multi Pickup

    How did you fix this problem as I am having the exact same issue?
  15. fourmat

    SiteMonitor

    This could be an issue with open_basedir restrictions in apache. If your stores are in separate accounts, that might be the reason. Maybe it won't play nice with symbolic links?
  16. fourmat

    SiteMonitor

    Actually, I'm my own host, maybe not the most knowledgeable sysadmin, but I am using several other scripts that have the glob function and they seem to run fine for what the script is asking glob to do. I'll keep working on it. This is a great script. And a valuable service. I had been hacked a couple of times using the same exploit, and one of the things that they did to sift off more identity information was add a script to the index.php page that would automatically turn on the Date of Birth question in the database config, which none of my customers require, so I created a piece of code that would email the admin whenever the DOB function was turned on. This is an instant notification and we don't have to wait for the scanner schedule. If you think this might be helpful, I can send you the code. It's just a simple include and an extra file. I have saved the other hacked files for reference, and I'll also see if I can identify any additional signatures that you can use in your hacked file detection setup. What would be really nice would be to create a text file that can be updated with the code signatures that other people have found. This can be similar to the spiders.txt setup. When a new exploit is found, it can be added to the txt file and updated on the sites easily.
  17. fourmat

    SiteMonitor

    OK, we are making progress! I made a dumb mistake and had set the source starting directory to the wrong place right before this last change. I have it switched back to DIR_FS_CATALOG, and this is the response: Checked 20 directories containing a total of 140 files. Skipped 0 files. 2 suspected hacked files found. Hacked Files Found hack.php imagemagic.php This is correct because the hack.php file is one that I seeded, and the other contains a base64 encoding line. BUT, when I seeded the hack file deeper into the directory structure, it isn't finding them. So it is scanning the main directory, but it's not scanning files as it traverses the directory structure. This is the current state of my rglob() function: function rglob($sDir, $sPattern, $nFlags = NULL) //recursive function to get array of all files and directories { $aFiles = glob("$sDir/$sPattern", $nFlags); //get the initial directory $tmpArray = glob("$sDir/*", GLOB_ONLYDIR); if (is_array($tmpArray) && ! empty($tmpArray)) foreach ($tmpArray as $sSubDir) //recursive call { $aSubFiles = rglob($sSubDir, $sPattern, $nFlags); array_merge($aFiles, (array)$aSubFiles); } return $aFiles; }
  18. fourmat

    SiteMonitor

    Well, it didn't crash, but I don't think it worked either. This is the message I got from the script: Checked 1 directories containing a total of 0 files. Skipped 0 files. 0 suspected hacked files found. Is there a better place that I can put an echo to see what is being sucked into the array or a better way to debug this? My setup isn't really any different than a lot of other people, so I'm concerned that this is something that is stupid simple, and I'm just missing it.
  19. fourmat

    SiteMonitor

    Ok I fixed those directory names and that seems to have cleared up the issue with the reference file and sitemonitor functions. I thought that there might be a possibility that the commas in the directory names was messing with the Hacker Check functions, but I am still getting the same errors. I changed the rglob() function code back to the original version and took a another look at the errors. The number of errors seems to correspond closely to the number of directories that the system is supposed to be scanning, which is an encouraging sign. As a recap, these are the errors it was returning: Warning: Invalid argument supplied for foreach() in /home/xxxxx/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 406 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/xxxxx/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 411 Warning: Invalid argument supplied for foreach() in /home/xxxxx/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 406 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/xxxxx/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 411 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/xxxxx/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 411 Then at the end of the several hundred iterations, it finishes with this error: Warning: Invalid argument supplied for foreach() in /home/xxx/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 89 (For Reference) Line 406 = foreach (glob("$sDir/*", GLOB_ONLYDIR) as $sSubDir) //recursive call Line 411 = $aFiles = array_merge($aFiles, $aSubFiles); Line 89 = foreach ($aFiles as $file) It appears that the glob function is cycling through the directory structure fine, it is just having an issue loading the directory names into it's array, which is what I assume that the code changes you suggested was trying to fix. I went back and changed line 411 from $aFiles = array_merge($aFiles, $aSubFiles); to array_merge($aFiles, (array)$aSubFiles); by itself and it no longer returned an error on that line. So with that result I would assume that it is this code that is creating the infinite loop: foreach ((array)glob("$sDir/*", GLOB_ONLYDIR) as $sSubDir) Any thoughts?
  20. fourmat

    SiteMonitor

    I think that I found another issue with the site traversal looking for files/directories. I have a client who created a subfolder inside of 'images' but he included commas in the folder name. example: "images/UPLOAD/Image/Products/Bottles, Openers and Wine Racks" "images/UPLOAD/Image/Products/Oak chips, beans, staves" "images/UPLOAD/Image/Products/Spoons, paddles and bags" I have added "images/UPLOAD" to the exclusion list, but this is what it is finding every time it runs into a directory with a comma in the name: Difference found: New-> images/UPLOAD/Image/Products/Oak chips Original-> beans Difference found: New-> images/UPLOAD/Image/Products/Oak chips Original-> beans Difference found: New-> images/UPLOAD/Image/Products/Oak chips Original-> beans Difference found: New-> images/UPLOAD/Image/Products/Oak chips Original-> beans Difference found: New-> images/UPLOAD/Image/Products/Oak chips Original-> beans Difference found: New-> images/UPLOAD/Image/Products/Oak chips Original-> beans Difference found: New-> images/UPLOAD/Image/Products/Bottles Original-> Openers and Wine Racks/_thumbs/_67618.jpg Difference found: New-> images/UPLOAD/Image/Products/Bottles Original-> Openers and Wine Racks/_thumbs/_Corkscrewsmall.jpg Difference found: New-> images/UPLOAD/Image/Products/Bottles Original-> Openers and Wine Racks/_thumbs/_67617.jpg Difference found: New-> images/UPLOAD/Image/Products/Bottles Original-> Openers and Wine Racks/_thumbs/_67640.jpg It also goes on to find a bunch of Time Mismatches, and permission problems which is understandable if it is reading the directory name/structure wrong. What is interesting about this is that if I exclude just the "images" directory , it will skip everything just fine. But when I remove "images" and replace it with "images/UPLOAD" it finds those other subdirectories. I'm not sure why that is. I think that either way there might be a bug in reading the directory structure if it has commas. Can anyone else reproduce this issue?
  21. fourmat

    SiteMonitor

    I hadn't seen your other post recently on the previous page about excluding files. Will work on that. So I have been upping memory and timeout time, and I have been lowering the 2000000 number you have set, and subsequent lowering has taken there error from this: Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to allocate 24 bytes) in /home/XXX/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 401 to this: Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to allocate 24 bytes) in /home/XXX/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 404 Which is moving the failure point from one array to another I think. I fear that the previous changes I made to the array per your suggestion might not have fixed the original issue that I was having.
  22. fourmat

    SiteMonitor

    FYI, I'm using PHP 5.2.9. Hey that change seemed to work, the problem I now have is bumping up the timeout limit and the memory allocation settings. I bumped up the time to 120s (up from 30s) and the memory limit to 200mb (from 80mb), but I'm still hitting the limit. I was wondering if there was a way to do a separate exclusion for the hacker check than for the file change check? Do ou have a recommendation for the execution and the memory limit? I have a decent sized server, but I have a heavily modified version of OSCMax with about 1700 files to run through when you include FCKeditor and other JS modifications I have made. I would like them to be scanned for changes, but not necessarily for hack tweeks.
  23. fourmat

    SiteMonitor

    That's one of the first things I checked and it appears to be formatted correctly. This is the location that it is looking for right? /home/XXXX/public_html/scart3/ I added the XXX for obfuscation and 'scart3' is the name of the installation directory, and is correct. Usually the configuration folders all require the trailing slash, but looking at the SM code, that doesn't appear to be an issue either. Does GLOB require any particular permissions? The file permissions are standard 644 (depending)and directory permissions are generally 755. Right now the owner is the user, but some of these functions require the owner to be changed to nobody. The other SM functions are working with standard user owner permissions. I changed ownership of the sitemonitor_functions.php file from one to the other without any change in the errors.
  24. fourmat

    SiteMonitor

    Hi Jack, I have installed V1.9 and I have been able to get most things working just fine. The one that I am having an issue with the the Manually Check for Hacked Files capabilities. When I click the button, it returns this: Warning: Invalid argument supplied for foreach() in /home/fourm3/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 402 This goes on recursively for as many directories as it finds, then chokes when it tries to use this information on these lines... Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/fourm3/public_html/scart3/admin/includes/functions/sitemonitor_functions.php on line 405 It looks like line 402 is using the GLOB function to go through the directories and subdirectories, but it's choking for some reason, here's the snip: function rglob($sDir, $sPattern, $nFlags = NULL) //recursive function to get array of all files and directories { $aFiles = glob("$sDir/$sPattern", $nFlags); //get the initial directory foreach (glob("$sDir/*", GLOB_ONLYDIR) as $sSubDir) //recursive call where it chokes on line 402 <<--------------- { $aSubFiles = rglob($sSubDir, $sPattern, $nFlags); $aFiles = array_merge($aFiles, $aSubFiles); } return $aFiles; } I added this: echo '<pre>$afiles'.$afiles.'</pre>'; right after the $afiles = assignment, and the results came up blank, so the code must not be getting the directory names to go through. I'm at a bit of a loss and I've searched for solutions through the rest of the forums posts, and as near as I can tell it hasn't cropped up for anyone else. Any ideas? Matt
  25. Oops, nevermind. I have debugged my code and found the problem. I didn't have a closing </form> in the header so it was trying to apply the YMM parameters to the shopping cart. Thanks again for a great contrib.
×