Jump to content

fourmat

Members
  • Content count

    82
  • Joined

  • Last visited

Posts posted by fourmat


  1. I'm using PHP 7.3 and added this to the .htaccess to get my authorize.net SIM payment module to return customers to the checkout success page properly.

    <IfModule mod_headers.c>
    Header always edit Set-Cookie ^(.*)$ $1;SameSite=None;Secure
    </IfModule>

  2. On 8/27/2016 at 9:51 AM, Peper said:

    Bump on this.

     

    I still only have a small hiccup when updating an order 

     

    When you add comments for a customer and you enter for a space between lines then getting error: Multiple or malformed newlines found in additional_header in admin/includes/classes/email.php on line 522

    the line 522 - 

    
    return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers)); 

    Just one single comment order update is fine

     

    So now checked and changed to

    return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers));

     

    works, however the comments line breaks is removed to give one line of comments

     

    Anyone knows a solution?

    Peper, I was wondering if you had ever made any headway on this.  I have run into the same issue.  I'm running php 5.6.37.  But It's the same with later versions.

    I have removed the $xtra_headers and it seems to work ok, except for the issue you called out where there aren't any new lines, and comment lines aren't separated any more.  I have changed the function implode($this->lf, $xtra_headers) to implode(" ", $xtra_headers), and it seems to work in the one scenario I tried.  What I don't know is, whether the $xtra_headers will be populated with information that needs line breaks in certain scenarios, and then be rejected by the mail servers.


  3. DJ Viper, this is because you are probably running php 5.5 and there are deprecated functions in there.

     

    I have been working with this, but I'm still having a problem.  I don;t know if it related to this particular issue or not:

     

    in feedmachine.php around line 335 you'll find this code:

    $mysqli = defined('MYSQL_EXTENSION') && MYSQL_EXTENSION == 'mysqli';
    
      $i=0;
      $fields = array();
      while( $i < ( $mysqli ? mysqli_num_fields($master_query) : mysql_num_fields($master_query) ) ) {
        ++$i;
        $cur_field = ( $mysqli ? mysqli_fetch_field($master_query) : mysql_fetch_field($master_query) );
        $fields[] = $cur_field->name;
      }
    

    change it to read:

    $mysqli = defined('MYSQL_EXTENSION') && MYSQL_EXTENSION == 'mysqli';
    
      $i=0;
      $fields = array();
      $fields_cnt = mysqli_num_fields($master_query);
     
      while( $i < $fields_cnt ) {
    	$fields[] = mysqli_fetch_field_direct($master_query, $i)->name;
            ++$i;
      }
    
    
    

    This won't if you don't have the mysqli extension enabled in PHP.

     

    Still have a problem where it won't list but 16 of the 10,000+ products I have, but at least it stopped that particular error.  now have to debug the rest of the system.

     


  4. Hello:

    My problem is that it gives me the following error when trying to install and make a copy of the database. The version I am using oscommerce is v2.3.3.4 :

    Thanks for the help

    Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/www/xxxx.com/admin/backup.php on line 210

     

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/xxxx.com/admin/backup.php on line 183

     

    Warning: Cannot modify header information - headers already sent by (output started at /home/www/xxxx.com/admin/backup.php:210) in /home/www/xxxx.com/admin

    /includes/functions/general.php on line 38

     

     

    I am having the same issue.  This happened when we made the upgrade to php 5.5.  Any ideas?


  5. Thanks! No wonder I missed it!.  I wonder if it would be possible to modify the script and set up a cron job that could be accessed to run the sale_followup once a day.  I have installed it and it works fine, but if we could automate it that would take away one more thing that someone has to remember to do.


  6. Hi All,

     

    I have probably missed this somewhere in the documentation, but I was wondering what triggers the sales_followup function once it has been enabled.  Is it just someone going to the site and accessing a page, or does there need to be a cron job created to run this feature?


  7. I've been working on a lot of improvements to the SpecsPopulate code. I ran into a lot of bugs concerning the compatibility with Excel and how it handles quotes in the specifications values. I have been using a variation of EasyPopulate 2.76g with great success, and I went back through and built a whole new SpecsPopulate 1.3 based on that version of EP.

     

    These are the highlights:

    • Again, this is stripped down to only focus on specs, but I did leave in the option to add fields from the products table like MPN and UPC in case you needed those as a cross reference. If you do not have those columns just remove them from the customer fields section in the code.
    • Any changes to any of the fields will be uploaded and applied, so beware.
    • This system will not add new products, and will skip rows with model numbers that are not currently in the database.
    • I have added a Dummy row at the top of the export file which will also be ignored upon import.
    • The system will only create an export file if a category is selected and there are specs applied to that category.
    • You can still download all specs and products in one file by selecting the Top category, but if you have a lot of specs or products, I wouldn't recommend it.
    • I have also included a utility to look at the specs that have been applied to a category.
    • I changed the export file naming structure so that it would include the category name, and a more accurate time stamp so there aren't as many overwritten files.

     

    I made one other major modification to all of my specifications code, and some of that is included here. I had to build a special character translation and replace function that gets around problems with URL translation for values. If you would like to use this, just add it to your includes/general.php in both the admin and catalog side. (you will also need to modify a lot of other areas in your specs code to make this work also)

     

    function specs_special_char_replace($values_data){
    
     $needles = array('ZslashZ', 'ZinchZ', 'ZcommaZ', 'ZfeetZ', 'ZpercentZ','ZquestionZ','ZpipeZ','ZampZ','ZexclamationZ','ZhashtagZ','ZdollarZ','ZasteriskZ','ZcolonZ','ZsemicolonZ','ZltZ','ZgtZ','ZatZ','ZcaretZ','ZtildeZ');
     $haystack = array('/', '"', ',','\'','%','?','|','&','!','#','$','*',':',';','<','>','@','^','~');
     $values_data_clean = str_replace($needles, $haystack, $values_data);
     return $values_data_clean;		
    }
    
    function specs_special_char_reverse($values_data){
    
     $needles = array('/', '"', ',','\'','%','?','|','&','!','#','$','*',':',';','<','>','@','^','~');
     $haystack = array('ZslashZ', 'ZinchZ', 'ZcommaZ', 'ZfeetZ', 'ZpercentZ','ZquestionZ','ZpipeZ','ZampZ','ZexclamationZ','ZhashtagZ','ZdollarZ','ZasteriskZ','ZcolonZ','ZsemicolonZ','ZltZ','ZgtZ','ZatZ','ZcaretZ','ZtildeZ');
     $values_data_clean = str_replace($needles, $haystack, $values_data);
     return $values_data_clean;		
    }
    

     

    if you do not want to use this, just do a search within the SP file for specs_special_char_replace and specs_special_char_reverse and comment out the lines with those functions in them. SP should work fine without them.

     

    Another addition feature I have been using is the integration of the Select 2 jQuery dropdown plugin to help with searching for categories more easily. Go here to find out more: http://ivaynberg.github.io/select2/

     

    Otherwise just remove the script codes to prevent any javascript errors in your installation.

     

    I hope this will help someone out.

    specspopulate.php


  8. Hello All, I have taken the easypopulate file that bruyndoncx so generously uploaded and stripped it down to just include the specifications. I'm calling it SpecsPopulate. I found it was much simpler to separate everything and to only focus on the specifications once the individual products, categories etc have been created.

     

    It seems to work very well, but the biggest hurdle that I have found is that it's difficult to determine what the specifications_value_id and the specifications_value pair actually are to be able to enter them into the spreadsheet. If the specification hasn't been assign to a product, the value doesn't show up in the column anywhere, and you are left to search out the spec value.

     

    My thought was to build the code that would add the id/value pair to the first row or last row in the SP spreadsheet. This row would be for reference only, and would not include a model number. Without the model number, the row would be skipped. By having the id/value pair on the sheet already, it would make it very easy to just copy the values down to the rows they are needed in.

     

    My problem I'm running into a coding mind block on how to make this happen. I'll upload my current version of the file and would welcome anyone to come along and add or modify it.

    specspopulate.php


  9. I have a customer who is using all three services, FedEx, UPS (UPSXML) and USPS as choices for shipping. I have FedEx Web services 9.4.2 installed and working fine. One of the things that they have asked about was the ability to tack on insurance for the shipment for FedEx, like they can for the other 2 modules. I see that the WSDL has mentions of insurance, but not sure in what capacity.

     

    Would it be possible to add an insurance option to this module?


  10. I have a question about Insurance using the FedEx Web Services v9 module. I see that there is code included in the module with an apparent defined constant:

     

    @[member='definedmedia']('MODULE_SHIPPING_FEDEX_WEB_SERVICES_INSURE', 0);
    

     

    and further down:

     

    function _setInsuranceValue($order_amount){
    if ($order_amount > (float)MODULE_SHIPPING_FEDEX_WEB_SERVICES_INSURE) {
      $this->insurance = sprintf("%01.2f", $order_amount);
    } else {
      $this->insurance = 0;
    }
     }
    

     

    The _setInsuranceValue function is called in the module, but it doesn't appear that it changes the value of the returned quote when we change the package value or the value of the defined constant from 0 to any other number.

     

    In the previous module/API we were able to define the insurance amount that triggered insurance addition.

     

    Can someone confirm or deny that the insurance option is or isn't functioning with the v9 module?


  11. Love the feedmachine, but I have a configuration issue.

     

    I have another URL parameter that I have been using to track what particular item is being clicked to produce the click conversion.

    I have been using another feed generator and had coded it to return the additional URL parameter of &utm_term="model number" where model number is pulled from the $products['products_model'] in the database. How can I structure or modify FM to return that parameter?

     

    I have tried adding it to various locations in feedmachine.php where PRODUCTS_URL is generated, but it doesn't seem to be picking it up. I also tried creating a separate function in the configuration file, but it's not picking up the url parameters spec'd in the admin. Any help would be appreciated.


  12. Thanks for the push in the right direction.

     

    I'm having another problem and I wonder if I found a bug. I have built a filter with a multi select box. Whenever I select multiple items within the same box, and submit I get the following SQL error.

     

    1066 - Not unique table/alias: 'ps9'

     

    select count(p.products_id) as count from (products p) join (products_to_categories p2c) on (p.products_id = p2c.products_id) left join (specials s) on (p.products_id = s.products_id) INNER JOIN products_specifications ps9 ON p.products_id = ps9.products_id INNER JOIN products_specifications ps9 ON p.products_id = ps9.products_id where p.products_status = '1' and p.products_master_status != '1' and p2c.categories_id = '140' AND ps9.specification <=> 215 AND ps9.specifications_id = '9' AND ps9.language_id = '1' AND ps9.specification <=> 245 AND ps9.specifications_id = '9' AND ps9.language_id = '1'

     

    Is anyone else seeing this?


  13. That won't work. The weight is a stock field, and there is no code for the stock fields to show up on the Product Info page, since they should already be there. You could add a separate field for weight, which means you would have to enter that value twice. You could also modify the code to allow the stock field to show up, but that's a can of worms.

     

    Regards

    Jim

     

     

     

    Thanks for the prompt reply Jim. I thought that was the answer but I miss things sometimes. I'm trying to consolidate the display of various bits if information about the products, and this system would be a great place to put it. For instance I have added UPC, ISBN, Manufacturer Part Number fields as well as the already existing fields. To bring the site up to the standards of a Grainger or Fastenal, I'll need to be able to display all of this information in a fast easy to digest manner. The dilemma I have is that my customers who admin the site see the "display on products info page" setting and are disappointed when I tell them that they can't do that.

     

    Correct me if I'm wrong. In glancing at the code, I'm thinking that if I add an additional MySQL query to the /includes/modules/products_specifications.php code, which ignores the restrictions from the products_specification table, I'll be able to bring in the information from the products_column_name field, and reference that to the products_id to be able to display the info stored in the field. I'll just have to rejigger some of the if statements (and grow some talent).

     

    Any thoughts?


  14. Another questions guys,

     

    I want to display the weight on the product info page, but not as a filter and not in the comparison page. I have set up the spec and have selected the Products Weight from the drop down. It is not displaying in the products information page along with the other specs.

     

    I have a couple of questions:

    Is this even possible with this feature?

    If so, what would the criteria be that I need to meet to make it happen?

     

    Thanks for the help.

     

    Matt


  15. Are you using this with STS Templating? I need to create a placeholder to display the product_filter box in the left hand column of my sts template. My store is http://www.stogieboys.com/store and I believe that unless I create a info box calling that file it will nt display when I have the STS Templating enabled.

     

    Can anyone confirm this?

     

     

    I am using the BTS with the infobox admin contribution. I'm not sure how STS handles the info boxes, but I did have to do some custom stuff with BTS to get the new box in the right place so the template would pick it up. But even after I had everything all set up and working "as it should have" I didn't have the Products Specs set up correctly to allow the box to actually display. This was very confusing to me at first because nothing showed up where I though it should have.

     

    Have you set up any filters or specifications in admin? You must have something set up, and be in the proper category with products that fall into the filter/specification criteria otherwise the filter box will not show up at all.

     

    As a test you can open up the /includes/boxes/products_filter box.php file and comment out the code that says

     

     if ($count_filters >= SPECIFICATIONS_FILTER_MINIMUM) {

    and the corresponding close brace } toward the bottom of the file. At least then it will display a blank box for you so you know you have it in the right location.


  16. Jim,

     

    I'm running into a problem where I have set up a "Call For Price" system in my cart. Basically, I created another column in the products table that just sets a flag, 1 or 0, to display "Call For price" for each item. I don't want those items to show up in the products filter (or filter count) when I filter based on final price or products_price. I was going through the SQL logic in catalog\includes\functions\products_specifications.php, and have tried to insert a

     

    and p.products_call_for_price != '1'

     

    into the 'where' statements, to no avail so far.

     

    Is there some specific place you can point me to where I can place this logic where the products with no prices won't show up in the filter list? I think I may not have placed the p.products_call_for_price in the right select statement, but I'm a bit stuck as to where the columns are actually selected. I'm looking at around line 392-398, but I'm not sure.


  17. Has anyone used this module with STS templating module? I have; installed the module as described to the "T' and nothing displays. I am trying to create a placeholder for use with sts templating on the index.php page, but I don't think it should be necessary as STS templating still uses that file.

     

    Any help??

     

    Thanks

     

     

    I ran into the same problem and as much as I always thought it was something wrong with the installation or coding, it always turned out to be my issue not having everything configured in the specifications. Meaning that the coding was always correct, but the specs, filter, or display settings were not tweeked to find products. I know this doesn't help you much, but before you dive in and start mucking in the code (like I did), go through all your admin settings and make double sure you aren't missing something.


  18. I have just gone through and done a good bit of experimentation and have found a few things concerning the UPS fuel surcharge. We have been missing the fuel surcharge in the shipping quotes returned by the UPSXML module. It appears that the problem is that for the customer type selection, (01, 03, or 04) we had selected 01, which is for a UPS customer that gets billed and has an account with daily pickup. Once I switched the customer type to either 03 (customer with no account or with no daily pickup), or 04 (retail counter customer) then the shipping quote and fuel surcharge are combined, and the quote is accurate. We are wanting just the complete standard retail shipping rate returned, and we don't have negotiated rates enabled or active.

     

    On the UPS paper bill that comes in every week, they break out the fuel surcharge as a separate line item. I don't know why you would ever want to receive a quote where you didn't add in the surcharge. Is it possible that UPS changed their XML schema where, if you are an 01 customer, then the fuel surcharge gets delivered as a separate variable that the UPSXML module isn't picking up?


  19. HI Folks,

     

    I was wondering if you might be able to help me with a couple of issues that we have run across recently. I am using UPSXML 1.2.6 and I have run into an issue where I believe that the fuel surcharge is not being passed in the quote. We have straight retail quotes, and for the 30 lb box Next Day Air, the only difference from the UPS Online tool and the returned quote was the amount of the fuel surcharge. I also installed V 1.3.9 and am having the same issue where the quoted amount was significantly less than the actual cos with surcharge.

     

    UPS charges the fuel surcharge as a separate line item in just about everything report I've seen, including the UPS Online tool. I was wondering if their protocol changed in their XML during the last price updates and the surcharge wasn't being added by the module?

     

    How does everyone else handle the extra fuel surcharge? Any suggestions?


  20. usps sends <sup>®</sup> in urlencoded format. The problem is that even after this is decoded and replaced, I couldn't get it to strip the special characters for processing and posting the methods. It was more effective to modify it down to a common term and then do the replacement at the display level. This way we have both the function and the display working properly.

     

    I replaced <sup>®</sup> with " reg" and the same thing for trade. It can be replaced with ANYTHING that doesn't contain special characters. I'll replace it with something else to ensure that it doesn't interfere with other modules.

     

    Will post back when fix is uploaded

     

     

    Thanks! Also, is there any way to get rid of the ® that shows up in the shipping method for the order confirmation emails that come through as plain text? For example:

     

    United States Postal Service5 lbs, 0 oz (Priority Mail®--Approx. delivery time 3 Days--Insured for $21.35): $12.00


  21. I found another small, if not annoying, issue with the 5.2.1 update. I have another module for "Store Pickup" installed. The description in the language file is

     

    "In-store pickup during regular business hours."

     

    The problem is that the USPS changes are messing with all the descriptions that have the letters " reg" in them and turning them into the registered trademark symbol.

     

    "No shipping charge added. Pickup during®ular business hours."

     

    This would be simple to fix by changing the text from "regular" to "normal" in the language file. Fulluvscents, I know you are a stickler for doing this right. We should take a look at the changes to the checkout_shipping.php specifically $search = array(' reg', ' trade'); and everywhere else it shows up. and figure out how to isolate it even more. I'm not sure what the USPS response is that triggers this function, otherwise I'd play with it myself.

×