Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / Can I apply Flat Rate to one Category & Zone, Per Weight for all other Categories?

Can I apply Flat Rate to one Category & Zone, Per Weight for all other Categories?

Locked

Started by blackorchidcouture on 18 Jun 2010, 9:03 PM · Views: 8,361

Results 41 to 60 of 70
This thread is locked. New replies are disabled.
4 Jul 2010, 4:50 AM
#41
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #41 by ajeh

This IF has no purpose, at this time:

// check total weight
if (IS_ADMIN_FLAG == false) {
          $chk_weight = $_SESSION['cart']->in_cart_check('products_weight','0');
      }

global $cart; is needed in each function ... but just 1 time per function ...

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 Jul 2010, 6:02 AM
#42
blackorchidcouture avatar

blackorchidcouture

Zen Follower

Join Date:
Apr 2010
Location:
Albuquerque, NM
Posts:
198
Plugin Contributions:
0

Post #42 by blackorchidcouture

I sure hope I'm not driving you crazy.....:blush:

Ok, I took that out of usps.php AND flat.php, and for now I'm working on Flat.

I feel like I'm onto something, but may have the parentheses wrong, something is wrong, but I'm starting to understand this a bit!

I realized I had to give flat.php more instructions so it will really know when to use it and when to not:

global $cart;

// check for manufacturer id alchemy
if (IS_ADMIN_FLAG == false) {
          $chk_manufacturer = $_SESSION['cart']->in_cart_check('manufacturers_id','1');
      }

// disable if no alchemy products in cart
      
      if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('manufacturers_id','1') == 0)) {
          // hide FLAT
          $this->enabled = false;
      } 

// disable if there are weighted products
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_weight') > 0)) {
          // hide FLAT
          $this->enabled = false;
      } 

// enable if total product weight is 0 AND there are alchemy products
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_weight') == 0)) && (('manufacturers_id','1') > 0)) {
          // show FLAT
          $this->enabled = true;
      }
4 Jul 2010, 1:58 PM
#43
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #43 by ajeh

This one isn't doing anything and I think there is a unbalanced use of the parens:

// enable if total product weight is 0 AND there are alchemy products
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('products_weight') == 0)) && (('manufacturers_id','1') > 0)) {
          // show FLAT
          $this->enabled = true;
      }

But the better way is to clean up all that code and condense it:

  global $cart;
// check for manufacturer id alchemy
  if (IS_ADMIN_FLAG == false) {
    $chk_manufacturer = $_SESSION['cart']->in_cart_check('manufacturers_id','1');
    $chk_products_weight = $_SESSION['cart']->show_weight();
  }

// enable if total product weight is 0 AND there are alchemy products
  if (IS_ADMIN_FLAG == false && $chk_products_weight == 0 && $chk_manufacturer > 0) {
    // show FLAT
    $this->enabled = true;
  } else {
    $this->enabled = false;
  }

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!

13 Jul 2010, 6:52 AM
#44
blackorchidcouture avatar

blackorchidcouture

Zen Follower

Join Date:
Apr 2010
Location:
Albuquerque, NM
Posts:
198
Plugin Contributions:
0

Post #44 by blackorchidcouture

I finally made this work and thought I'd update in case others were needing to do the same thing. With what I'd done up to this point it wasn't working correctly, and I finally just simplified it and had both the USPS and FLAT modules check the total cart weight, if it's zero it uses flat, if it's more than zero it uses USPS. If USPS is being used, it checks for Alchemy products, and if there are any it adds my flat rate to the USPS.

Linda, thank you so much for sticking with me on this and helping me so much! I learned a lot!

Here's the code in case it helps someone else, my added code is in green...

In flat.php...

 // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
      }

// disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
      }

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;
  }
   

In usps.php....

// disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
    }

global $cart;

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

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

// BOF: UPS USPS
        $this->quotes = array('id' => $this->code,
        'module' => $this->title . $show_box_weight);
        // EOF: UPS USPS

    global $cart;

    //check if manufacturer alchemy 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 = $manufacturer_alchemy;
      } 
 
   // charge dropship fee for alchemy 
      if ($drop_ship_extra_charge > 0) { 
        $cat_extra_charge = 10; 
        echo 'An additional $10 shipping fee for Alchemy items has been applied.';
      } else {
        $cat_extra_charge = 0;
      }
30 Jul 2010, 2:26 AM
#45
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Post #45 by mortalwombat

Hi

I haven't had any luck posting around elsewhere, so I thought I'd try here.

I'd like to do something similar to the OP and what's been discussed here...

I've been playing with the codes on this thread, as you can see below, but haven't had any success getting them to work for me.

global $cart;

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

// enable if manufacturer is in cart 
  if (IS_ADMIN_FLAG == false && $chk_manufacturers_id == 0) {
    // show FLAT
    $this->enabled = true;
  } else {
    // hide FLAT
    $this->enabled = false;
  }

I want to get the cart to only show the Flat Rate shipping option when products from the manufacturers Excalibur and Greenpower are in the cart - otherwise show the Per Item option.

I really have little idea how the coding works, so any help would be much appreciated.

Thanks in advance,
Tija

30 Jul 2010, 2:34 AM
#46
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #46 by ajeh

What happens if I have 1 Product from Excalibur and 2 Products from Greenpower and then 2 Products from other manufacturers_id ... :unsure:

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!

30 Jul 2010, 2:47 AM
#47
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #47 by ajeh

To control the Flat Rate flat shipping module so that it only shows if ALL products in the cart are from manufacturers_id 1 or 2 you can use:

      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
      }

    // check if manufacturer 1 or 2 is in cart
      if (IS_ADMIN_FLAG == false) {
        global $cart;
        $chk_manufacturers_id1 = $_SESSION['cart']->in_cart_check('manufacturers_id', '1');
        $chk_manufacturers_id2 = $_SESSION['cart']->in_cart_check('manufacturers_id', '2');
        $chk_manufacturers_id = $chk_manufacturers_id1 + $chk_manufacturers_id2;
        if ($chk_manufacturers_id > 0) {
          $this->enabled = true;
        } else {
          $this->enabled = false;
      }

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!

30 Jul 2010, 3:25 AM
#48
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Post #48 by mortalwombat

Ajeh:

To control the Flat Rate flat shipping module so that it only shows if ALL products in the cart are from manufacturers_id 1 or 2 you can use:

  // disable only when entire cart is free shipping
  if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
  }

// check if manufacturer 1 or 2 is in cart
if (IS_ADMIN_FLAG == false) {
global $cart;
$chk_manufacturers_id1 = $_SESSION['cart']->in_cart_check('manufacturers_id', '1');
$chk_manufacturers_id2 = $_SESSION['cart']->in_cart_check('manufacturers_id', '2');
$chk_manufacturers_id = $chk_manufacturers_id1 + $chk_manufacturers_id2;
if ($chk_manufacturers_id > 0) {
$this->enabled = true;
} else {
$this->enabled = false;
}


Ah, OK - thanks for the reply and for cleaning that up :)

> **Ajeh:**
>
> What happens if I have 1 Product from Excalibur and 2 Products from Greenpower and then 2 Products from other manufacturers_id ... :unsure:

Most of my items are drop-shipped and remain a flat rate no matter how many a customer buys, and I subsidise the shipping when a customer buys products combined with drop-shipped products. So the shipping remains $15.
30 Jul 2010, 3:59 AM
#49
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Post #49 by mortalwombat

OK, so I tried the code, Linda... now both the shipping estimator and the admin shipping modules page aren't working.

I know I'm doing something wrong - I just have no idea what.

Any suggestions?

  • Tija
30 Jul 2010, 4:50 AM
#50
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #50 by ajeh

Yeps ... add the missing closing bracket that I left out:

    // check if manufacturer 1 or 2 is in cart
      if (IS_ADMIN_FLAG == false) {
        global $cart;
        $chk_manufacturers_id1 = $_SESSION['cart']->in_cart_check('manufacturers_id', '1');
        $chk_manufacturers_id2 = $_SESSION['cart']->in_cart_check('manufacturers_id', '2');
        $chk_manufacturers_id = $chk_manufacturers_id1 + $chk_manufacturers_id2;
        if ($chk_manufacturers_id > 0) {
          $this->enabled = true;
        } else {
          $this->enabled = false;
        }
      }

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!

30 Jul 2010, 5:35 AM
#51
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Post #51 by mortalwombat

That works :) Thanks so much Linda :)

Now I just have one last question...

I have two different drop-shipping rates for different products (say A for $15 and B for $35), and then use Per Item for the products I stock.

So, when a customer has any number of drop-ship A in their cart, Flat Rate #1 at $15 will be the only option available. The same goes for each of the other products - Flat Rate #2 at $35, Per Item at $6, etc.

I want to have just one shipping method as the only option, no matter what a customer has in their cart, but this next part is confusing me as to how to get it to work:

If a customer buys one of each of the drop-shipped items (A and B), Flat Rate #2 ($35) would be the only option.

And if a customer buys either of the drop-shipped items (A or B), combined with products I stock, then the respective shipping rate would show. For example, if a customer buys an item from A as well as items I stock, the shipping would be Flat Rate #1 at $15. If item A was changed to B, then the shipping would be #2 at $35.

How would I get all this into the code?

Again - thanks so much for your help. I REALLY appreciate it :)

30 Jul 2010, 2:29 PM
#52
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #52 by ajeh

If you were to add this code into the quote section of the Item Rate item shipping module:

    // check if manufacturer 1 or 2 is in cart
      if (IS_ADMIN_FLAG == false) {
        global $cart;
        $chk_manufacturers_id1 = $_SESSION['cart']->in_cart_check('manufacturers_id', '1');
        $chk_manufacturers_id2 = $_SESSION['cart']->in_cart_check('manufacturers_id', '2');
        $chk_manufacturers_id = $chk_manufacturers_id1 + $chk_manufacturers_id2;
      }

You would know how many items are from manufacturers_id 1 and from manufacturers_id 2 ...

The Item Rate is using the number of items in the cart ...

If you were to subtract from the number of items about to be calculated the $chk_manufacturers_id you would then just be charging the Item Rate for all products not in 1 and 2 ... just under this code in item.php

      // adjusted count for free shipping
      $item_total_count = $total_count - $_SESSION['cart']->free_shipping_items();

then, you can add in the extra charge for the Flat Rate amount to this calculation based on $chk_manufacturers_id1 >= 1 add $15.00 and $chk_manufacturers_id2 >= 1 add $35 ... by adjusting the code in this section:

      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
                                                     'cost' => (MODULE_SHIPPING_ITEM_COST * $item_total_count) + MODULE_SHIPPING_ITEM_HANDLING)));

So Flat Rate should only be used for manufacturers_id 1 and 2 and the amounts altered to $15 or $35 or both ... otherwise, Flat Rate should not show if there are other products in the cart ...

Item Rate should be altered to not show when only products are from manufacturers_id 1 and 2 ...

Item Rate should be altered to reduce the item count based on anything from manufacturers_id 1 and 2 ... and add the additional charges for manufacturers_id 1 and 2 ...

Note: in theory, this could all be done in Item Rate item as the Item Rate would be 0 when only products are from manufacturers_id 1 and 2 ... and then the calculations for manufacturers_id 1 and 2 would be used ... providing you write the code correctly ... :cool:

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!

31 Jul 2010, 4:50 AM
#53
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Post #53 by mortalwombat

Well, I added the codes into the modules, but now the shipping estimate shows two Per Item methods, instead of Flat Rate, when I have manufacturers 1 and/or 2 in the cart (the one that should be Flat Rate is showing at $0).

The Per Item module (the one that's supposed to show) is fine when I have products from any other manufacturer in the cart, and it is the only option available.

I'm thinking it has something to do with this part you mentioned:

Ajeh:

If you were to subtract from the number of items about to be calculated the $chk_manufacturers_id you would then just be charging the Item Rate for all products not in 1 and 2 ... just under this code in item.php

  // adjusted count for free shipping
  $item_total_count = $total_count - $_SESSION['cart']->free_shipping_items();

I don't quite understand what you mean by this... am I supposed to add a piece of coding here?

Thanks again,
Tija
31 Jul 2010, 11:45 PM
#54
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #54 by ajeh

If you only used the Item Rate item shipping module ... you would do the calculation for the two manufacturers_id in it ...

NOTE: based on where the code is you do not need to test for if in the admin or not ...

Change the quote function to:

// class methods
    function quote($method = '') {
      global $order, $total_count;

    // check if manufacturer 1 or 2 is in cart
        global $cart;
        $chk_manufacturers_id1 = $_SESSION['cart']->in_cart_check('manufacturers_id', '1');
        $chk_manufacturers_id2 = $_SESSION['cart']->in_cart_check('manufacturers_id', '2');
        $chk_manufacturers_id = $chk_manufacturers_id1 + $chk_manufacturers_id2;

   // calculate charges for manufacturers 1 or 2
        $extra_manufacturers_charge = 0.00;
        if ($chk_manufacturers_id1 > 0) {
          $extra_manufacturers_charge += 15;
        }

        if ($chk_manufacturers_id2 > 0) {
          $extra_manufacturers_charge += 35;
        }

      // adjust count for manufacturers
      // adjusted count for free shipping
      $item_total_count = $total_count - $chk_manufacturers_id1 - $chk_manufacturers_id2 - $_SESSION['cart']->free_shipping_items();
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
                                                     'cost' => $extra_manufacturers_charge + (MODULE_SHIPPING_ITEM_COST * $item_total_count) + MODULE_SHIPPING_ITEM_HANDLING)));

This way, there is only one shipping method handling everything ...

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!

1 Aug 2010, 1:12 PM
#55
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Post #55 by mortalwombat

Well, that works for the two separate drop-ship prices, but this part doesn't seem to be working:

      // adjust count for manufacturers
      // adjusted count for free shipping
      $item_total_count = $total_count - $chk_manufacturers_id1 - $chk_manufacturers_id2 - $_SESSION['cart']->free_shipping_items();
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
                                                     'cost' => $extra_manufacturers_charge + (MODULE_SHIPPING_ITEM_COST * $item_total_count) + MODULE_SHIPPING_ITEM_HANDLING)));

When I have the two different manufacturers in the cart, the shipping adds together - so it comes to $50 instead of $35 for the combined drop-ship items, and just adds the Per Item rate onto those rates for drop-ship products combined with products I stock.

Any ideas?

1 Aug 2010, 2:35 PM
#56
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #56 by ajeh

Could you post the whole quote portion of the item.php file so that we can see what you are using right now?

NOTE: this is the only portion of the code that should be changed and the only shipping module that should be installed ...

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 Aug 2010, 2:02 AM
#57
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Post #57 by mortalwombat

Hopefully this is the correct part of the code... I'm not familiar with PHP at all :unsure:

// class methods
    function quote($method = '') {
      global $order, $total_count;

    // check if manufacturer 1 or 2 is in cart
        global $cart;
        $chk_manufacturers_id1 = $_SESSION['cart']->in_cart_check('manufacturers_id', '1');
        $chk_manufacturers_id2 = $_SESSION['cart']->in_cart_check('manufacturers_id', '2');
        $chk_manufacturers_id = $chk_manufacturers_id1 + $chk_manufacturers_id2;

   // calculate charges for manufacturers 1 or 2
        $extra_manufacturers_charge = 0.00;
        if ($chk_manufacturers_id1 > 0) {
          $extra_manufacturers_charge += 15;
        }

        if ($chk_manufacturers_id2 > 0) {
          $extra_manufacturers_charge += 35;
        }

      // adjust count for manufacturers
      // adjusted count for free shipping
      $item_total_count = $total_count - $chk_manufacturers_id1 - $chk_manufacturers_id2 - $_SESSION['cart']->free_shipping_items();
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
                                                     'cost' => $extra_manufacturers_charge + (MODULE_SHIPPING_ITEM_COST * $item_total_count) + MODULE_SHIPPING_ITEM_HANDLING)));

      if ($this->tax_class > 0) {
        $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
      }

      if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);

      return $this->quotes;
    }

NOTE: this is the only portion of the code that should be changed and the only shipping module that should be installed ...

I haven't altered any other part of the code and it is the only module installed except for Zone Rates, as I ship internationally.

2 Aug 2010, 6:00 AM
#58
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #58 by ajeh

What charges do you get if you add 1 product from manufacturers_id 1?

What charges do you get if you add 2 product from manufacturers_id 1?

What charges do you get if you add 1 product from manufacturers_id 2?

What charges do you get if you add 2 product from manufacturers_id 2?

What charges do you get if you add 1 product from manufacturers_id 1 and 1 product from manufacturers_id 2?

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 Aug 2010, 8:53 AM
#59
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Post #59 by mortalwombat

what charges do you get if you add 1 product from manufacturers_id 1?

$15

what charges do you get if you add 2 product from manufacturers_id 1?

$15

what charges do you get if you add 1 product from manufacturers_id 2?

$35

what charges do you get if you add 2 product from manufacturers_id 2?

$35

what charges do you get if you add 1 product from manufacturers_id 1 and 1 product from manufacturers_id 2?

$50

2 Aug 2010, 1:31 PM
#60
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #60 by ajeh

Okay so that part is working fine to charge the correct amounts based on those two manufacturers_id values ...

Now, you should have your Item Rate setup to charge a certain amount per item when you add a Product to the order that is not in manufacturers_id 1 or 2 ...

If you add 1 Product to the order that is not in manufacturers_id 1 or 2 what is the amount?

If you add 2 Product to the order that is not in manufacturers_id 1 or 2 what is the amount?

If you add 1 Product to the order that is not in manufacturers_id 1 or 2 and add 1 Product from manufacturers_id 1 what is the amount?

If you add 2 Product to the order that is not in manufacturers_id 1 or 2 and add 1 Product from manufacturers_id 1 what is the amount?

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!