Page 7 of 8 FirstFirst ... 5678 LastLast
Results 61 to 70 of 77
  1. #61
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Per Item shipping for 1 category

    Are you saying that the tested products_id should NOT be allowed for Flat Rate and should using the other shipping modules only?
    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. #62
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Per Item shipping for 1 category

    Correct. I would rather block 30 items than allow over 1000...know what I mean? So I'm just blocking the big, bulky, heavy items from flat rate shipping. They can still ship, just using the other modules (USPS, UPS, and in store pickup).

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

    Default Re: Per Item shipping for 1 category

    To make this have the checked products_id NOT allow Flat and only allow USPS use the code in RED:
    /includes/modules/shipping/flat.php

    Code:
        function quote($method = '') {
          global $order;
    
    // bof: NOT Allow individual Products to use Flat
    // set allowed products_id 12, 13, 15
    $chk_cart = 0;
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','13');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','15');
    
    if ($chk_cart == 0) {
      // allow flat rate
          $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)));
    } else {
      // skip flat rate
    }
    // eof: Allow individual Products to use Flat
    
          if ($this->tax_class > 0) {
    and for USPS use:
    Code:
        function quote($method = '')
        {
          global $order, $shipping_weight, $shipping_num_boxes, $currencies, $shipping;
    
    // bof: NOT Allow individual Products to use Flat enable USPS
    // set allowed products_id 12, 13, 15
    $chk_cart = 0;
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','13');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','15');
    
    if ($chk_cart > 0) {
      // NOT allow flat rate only allow USPS
    } else {
      return;
    }
    // eof: NOT Allow individual Products to use Flat enable USPS
    
    //echo 'USPS function quote BEFORE IF $this->enabled $this->uspsQuote $this->enabled: ' . ($this->enabled ? ' ON' : ' OFF') . ' $shipping_weight: ' . $shipping_weight . '<br>';
          $usps_shipping_quotes = '';
    and then use something similar on FedEx and UPS ...
    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. #64
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Per Item shipping for 1 category

    Quote Originally Posted by Ajeh View Post
    To make this have the checked products_id NOT allow Flat and only allow USPS use the code in RED:
    /includes/modules/shipping/flat.php

    Code:
        function quote($method = '') {
          global $order;
    
    // bof: NOT Allow individual Products to use Flat
    // set allowed products_id 12, 13, 15
    $chk_cart = 0;
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','13');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','15');
    
    if ($chk_cart == 0) {
      // allow flat rate
          $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)));
    } else {
      // skip flat rate
    }
    // eof: Allow individual Products to use Flat
    
          if ($this->tax_class > 0) {
    and for USPS use:
    Code:
        function quote($method = '')
        {
          global $order, $shipping_weight, $shipping_num_boxes, $currencies, $shipping;
    
    // bof: NOT Allow individual Products to use Flat enable USPS
    // set allowed products_id 12, 13, 15
    $chk_cart = 0;
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','13');
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','15');
    
    if ($chk_cart > 0) {
      // NOT allow flat rate only allow USPS
    } else {
      return;
    }
    // eof: NOT Allow individual Products to use Flat enable USPS
    
    //echo 'USPS function quote BEFORE IF $this->enabled $this->uspsQuote $this->enabled: ' . ($this->enabled ? ' ON' : ' OFF') . ' $shipping_weight: ' . $shipping_weight . '<br>';
          $usps_shipping_quotes = '';
    and then use something similar on FedEx and UPS ...
    I updated the Flat Rate and USPS and lost the shipping module in the admin, and those shipping options don't show at all on the site during checkout. It seems to be the Flat Rate file that makes the admin shipping module crash. When I undid the USPS, no change. Undid the Flat Rate, back to normal.
    Last edited by bigandrew; 23 Oct 2015 at 08:39 PM.

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

    Default Re: Per Item shipping for 1 category

    You have an error then in the file ... if you check in the /logs (or /cache in older versions of Zen Cart) you will see a log file that explains the problem ...

    Check and read the debug log file and post its contents and we can help you figure out the problem ...
    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. #66
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Per Item shipping for 1 category

    [23-Oct-2015 15:48:38 America/New_York] PHP Parse error: syntax error, unexpected 'else' (T_ELSE) in .../store/includes/modules/shipping/flat.php on line 95

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

    Default Re: Per Item shipping for 1 category

    Sounds like a typo on the new code ... I am using this:
    Attached Files Attached Files
    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. #68
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Per Item shipping for 1 category

    Not sure why the attachment has jibberish, however, I think I found my issue. testing now...
    Last edited by bigandrew; 24 Oct 2015 at 02:18 PM. Reason: Might have found the issue....

  9. #69
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Per Item shipping for 1 category

    My coding error in the Flat Rate file was due to placing the edits too high in the file. I moved it to just behind the class methods and it worked. It just didn't look right when I placed it behind the class constructor. It seems to be working. I will continue testing and report back with any issues.
    Donation on the way.
    Thanks!
    Andrew

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

    Default Re: Per Item shipping for 1 category

    Thanks for the update that this appears to be working for you now and the explination on the problem you had ... Let us know if you run into any issues ...

    Thanks also for the donation to the Zen Cart Team, that is always of great help to us!
    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!

 

 
Page 7 of 8 FirstFirst ... 5678 LastLast

Similar Threads

  1. Shipping Cost Based On Item Category With Discount Per Multiple Items In Category
    By CFen in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 Nov 2011, 07:05 PM
  2. Flat rate for 1 category, Per Item for all others
    By Znak in forum Built-in Shipping and Payment Modules
    Replies: 19
    Last Post: 18 Aug 2011, 03:09 PM
  3. Shipping charged per item and free shipping per item
    By ae_support in forum Addon Shipping Modules
    Replies: 2
    Last Post: 27 Jul 2011, 05:04 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. Per item shipping for multi item kits
    By Biometicslady in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 4 Jan 2009, 06:16 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