Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Customized shipping modules not working after upgrade

    Do you anywhere in the code add this value:
    $cat_extra_charge

    to the $cost or something so it is included?
    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. #12
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Customized shipping modules not working after upgrade

    Gotcha, yes, I left this very little but all important piece of the puzzle out:

    PHP Code:
    'cost' => $cat_extra_charge + ($cost $shipping_num_boxes
    Thank you! It's now adding the $5.00 extra cost!

    In terms of the echo I had added to explain the whole deal about the added shipping cost, is there a reason why it wasn't working with it, and taking out the echo fixed the blank page error? I'd really like to have this paragraph in there.

    One more question, I now have another product with a similar situation, I need to apply a flat rate to this whole category but it will be a different amount than the $5.00, so I need to write more code for it. I'm sure I can figure out how to duplicate it for this, but my main question is would I just add the new code to these same files, or should I make a clone of the usps.php and in the second one have the customized code for the new product? Guess I'm not sure why or when you'd want to clone a shipping module.


    THANK YOU!!!!!!!!!!!!!!!!!!!!!!

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

    Default Re: Customized shipping modules not working after upgrade

    You would just do the same thing based on the different information such as using the master_categories_id ...
    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. #14
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Customized shipping modules not working after upgrade

    Wouldn't I clone the flat if I want a different flat rate for the other product?

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

    Default Re: Customized shipping modules not working after upgrade

    Sorry, yes ... you need to clone Flat Rate flat for the new rate and Category and on the USPS you need to add the new calculation just like you had the other one ...
    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. #16
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Customized shipping modules not working after upgrade

    After much thought, and trying to configure the two cloned flat rates (and after studying code in other similar posts), I finally realized that I think this can be done with just one flat.php file.

    The usps.php is working perfectly, if the weight of the items in the cart is more than 0 it is activated, and if there are manufacturers 1 and or 2 in the cart it adds the appropriate extra flat fees.

    I used basically the same code in the flat.php, if the total cart weight is 0 it is activated, then it is supposed to look for manufacturers 1 & 2 and add the correct flat fees together.

    My thought is to configure the flat fee under shipping modules in my admin to be $0, and then just have the extra flat fees added.

    I know something is wrong with this file, because once I added the extra code in, the shipping modules don't show in my admin. Take the code out, and they show.

    Here is my custom code in the flat.php:

    PHP Code:
    global $cart;

    // check total cart weight
      
    if (IS_ADMIN_FLAG == false) {  
        
    $chk_products_weight $_SESSION['cart']->show_weight();
      }

    // enable if total product weight is 0 
      
    if (IS_ADMIN_FLAG == false && $chk_products_weight == 0) {
        
    // show FLAT
        
    $this->enabled true;
      } else {
        
    // hide FLAT
        
    $this->enabled false;
      }

        
    //check if manufacturer 1 is in cart 
          
    if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('manufacturers_id','1') > 0)); {
            
    $manufacturer_alchemy $_SESSION['cart']->in_cart_check('manufacturers_id','1');  
            
    $drop_ship_extra_charge_one $manufacturer_alchemy;
          }  

       
    // charge dropship fee for manufacturer 1 
           
    if ($drop_ship_extra_charge_one 0) { 
            
    $cat_extra_charge_one 5
            } else {
            
    $cat_extra_charge_one 0;
          }

    //check if manufacturer 2 is in cart 
          
    if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('manufacturers_id','2') > 0)); {
            
    $manufacturer_femme_metale $_SESSION['cart']->in_cart_check('manufacturers_id','2');  
            
    $drop_ship_extra_charge_two $manufacturer_femme_metale;
          }
      
       
    // charge dropship fee for manufacturer 2
          
    if ($drop_ship_extra_charge_two 0) { 
            
    $cat_extra_charge_two 10
            } else {
            
    $cat_extra_charge_two 0;
          } 
    and for the cost part I did this:

    PHP Code:
    'cost' => $cat_extra_charge_one $cat_extra_charge_two 
    Any ideas of what is wrong here?

    Thank you!!!!

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

    Default Re: Customized shipping modules not working after upgrade

    Where have you placed your code?

    You test to see if the module should be enabled or not, then go on to test for extra charges ...

    Then change the cost to your calculated costs ...

    You are also showing the semi-colons on your IF statements:
    Code:
          if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('manufacturers_id','1') > 0)); {
    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!

  8. #18
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Customized shipping modules not working after upgrade

    Ok, taking the bad semicolons out made the shipping modules show back up in admin, that's good. I also moved the code for testing for the different manufacturers down. I'm very close, if manufacturer 1 is in the cart it is showing the correct shipping cost, but it doesn't add anything if manufacturer 2 is in there. Here's my code in red:

    PHP Code:
    global $cart;

     
    //check if manufacturer 1 and 2 is in cart
            
    $chk_manufacturers_alchemy $_SESSION['cart']->in_cart_check('manufacturers_id''1');
            
    $chk_manufacturers_femme_metale $_SESSION['cart']->in_cart_check('manufacturers_id''2');

           if (
    $chk_manufacturers_alchemy 0) {
              
    $chk_shipping_charges_one 5.00;
              } else {
              
    $chk_shipping_charges_one 0;
           }

             if (
    $chk_manufacturers_femme_metale 0) {
              
    $chk_shipping_charges_two 10.00;
              } else {
              
    $chk_shipping_charges_two 0;
           } 
    PHP Code:
          $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' => [COLOR="Red"]($chk_shipping_charges_one $chk_shipping_charges_two) +[/COLORMODULE_SHIPPING_FLAT_COST))); 
    Coffee is on it's way!!

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

    Default Re: Customized shipping modules not working after upgrade

    Are you sure your second Manufacturer is actually manufacturers_id 2 and not some other value?
    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!

  10. #20
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Customized shipping modules not working after upgrade

    I believe it really is, the USPS module is working if I have an item from Alchemy, and item from Femme Metale (manufacturer 2), and a weighted product that triggers the USPS module, all the shipping fees added together are correct.

    Under Manufacturers in Admin, I have three listed in this order: Alchemy, Femme Metale, and Other. Is there somewhere else to check the actual number for the manufacturer?

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v151 Shipping estimator not working after upgrade from 1.3.8
    By HalRau in forum Upgrading to 1.5.x
    Replies: 12
    Last Post: 28 Mar 2014, 04:33 PM
  2. Free Shipping not working correctly after upgrade?
    By Jeff_Mash in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 6 Oct 2010, 03:39 PM
  3. Problems after upgrade of customized site
    By gage in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 10 Jun 2008, 07:37 AM
  4. USPS shipping module not working after upgrade
    By bobage24 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 14 Nov 2006, 06:04 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