Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 41
  1. #11
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Hide module from certain state

    thank you that works.
    can you help me with a couple more?
    Like this One
    Code:
    if ($data->fields['products_freightquote_enable'] == '1') {
              $product_list[] = array(
                'Class' => (zen_not_null($data->fields['products_freightquote_class']) ? $data->fields['products_freightquote_class'] : '50'),
                'ProductDescription' => $product['name'],
                'Weight' => ceil($product['quantity'] * (int)$product['weight']),
                'Length' => ceil($data->fields['products_freightquote_length']),
                'Width' => ceil($data->fields['products_freightquote_width']),
                'Height' => ceil($data->fields['products_freightquote_height']),
                'PackageType' => (zen_not_null($data->fields['products_freightquote_package_type']) ? $data->fields['products_freightquote_package_type'] : 'Boxes'),
                'DeclaredValue' => round($product['price']),
                'CommodityType' => (zen_not_null($data->fields['products_freightquote_commodity_type']) ? $data->fields['products_freightquote_commodity_type'] : 'GeneralMerchandise'),
                'ContentType' => (zen_not_null($data->fields['products_freightquote_content_type']) ? $data->fields['products_freightquote_content_type'] : 'NewCommercialGoods'),
                'IsHazardousMaterial' => $data->fields['products_freightquote_hzmt'],
                'NMFC' => $data->fields['products_freightquote_nmfc'],
                'PieceCount' => ceil$product['quantity'], Added ceil here
                'ItemNumber' => $counter
              );
    The 'Weight' code in red does not round or mutiply, is there another way to write this to round product quantity and product weight, then mutiply?
    'Piececount' also in red, i just need to add round or ceil to the front.

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

    Default Re: Hide module from certain state

    You have in there:
    Code:
                'Weight' => ceil($product['quantity'] * (int)$product['weight']),
    The (int)$product['weight'] means take:
    5.75 = 5
    6.25 = 6
    3.10 = 3
    6.99 = 6

    This is coded wrong:
    Code:
                'PieceCount' => ceil$product['quantity'], Added ceil here
    What is the goal for:
    Code:
     
    'Weight' =>
    and for:
    Code:
     'PieceCount' =>
    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!]
    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. #13
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Hide module from certain state

    the goal for weight is to determine the products weight and not the weight of the cart
    Piececount = how many pieces

  4. #14
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Hide module from certain state

    this is the way i edited it in the file
    Code:
    'PieceCount' => round($product['quantity']),
    Last edited by jimmie; 22 Nov 2014 at 12:42 AM.

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

    Default Re: Hide module from certain state

    Humor me for a minute ...

    What do you expect the results of:
    (int)5.99 =
    ceil(100 * (int)5.99) =

    What kinds of Product Weight do you use, give 7 examples ...

    What kinds of Product Quantities do you get on orders, give 7 examples ...
    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!]
    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. #16
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Hide module from certain state

    i did not write this freightquote, thought that because it was written for v1.37 might have to make changes to work. as it stands this module does not work with sq ft. without some modifications. Have spoken with freightquote.com and he agrees that their api does not do decimals. i sell some products by the sq. ft. and have set min-max up. there is 18.94 sq ft. in carton. that carton weighs 30 lbs, i cant put 30 as weight. 30 x 18.94. so i divided 18.94 into 30=1.583949313621964 lbs per foot. that is what i enter as weight.
    p. s. every freightquote module written for other carts is the same

  7. #17
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Hide module from certain state

    a person could order 1200 ft of laminate add couple rolls of underlayment add some moldings. there is 1200+ quantity

  8. #18
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Hide module from certain state

    if i use this than whole cart is weighed, i drop ship and if they have other than flooring it will be wrong weight
    Code:
    'Weight' => ceil($_SESSION['cart']->weight),

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

    Default Re: Hide module from certain state

    So if you have:
    Quantity 1200 and Weight 1.583949313621964

    What do you want it to equal?
    1200 * 1.583949313621964 = 1900.7391763464
    -- or --
    ceil(1200 * (int)1.583949313621964) = 1200
    -- or --
    ceil(1200 * 1.583949313621964) = 1901
    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!]
    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. #20
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Hide module from certain state

    you be wondering why i dont switch over to sell by the carton. Well because most customers understand sq ft. When they measure they get sq ft. Easier to know

 

 
Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. v139h Hide COD payment method from certain customers?
    By TroyC in forum General Questions
    Replies: 3
    Last Post: 5 Apr 2013, 04:19 PM
  2. Hide Search box from certain categories
    By pixelpadre in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 29 Aug 2011, 01:49 AM
  3. Hide certain products from a group of users
    By mohammedsk in forum Basic Configuration
    Replies: 4
    Last Post: 29 Dec 2009, 06:31 AM
  4. Hide Certain EZ Pages Links from main page??
    By lmw1 in forum Basic Configuration
    Replies: 0
    Last Post: 6 Oct 2007, 12:18 PM
  5. Hide Table Shipping Module from Certain Customers
    By bearaman in forum General Questions
    Replies: 1
    Last Post: 29 Jun 2007, 05:51 AM

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