Page 13 of 56 FirstFirst ... 3111213141523 ... LastLast
Results 121 to 130 of 552
  1. #121
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by webpdq View Post
    It does NOT work but maybe someone can show me how to fix it.
    // disable when products_model is not all books this goes in item
    global $db;
    if (($total_count - $_SESSION['cart']->count_contents('products_model','book') == 0)) {
    // show
    $this->enabled = true;
    } else {
    // hide
    $this->enabled = false;
    }
    You have an error in your code, you used a single = you need a double == in the IF ...
    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!

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

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ooba_Scott View Post
    Hi all, i have been trying to implement the code from page 1 into my table rate php file, but with no luck....it just doesnt seem to make any difference

    Here is a little bit of info about what i am trying to achieve.....for ease lets say i have 2 categories, each with x amount of products in.

    Category 1 is chairs, and needs 2 shipping options, 48hr delivery at £15 and 24hr delivery at £30. But if you buy 2 you get it for cost of one delivery rate ( hence why i chose table rate shipping)

    Category 2 is stools, and needs 2 shipping options, 48hr delivery at £10 and 24hr delivery at £20. And once again if you buy 2 you get it for cost of one delivery rate


    I decided that probably best way would be to duplicate the table shipping rate 3 extra times, and then only show 2 that is needed per category.

    Sadly i cant seem to get the code from page one to work correctly ( i did change the category id to be my id, and changed it from ITEM to TABLE)

    Where should this code be placed, and does it overwrite any other code?

    Any help would be greatly appreciated!!

    Thanks in advance

    Scott
    If should go at the end of the function table, just before the closing } ...

    Could you post your code so we can see it?
    Could you post your code?
    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!

  3. #123
    Join Date
    Apr 2009
    Posts
    18
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    In answer to the question as to where to place the code
    You need to be customizing the file:
    /includes/modules/shipping/filename.php
    where filename is the name of the shipping method that you want to hide or show. Note you have to place this code in all the methods that you want to hide and show. In my case, I put it in zones to hide it and item to show it and just swapped the last two statements about true and false.

  4. #124
    Join Date
    Apr 2009
    Posts
    18
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    I must still be missing something. Now Zones show up no matter what is in the cart and item shipping never shows up. It should show only item if the whole cart is books and zone other wise. Here's the code for both files. I have checked and model is set to book.
    // disable when products_model is not all books this goes in zones
    global $db;
    if (($total_count - $_SESSION['cart']->count_contents('products_model','book') == 0)) {
    // hide
    $this->enabled = false;
    } else {
    // show
    $this->enabled = true;
    }

    // enable when products_model is all books this goes in item
    global $db;
    if (($total_count - $_SESSION['cart']->count_contents('products_model','book') == 0)) {
    // show
    $this->enabled = true;
    } else {
    // hide
    $this->enabled = false;
    }


  5. #125
    Join Date
    Jun 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    I need no free shipping for one category only...
    I need to add only this code to freeoptions.php?

    PHP Code:
     if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','107') > 0)) {
            
    $this->enabled false;
          } 
    (it doesn't operate!)

    thank you very much

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

    Default Re: Different shipping methods for different categories

    Depends on where you put that in the code ...
    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!

  7. #127
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: Different shipping methods for different categories

    Ajeh - thank you for your reply, much appreciated :)

    I was adding the code into the wrong place! oops my bad!

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

    Default Re: Different shipping methods for different categories

    Thanks for the update that you were able to get the code working after placing it in the right location of the file ...
    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!

  9. #129
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: Different shipping methods for different categories

    annoyingly, the client has changed their mind and gone with the way i originally suggested haha

    At least i will know now for next time, adn will be able to part my new found knowledge with others

  10. #130
    Join Date
    Apr 2009
    Posts
    18
    Plugin Contributions
    0

    Default Re: Different shipping methods for different categories

    Ajeh
    Any suggestions for my code in #124? I think it will help a lot of people in this thread.
    Thanks
    Shirley

 

 
Page 13 of 56 FirstFirst ... 3111213141523 ... LastLast

Similar Threads

  1. 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
  2. Replies: 2
    Last Post: 27 Oct 2010, 01:45 PM
  3. Different shipping methods for different categories and mixed categories
    By neit in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 10 Aug 2010, 12:20 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 methods for different product types?
    By talisman-studios in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 17 Sep 2008, 04:59 PM

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