Results 1 to 10 of 77

Threaded View

  1. #29
    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.

 

 

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