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

    Default Re: Adding 2 more flat rate shipping modules

    What are you trying to do ...

    Can you show some 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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  2. #22
    Join Date
    Jul 2010
    Location
    Boston
    Posts
    140
    Plugin Contributions
    0

    help question Re: Adding 2 more flat rate shipping modules

    We sell yarn as well as some smaller accessories. I would like a flat rate on the yarn of 7.50 and a flat rate on the sequins which are much lighter of 3.50.

    http://www.stitchboutiqueboston.com/...sequins-p-471/

    I would like the flat rate of $3.50 to appear on the sequins.

  3. #23
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,681
    Plugin Contributions
    6

    Default Re: Adding 2 more flat rate shipping modules

    What about everything else?

    Are all Yarn in one Category?

    Are all Sequins in one Category?

    Are there other Products that this has to happen to?
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  4. #24
    Join Date
    Jul 2010
    Location
    Boston
    Posts
    140
    Plugin Contributions
    0

    Default Re: Adding 2 more flat rate shipping modules

    I would like all the categories at the same flat rate 0f 7.50 except for the accessories at 3.50.

  5. #25
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,681
    Plugin Contributions
    6

    Default Re: Adding 2 more flat rate shipping modules

    What should shipping be when I order:

    1 Accessory Product?

    10 Accessory Products?

    1 Accessory Product and 1 non-Accessory Product?

    1 Accessory Product and 10 non-Accessory Product?

    10 Accessory Product and 1 non-Accessory Product?
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  6. #26
    Join Date
    Jul 2010
    Location
    Boston
    Posts
    140
    Plugin Contributions
    0

    Default Re: Adding 2 more flat rate shipping modules

    What should shipping be when I order:

    1 Accessory Product? 3.5

    10 Accessory Products? 3.5

    1 Accessory Product and 1 non-Accessory Product? 7.5

    1 Accessory Product and 10 non-Accessory Product? 7.5

    10 Accessory Product and 1 non-Accessory Product? 7.50

  7. #27
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,681
    Plugin Contributions
    6

    Default Re: Adding 2 more flat rate shipping modules

    You can customize the Flat Rate flat shipping module:
    /includes/modules/flat.php

    by customizing the code in RED:
    Code:
        function quote($method = '') {
          global $order;
    
    // bof: flat rate charges
          global $cart;
    
          $chk_cat1 = $_SESSION['cart']->in_cart_check('master_categories_id','1');
          $full_cart = $_SESSION['cart']->count_contents();
          if ($chk_cat1 == $full_cart) {
            $flat_charge = 3.50;
          } else {
            $flat_charge = 7.50;
          }
    
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => $flat_charge)));
    // eof: flate rate charges
          if ($this->tax_class > 0) {
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  8. #28
    Join Date
    Jun 2008
    Location
    New England, USA
    Posts
    11
    Plugin Contributions
    0

    Default Re: Adding 2 more flat rate shipping modules

    I am working on a situation that is rather the reverse of the yarns/sequins problem.

    I have a set of products (patterns, but they are in multiple categories based on the kind of pattern they are) for which the buyer should get a Low Flat Rate shipping (if they order less than 5 of patterns, say).

    However, if *anything* else is in the cart--books, yarns, etc--the High Flat Rate should apply.

    I am not sure how to edit/code this line (or nearby lines) (in /includes/modules/shipping/flat.php) to test for "any of the following category IDs" instead of just one ID:

    PHP Code:
         $chk_cat1 $_SESSION['cart']->in_cart_check('master_categories_id','20'); 
    I can get any one of the IDs to work fine, of course, following the pattern you provided in August. Any code help (or a link to a post I couldn't find yet) is most welcome!

    (ZC version = the most recent )
    (Category IDs include 20, 27, 23, and some others)
    (Site: http://www.vtyarnco.com/store/ )
    Thanks,
    Kir
    Last edited by metasilk; 15 Sep 2011 at 07:02 PM. Reason: clarifying file being edited, added site URL

  9. #29
    Join Date
    Jun 2008
    Location
    New England, USA
    Posts
    11
    Plugin Contributions
    0

    Idea or Suggestion Re: Adding 2 more flat rate shipping modules

    Quote Originally Posted by metasilk View Post
    I am working on a situation that is rather the reverse of the yarns/sequins problem.

    I have a set of products (patterns, but they are in multiple categories based on the kind of pattern they are) for which the buyer should get a Low Flat Rate shipping (if they order less than 5 of patterns, say).
    Hey, I got it. Here is the code (2 categories shown) below. I started with what Ajeh posted in http://www.zen-cart.com/forum/showpo...6&postcount=27 (where she posted an edit to includes/modules/shipping/flat.php that allowed for a custom flat rate for one category).
    Then I had to
    1) Add up the results of the in_cart_check by adding a line of code to call this for each category I cared about, and summing those (with [FONT="Courier New"]+=[/FONT]),
    and
    2) including a check for the final total of items as well

    Code:
          $chk_cat1 = $_SESSION['cart']->in_cart_check('master_categories_id','20'); // counts how many are of the Hats category
          $chk_cat1 += $_SESSION['cart']->in_cart_check('master_categories_id','26'); // counts how many are of the Mittens category
          $full_cart = $_SESSION['cart']->count_contents(); // counts number of items in the cart in total
          if ( ($chk_cat1 == $full_cart) && ($full_cart<6) ) {
            $flat_charge = 1.50;
          } else {
            $flat_charge = 6.00;
          }
    I think this works (2 categories and the counts work, so far). Let me know if you see any screw ups or improvements! Feel free to cross post this to other threads if it's useful...

    Hopefully I'm not duplicating the suggestions of forty gazillion other ZCers... :)

    --Kir

  10. #30
    Join Date
    Jun 2008
    Location
    New England, USA
    Posts
    11
    Plugin Contributions
    0

    help question Re: Adding 2 more flat rate shipping modules

    A new puzzle:
    Current situation: if you buy 5 or fewer patterns you can get them shipped for a low price. If you buy more patterns, or buy anything else with the pattern, it's shipped for the standard flat rate. Cool.

    Now I'd like to add the option: if you buy 5 or fewer patterns, you can **choose** to have them shipped at a priority mail rate (more than the default low) (and we'll ship them flat, too).

    I assume I should clone the flat.php files -- so far so good. I got that cloned and installed through the admin no problem (well, except for the _ I had been using which prevented it from displaying).

    But how to change the code so it
    1) checks for the patterns
    2) checks for the number of items
    and THEN enables/disables that new priority mail module according to the results?

    So far, it seems this module is all disabled -- no matter what's in the cart, it doesn't show this shipping option. I tried working within the class options (as when I was doing the low rate bit) and up by where modules get disabled when it's all free shipping...

    Help welcome!

 

 
Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. More Flat Rate Shipping Modules?
    By Checkit in forum Addon Shipping Modules
    Replies: 2
    Last Post: 26 Nov 2006, 09:13 AM
  2. Multiple Flat Rate Modules, Only Selects Original
    By kevinhankens in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 13 Oct 2006, 04:37 PM
  3. Flat rate shipping-one rate euro, one rate international
    By schwimwastaken in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 11 Oct 2006, 04:59 AM
  4. Flat Rate and USPS Shipping Modules Conflict
    By eDigitalExpress in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 8 Sep 2006, 05:01 AM

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
  •