Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 40
  1. #21
    Join Date
    Mar 2009
    Posts
    68
    Plugin Contributions
    0

    Default Re: Per Unit or Per Item Shipping Help?

    Okay, look, here's the deal. I'm totally lost here, and I'm not sure what I am doing. So I'm going to break everything down one more time, and hopefully you (Ajeh) or somebody else can see what I'm trying to explain and guide me to light.

    here is the website in question

    www.mandbguns.com/zencart

    Website currently has 3 categories:

    1) Custom Rifles for Sale (6 products currently)
    2) Guns for Sale (5 products currently)
    3) General Sales (2 products currently)

    Products all have a set price and shipping weight

    Shipping Module is USPS

    Enable USPS Shipping
    True

    Enter the USPS Web Tools User ID
    ****************

    Which server to use
    production

    Handling Fee
    50.00

    Tax Class
    Taxable Goods

    Tax Basis
    Shipping

    Shipping Zone
    --none--

    Sort Order
    1

    All Packages are Machinable
    False

    USPS Options
    --none--

    Domestic Shipping Methods
    PRIORITY

    International Shipping Methods
    --none--

    Debug Mode
    Off
    In Shipping/Packaging I have the following:

    Enter the Maximum Package Weight you will ship: 15

    Package Tare Small to Medium - added percentage:weight: 0:0

    Larger packages - added packaging percentage:weight: 10:0
    I have no clue... I just went to go through 3 products, and got a shipping charge of just $62.50.

    Now, I keep reading on USPS's site about a Rate Calculator, so I'm not sure if this is soemthing that needs to be turned on or not. Maybe that's the case? I don't know.

    Again, I apologize for being so daft... this is the most confusing thing I've ever done on ZC. Any help is again, appreciated.

  2. #22
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Per Unit or Per Item Shipping Help?

    Quote Originally Posted by colortheworld
    I have no clue... I just went to go through 3 products, and got a shipping charge of just $62.50.
    Did you customize the file:
    /includes/modules/shipping/usps.php

  3. #23
    Join Date
    Mar 2009
    Posts
    68
    Plugin Contributions
    0

    Default Re: Per Unit or Per Item Shipping Help?

    Quote Originally Posted by kobra View Post
    Did you customize the file:
    /includes/modules/shipping/usps.php
    I haven't done any customization to it, no. I do have the file open though. Giving it a look to see what I would need to customize.

  4. #24
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Per Unit or Per Item Shipping Help?

    Quote Originally Posted by colortheworld
    I just went to go through 3 products, and got a shipping charge of just $62.50.

    I haven't done any customization to it, no. I do have the file open though. Giving it a look to see what I would need to customize.
    What did you expect??
    Ajeh outlined in fair detail what must be added

  5. #25
    Join Date
    Mar 2009
    Posts
    68
    Plugin Contributions
    0

    Default Re: Per Unit or Per Item Shipping Help?

    Well here's where I think I'm hung up.

    Ajeh was in-depth with discussing a "calculation", but I'm not sure if she meant adding it to the module, or the database.

    Code:
    global $cart;
    $chk_guns = $_SESSION['cart']->in_cart_check('master_categories_id','2');
    $chk_rifles = $_SESSION['cart']->in_cart_check('master_categories_id','3');
    $extra_handling_fee = ($chk_guns * 50) + ($chk_rifles * 35);
    I realize that's a generalized run of the code, but I don't see that in the usps.php file, so that's what is throwing me off.

  6. #26
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Per Unit or Per Item Shipping Help?

    Quote Originally Posted by colortheworld
    Ajeh was in-depth with discussing a "calculation", but I'm not sure if she meant adding it to the module, or the database.

    Quote Originally Posted by Ajeh
    If you are using USPS shipping module, then you will want to customize the file:
    /includes/modules/shipping/usps.php
    I do not see the confusion??

  7. #27
    Join Date
    Mar 2009
    Posts
    68
    Plugin Contributions
    0

    Default Re: Per Unit or Per Item Shipping Help?

    Quote Originally Posted by kobra View Post
    I do not see the confusion??
    I guess the confusion then is I'm not the best with php code. I don't see any place in the usps.php file where I would add a calculation. This might be something I may have to pay somebody to assist with, now that I see it.

  8. #28
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Per Unit or Per Item Shipping Help?

    In the USPS shipping module:
    /includes/modules/shipping/usps.php

    you will see around line 229 the line:
    Code:
              $cost = preg_replace('/[^0-9.]/', '',  $cost);
    Below that line add:
    Code:
    global $cart;
    $chk_guns = $_SESSION['cart']->in_cart_check('master_categories_id','2');
    $chk_rifles = $_SESSION['cart']->in_cart_check('master_categories_id','3');
    $extra_handling_fee = ($chk_guns * 50) + ($chk_rifles * 35);
    This is calculating how many Guns from categories_id 2 and Rifles from categories_id 3, using the master_categories_id of the Products and multiplying them by 50 for Guns and 35 for Rifles ...

    This creates the:
    $extra_handling_fee

    which holds this amount ...

    Now add the $extra_handling_fee to the final cost in the next section of code:
    Code:
              $methods[] = array('id' => $type,
                                 'title' => $title,
                                 'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) + $extra_handling_fee  );
    If you take out the 50.00 from the Handling Fee that you setup in the USPS shipping module, does this now add the correct additional cost?
    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!

  9. #29
    Join Date
    Mar 2009
    Posts
    68
    Plugin Contributions
    0

    Default Re: Per Unit or Per Item Shipping Help?

    Hmm... I cannot find that line of code near line 229 or anywhere (using ctrl+f for "find") and this is on includes/modules/shipping/usps.php

    Could this be a difference in version?

  10. #30
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Per Unit or Per Item Shipping Help?

    What version of Zen Cart are you running?

    If you look at the file:
    /includes/modules/shipping/usps.php

    what does the version id line read?
    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!

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 7
    Last Post: 20 Mar 2013, 02:12 PM
  2. v139h Per unit/per category/per location shipping rates
    By jsavoie in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 4 Nov 2012, 06:19 PM
  3. Shipping per unit/weight not calculating for more than one item
    By brightideas in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 8 Mar 2010, 07:54 PM
  4. Individual Shipping Per Item, and reduced cost per extra item
    By canad1an in forum Addon Shipping Modules
    Replies: 7
    Last Post: 6 Feb 2009, 11:41 PM
  5. How to removing free and per unit shipping on an item?
    By datatv in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Jun 2008, 03:59 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