Forums / General Questions / Help with different shipping rates for first and additional items???

Help with different shipping rates for first and additional items???

Locked

Views: 3,167

Results 21 to 40 of 52
This thread is locked. New replies are disabled.
25 Oct 2009, 8:47 PM
#21
ajeh avatar

ajeh

Oba-san

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

Help with different shipping rates for first and additional items???

This is where you have to decide what you want done with the shipping ...

Currently, it is calculating the 3 different shipping costs based on the formula of charging a flat rate for the first qty 4, then adding an additional charge for each new break of qty 4 ...

It is not "doing" anything with the calculation other than displaying the count and charge on screen ...

If the charges work right, they could be added together and set as the cost for the 3 Product types ...

Or, if there needs to be a different way to calculate the charges then that can be done ...

If the original Table rate settings worked for Shoes and their weight but not for the Cards and Hotwheels but the "new" rates are correct for the them, then the "new" charges for the Cards and Hotwheels could be added to the original calculated charge that was working for the Shoes ...

You have to decide what you want to do with the new calculations and if you want to use the master_categories_id or something else for the calculations ...

It sounds like you are going to have a lot of categories ... this is why I was looking at the products_model if that is not something you need for anything else ...

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!

25 Oct 2009, 10:48 PM
#22
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

Sounds great! Couple of things, I changed shoes to be set at 1 instead of 4 and I noticed that the count price was set at 13.03 and should be 11.57 so I dropped that to 10.11 to go with the 1.46. Hot Wheels also needed to be at 1. I already changed all of the Master ID boxes on the actual products earlier to include one of the three names. If we can keep shoes with all of the rest, I think that would be easier for me in the future when I add more categories. So, what script do I need to add or change to get this to start charging S&H? The counts are coming up perfectly now, just ready to see if this thing can add them properly and I will be in business!! I am ready to get typin!! You are Awesome, LINDA!!!!

Kristofer Benham

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

25 Oct 2009, 11:00 PM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Help with different shipping rates for first and additional items???

Wait wait wait ...

When you say you changed the "Master ID boxes" what do you mean?

Spell that out very carefully ...

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!

25 Oct 2009, 11:06 PM
#24
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

SORRY!!! In my products page, I actually entered in the box CARDS or HOTWHEELS or SHOES so they are ready to be detected by any settings you may or may not implement. This is instead of creating ID's for each product. Sorry for the scare!!

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

25 Oct 2009, 11:21 PM
#25
ajeh avatar

ajeh

Oba-san

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

Re: Help with different shipping rates for first and additional items???

Yes ... for a moment there you did scare the beejeevees out of me ... thought you went and changed something important ... :eek:

Okay ... so now you have 3 prices come up and compute their shipping cost right for each ... correct?

And if you were to add them together ... the total would be your shipping cost ... correct?

If so, this means the code that we have been fooling with can be used to manage your shipping ... and all that has to be decided here is what to do with it ... :smile:

If you are only going to have 3 three product types, then we can make a new, unique shipping module for your site, so that it won't get overwritten on an upgrade ...

Are you only going to have these 3 product types? Or, will you have more ... and if you will have more, do you understand the pattern here to manage them beyond these three? :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!

26 Oct 2009, 1:08 AM
#26
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

Yes the prices are computing correctly. The prices are not the actual prices that I plan to use. I still have to figure in a handling charge that I will simply just add to each number. As long as you keep this same format in this code, I will be able to find it in the file manager and tweek prices as I need to. That would be the only thing I would need to change. Also, the USPS is very famous for raising prices every year or more often. The store will always be changing the amount of categories it has so I will definitely have more than three categories, but these were three different ones that I had no idea how to seperate from each other. I knew if I saw how three were set up, I could copy what I saw to allow for more categories. As long as this code says in the same format, I will be able to change the prices and categories as the store changes. You are my new hero. Let me know of any other info of input that you may need.

Kristofer Benham

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

26 Oct 2009, 1:23 AM
#27
ajeh avatar

ajeh

Oba-san

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

Re: Help with different shipping rates for first and additional items???

Well ... if everything can be calculated from the new formulas ... the best thing to do would be to clone a shipping module such as:
Item Rate item

and make your own shipping modules, such as:
itemcnts

This way, you can build your own, unique shipping module ...

Originally, we threw the code in the table.php file ... but this is a harder program to clone and as you really are not using anything from it, it would be better to work with a shipping module that is easy to clone ...

First, do a search on:
clone item

to see how to make one ...

I'd use
itemcnts
ITEMCNTS

as the keys on the cloning ...

It would keep it simple ...

Then, you can move that custom code from table.php over to your new shipping module ...

Then, you can add in the Handling Rate where you need it to the code, and yes, just add a number on each variable to get the handling when the count is not 0 ...

Next, add each of the rates together ...

Then adjust the cost that the module will display ...

Now that your eyes are starting to cross ... :blink:

First clone the Item Rate item shipping module ...

Make sure it works the old way ... when that works, add your custom code to it, and make sure the values still work like they did in table.php ...

Once you reach this point ... you can dive in and try to get the handling charges working ... once those are right and you still are feeling pretty smurphy ... you can try to get the total of the costs to show correctly ...

Or ... if you get lost ... give a yell ... :smile:

Feeling like a coder yet? :lamo:

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!

26 Oct 2009, 1:32 AM
#28
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

My eyes crossed way before you thought they would. Where do I need to search for item something? Then what part of the custom code we tweeked do I need to copy EXACTLY? I just read all of that again and I still don't know where to start. Lets try step one. Try not to put so much in one message block, it is way too mind boggling! I need to do a search for 'clone item', but where do I search for that Zen, Goggle, Yahoo??

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

26 Oct 2009, 1:45 AM
#29
ajeh avatar

ajeh

Oba-san

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

Re: Help with different shipping rates for first and additional items???

Step 1 ... How to clone Item Rate item shipping module to a new module ...

Copy the files:
/includes/modules/shipping/item.php
/includes/langauges/english/modules/shipping/item.php

to the new files:
/includes/modules/shipping/itemcnts.php
/includes/langauges/english/modules/shipping/itemcnts.php

we could call these files anything, but itemcnts for Item Counts made sense to me ... :smile:

Edit the files and globally change all occurances of the word:
item to itemcnts
ITEM to ITEMCNTS

those are case sensative ...

Do NOT change this line as this is suppose to use the word item in the functions and variables:

      $item_total_count = $total_count - $_SESSION['cart']->free_shipping_items();

and just below it do not change the variable $item_total_count in this line:

                                                     'cost' => (MODULE_SHIPPING_ITEM_COST * $item_total_count) + MODULE_SHIPPING_ITEM_HANDLING)));

Once these are cloned right, you should be able to install them in the Modules ... Shipping ... and set the rate to 0.10 to test if it charges $0.10 per item added to the cart ...

Then come back for the next step ...

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!

26 Oct 2009, 2:05 AM
#30
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

Wow, talk about crossing my eyes. I am gonna have to wait for tomorrow after work to start on this one. I have got to get to bed here in a bit and I just don't have the mental capability to handle this much right at this moment. My wife and I just bought a dog an hour ago so I need to get in there and play with him for now. It will help relax away the stress of coding. You will probably be hearing something from me tomorrow and it may sound like screaming. LOL!!

Kristofer

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

26 Oct 2009, 2:24 AM
#31
ajeh avatar

ajeh

Oba-san

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

Re: Help with different shipping rates for first and additional items???

Or you could peek in your directories for:
/includes/modules/shipping
/includes/languages/english/modules/shipping

and you might find a couple new files ... :cool:

You do have to configure them for the shipping and handling but see if they give you a head start ... :flex:

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!

26 Oct 2009, 12:12 PM
#32
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

Hmmm...I wonder how new files might have gotten in there??:wink: I'll get on it after work today. Already gonna be late because I checked my email now. Oh well.

I am sure I will be on here again later.

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

26 Oct 2009, 1:45 PM
#33
ajeh avatar

ajeh

Oba-san

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

Re: Help with different shipping rates for first and additional items???

Zen Cart is magical ... and little elves just work through the night when you are sleeping ... or playing with the new puppy ... :lamo:

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!

26 Oct 2009, 10:42 PM
#34
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

Well, now that the "elves" took care of everything in your instructions, the only thing left that you wanted me to do was put 10¢ somewhere and test something. If you would like me to do so, I can. The elves don't have to do it all, I just have to have my hand held because I am basically walking blind through a forest of and the trees are made of php. LMAO!!

Kristofer

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

26 Oct 2009, 11:05 PM
#35
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

Is there a way to get the item counts on the cart page off of the screen, or does it have to stay there now? I tried to replace the code we were playing with in the table.php file with the original code that was there before, but that didn't work. I bet if I delete the echos at the bottom of that global section, that would do it would it! But I want to make sure that it won't hurt the function of the cart. I just tested the cart again and it is charging shipping correctly now!!! WOOOHOOO!!!

Kristofer

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

26 Oct 2009, 11:35 PM
#36
ajeh avatar

ajeh

Oba-san

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

Re: Help with different shipping rates for first and additional items???

The "new" shipping module is the Itemcnt ...

Just comment out the echos in the itemcnt.php file so that they do not display once you have the prices all happily calculating right with handling etc.

The 3 totals are added together and being listed in the shipping cost ... so that should be correct if your 3 calculations are correct ...

The 3 echos is just so you can see the breakdown of these charges while completing the calculations ...

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!

27 Oct 2009, 12:00 AM
#37
beilana avatar

beilana

New Zenner

Join Date:
Apr 2006
Location:
Phoenix, AZ
Posts:
84
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

I am using the latest release of Zencart. I am getting several people signing up, but nobody checking out. Then someone finally emailed me and told me the problem.

UPS seems to be adding an extra 3 pounds to the shipping weight.

Is anyone else having this problem?

How would I correct it?

Thanks,

27 Oct 2009, 1:35 AM
#38
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

Ajeh, I sent you a PM and just realized that the person needing assistance is below this post, not below my PM to you. I feel brilliant now. LOL!

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

27 Oct 2009, 2:21 AM
#39
benhamcollectibles avatar

benhamcollectibles

Zen Follower

Join Date:
Oct 2009
Posts:
131
Plugin Contributions:
0

Re: Help with different shipping rates for first and additional items???

Hey, Ajeh, when I put the CARDS, HOTWHEELS, and SHOES in the products model boxes on each product, does it have to be in all CAPS? Do I even need to do this at all? It would save time if I don't have to. I might have to ask you later about how to do the Easy Populate. I did it once, but I seem to have somehow forgotten how to do so now. I am punching in cards right now just to get something in there. Only 149,990 more to go. Easy Populate sounds really good right about now.

Here is a link to my site if this will help anyone that needs to see how things look.

https://www.benhambaseballcards.com

27 Oct 2009, 2:45 AM
#40
ajeh avatar

ajeh

Oba-san

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

Re: Help with different shipping rates for first and additional items???

You need to put the code in the products_model as it is in the itemcnt.php shipping module ...

If you want it in caps, change it in the shipping module to all caps ... if you want it lower case, change it to lower case ... they just have to match identically ...

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!