Forums / Addon Shipping Modules / free shipping when cart total is below xx but one product in cart is free shipping

free shipping when cart total is below xx but one product in cart is free shipping

Views: 3,622

Results 1 to 19 of 19
8 Jun 2012, 10:23 AM
#1
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

free shipping when cart total is below xx but one product in cart is free shipping

Hi,
I have this problem that I can not solve in any way.
I tryed to hack alla waht I could but with no results.
I think it should be easy but probably not for me.
I need that when I have set a minimum cart amount to grant free shipping free shipping is granted also if a free shipping product is in the cart and the toatla amount is below the minimum.
Examples:

1)Minimum order to grant free shipping is 60 euro

-product a price 45 euro (always free shipping)
-product b price 5 euro (not always free shipping)
-Total cart 50 euro
free shipping granted

2)Minimum order to grant free shipping is 60 euro

-product a price 45 euro (always free shipping)
-Total cart 45 euro
free shipping granted

3)Minimum order to grant free shipping is 60 euro

-product b price 5 euro (not always free shipping)
-Total cart 5 euro
free shipping NOT granted

I am ready to pay someone if he can show me how to hack the code of the freeshipper.php file that I think controls the free shipping granting.
Thanks
enzo

8 Jun 2012, 10:34 AM
#2
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Hi,
I have this problem that I can not solve in any way.
I tryed to hack alla waht I could but with no results.
I think it should be easy but probably not for me.
I need that when I have set a minimum cart amount to grant free shipping free shipping is granted also if a free shipping product is in the cart and the toatla amount is below the minimum.
Examples:

1)Minimum order to grant free shipping is 60 euro

-product a price 45 euro (always free shipping) (one piece)
-product b price 5 euro (not always free shipping) (one piece)
-Total cart 50 euro
free shipping granted

2)Minimum order to grant free shipping is 60 euro

-product a price 45 euro (always free shipping) (one piece)
-Total cart 45 euro
free shipping granted

3)Minimum order to grant free shipping is 60 euro

-product b price 5 euro (not always free shipping) (one piece)
-Total cart 5 euro
free shipping NOT granted

4)Minimum order to grant free shipping is 60 euro

-product b price 5 euro (not always free shipping) (15 pieces )
-Total cart 75 euro
free shipping granted

5)Minimum order to grant free shipping is 60 euro

-proudct b price 5 euro (not always free shipping) (two pieces)
-product c price 45 euro (not always free shipping) (one piece)
-product d price 10 euro (not always free shipping) (one piece)
-Total cart 65 euro
free shipping granted

6)Minimum order to grant free shipping is 60 euro

-proudct b price 5 euro (not always free shipping) (two pieces)
-product c price 45 euro (not always free shipping) (one piece)
-Total cart 50 euro
free shipping NOT granted
I am ready to pay someone if he can show me how to hack the code of the freeshipper.php file that I think controls the free shipping granting.
Thanks
enzo

8 Jun 2012, 3:22 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: free shipping when cart total is below xx but one product in cart is free shipping

Do you have a link to these two products that we could perhaps peek at?

1)Minimum order to grant free shipping is 60 euro

-product a price 45 euro (always free shipping) (one piece)
-product b price 5 euro (not always free shipping) (one piece)
-Total cart 50 euro
free shipping granted

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!

9 Jun 2012, 7:26 AM
#4
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Hi and thanks for your answer.

To have a look at the problem, please go to www.acqua tua.it add to cart http://www.acq uatua.it/filtri-acqua-everpure-kit/filtro-acqua-everpure-ac-con-testa-ql1 and you will see that the icon "spedizone gratuita" will show up in the cart box on the left. If you check out the first shipment listed will be "spedizione gratuita" and this is ok. Now add to cart also http://www.acquat ua.it/raccordi-e-tubi/tubo-polietilene-da-1-4 and try to check out. You'll notice that the "spedizione gratuita" is not there anymlore and you have to pick up a paid shipment option. This happens on any mix of products totalizing less then 60 euros.
Thanks a lot agian for taking care.
enzo

9 Jun 2012, 1:33 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: free shipping when cart total is below xx but one product in cart is free shipping

I have in the cart:

Filtro acqua EVERPURE AC con Testa QL1 69,70 € 69,70 €
A scelta - AC

Tubo Polietilene da 1/4 0,86 € 4,30 €

And see in checkout_shipping:

Hai diritto alla SPEDIZIONE GRATUITA Pacco celere 3 - SDA Poste Italiane NON ASSICURATO 0,00 €
No Preavviso o Appuntamento - Consegna entro 3 gg ll, oltre quello di accettazione, dal lun al ven max 30 Kg.

Plus other choices ...

I have just the one product:

Filtro acqua EVERPURE AC con Testa QL1 69,70 € 69,70 €
A scelta - AC

and see shipping:

SPEDIZIONE GRATUITA!
0,00 €
Spedizione Gratuita NON ASSICURATA Pacco Celere 3 - No Preavviso o Appuntamento

plus other choices ...

What all shipping modules are installed?

You appear to have:
Free Shipping freeshipper
Free Shipping Options freeoptions

plus others ...

I do not read Italian ...

Have you customized the shipping modules?

Have you added Zones to the Shipping modules?

Are any Products marked as Always Free Shipping?

Are any Products marked as Product Weight 0 ... where in the Configuration ... Shipping/Packaging ... the 0 weight Products are set to be Free Shipping?

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!

10 Jun 2012, 10:49 AM
#6
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Hi Linda,
Thanks for you help.
First of all I made a mistake.
If you add http://www.acqu atua.it/filtro-acqua-everpure/everpure-ac which is always free shipping, and then you add http://www.acquat ua.it/raccordi-e-tubi/tubo-polietilene-da-1-4 when checking out you will see that "spedizione gratuita" is not there but it should be because the first product added is always free shipping. The product you added because of my mistake have a price over 60 euros therefore the shipping becomes free, no matter what is in the cart.

Yes I have Free Shipping freeshipper and Free Shipping Options freeoptions and also ot_shipping is installed and active, plus I have all the modules for the Italian mail parcel service which are:

  • Pacco Celere 1Plus - Poste Italiane
  • Pacco Celere 1Plus - SDA Poste Italiane ASSICURATO
  • Pacco Celere 3 - Poste Italiane
  • Pacco Celere 3 - SDA Poste Italiane ASSICURATO
  • Consegna su Appuntamento - SDA Poste Italiane
    About ot_shipping the module is installed but the option "allow free shipping" is set to false. Later I will explain why.

Furthermore I have the free shipping qualifier that when is free shipping makes the blue star icon appearing in the shopping cart box, and when it is not free shipping, makes appearing a phrase suggesting to buy more if the cart amount is not enough to grant free shipping.
This is the only function I have mod so that it would correctly show up the free shipping icon in the cart box when a always free shipping product is in the cart. Before my mod the free shipping qualifier would not work as I intended.

I have also mod the free shipping qualifier module so it will be active when ot_shipping is set to false and to get the minimum amount to grant free shipping from freeoptions setting.

Yes the zones are for Free Shipping freeshipper and Free Shipping Options set as Italy and for ot_shipping is set national.

Yes there are products marked as Always Free Shipping and the blue star with "spedizione gratuita" marks them in the product listing.

In the Configuration ... Shipping/Packaging ... the 0 weight Products are set to 0 (not free shipping)

One thing I think it is worth to mention is that I want to offer to the customer the chance of picking up a different shipping method even if free shipping is granted by always free shipping product or by cart amount.

Thanks a lot for your attention Linda.
ciao from Italy

10 Jun 2012, 1:35 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: free shipping when cart total is below xx but one product in cart is free shipping

Free Shipping freeshipper will only show when All Products in the cart are Always Free Shipping, the the customer is in your Italia zone ...

You Free Shipping Options freeoptions will show when the cart is >= 60 and the customer is in your Italia zone ...

So if you have an Always Free Shipping Product in the Cart and a regular Product in the Cart, you will not see the Free Shipping freeshipper and will only see the Free Shipping Option freeoptions if >= 60 ...

It sounds like you are expecting to see the Free Shipping freeshipper just because 1 or more Products are marked as Always Free Shipping ... but if 1 or more Products is NOT marked as Always Free Shipping, then Free Shipping freeshipper will not show ...

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!

10 Jun 2012, 1:55 PM
#8
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Perfect!
That is how it is working at the moment.
What I need to achieve is to have free shipping even if a mix of products "always free shipping" and "not always free shipping" is in the cart and the total amount of the cart is lower than the minimum amount set to achieve free shipping.
What can I do to mod that? Which files should I try to work on?
If someone is willing to make to code for me, I am ready to pay for.

Thank again!!!
enzo

10 Jun 2012, 2:58 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: free shipping when cart total is below xx but one product in cart is free shipping

You have 1 Product that is NOT Always Free Shipping in the cart:
/raccordi-e-tubi/tubo-polietilene-da-1-4

and get:

Celere 3 - SDA Poste Italiane, NON ASSICURATO No Preavviso o Appuntamento
Consegna in 3 gg.ll., più quello di accettazione, max 30 Kg. 9,99 €

Celere 3 - SDA Poste Italiane ASSICURATO No Preavviso o Appuntamento
Consegna entro 3 gg.ll., oltre quello di accettazione, solo feriali, peso max 30 Kg. 13,30 €

Celere 1Plus - SDA Poste Italiane, NON ASSICURATO No Preavviso o Appuntamento
Consegna entro le ore 12,00 del giorno lavorativo successivo alla partenza, peso max 30 Kg. 19,36 €

Celere 1Plus - SDA Poste Italiane ASSICURATO No Preavviso o Appuntamento
Consegna entro le ore 12,00 del giorno lavorativo successivo alla partenza, peso max 30 Kg. 22,70 €

Consegna su Appuntamento - SDA Poste Italiane
Consegna su Appuntamento con Preavviso entro 3 giorni lavorativi, dal lunedi al venerdi, peso max 30 Kg. 42,35 €

You then add a Product that IS marked Always Free Shipping:
/filtro-acqua-everpure/everpure-ac

and you have the same shipping rates ...

Celere 3 - SDA Poste Italiane, NON ASSICURATO No Preavviso o Appuntamento
Consegna in 3 gg.ll., più quello di accettazione, max 30 Kg. 9,99 €

Celere 3 - SDA Poste Italiane ASSICURATO No Preavviso o Appuntamento
Consegna entro 3 gg.ll., oltre quello di accettazione, solo feriali, peso max 30 Kg. 13,30 €

Celere 1Plus - SDA Poste Italiane, NON ASSICURATO No Preavviso o Appuntamento
Consegna entro le ore 12,00 del giorno lavorativo successivo alla partenza, peso max 30 Kg. 19,36 €

Celere 1Plus - SDA Poste Italiane ASSICURATO No Preavviso o Appuntamento
Consegna entro le ore 12,00 del giorno lavorativo successivo alla partenza, peso max 30 Kg. 22,70 €

Consegna su Appuntamento - SDA Poste Italiane
Consegna su Appuntamento con Preavviso entro 3 giorni lavorativi, dal lunedi al venerdi, peso max 30 Kg. 42,35 €

Why would you want to offer the Free Shipping freeshipper on the shipping methods in this case? The order does not qualify for Free Shipping freeshipper ... there is a regular Product in the cart that does not qualify for Free Shipping freeshipper and the Product marked as Always Free Shipping is not affecting the shipping rates ...

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!

10 Jun 2012, 7:54 PM
#10
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Hi Linda.
Interesting question.

  1. I think that if I were a customer I would get upset ordering a product that is always free shipping and have to pay the shipment because I add another product to my order. If I am ordering something always free shipping why should I not be allowed to take the chance of this free shipping parcel adding something to it?
  2. As shop, I would be happy if a customer can add a Regular Product to a free shipping product because in this case the money I spend for the shipping giving the free shipping will be better paid back buy the added product.
  3. Many customers come to my site, want to buy something worthing 10 euro and they go away because thay do not want to pay 10 euro for the shipment only. Assume that they can add to the product they want another always free shipping product, what would be better? That they go away or that they buy 2 products one of which always free shipping amd enjoy the free delivery?

I understand that may be that the always free shipping was invented for immaterial products that are not really shipped as a parcel, but if it could be possible to achieve what I am looking for, it would e powerfull selling tool for sites like mine selling only material products.
Who have immaterial products on sale, can always set weight to 0 and have the free shipping for immaterial products.

Ciao

enzo

12 Jun 2012, 10:16 AM
#11
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Ok.
Now we have determined my need, which is that I want that the order qualifies for Free Shipping freeshipper when a Product marked as Always Free Shipping is in the cart, even if there is a regular Product in the cart that does not qualify for Free Shipping freeshipper.

My next question is: which is/are the php file/s that control this?

Please tell me where I can begin to try to mod something if you can not, or don't want to do the coding for me.

Thanks
.

12 Jun 2012, 2:08 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: free shipping when cart total is below xx but one product in cart is free shipping

If you wanted to make it where if there is 1 Product marked as Always Free Shipping in the Cart and 10 other Products in the Cart that are NOT marked as Always Free Shipping and you want to show the Free Shipping, you could customize the code:
/includes/modules/shipping/freeshipper.php

with the code in RED:

      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_FREESHIPPER_STATUS == 'True') ? true : false);
      }

// bof: show free shipping when 1 or more products in the cart are Always Free Shipping
      if (!IS_ADMIN_FLAG) {
        if ($_SESSION['cart']->in_cart_check('product_is_always_free_shipping','1') > 0) {
          $this->enabled = true;
        }
      }
// eof: show free shipping when 1 or more products in the cart are Always Free Shipping

      if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREESHIPPER_ZONE > 0) ) {

Now what you will see is the Free Shipping freeshipper in addition to the other shipping modules so the customer can either select the Free Shipping freeshipper or pick a different shipping method of their choice ...

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 Jun 2012, 8:33 PM
#13
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Dear Linda,
I am really sorry I did not answer your last post before but I never received the email telling that the thread was answered. I am going to apply the mod immediately and let you know. THANKSSSSSSSSSSSSSSSSSS

26 Jun 2012, 9:06 PM
#14
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

It works perfectly!!! Linda you made my day. I can not think about how much time I spent trying to create this code mod. You did it in a very simple way!!! Amazing.
I think it would be just perfect if in a future release of zen cart it would be possible to include this function but by product.
In other words I would put a selctable flag for the products, which allows this function or not when a product is always free shipping.
So we would have for each product: Always Free Shipping Y/N and Make Cart Free Shipping Y/N
Thank a lot!!
enzo

26 Jun 2012, 9:17 PM
#15
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

I was editing and...time out!!!

It works perfectly!!! Linda you made my day. I can not think about how much time I spent trying to create this code mod. You did it in a very simple way!!! Amazing.
Thank a lot!!
I think it would be just perfect if in a future release of zen cart it would be possible to include this function but by product.
In other words I would put a selectable flag for the products, which allows this function or not when a product is always free shipping.
So we would have for each product: 1)Always Free Shipping Y/N and 2)Make Cart Free Shipping Y/N
If 1 Y and 2 N normal function
If 1 Y and 2 Y cart is free shipping
If 1 N and 2 N normal function
If 1 N and 2 Y cart is free shipping
Ciao and god bless you!
enzo

26 Jun 2012, 9:29 PM
#16
ajeh avatar

ajeh

Oba-san

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

Re: free shipping when cart total is below xx but one product in cart is free shipping

Thanks for the update that this worked for you ...

A lot of custom code like this is really site specific and something you need to customize for your code ... it is difficult to make every concept a part of the 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!

26 Jun 2012, 10:45 PM
#17
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

I wish I knew more about PHP so I could produce the code on my own and submit this concept as a contribution because it could be a way to sell more, or to promote a product.
Well, may be in another life.....
In this life I am happy with what you did for me.
Thank again.
ciao
enzo

25 Aug 2012, 1:55 PM
#18
slitter avatar

slitter

New Zenner

Join Date:
Jun 2005
Posts:
39
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Ajeh:

If you wanted to make it where if there is 1 Product marked as Always Free Shipping in the Cart and 10 other Products in the Cart that are NOT marked as Always Free Shipping and you want to show the Free Shipping, you could customize the code:
/includes/modules/shipping/freeshipper.php

with the code in RED:

  if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_FREESHIPPER_STATUS == 'True') ? true : false);
  }

// bof: show free shipping when 1 or more products in the cart are Always Free Shipping
if (!IS_ADMIN_FLAG) {
if ($_SESSION['cart']->in_cart_check('product_is_always_free_shipping','1') > 0) {
$this->enabled = true;
}
}
// eof: show free shipping when 1 or more products in the cart are Always Free Shipping

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREESHIPPER_ZONE > 0) ) {

> 
> Now what you will see is the Free Shipping freeshipper in addition to the other shipping modules so the customer can either select the Free Shipping freeshipper or pick a different shipping method of their choice ...

Hello Ajeh,
Instead of freeshipper I am using the Free Shipping Options (freeoptions) module for shipping. 
I was wondering if you could help me out how to use the same hack when i have chosen freeoptions so that if one product applies, all other items in the cart also get free shipping..
I am basing it on the Order weight <= 0.1
Is it possible to use the same code you have added to freeshipper.php for freeoptions.php? Or does it have to be slightly modified?
Regards,
Marco
28 Aug 2012, 1:24 PM
#19
slitter avatar

slitter

New Zenner

Join Date:
Jun 2005
Posts:
39
Plugin Contributions:
0

Re: free shipping when cart total is below xx but one product in cart is free shipping

Does any one have an idea on how to do this?