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

    Default Re: flat rate shipping to specific products

    You are passing the wrong value for the master_categories_id ...

    This is the cPath: 61_63_330

    The master_categories_id is the immediate categories_id that the product is in, for this example it would be: 330

    You can check the master_categories_id value by editing the Product to be sure that you are using the right values ...
    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
    Feb 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: flat rate shipping to specific products

    ** Wait! I want to try what you said first, I didn't see it when I wrote this below!!**

    Or maybe just adding the flat shipping fee to the canada post would be simpler...

    If I have products in the master categories of my choice, skip the usual fees and charge 5$
    If I have only products outside of the master categories, charge the usual fees
    If I have both products, add the 2 fees

    Would this be easier to manage all in the canada post module ?

  3. #23
    Join Date
    Feb 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: flat rate shipping to specific products

    It works perfectly!!!!

    Thank you so much for all your help and your patience!

  4. #24
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: flat rate shipping to specific products

    Thanks for the update that this is now working for you ...
    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!

  5. #25
    Join Date
    Jun 2009
    Posts
    389
    Plugin Contributions
    0

    Default Re: flat rate shipping to specific products

    I am trying to set two different flat rates for certain categories.

    I want master category 62 & 76 just to be $3.00
    And the rest $8.00.

    I have re-read this thread several times...no success.

    I added this code to my flat.php


    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
    }

    if (!IS_ADMIN_FLAG) {
    global $cart;
    $chk_categories = 0;
    $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','62');
    $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','76');
    if ($_SESSION['cart']->count_contents() != $chk_categories) {
    $this->enabled = false;
    }
    }

    if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {

    AND when I went to Shipping Modules in admin it was blank..no modules showed up.

    So I put the flat.php back to the original.

    Then I cloned the flat.php and renamed to flat3.php and still no success.

    So I am lost here.

    Please help.

    Thanks.

  6. #26
    Join Date
    Mar 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: flat rate shipping to specific products

    Hi

    Thanks for your help so far with this, just have one question.

    I am trying to set this up so that there are 2 categories with different flat rates.

    I have this code but I think I need an If statement in there so that it only charges whatever is bigger.

    Code:
            $extra_shipping = 0.00;
            global $cart;
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','1');
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','2');
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','4');
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','5');
            if ($chk_categories > 0) {
              $extra_shipping = 8.50;
            }
    
            $extra_shipping2 = 0.00;
            global $cart;
            $chk_categories2 += $_SESSION['cart']->in_cart_check('master_categories_id','3');
            $chk_categories2 += $_SESSION['cart']->in_cart_check('master_categories_id','6');
            if ($chk_categories2 > 0) {
              $extra_shipping2 = 14.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' => MODULE_SHIPPING_FLAT_COST + $extra_shipping + $extra_shipping2)));
    If you only buy items from Categories 1,2,4 & 5 you pay $8.50

    If you buy from Categories 3 & 6 you pay $14.50

    If you buy from mixed categories the maximum you will pay is $14.50

    Hope you can help

    Thanks

    Steve

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

    Default Re: flat rate shipping to specific products

    You could use beneath that code:
    Code:
    if ($extra_shipping2 > 0) {
      $extra_shipping = $extra_shipping2;
    }
    Then you have the value of $extra_shipping as either 8.50 or 14.50 ...
    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
    Mar 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: flat rate shipping to specific products

    Thanks

    This is the final piece

    Code:
    // disable only when entire cart is free shipping
    		if (zen_get_shipping_enabled($this->code)) {
    		$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
    	}
    
    
            $extra_shipping = 0.00;
            global $cart;
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','1');
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','2');
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','4');
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','5');
            $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','7');
            if ($chk_categories > 0) {
              $extra_shipping = 7.50;
              $extra_shipping2 = 0;
            }
    
            $extra_shipping2 = 0.00;
            global $cart;
            $chk_categories2 += $_SESSION['cart']->in_cart_check('master_categories_id','3');
            $chk_categories2 += $_SESSION['cart']->in_cart_check('master_categories_id','6');
            if ($chk_categories2 > 0) {
              $extra_shipping2 = 11.50;
            }
    
    
    	if ($extra_shipping2 > 0) {
      	$extra_shipping = $extra_shipping2;
    	}
    
    
    
          $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' => MODULE_SHIPPING_FLAT_COST + $extra_shipping )));

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

    Default Re: flat rate shipping to specific products

    Thanks for the update that this is now working for you and for posting the final solution on the code changes ...
    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
    Aug 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: flat rate shipping to specific products

    I've tried the script madkeen posted but I keep getting an error "Call to a member function in_cart_check() on a non-object" on this line of the script

    PHP Code:
    $chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','1'); 
    I'm not sure what the problem is!

    Thanks!

 

 
Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Replies: 98
    Last Post: 26 Feb 2014, 08:33 PM
  2. free shipping for specific zip code, flat rate otherwise
    By newdre in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 11 Jan 2012, 11:39 AM
  3. zone specific flat rate shipping question
    By Lockerroom in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 7 Jan 2010, 07:21 PM
  4. Calculate shipping on all items, except flat rate on specific category
    By buckit in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 1 Dec 2009, 06:24 PM
  5. flat rate on specific products only
    By bangsters in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 8 Nov 2006, 07:38 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR