Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 48
  1. #21
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: quantity deicimals

    And the two Tare Rate settings?

    I have not used this shipping module but your shipping quotes do not appear to be able to manage the weight and settings that you are using ...
    NOTE: from the post of your Configuration ... Shipping/Packaging ... I cannot tell what are your actual settings and what is the display text

    As to the decimal issue, edit the class:
    /includes/modules/shopping_cart.php

    and around line 1241, what happens if you add the code in RED:
    Code:
            if (false && $new_qty == (int)$new_qty) {
              $new_qty = (int)$new_qty;
            }
    NOTE: you may still get the message, but see if you can now get to checkout_shipping ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  2. #22
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: quantity deicimals

    Then to manage the error message, test this, I am not done testing this idea, but see how it works for you ...

    Edit the file:
    /includes/classes/shopping_cart.php

    and add the code in RED:
    Code:
              // Check Quantity Units if not already an error on Quantity Minimum
              if ($fix_once == 0) {
                $check_units = $products->fields['products_quantity_order_units'];
    //            if ( fmod_round($check_quantity,$check_units) != 0 ) {
                if ( fmod_round($check_quantity,$check_units) != $check_units && fmod_round($check_quantity,$check_units) != 0) {
                  $_SESSION['valid_to_checkout'] = false;
                  $_SESSION['cart_errors'] .= ERROR_PRODUCT . $products->fields['products_name'] . ERROR_PRODUCT_QUANTITY_UNITS_SHOPPING_CART . ERROR_PRODUCT_QUANTITY_ORDERED . $check_quantity  . ' <span class="alertBlack">' . zen_get_products_quantity_min_units_display((int)$prid, false, true) . '</span> ' . '<br />';
                }
              }
    
              // Verify Valid Attributes
    Last edited by Ajeh; 11 Nov 2014 at 05:00 PM. Reason: fix error
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #23
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: quantity deicimals

    Check the IF as I had an error in it that I just fixed ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #24
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: quantity deicimals

    tare settings *:1.00

  5. #25
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: quantity deicimals

    That isn't a valid setting ... if you want to add 1lb to all your quotes, us:
    0:1
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #26
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: quantity deicimals

    I'll change it, but it does show 1 lb was added in cart

  7. #27
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: quantity deicimals

    You might read through the file:
    /includes/classes/shipping.php

    and see how Tare Rates are calculated ... you would get some strange logic trying to use * as a value in the calculations ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #28
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: quantity deicimals

    i Dont have A shopping_cart.php in that location.
    did a search in catalog for that file and this is what was returned.

    /var/www/clients/client1/web4/web/includes/auto_loaders/config.core.php

    Line #25 : * require(DIR_WS_CLASSES . 'shopping_cart.php');

    Line #63 : 'loadFile'=>'shopping_cart.php');

    /var/www/clients/client1/web4/web/includes/auto_loaders/paypal_ipn.core.php

    Line #34 : 'loadFile'=>'shopping_cart.php');

    /var/www/clients/client1/web4/web/includes/init_includes/auto_loaders/config.core.php

    Line #25 : * require(DIR_WS_CLASSES . 'shopping_cart.php');

    Line #63 : 'loadFile'=>'shopping_cart.php');

    /var/www/clients/client1/web4/web/includes/init_includes/auto_loaders/paypal_ipn.core.php

    Line #34 : 'loadFile'=>'shopping_cart.php');

    /var/www/clients/client1/web4/web/includes/languages/english.php

    Line #104 : // shopping_cart box text in sideboxes/shopping_cart.php

    /var/www/clients/client1/web4/web/includes/languages/english/info_shopping_cart.php

    Line #19 : // $Id: info_shopping_cart.php 1969 2005-09-13 06:57:21Z drbyte $

    /var/www/clients/client1/web4/web/includes/languages/english/shopping_cart.php

    Line #6 : * @version $Id: shopping_cart.php 3183 2006-03-14 07:58:59Z birdbrain $

    /var/www/clients/client1/web4/web/includes/languages/sheffield_blue/english.php

    Line #104 : // shopping_cart box text in sideboxes/shopping_cart.php

    /var/www/clients/client1/web4/web/includes/modules/quick_checkout_process/sideboxes/shopping_cart.php

    Line #8 : * @version $Id: shopping_cart.php 7437 2007-11-16 21:33:16Z drbyte $

    Line #33 : require($template->get_template_dir('tpl_shopping_cart.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_shopping_cart.php');

    /var/www/clients/client1/web4/web/includes/modules/sideboxes/shopping_cart.php

    Line #8 : * @version $Id: shopping_cart.php 7437 2007-11-16 21:33:16Z drbyte $

    Line #33 : require($template->get_template_dir('tpl_shopping_cart.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_shopping_cart.php');

    /var/www/clients/client1/web4/web/includes/templates/sheffield_blue/sideboxes/tpl_shopping_cart.php

    Line #9 : * @version $Id: tpl_shopping_cart.php 7192 2007-10-06 13:30:46Z drbyte $

    /var/www/clients/client1/web4/web/includes/templates/template_default/sideboxes/tpl_shopping_cart.php

    Line #9 : * @version $Id: tpl_shopping_cart.php 7192 2007-10-06 13:30:46Z drbyte $

  9. #29
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: quantity deicimals

    Do this ... forget the shopping_cart.php class file you cannot find ...

    Change the file:
    /includes/functions/functions_general.php

    and replace the function fmod_round with this new code:
    Code:
      // replacement for fmod to manage values < 1
      function fmod_round($x, $y) {
        $x = strval($x);
        $y = strval($y);
        $zc_round = ($x*1000)/($y*1000);
        $zc_round_ceil = round($zc_round,0);
        $multiplier = $zc_round_ceil * $y;
        $results = abs(round($x - $multiplier, 6));
        return $results;
      }
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #30
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: quantity deicimals

    that worked, now is there a way to round up the weight to a whole number
    517.8 ft = 899.998536, Would like it to be 900 lbs

 

 
Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Need to Offer Quantity Discount Depending on Total Cart Quantity
    By ikernbecauseicare in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 3 Feb 2011, 01:26 AM
  2. Position quantity update button under quantity box
    By JC.M in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Feb 2010, 02:43 PM
  3. Price by attributes - quantity discount and minimum quantity required
    By josefine in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 24 Sep 2009, 07:28 PM
  4. quantity discount for checked attributes NOT product quantity
    By adod in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 6 Mar 2009, 06:39 PM
  5. Quantity Total in Shopping Cart Sidebox with Quantity Discount Contribution
    By maineiac13 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 14 Oct 2008, 08:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR