-
Adding $1.00 for each aditional item?
Is there a way I can add $1.00 to each aditional item they put in their cart?
1 item costs $10.00 to ship but 2 items only costs $11.00 to ship. If I put the weight in the system that they are supposed to be when they add that second item its going to raise the shipping way more then it needs to be.
-
Re: Adding $1.00 for each aditional item?
Use Item Rate item shipping module ...
Set the Handling to 9.00 and the Item Rate to 1.00 ... :smile:
-
Re: Adding $1.00 for each aditional item?
Can this method also be used just for two categories while leaving my other categories to use the perweight unit module?
Lisa
-
Re: Adding $1.00 for each aditional item?
And what happens when there are multiple Products from the two Categories and from other Categories in the same cart? :unsure:
-
Re: Adding $1.00 for each aditional item?
Hi Linda
I don't know, would it work? My shipping depends on each supplier so for example the two categories that I'd like to make this work for are gowns and each gown on its own costs $48.75 to ship BUT if a bride purchases her gown and her maid of honor's gown then the shipping should be less than $48.75 for each since they are being shipped to the same address. The other products that we have such as wedding favors or shoes or jewelry would have to stay on a perweightunit basis as that is what works based on what I'm being charged by each of the other suppliers.
Is there a way to do this?
Lisa (o:
-
Re: Adding $1.00 for each aditional item?
I thought I did a solution for you on this a couple three weeks ago ... :unsure:
-
Re: Adding $1.00 for each aditional item?
We never figured it out, i think you had said that i would have to get somebody to write the code for me but when i saw this thread i thought that this may be a way around my problem.
Our family has been in the process of a major relocation over the last month so this is actually the first time I've had to sit down and get back to working out the wrinkles on our site.
I'd much rather be trying to figure this out than unpack the hundred and fifty boxes we have sitting here staring at me!
Anyways, if I can make this work I will be able to check off one thing on my big list of to-dos for this site. If not, then it will get sorted out eventually.
Thanks Linda, nice to hear from you again
Lisa (o:
-
Re: Adding $1.00 for each aditional item?
You really need a formula worked out for your products to calculate the shipping for the gowns, where multiple gowns have a scaled discount and then shipping for other products based on the Per Unit perweightunit that uses the products_weight ...
You have Products in multiple categories for the gowns ... and then these 2 categories of products that have their own rate ...
If you calculated how many products are from these 2 categories and subtracted those from the number of items in the cart, you would know how many gowns are in the cart ...
Now, you can calculate a charge for the number of gowns in the cart ...
Let's assume anything not a gown uses the products_weight * quantity ordered to calculate the shipping ...
Now for the gowns ...
So first, what is the gown formula? Let's look at how much shipping is for the gowns from 1 to 5 ...
1 gown
2 gown
3 gown
4 gown
5 gowns
Is there just 1 formula?
Something like
(Gown Quantity * 20) - 20 if there is more than 1 gown or ...
(Gown Quantity * 20) - ((Gown quantity - 1) * 10%)
Or ... something different?
-
Re: Adding $1.00 for each aditional item?
Hi Linda
What we would like to do is actually very simple. We would like to just charge $25 for each additional gown regardless of how many are ordered.
Like this
gown 1- $48.75
gown 2- $25.00
gown 3- $25.00
gown 4- $25.00
and so on.
Currently I have adjusted the weight on the gowns to calculate the shipping at $48.75
Lisa
-
Re: Adding $1.00 for each aditional item?
Set all gowns to 0 on products_weight ...
Add to the quote in Per Unit perweightunit shipping module:
Code:
// check products with products_weight 0
global $cart;
$chk_gowns = $_SESSION['cart']->in_cart_check('products_weight','0');
$chk_gown1 = 48.75;
$chk_gown2 = 25.00;
if ($chk_gowns > 1) {
$chk_gowns_shipping = $chk_gown1 + (($chk_gowns - 1) * $chk_gown2);
} else {
if ($chk_gowns == 1) {
$chk_gowns_shipping = $chk_gown1;
} else {
$chk_gowns_shipping = 0;
}
}
The add to the cost the:
$chk_gowns_shipping to cost
-
Re: Adding $1.00 for each aditional item?
Sorry Linda, we lost our internet connection yesterday and the signal is pretty low today. I will give this a try and repost as soon as I can.
Thanks, talk to you soon!
Lisa
-
Re: Adding $1.00 for each aditional item?
Hi Linda
I pm'd you this morning
Lisa
-
Re: Adding $1.00 for each aditional item?
The code goes above:
Code:
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
(MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));
and then the cost in that code needs to have the new value $chk_gowns_shipping to the cost in that code ...
-
Re: Adding $1.00 for each aditional item?
Mine seems a bit different. Is that because I haven't upgraded to 1.3.9 yet? This is what I have....
$total_weight_units = $shipping_weight;
if (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => (15.00)
+ MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));
} else {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units)
+ MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));
}
Should I still put the code above this even though it is slightly different?
-
Re: Adding $1.00 for each aditional item?
Your Per Unit perweightunit looks like it was customized before to behave one way for when:
MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00
and another way when:
MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units >= 15.00
Are you also trying to do something else with the Per Unit perweightunit for your other Products based on 15.00?
-
Re: Adding $1.00 for each aditional item?
Hi Linda
The only thing that I can think of that that might be is that I set up the shipping to be a minimum of $15.00 when the total weight of all the products in the cart result in a low shipping rate that won't cover the actual shipping. Customers can purchase things such as stickers for their wedding reception and if they choose a quantity of say 20 stickers the shipping may only come to $.40 which still doesn't cover even a postage stamp. Things like small hair accessories etc end up weighing too little so I made a minimum shipping fee.
Lisa
-
Re: Adding $1.00 for each aditional item?
This is really going to need more customization as you have 2 situations where if the weight is < 15 you want to charge $15.00 but there is no weight on the gowns so that will be true on gown orders but you don't want to add another $15.00 to the cost of the shipping for them ...
Change the IF to be:
Code:
if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
Add the code above that line to calculate the charges for the gowns ... then add the:
$chk_gowns_shipping
to the cost line in the second part of the IF changing the part:
Code:
'cost' => (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units)
to read:
Code:
'cost' => $chk_gowns_shipping + (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units)
NOTE: don't remove any code just add the new code ...
-
Re: Adding $1.00 for each aditional item?
Well thank you very much Linda I put everything in the right place and it works great! I really appreciate the time you took on this!
Obviously I can't help you in the same way but let me know if you ever need anything from our site and my mum and I will certainly make sure that you get what you need.
Cheers
Lisa (o:
-
Re: Adding $1.00 for each aditional item?
Glad to hear that things are now working properly for you ... remember us when you are rich and famous ... :cool:
-
Re: Adding $1.00 for each aditional item?
Hi Linda, I just realized that there is something wrong with the way the shipping is working....
For some reason if there is a gown in the cart (shipping $48.75) and then another product that isn't a gown is added, the shipping only comes to the second product's shipping rate and the $48.75 is voided from the total.
Lisa
-
Re: Adding $1.00 for each aditional item?
The curse continues ... :blink:
Have you a couple of products that can be added to the cart to reproduce this problem on your site and something to indicate what the shipping should be? :unsure:
-
Re: Adding $1.00 for each aditional item?
Add any gown, shipping should be $48.75, add any second gown shipping should be an additional $25.00 which seems to work. Now I remember that we configured our shipping so that any item other than the gowns under a certain weight would be a $15.00 shipping because when a customer put those items in their cart the shipping was ridiculously low such as 7 cents, and that doesn't even cover a postage stamp. I can't remember where we set that up in the admin/files but I know we did that.
If you add an item to the cart such as a few stickers found in the wedding stationary section, a piece of jewelry or anything else that is super light weight and then add a gown, the shipping stays at $15
Did I just confuse matters?? :wacko:
-
Re: Adding $1.00 for each aditional item?
Let's pretend I have not worked on your site in an age ... and that I have worked on a zillion others since then ...
Now if I were to guess at your site URL and the products_id numbers to do a click for click to reproduce this issue ... what would I be doing ... :unsure:
-
Re: Adding $1.00 for each aditional item?
hahahaha, sorry Linda! I forgot my bubble is much much smaller than yours! :rotflmao:
Heres the site
And add product id 30LA94HD which should have $48.75 for shipping, then add product id ws6136 which is a product that has a minimum shipping of $15 because its weighs next to nothing.
Lisa :smile:
-
Re: Adding $1.00 for each aditional item?
If there are gowns in the cart and something else and something else calculates to less than $15.00 ...
Should the charge be the gown charge plus the $15.00? :unsure:
-
Re: Adding $1.00 for each aditional item?
Yes, I would like, if possible to have the shipping that is configured for all of our gown categories (1st gown $48.75, second gown $25 and so on) added as a separate rate to our other products since they are from separate suppliers and we have to figure in our shipping, duty and taxes too.
So like this:
gown 1 $48.75
gown 2 $25.00
veil $15.00
Now I've just tested a few things and it looks like all of my perweightunit items are going in at a flat rate of $15.00 when added to the cart. Originally, the gowns were supposed to be the only flat rate items and everything else would remain as perweightunit.
Uh-oh...
-
Re: Adding $1.00 for each aditional item?
So edit the perweightunit.php and comment out the existing IF line and replace it ...
Code:
// if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
if ( $chk_gowns == 0 && (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
Does it now work happily? :unsure:
-
Re: Adding $1.00 for each aditional item?
Well that fixed the problem of the gown's shipping rate changing to $15.00 but now if the cart has a gown and an under weight item it doesn't add the $15.00 for the underweight item, it only adds a dollar and change because of its weight. (I'm guessing).
What I need it to do is this:
Gowns- 1st one is always $48.75 every one after is $25.00
Shoes- every pair is $25, that works since I've made their weight the same so it will calculate it the same every time.
Everything else- on the actual perweight basis but always $15 or more so that when they order a cowboy hat for example, then the rate will be $15 because its actually underweight but if they order that and a photo album, the combined weight will calculate the shipping to either be $15 or more.
-
Re: Adding $1.00 for each aditional item?
Okay ... try this one:
Code:
// if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
if ( $chk_gowns == 0 && (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => (15.00)
+ MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));
} else {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => $chk_gowns_shipping + (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units < 15 ? 15.00 : $total_weight_units))
+ MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));
}
-
Re: Adding $1.00 for each aditional item?
Am I just replacing that one line that I changed the last time with this?
Lisa
-
Re: Adding $1.00 for each aditional item?
No, you have a full IF setup in your perweightunit.php module so you are replacing it ...
I am pretty sure the changes that should stand out are:
Code:
// if ( (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
if ( $chk_gowns == 0 && (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units < 15.00) && $total_weight_units != 0) {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => (15.00)
+ MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));
} else {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => $chk_gowns_shipping + (MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units < 15 ? 15.00 : $total_weight_units))
+ MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING)));
}
-
Re: Adding $1.00 for each aditional item?
ok so I copied that but its still miscalculating. If you can put a gown in the cart, then say two other gowns in the cart and then the cowboy hat on this page. Hat
For some reason the shipping is not right, and then if you remove the gowns the shipping is right for the hat. But if you add 3 other different gowns with the same hat the shipping amount is different than the first time... geez, I hope this isn't another case of weird. Remember when I had files crossing over to each other? But since we fixed that mix up I haven't changed anything, it was just by accident that I realized the shipping wasn't right.
I have to run out for an hour but I will come back...
Lisa :smile:
-
Re: Adding $1.00 for each aditional item?
I am having a great coding day ... :blink:
Give me a few to work with this one ...
What is your Shipping Cost per Unit set to? 1 or 5?
-
Re: Adding $1.00 for each aditional item?
I reverted the file back to the way it was this morning just incase I have traffic. I have the Shipping Cost per Unit set at 5.
No such thing as a bad coding day in my books, I haven't a clue how you do all of this! :blink:
Lisa:smile:
-
Re: Adding $1.00 for each aditional item?
So you take the Product Weight * 5 for all of the products that are not gowns ... and if the amount of the calculation of the:
Product Weight * 5 < 15
You want to charge $15.00 ...
Then if there are gowns you want the gown rates plus either the:
Product Weight * 5
Or plus $15.00, which ever is greater ... correct?
-
Re: Adding $1.00 for each aditional item?