Forums / Built-in Shipping and Payment Modules / Adding $1.00 for each aditional item?

Adding $1.00 for each aditional item?

Locked

Views: 3,174

Results 1 to 20 of 36
This thread is locked. New replies are disabled.
5 Jul 2010, 3:59 PM
#1
lilguppy avatar

lilguppy

New Zenner

Join Date:
Jan 2010
Posts:
96
Plugin Contributions:
0

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.

5 Jul 2010, 4:26 PM
#2
ajeh avatar

ajeh

Oba-san

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

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:

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!

6 Jul 2010, 11:41 AM
#3
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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

Every bit of help I get here, gets me that much closer to helping others

6 Jul 2010, 1:17 PM
#4
ajeh avatar

ajeh

Oba-san

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

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:

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!

6 Jul 2010, 5:44 PM
#5
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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:

Every bit of help I get here, gets me that much closer to helping others

6 Jul 2010, 8:05 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Adding $1.00 for each aditional item?

I thought I did a solution for you on this a couple three weeks ago ... :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!

6 Jul 2010, 9:18 PM
#7
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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:

Every bit of help I get here, gets me that much closer to helping others

7 Jul 2010, 2:07 AM
#8
ajeh avatar

ajeh

Oba-san

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

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?

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!

7 Jul 2010, 2:21 PM
#9
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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

Every bit of help I get here, gets me that much closer to helping others

7 Jul 2010, 5:36 PM
#10
ajeh avatar

ajeh

Oba-san

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

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:

// 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

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!

8 Jul 2010, 12:11 PM
#11
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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

Every bit of help I get here, gets me that much closer to helping others

12 Jul 2010, 1:35 PM
#12
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

Re: Adding $1.00 for each aditional item?

Hi Linda

I pm'd you this morning

Lisa

Every bit of help I get here, gets me that much closer to helping others

12 Jul 2010, 2:39 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Adding $1.00 for each aditional item?

The code goes above:

    $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 ...

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, 10:51 PM
#14
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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?

Every bit of help I get here, gets me that much closer to helping others

14 Jul 2010, 12:03 AM
#15
ajeh avatar

ajeh

Oba-san

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

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?

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!

14 Jul 2010, 1:19 AM
#16
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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

Every bit of help I get here, gets me that much closer to helping others

14 Jul 2010, 2:16 AM
#17
ajeh avatar

ajeh

Oba-san

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

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:

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:

'cost' => (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units)

to read:

'cost' => $chk_gowns_shipping + (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units)

NOTE: don't remove any code just add the new code ...

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!

14 Jul 2010, 11:44 AM
#18
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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:

Every bit of help I get here, gets me that much closer to helping others

14 Jul 2010, 1:24 PM
#19
ajeh avatar

ajeh

Oba-san

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

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:

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 Aug 2010, 2:06 PM
#20
cdnbride avatar

cdnbride

Zen Follower

Join Date:
Sep 2009
Location:
Toronto, Canada
Posts:
149
Plugin Contributions:
0

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

Every bit of help I get here, gets me that much closer to helping others