Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / "additional items ship free" is this possible?

"additional items ship free" is this possible?

Locked

Views: 1,901

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
21 Aug 2010, 12:20 AM
#1
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

"additional items ship free" is this possible?

I want to set up my store so that I can charge a flat shipping rate for the 1st item purchased form a specific category and then every other purchase from that same category is shipped at no additional cost. Is this possible? How?

Thanks.

21 Aug 2010, 2:40 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: "additional items ship free" is this possible?

What other shipping modules do you use?

What happens when a Product from this category are mixed in the same order with other categories of Products?

21 Aug 2010, 12:41 PM
#3
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Re: "additional items ship free" is this possible?

I will only be using USPS for shipping. The store is not open yet as I just got things up and running 2 days ago.

As for your example, the single cost for the multiple items would be added to the shipping costs of the rest of the order.

I'm very new to Zen Cart but I am learning fast. I know it's very versatile, I'm just trying to find the limits of that versatility.

Any ideas on how to approach this would be greatly appreciated.

21 Aug 2010, 1:32 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: "additional items ship free" is this possible?

This is confusing ...

The USPS shipping module takes the weight of all the Products in the cart and gets a Real Time quote from the USPS server ...

But then you say you want to use a ... flat shipping rate for the 1st item purchased form a specific category and then every other purchase from that same category is shipped at no additional cost.

Are you saying that ALL Products use USPS for their shipping costs ... except this 1 Category ... and for that 1 Category you want to add $XXX to the USPS shipping costs for the other products ... if 1 or more Products are in the cart from that 1 Category? :unsure:

21 Aug 2010, 4:49 PM
#5
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Re: "additional items ship free" is this possible?

Yes, that's basically it.

I apologize for not being clearer. I'll see if this helps...

Say I have 4 categories; A, B, C, D.

Categories A & B are very small, specialized pieces that way only a few ounces each. I want to offer flat $2.00 shipping an any purchases from categories A & B. If you buy 1 item from those categories, shipping is $2. If you buy 20 items from those categories, shipping is still just $2.00.

Additionally I would want to be able to add-in the cumulative shipping from the other 2 categories, C & D.

21 Aug 2010, 5:16 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: "additional items ship free" is this possible?

Do Categories C and D have weight and use USPS for the shipping?

21 Aug 2010, 5:18 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: "additional items ship free" is this possible?

Also, do you use Linked Product?

The idea being ... do ALL Products in Category A have the master_categories_id of Category A categories_id and do ALL Products in Category B have the master_categories_id of Category B categories_id ...

21 Aug 2010, 5:36 PM
#8
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Re: "additional items ship free" is this possible?

Do Categories C and D have weight and use USPS for the shipping?

Yes.

Also, do you use Linked Product?

The idea being ... do ALL Products in Category A have the master_categories_id of Category A categories_id and do ALL Products in Category B have the master_categories_id of Category B categories_id ...

No linked products.

22 Aug 2010, 3:40 AM
#9
ajeh avatar

ajeh

Oba-san

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

Re: "additional items ship free" is this possible?

On your products, does 0 weight mean Free Shipping?

There is a setting for this in the Configuration ... Shipping/Packaging ...

Order Free Shipping 0 Weight Status
If there is no weight to the order, does the order have Free Shipping?
0= no
1= yes

Note: When using Free Shipping, Enable the Free Shipping Module this will only show when shipping is free.

If 0 weight does not mean Free Shipping on your Products, then leave this setting set to 0 or NO ...

Now make all the Products in Category A and B 0 weight ...

Next, add normal shipping weights to Products in Category C and D ...

Now, you need to customize the USPS shipping module to add 2.00 to the $cost, to account for the $2.00 Flat amount, from the Quotes if there is 1 or more products in the cart from Category A and B ...

Would that work?

What do you want to happen if Products are only from Category A and B and not the other categories?

Do you want USPS shipping still where the price would be $2.00 plus the minimum charge for each shipping method ... or do you just want a Flat Rate $2.00 and the USPS shipping module disabled?

22 Aug 2010, 12:08 PM
#10
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Re: "additional items ship free" is this possible?

On your products, does 0 weight mean Free Shipping?

There is a setting for this in the Configuration ... Shipping/Packaging ...
Quote:
Order Free Shipping 0 Weight Status
If there is no weight to the order, does the order have Free Shipping?
0= no
1= yes

Note: When using Free Shipping, Enable the Free Shipping Module this will only show when shipping is free.
If 0 weight does not mean Free Shipping on your Products, then leave this setting set to 0 or NO ...

Now make all the Products in Category A and B 0 weight ...

Next, add normal shipping weights to Products in Category C and D ...

Now, you need to customize the USPS shipping module to add 2.00 to the $cost, to account for the $2.00 Flat amount, from the Quotes if there is 1 or more products in the cart from Category A and B ...

Would that work?

It looks like it would

What do you want to happen if Products are only from Category A and B and not the other categories?

Do you want USPS shipping still where the price would be $2.00 plus the minimum charge for each shipping method ... or do you just want a Flat Rate $2.00 and the USPS shipping module disabled?

A flat rate of just $2. Nothing additional.

All I can say is...thank you. I've already learned a bunch from this exchange and you really are helping me to understand ZC. I will have to move forward and get things going and I will implement this ASAP to see if it works.

If you have any ideas about how to go about customizing the USPS shipping module, it would be greatly appreciated.

22 Aug 2010, 2:39 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: "additional items ship free" is this possible?

You would need to test then, in the Flat Rate flat shipping module to see if the cart only holds products from Category A and B ...

To customize the Flat Rate file add the code to:
/includes/modules/shipping/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);
      }

// bof: only run Flat Rate if all Products in the cart are from categories_id 10 and 15
      if (!IS_ADMIN_FLAG) {
        global $cart;
        $chk_categories_a = $_SESSION['cart']->in_cart_check('master_categories_id', '10');
        $chk_categories_b = $_SESSION['cart']->in_cart_check('master_categories_id', '15');
        if ($chk_categories_a + $chk_categories_b != $_SESSION['cart']->count_contents()) {
          $this->enabled = false;
        }
      }
// eof: only run Flat Rate if all Products in the cart are from categories_id 10 and 15

Now for you, customize the categories_id of 10 and 15 to your categories_id for Category A and Category B

Next, for your USPS shipping module, you would use the same code that is in red, but change the categories_id that are being tested to those for Category C and Category D ...

NOTE: while we are wanting to test Products in Category A and B etc. we are using the master_categories_id as that is the categories_id that these Products belong to ... the master_categories_id makes it easier as it is in the products table and there is a handy function to this type of test in the shopping_cart class ...

22 Aug 2010, 5:28 PM
#12
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Re: "additional items ship free" is this possible?

Why can I not take the above code and simply plug in categories_id 1 and 2 wherever the code says 10 & 15? Is there a signifigance to 10 & 15?

Also, is there a way to change the Catregory ID at will from the Admin or do I have to create 15 generic categories and then go back and rename 10 & 15?

I hope that all makes sense.

Also, am I going in and making changes to the actual module? If it doesn't work is there a way to re-install or set to default?

Thanks

22 Aug 2010, 6:09 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: "additional items ship free" is this possible?

You should be able to do that ...

Make sure the file on the server for:
/includes/modules/shipping/flat.php

is being updated correctly ...

As to managing this via the Admin, you can always write the code to use constants that you store in the configuration table so that they could be customized via the Admin ...

22 Aug 2010, 6:22 PM
#14
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Re: "additional items ship free" is this possible?

Ajeh, you are the best. Whatever "Oba-san" means...you're it brother.

I'll post again with any other related issues and results.

Thanks!

27 Aug 2010, 12:28 AM
#15
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Re: "additional items ship free" is this possible?

Hey Ajeh-

So I am currently trying to insert the code you supplied but I am scratching my head a little as to wether I am ADDING this code or REPLACING code.

Also, especially in the USPS module, can you please give a refernece point as to where this code should be inserted/replaced?

Thanks.

29 Aug 2010, 3:10 PM
#16
ajeh avatar

ajeh

Oba-san

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

Re: "additional items ship free" is this possible?

Look for the same code but where it says FLAT you will see USPS ...

Example, this line in Flat Rate flat shipping module:

        $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);

would read in USPS shipping module as:

        $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);