Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Free Shipping with 1 Exception

Free Shipping with 1 Exception

Locked

Views: 2,254

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
9 Nov 2010, 9:48 PM
#1
tmdelia avatar

tmdelia

New Zenner

Join Date:
May 2005
Posts:
69
Plugin Contributions:
0

Free Shipping with 1 Exception

I need to set Free Best Way Shipping to US only for all orders over $148 EXCEPT - I have a few products that are under $148 that I can offer free shipping to US only also.

I can't use the freeshipper module and set it per product, because then non-US residents will get an error that we don't ship to their region. On top of that, the freeshipper module prevents expedited methods from appearing if the customer didn't want the Free Best Way Shipping (ground) and decided they want to pay for Overnight or 2nd Day.

I also can't figure out how to deal with the issue that if a product that was not under $148 is mixed with one of the under $148 free shipping products. I.E. the total products are $100, but I need to charge shipping on only the non-free shipping products.

Help, please! I can't seem to figure this one out!

10 Nov 2010, 4:38 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping with 1 Exception

For Free Shipping on shipping to the US on Orders of $148 or more, you can set this with the Modules ... Order Totals ... Shipping ot_shipping and set this up with:

Allow Free Shipping
true

Free Shipping For Orders Over
$148.00

Provide Free Shipping For Orders Made
national

For the individual Products that you want to make Free shipping, is there something to identify these Products by that is in the:
products

table that would flag them in some manner ...

10 Nov 2010, 2:30 PM
#3
tmdelia avatar

tmdelia

New Zenner

Join Date:
May 2005
Posts:
69
Plugin Contributions:
0

Re: Free Shipping with 1 Exception

Thanks for your help Ajeh.

For the individual Products that you want to make Free shipping, is there something to identify these Products by that is in the: products table that would flag them in some manner ...

I can certainly add a field in the products table to identify them. What were you thinking once they were able to be identified via the products table?

10 Nov 2010, 2:51 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping with 1 Exception

You could use that flag to identify what is in the cart and if all Products are flagged as products_ships_free_usa then show the an additional shipping module if the customer is shipping to the US that has the Free Shipping ...

Something like clone the Flat Rate flat shipping module and set a Zone on it for your definition of the US and then check the cart contents to see if ALL of the Products are products_ships_free_usa ...

Next, depending on what shipping method(s) you are using, be able to adjust the shipping if need be for when there is a Product that is not products_ships_free_usa and a Product that is products_ships_free_usa and the customer is shipping to your Zone Definition for the US ...

You do need to decide how you want that to work on mixed shopping carts ...

18 Nov 2010, 6:43 PM
#5
tmdelia avatar

tmdelia

New Zenner

Join Date:
May 2005
Posts:
69
Plugin Contributions:
0

Re: Free Shipping with 1 Exception

Ajeh, I appreciate your feedback, however I've decided to go another route with this. The main reason for using the built-in products is always free shipping functionality was for the nice Free Shipping Icon code.

But it caused more problems than it solved, so I just decided to write an additional if statement and add it to includes/templates/MYTEMPLATE/tpl_product_info_display.php and includes/modules/MYTEMPLATE/product_listing.php

  <?php if (($saleprice >= 148) || ($listing->fields['products_price'] >= 148)) {
   ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>  
<?php } ?>

This works perfectly for the Products Listing page, but only works for items with a specials price the product_info page. Items with a products_price of greater than 148, but that do not have any specials price defined do not show the icon on the product_info page.

Any idea why?

18 Nov 2010, 7:40 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Free Shipping with 1 Exception

Try $products_price_sorter or $specials_price, or both?

18 Nov 2010, 7:50 PM
#7
tmdelia avatar

tmdelia

New Zenner

Join Date:
May 2005
Posts:
69
Plugin Contributions:
0

Re: Free Shipping with 1 Exception

Dr. Byte, thanks for the reply.

$saleprice is working just fine, so there is no need to change that. It is products without a specials price that has the issue.

$products_price_sorter will not work, because that variable is never defined, so I tried:

($listing->fields['products_price_sorter'] >= 148)

just trying to call from that database field, but no joy either.

18 Nov 2010, 8:00 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Free Shipping with 1 Exception

This is on the product_info page, right? If so, then the $listing variable is irrelevant, since it only applies to the product-listing page.

18 Nov 2010, 10:27 PM
#9
tmdelia avatar

tmdelia

New Zenner

Join Date:
May 2005
Posts:
69
Plugin Contributions:
0

Re: Free Shipping with 1 Exception

Ah! Well that would explain why I'm not getting anything!

Since the $listing variable is irrelevant, what is the variable that I can use on the product_info page that is looking at the price being displayed for the current product?

18 Nov 2010, 11:06 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping with 1 Exception

(int)$_GET['products_id']

will give you the current products_id on the product _info page ...

18 Nov 2010, 11:46 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Free Shipping with 1 Exception

tmdelia:

what is the variable that I can use on the product_info page that is looking at the price being displayed for the current product?

$products_price and $specials_price

19 Nov 2010, 12:13 AM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping with 1 Exception

I so hate when I speed read ... especially when it appears that my answer applies to another question as sometimes I read things that most people don't ... :lookaroun

Listen to the good DrByte ... :lamo:

19 Nov 2010, 12:57 PM
#13
tmdelia avatar

tmdelia

New Zenner

Join Date:
May 2005
Posts:
69
Plugin Contributions:
0

Re: Free Shipping with 1 Exception

Well, $specials_price and $products_price didn't work - in fact products with a specials price stopped working too:

<!--bof free ship icon  $148-->
<?php if(($specials_price >= 148) || ($products_price >= 148)) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>  
<?php } ?>
<!--bof free ship icon  $148-->

So I tried this:

<?php $msrp = $db->Execute("select * from " . TABLE_PRODUCTS . " where products_id = '".(int)$_GET['products_id']."'");
   if (($saleprice >= 148) || ($msrp->fields['products_price'] >= 148)) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>  
<?php } ?>

And again, $saleprice works just fine - but products with no specials price that are over $148 still don't work... Argh!

19 Nov 2010, 1:21 PM
#14
tmdelia avatar

tmdelia

New Zenner

Join Date:
May 2005
Posts:
69
Plugin Contributions:
0

Re: Free Shipping with 1 Exception

Scratch what I said above.

I totally missed a pesky ```php

<? } else { ?>

Fixed!!! Thanks so much for your help!