Page 52 of 56 FirstFirst ... 2425051525354 ... LastLast
Results 511 to 520 of 552
  1. #511
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    The methods used in post #498 do look correct in all three methods you have posted for:
    master_categories_id
    manufacturers_id
    products_id

    the idea being you are testing the cart to see what's in there and turning off the module based on the result ...
    Yes ma'am I am.. or at least that's the plan when I get back to messing with this.. Got a LOT going on with this particular build so I'm just trying to get all my ducks in a row as it were.. Thanks for the sanity check..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #512

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    Have you gotten this working or are you still having issues?

    One of the things that stand out is that your naming conventions for the files, variables and constants are using underscores ...

    Your file:
    signpost.php

    is the closet to correct ...

    The other files:
    pos_malaysia.php
    singpost_plus_posmalaysia.php

    should be remade from the file:
    signpost.php

    where you can change all:
    signpost to posmalaysia
    SIGNPOST to POSMALAYSIA
    and the filenames to posmalaysia.php

    and copy then:
    signpost to singpostplusposmalaysia
    SIGNPOST to SIGNPOSTPLUSPOSMALAYSIA
    and the filenames to singpostplusposmalaysia.php

    Now add in your customization for the $chk_cat for each one ...

    I think the conflicts are worth fixing before you proceed ...

    Then remove all traces of the old files from your site for:
    pos_malaysia.php
    singpost_plus_posmalaysia.php

    From here, we can look further into what needs to be done ...
    Thanks Linda, still having problem. I have followed your instruction, check out is fine now for all 3 modules , mixed cart and cart with only #20 are also working fine but cart without #20 still show all three modules (should be only Singpost), back to the same problem posted #501

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

    Default Re: Different shipping methods for different categories

    In the module for:
    posmalaysia

    what happens if you change the IF to:
    Code:
          if ($chk_cat > 0  && $chk_cat == $_SESSION['cart']->count_contents()) {
    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!

  4. #514

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    In the module for:
    posmalaysia

    what happens if you change the IF to:
    Code:
          if ($chk_cat > 0  && $chk_cat == $_SESSION['cart']->count_contents()) {
    Didn't work, cart without #20 still show all three modules and posmalaysia no longer show up in cart with only #20 which it suppose to show.

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

    Default Re: Different shipping methods for different categories

    And please confirm these shipping rules:

    1. singpost - enable for all categories except cat #20

    2. posmalaysia - enable when cart only have cat #20

    3. singpostplusposmalaysia - mixed cart enable only when cart have cat #20 plus any other cat
    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!

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

    Default Re: Different shipping methods for different categories

    Using a slightly different approach ...

    SIGNPOST:
    Code:
     // bof: disable for these master_categories_id
        if (IS_ADMIN_FLAG == false) {
          // check master_categories_id add one line per master_categories_id
          $chk_cat = 0;
          $this->enabled = true;
          $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','20');
          if ($chk_cat > 0) {
            $this->enabled = false;
          }
    echo '<br>SINGPOST - ' . 'chk_cat: ' . $chk_cat . ' count: ' . $_SESSION['cart']->count_contents() . ' ' . ($this->enabled ? 'ON' : 'OFF') . '<br>' . ' - 1. singpost - show when cart without cat #20' . '<br><br>';
        }
        // eof: disable for these master_categories_id
    POLYMALAYSIA:
    Code:
        // bof: disable for these master_categories_id
        if (IS_ADMIN_FLAG == false) {
          // check master_categories_id add one line per master_categories_id
          $chk_cat = 0;
          $this->enabled = false;
          $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','20');
          if ($chk_cat > 0 && $chk_cat == $_SESSION['cart']->count_contents()) {
            $this->enabled = true;
          }
    echo '<br>POSMALAYSIA - ' . '$chk_cat: ' . $chk_cat . ' total count: ' . $_SESSION['cart']->count_contents() . ' ' . ($this->enabled ? 'ON' : 'OFF') . '<br>' . ' - 2. pos_malaysia - show when cart have only cat #20' . '<br><br>';
        }
        // eof: disable for these master_categories_id
    SINGPOSTPLUSMALAYSIA:
    Code:
          // bof: enable for mixed cart where cat #20 must be present plus any other cat
        global $db, $cart;
        if (IS_ADMIN_FLAG == false) {
          // check master_categories_id add one line per master_categories_id
          $chk_cat = 0;
          $this->enabled = false;
          $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','20');
          if ($chk_cat > 0 && $chk_cat != $_SESSION['cart']->count_contents()) {
             $this->enabled = true;
          }
    echo '<br>SINGPOSTPLUSMALAYSIA -' . 'chk_cat: ' . $chk_cat . ' count: ' . $_SESSION['cart']->count_contents() . ' ' . ($this->enabled ? 'ON' : 'OFF') . '<br>' . ' - 3. singpost_plus_posmalaysia - show when cat #20 plus any other cat<br><br>';
         }
    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. #517

    Default Re: Different shipping methods for different categories

    Quote Originally Posted by Ajeh View Post
    Using a slightly different approach ...

    SIGNPOST:
    Code:
     // bof: disable for these master_categories_id
        if (IS_ADMIN_FLAG == false) {
          // check master_categories_id add one line per master_categories_id
          $chk_cat = 0;
          $this->enabled = true;
          $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','20');
          if ($chk_cat > 0) {
            $this->enabled = false;
          }
    echo '<br>SINGPOST - ' . 'chk_cat: ' . $chk_cat . ' count: ' . $_SESSION['cart']->count_contents() . ' ' . ($this->enabled ? 'ON' : 'OFF') . '<br>' . ' - 1. singpost - show when cart without cat #20' . '<br><br>';
        }
        // eof: disable for these master_categories_id
    POLYMALAYSIA:
    Code:
        // bof: disable for these master_categories_id
        if (IS_ADMIN_FLAG == false) {
          // check master_categories_id add one line per master_categories_id
          $chk_cat = 0;
          $this->enabled = false;
          $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','20');
          if ($chk_cat > 0 && $chk_cat == $_SESSION['cart']->count_contents()) {
            $this->enabled = true;
          }
    echo '<br>POSMALAYSIA - ' . '$chk_cat: ' . $chk_cat . ' total count: ' . $_SESSION['cart']->count_contents() . ' ' . ($this->enabled ? 'ON' : 'OFF') . '<br>' . ' - 2. pos_malaysia - show when cart have only cat #20' . '<br><br>';
        }
        // eof: disable for these master_categories_id
    SINGPOSTPLUSMALAYSIA:
    Code:
          // bof: enable for mixed cart where cat #20 must be present plus any other cat
        global $db, $cart;
        if (IS_ADMIN_FLAG == false) {
          // check master_categories_id add one line per master_categories_id
          $chk_cat = 0;
          $this->enabled = false;
          $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','20');
          if ($chk_cat > 0 && $chk_cat != $_SESSION['cart']->count_contents()) {
             $this->enabled = true;
          }
    echo '<br>SINGPOSTPLUSMALAYSIA -' . 'chk_cat: ' . $chk_cat . ' count: ' . $_SESSION['cart']->count_contents() . ' ' . ($this->enabled ? 'ON' : 'OFF') . '<br>' . ' - 3. singpost_plus_posmalaysia - show when cat #20 plus any other cat<br><br>';
         }
    Bingo! It Works!
    Linda, you are the BEST, thank you for being so patience.

  8. #518
    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 this is working and sorry for the delay in getting the three of these working as needed ...
    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. #519

    Default Re: Different shipping methods for different categories

    I am using ver 1.5 zencart if that makes a difference.

    Want to do like the first post. I understand alittle about putting the code in the shipping options you do not want it to show in. Just not quite sure how to get it to go to table rate with a mixed cart or other items?

    I have 4 different shipping methods

    Jewelry Shipping - using flatrate clone called jewelry.php = This I only want categories with jewelry items to use this shipping option. Turn off if there is a combination of jewelry and other items or just other items in the cart and use the Table Rate Option

    Linen Shipping - using flaterate clone called linen.php = This I only want categories with linen items to use this shipping option. Turn off if there is a combination of Linen and other items or just other items in the cart and use the Table Rate option

    Shoes Shipping - using item shipping clone called shoes.php = This I only want categories with shoes items to use this shipping option. Turn off if there is a combination of shoes and other items or just other items in cart and use Table Rate option.

    Table Rate Option - using the table rate clone table1.php = This I only want to use this on all other categories and mixed carts.

    Any help would be appreciated.

    Mack

  10. #520

    Default Re: Different shipping methods for different categories

    Anyone!

 

 
Page 52 of 56 FirstFirst ... 2425051525354 ... 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