Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 55
  1. #31
    Join Date
    Jun 2008
    Location
    New England, USA
    Posts
    9
    Plugin Contributions
    0

    Default Re: Adding 2 more flat rate shipping modules

    p.s. here's the code in my closed flat shipping file as I am stumped by it (basing my attempts on Ajeh's reply to another post here: http://www.zen-cart.com/forum/showpo...4&postcount=5:)
    PHP Code:
     // moderately experimental change by kjt 09.15.2011
          
    global $cart;
            
    // category IDs: 19 (Patterns), 25 Bags, 23 Cardigans, 20 Hats, 26 Mittens, 27 Scarves, 24 Socks, 21 Sweaters, 29 Vests as of 9/15/2011
          
    $chk_cat1 $_SESSION['cart']->in_cart_check('master_categories_id','20'); // counts how many are of the Hats category
          
    $chk_cat1 += $_SESSION['cart']->in_cart_check('master_categories_id','26'); // counts how many are of the Mittens category
          
    $chk_cat1 += $_SESSION['cart']->in_cart_check('master_categories_id','25'); // counts how many are of the Bags category
          
    $chk_cat1 += $_SESSION['cart']->in_cart_check('master_categories_id','23'); // counts how many are of the Cardgans category
          
    $chk_cat1 += $_SESSION['cart']->in_cart_check('master_categories_id','27'); // counts how many are of the Scarves category
          
    $chk_cat1 += $_SESSION['cart']->in_cart_check('master_categories_id','24'); // counts how many are of the Socks category
          
    $chk_cat1 += $_SESSION['cart']->in_cart_check('master_categories_id','21'); // counts how many are of the Sweaters category
          
    $chk_cat1 += $_SESSION['cart']->in_cart_check('master_categories_id','29'); // counts how many are of the Vests category

          
    $full_cart $_SESSION['cart']->count_contents(); // counts number of items in the cart in total

          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
          
    // also disable if cart contents include not-patterns or too many patterns
           
    if (($chk_cat1 != $full_cart) || ($full_cart 5)) { 
            
    $this->enabled = ((MODULE_SHIPPING_FLATpattUSPri_STATUS == 'True') ? true false);
            }
          } 

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

    Default Re: Adding 2 more flat rate shipping modules

    Code:
           if (($chk_cat1 != $full_cart) || ($full_cart > 5)) {
    This checks your specific categories and turns off if:

    1 the total cart content does not equal the checked categories so if the number of items in the checked categories is 1 and the full cart is 2 it is off, meaning something is in the cart that is not in the checked categories

    2 the total number in the cart regardless of what it is is greater than 5 so if the checked categories is > 5 it turns off or if the combination of things checked and not checked is > 5 it turns off
    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!

  3. #33
    Join Date
    Jan 2010
    Posts
    105
    Plugin Contributions
    0

    Default Re: Adding 2 more flat rate shipping modules

    Thank you so much - the simplest clearest instructions I've seen in a long time!

    I just created four clones of the flat rate, edited, uploaded and installed the modules, and they all worked perfectly first time - an unusual enough scenario when trying something new!

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

    Default Re: Adding 2 more flat rate shipping modules

    Thanks for the update that this is helped you out ...
    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!

  5. #35
    Join Date
    Jul 2009
    Posts
    158
    Plugin Contributions
    0

    Default Re: Adding 2 more flat rate shipping modules

    I've followed the instructions and changed the module and the languages files. Everything in them says flatsml or FLATSML but when I copy them to the areas by ftp and go and refresh the admin, nothing happens.

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

    Default Re: Adding 2 more flat rate shipping modules

    Could you look in your directory:
    /cache

    and see what debug logs are generated and what the errors are?
    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!

  7. #37
    Join Date
    Jul 2009
    Posts
    158
    Plugin Contributions
    0

    Default Re: Adding 2 more flat rate shipping modules

    Wow. I didn't know there was an error report... what a great tool.

    I just did what you said and corrected the line it had a problem with and now it appears in the list in shipping modules in admin but the two fields with name/descriptions are blank and it just has the red stop light as the only thing in the line.

    I clicked install on the that line but it didn't work.
    Attached Images Attached Images  

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

    Default Re: Adding 2 more flat rate shipping modules

    Kind of odd ...

    Can you post the two files that you created?
    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!

  9. #39
    Join Date
    Jul 2009
    Posts
    158
    Plugin Contributions
    0

    Default Re: Adding 2 more flat rate shipping modules

    I'm getting three errors now.

    Fatal error: Cannot redeclare class flat in /home4/occxxxp2/public_html/includes/modules/shipping/flatsml.php on line 11

    On line 11 there is this -

    class flat {
    var $code, $title, $description, $icon, $enabled;

    Do I put a sml there for flatsml or leave it blank?


    Warning: Variable passed to each() is not an array or object in /home4/occxxxp2/public_html/aadmin/modules.php on line 56

    On line 56 there is this -

    while (list($key, $value) = each($_POST['configuration'])) {



    PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in /home4/occxxxp2/public_html/aadmin/modules.php on line 282
    [01-Oct-2011 17:20:06] PHP Warning: Variable passed to each() is not an array or object in /home4/occxxxp2/public_html/aadmin/modules.php on line 283

    On line 283 there is this -

    reset($mInfo->keys);


    I don't know how to post or attach the whole files unless I just paste them in a post.

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

    Default Re: Adding 2 more flat rate shipping modules

    ALL of the flat become flatsml and ALL of the FLAT become FLATSML ...
    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 4 of 6 FirstFirst ... 23456 LastLast

Similar Threads

  1. flat rate shipping for three or more shippers
    By bigbear in forum Built-in Shipping and Payment Modules
    Replies: 18
    Last Post: 30 Oct 2010, 03:21 AM
  2. How Do I two flat rate shipping Modules
    By directdesign in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 13 Mar 2010, 05:26 AM
  3. More than one Flat Rate for Shipping
    By brightideas in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 8 Mar 2010, 01:18 AM
  4. More Flat Rate Shipping Modules?
    By Checkit in forum Addon Shipping Modules
    Replies: 2
    Last Post: 26 Nov 2006, 09:13 AM
  5. Flat Rate and USPS Shipping Modules Conflict
    By eDigitalExpress in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 8 Sep 2006, 05:01 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