Latest News: (loading..)

greasemonkey

Members
  • Content count

    1,097
  • Joined

  • Last visited

  • Days Won

    23

greasemonkey last won the day on March 26

greasemonkey had the most liked content!

About greasemonkey

Profile Information

  • Real Name
    Scott
  • Gender
    Male
  1. @Druid6900 thought you may find something like that 😝 Now... what are the issues with the box sizing? Let see if we can't figure that out....
  2. lol... a good one indeed. The good news is you now know it is not the module - but associated with dimensional support files. So, quickly looking at the addon there are 2 additional files used in dimensional support: admin/packaging.php (probably not the problem... it would not be loaded during checkout) and includes/classes/packing.php... this DEFINITELY would be loaded during checkout with dimensional support turned on.... This is where you need to start your search... looking for something similar to what we had found in the module file. Let me know what you find.
  3. @Druid6900 With the original code (which will be removing from the next version) if ((float)$weight < 1.0) { $weight = 1; 0.150 kg would be 1 kg With your versions OR if removed if ((float)$weight < 0.0001) { $weight = 1; it would stay as 0.150 kg The rounding by the way is done (hence why I suggest this is not required) just a few lines down to 1 decimal here $this->item_weight[$index] = ($weight ? (string)round((float)$weight,1) : '0' ); So I guess technically 0.150 would probably show up as 0.2 kg (0.15 would round up). I guess the point I was trying to make earlier (and now) is - if removing the code (to show as below) does not help - then something else causing your issue... function _addItem($length, $width, $height, $weight, $price = 0 ) { $index = $this->items_qty; $this->item_length[$index] = ($length ? (string)round((float)$length,1) : '0' ); $this->item_width[$index] = ($width ? (string)round((float)$width,1) : '0' ); $this->item_height[$index] = ($height ? (string)round((float)$height,1) : '0' ); $this->item_weight[$index] = ($weight ? (string)round((float)$weight,1) : '0' ); $this->item_price[$index] = $price; $this->items_qty++; }
  4. @Druid6900 sorry yes that exact code was not included in the current version... the exact original code was/is: if ((float)$weight < 1.0) { $weight = 1; } else { $weight = round($weight, 3); } Which says: "if the $weight is less than 1 kg then make the $weight equal 1 kg" else (otherwise) "round the $weight to the 3rd decimal". Which you are trying to replace with: if ((float)$weight < 0.0001) { $weight = 1; } else { $weight = round($weight, 3); Which says: "if the $weight is less than 0.0001 kg then make the $weight equal 1 kg" else (otherwise) "round the $weight to the 3rd decimal". Which doesn't make a whole lot of sense (neither do)... which is why I'm saying remove it (either/both) as this has fixed the issued (remember I had the exact same issue despite me not using dimensional support). Now - please keep in mind... most of us are not coders (those who are - are mostly likely more than happy to help you... for fee). I'm trying to support it the best I can... and i would not call it broken at all... It works perfectly for me and the issues that you have brought to my attention have been fixed (see function below). Again replacing the above code with your code will fix your issue until you get to 0.0001 kg when it will change the weight back to 1kg (as I said... doesn't make sense to do that) Removing it and leaving the following (i've included the entire function) should: function _addItem($length, $width, $height, $weight, $price = 0 ) { $index = $this->items_qty; $this->item_length[$index] = ($length ? (string)round((float)$length,1) : '0' ); $this->item_width[$index] = ($width ? (string)round((float)$width,1) : '0' ); $this->item_height[$index] = ($height ? (string)round((float)$height,1) : '0' ); $this->item_weight[$index] = ($weight ? (string)round((float)$weight,1) : '0' ); $this->item_price[$index] = $price; $this->items_qty++; }
  5. HI Druid, I'm really not sure.... What I can tell you is this piece of code (if you still have it) will do what you are saying for weights less than 0.0001 kg if ((float)$weight < 0.0001) { $weight = 1; } else { $weight = round($weight, 3); To translate (to the best of my ability... I'm not a coder either) what this code is doing in words: "if the $weight is less than 0.0001 kg then make the $weight equal 1 kg" else (otherwise) "round the $weight to the 3rd decimal". Again, my current version was doing the same thing removing the above code fixed it. I have removed this code (as well as the other fixes we spoke about in this tread) from the next version (which I have not yet released) - it is not needed or required and should not be included.
  6. @Harald Ponce de Leon Hey Harald, I believe I've mentioned this before.... however couldn't find the post (still not use to the new site... lol). I have intermittent errors in my log since upgrading to 5.018 [10-Jun-2017 14:38:22 America/Toronto] PHP Warning: Invalid argument supplied for foreach() in /home/*****/public_html/ext/modules/payment/paypal/express.php on line 620 [10-Jun-2017 14:38:24 America/Toronto] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/flournet/public_html/ext/modules/payment/paypal/express.php:620) in /home/*****/public_html/includes/functions/general.php on line 52
  7. @burt do you want to move this discussion into its own thread? Thank you kindly.... @mcmannehan Is this not sufficient (? function tep_validate_ip_address($ip_address) { if (function_exists('filter_var') && defined('FILTER_VALIDATE_IP')) { return filter_var($ip_address, FILTER_VALIDATE_IP); } return false; } And I presume the DB also needs to be changed... To VARBINARY(16)
  8. @burt so I guess updating the core tep_validate_ip_address function to work with ipv6 is out of the question? Do these conversations then move to the 2.4 tread?
  9. I've dropped the config for instant update - and so no longer worry about the fact shipping was impossible to get working (although funny enough it does seem to work with the latest app) The new in-context feature doesn't work (I don't believe) and also PayPal is not (or at least was not) mobile friendly using instant update.
  10. Here is what I use for vimeo
  11. @Druid6900 The difference is I don't use dimensional support - therefore there is no length, width & height (in the test request I posted on the CP developers forum I manual added dimensions to the file) ... I would presume the weight is the same however. Removing this set of rounding has worked for me.... if ((float)$weight < 1.0) { $weight = 1; } else { $weight = round($weight, 3); That said, I would definately test it by removing if($this->unit_weight == 'LBS') { //change to kilograms $weight = round($weight/2.2,3); } if($this->unit_length == 'IN') { //change to centimeters $width = round($width * 2.54,1); $height = round($height * 2.54,1); $length = round($length * 2.54,1); }
  12. @Druid6900 ok.... this is the last an only line that rounds the weight. First, in your admin make sure there is nothing in the "tare" config.... re-test if there was a "tare" weight... And then try to remove all rounding like.... $this->item_weight[$index] = $weight;
  13. @Druid6900 can you test this for the weight issue? I just want to change the default from LBS and IN to KG and CM (as it should be for a Canadian based module). And a question - are you using EDGE for GOLD... and do you know if are using Change // for those who will undoubtedly forget or not know how to run the configuration_shipping.sql // we will set the default to pounds (LBS) and inches (IN) $this->unit_weight = 'LBS'; } if (defined('SHIPPING_UNIT_LENGTH')) { $this->unit_length = SHIPPING_UNIT_LENGTH; } else { $this->unit_length = 'IN'; } To // for those who will undoubtedly forget or not know how to run the configuration_shipping.sql // we will set the default to pounds (KG) and inches (CM) $this->unit_weight = 'KG'; } if (defined('SHIPPING_UNIT_LENGTH')) { $this->unit_length = SHIPPING_UNIT_LENGTH; } else { $this->unit_length = 'CM'; }
  14. Ok looks like this is added with the configuration_shipping.sql for dimensional support.... How is your defind? LBS or KG? IN or CM?
  15. @Druid6900 ok.. this issue with the width... For some reason we have (lines 412 to 414) $weight = $this->item_weight[$index]; $price = round($this->item_price[$index],2); $width = $this->item_weight[$index]; Notice line 414 $width = is referencing item_weight This should be $weight = $this->item_weight[$index]; $price = round($this->item_price[$index],2); $width = $this->item_width[$index]; Still looking at the weight issue... trying to find where LBS and IN defined in admin (I don't think it is). if($this->unit_weight == 'LBS') { //change to kilograms $weight = round($weight/2.2,3); } if($this->unit_length == 'IN') { //change to centimeters $width = round($width * 2.54,1); $height = round($height * 2.54,1); $length = round($length * 2.54,1); }