Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Yes, another flat rate question

Yes, another flat rate question

Locked

Views: 1,363

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
25 Mar 2010, 1:15 PM
#1
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Yes, another flat rate question

Have two or three items that I want to ship on a flat rate basis. They are used songbooks and I can give them their own manufacturers' name.

Manuf="misc1" flat rate = $1.95
Manuf-"misc2" flat rate = $2.95

If some one purchases any of the above items as a single item, flat rate applies . If mixed, normal usps rates apply.

I am a non-programmer. If this is something that is do-able but you need to charge for your time, just let me know.

25 Mar 2010, 4:36 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Yes, another flat rate question

What happens when both song books are in the cart?

25 Mar 2010, 10:55 PM
#3
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Yes, another flat rate question

Then I've made twice as much haha! It's a good question.. I guess if some one were to order a few songbooks I would have it default back to the USPS rates. The weird thing about zen is if you select flat rate shipping, it shows flat rate shipping for every product in your catalog.... I only want to use flat rate on my songbooks... thin one's are $1.95 to ship and the fatter ones are $2.97.

Thanks for looking into this

26 Mar 2010, 12:04 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Yes, another flat rate question

You could use 0 weight on these products and then add a calculation to the USPS shipping module for:
global $cart;
$charge_products_thin = $_SESSION['cart']->in_cart_check('manufacturers_id','XX') * 1.95;
$charge_products_thick = $_SESSION['cart']->in_cart_check('manufacturers_id','YY') * 2.95;

Then use that to add these new charges on to the shipping cost ...

I would put in a test for when those are the only products in the cart so that you don't offer all the USPS shipping methods ...

26 Mar 2010, 3:47 AM
#5
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Yes, another flat rate question

Neat... I'll give it a try. Is there a specific area I need to place the code ie the body ?

26 Mar 2010, 3:58 AM
#6
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Yes, another flat rate question

sorry... I noticed you told me to put it in global $chart but I'm not exactly sure where that is in my usps.php file...

26 Mar 2010, 4:14 AM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Yes, another flat rate question

This would be done in the function quote ...

Just before the quotes are built ...

You will see the code:

        // EOF: UPS USPS

// add new code here

        $methods = array();
        $size = sizeof($uspsQuote);
        for ($i=0; $i<$size; $i++) {

You want it before the FOR statement so it is not repeated over and over ...

26 Mar 2010, 6:08 AM
#8
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Yes, another flat rate question

do i now need to enable my flat rate ? If so, what settings do I need to set ?

Also, will all of the other options be hidden so the flat rate is all they see ?

thanks, mitch

26 Mar 2010, 1:30 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Yes, another flat rate question

I don't know what all you are doing to customize the USPS shipping module to know if you need the Flat Rate flat shipping module or if you are managing everything in the USPS shipping module ...

You have 3 scenarios ...

1 Cart holds normal Products - use USPS

2 Cart holds normal Products and thin and/or thick Products - use USPS and add on extra charges to the cost in USPS shipping module

3 Cart only holds Thin and/or Thick Products - how are these charges managed? Does your USPS work right? Or is it showing all of the shipping methods? Does showing all of the shipping methods work for you? Or, do you only want 1 shipping method to show?

27 Mar 2010, 6:33 AM
#10
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Yes, another flat rate question

Good questions. Ok, I am happy with everything in my zen-cart which right now is using only USPS. Because of the tare setting for my other products, even if I put the weight at just above zero, the shipping rate is still to high for my used songbooks. Why ? because my used songbooks only sell for $2.95 (thin one) and $4.95 (thick one). No one will buy them if shipping is too high.
What I am hoping for is way to set a flat rate for each of those two sizes and Not have zen-cart show the USPS options, just the flat rate that applies to that songbook.

If some one wants to buy another songbook, or bundle it with something else, then I want the flat rate to disappear and go back to USPS defaults.

Is what I'm asking for going to be a programming nightmare ?

27 Mar 2010, 1:25 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: Yes, another flat rate question

If you had 0 weight on the Thin Songbook and 0 weight on the Thick Songbook ...

You could test the cart to see if the only products in the cart are from these two manufacturers ...

If they are, then disable the USPS shipping module and with a similar test you could enable the flat rate or some other shipping module to charge for the books ...

For when the Thin and Thick songbooks are in the cart with other products, then you can use USPS and add the extra charges to the calculated USPS charges for the rest of the cart ...

The Songbooks need to be set to 0 weight to get the first 2 of the 3 shopping carts working on shipping ...

Have you tried that so that the USPS works for shopping carts that are either:

1 All Products not including Thin and Thick Songbooks

2 Mixed Products that are normal USPS and Song Books

and do those charges work?

31 Mar 2010, 2:07 PM
#12
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Yes, another flat rate question

Ajeh, I tried your suggestions but since my programming knowledge is limited, I couldn't get it to work. Rather than continue to frustrate myself and take up a lot more of your time, I decided to try bundling the shipping cost into the songbooks and offer free shipping. Everything works out well except for one major obstacle.... the software offers free freight on everything I sell. I have set my shipping options for free shipping for any items less than or equal to zero but the free option shows up on every item I carry. I had to disable that feature until I get this figured out but here's an example attached.

31 Mar 2010, 2:47 PM
#13
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Yes, another flat rate question

Ok, I got it figured out.... just had to play with the different settings in the free shipping module.