Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Posts
    140
    Plugin Contributions
    0

    Default Different shipping methods for different categories and mixed categories

    After reading through other threads I am I not much clearer on what to do
    some of the others issues are similar to mine but there has been no clear instructions.

    I plan on selling 2 products on my website currently we are on selling higher value products:

    1) Higher value products (category a)
    2) Lower value products (category b)
    3) Other categories combination of products in category a and b)


    I currently have the clat rate shipping module cloned 8 times with different zones set to each clone.

    My shipping prices are fixed for each zone no matter if its a higher value product or a lower value product I still get charged
    the same from the courier.


    For 2 of these cloned flat rate zones I offer free shipping on higher value products and we absorb the cost of the courier.


    For the zones with free shipping we are unable to absorb the courier charges if a customer purchases a lower value product
    only as we would then be selling the product at a loss.

    So what I am trying to setup is a shipping modification
    that will:

    a) higher value product = shipping free
    b) higher value and lower value product = shipping free
    c) lower value product = shipping rate £5


    Having read through the thread the nearest I have found to
    what I am looking to do is this but I am not sure on this and
    what code to edit.

    PHP Code:
    // disable for one master_categories_id
          
    if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','17') > 0)) {
              
    $this->enabled false;
          } 

  2. #2
    Join Date
    Feb 2010
    Posts
    140
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories and mixed categories

    I guess no one can help with this query.

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

    Default Re: Different shipping methods for different categories and mixed categories

    You have the right idea ...

    To check how many products are in the shopping cart from master_categories_id 17 and disable if greater than 0, then you need to use:
    Code:
    // disable for one master_categories_id
          global $cart;
          if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','17') > 0)) {
              $this->enabled = false;
          }
    Most likely the missing:
    global $cart;

    is what is causing an issue ...

    global $cart will not trip the error in the Admin but the test of the $_SESSION['cart'] would ...

    Using the IS_ADMIN_FLAG && in the IF will prevent the error for the test of the cart, as you have it setup ...
    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!

 

 

Similar Threads

  1. Different shipping methods for different categories
    By tylerd213 in forum Built-in Shipping and Payment Modules
    Replies: 551
    Last Post: 18 Mar 2020, 02:12 AM
  2. v150 Using different Shipping Carrier for Different Categories
    By robin339 in forum Addon Shipping Modules
    Replies: 10
    Last Post: 31 Jul 2012, 12:19 AM
  3. Re: Different shipping methods for different categories
    By kaddie in forum Built-in Shipping and Payment Modules
    Replies: 14
    Last Post: 19 Nov 2010, 04:37 AM
  4. Separate Shipping Methods for Different Categories
    By MortalWombat in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 28 Jul 2010, 08:57 AM
  5. Different Shipping Module For Different Categories
    By jtatarin in forum General Questions
    Replies: 4
    Last Post: 2 Feb 2007, 02:53 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