Zen Cart Logo
Forums / General Questions / Show Item is FREE shipping in the CART.

Show Item is FREE shipping in the CART.

Views: 3,767

Results 21 to 40 of 43
13 Mar 2011, 2:11 PM
#21
ajeh avatar

ajeh

Oba-san

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

Show Item is FREE shipping in the CART.

Thanks for the update that this is now working for you ... :smile:

13 Mar 2011, 5:47 PM
#22
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

Ajeh,

just came up, but shipping to Alaska & Hawaii ?

how to EXCLUDE them from the FREE SHIPPING as well ?

13 Mar 2011, 5:49 PM
#23
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

it would be a mod of your custom code ?

// bof: add back weight for Canada
global $order, $cart;
if ($order->delivery['country']['id'] == 38) {
$total_weight += $_SESSION['cart']->free_shipping_weight;
}
// eof: add back weight for Canada

to add the EXCLUSION of Alaskas zone code AK and Hawaii HI ?

13 Mar 2011, 6:00 PM
#24
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

How do you know the ID # ?
as in your code if ($order->delivery['country']['id'] == 38
I do not see 38 in the backend to represent canada ?

13 Mar 2011, 6:08 PM
#25
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

When I click on contries I see it up in the address

/countries.php?page=2&cID=38

I will make copies of the code you made and change the 38 to AK and HI ?

will give it a shot, I have customer waiting in AK to make order :-)

No go, must be a play on the ZONE and not country

13 Mar 2011, 6:17 PM
#26
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

tried this as well

if ($order->delivery['zone']['id'] == AK) { $this->enabled = true; }

and this

if ($order->delivery['zone']['id'] == 2) { $this->enabled = true; }

and this

if ($order->delivery['country']['id']==223['zone']['id'] == 2) { $this->enabled = true; }

14 Mar 2011, 12:41 AM
#27
ajeh avatar

ajeh

Oba-san

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

Re: Show Item is FREE shipping in the CART.

Try using:

if ($order->delivery['country']['id'] == 38 || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Alaska') || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Hawaii')) {
14 Mar 2011, 12:52 AM
#28
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

That stopped the whole shipping to load ?

would I use the same code for the UPS.php and tpl_shopping_cart.php ?

I added { $this->enabled = true; } to the end based on the working code,
just looks like it was left off ?

so is now

if ($order->delivery['country']['id'] == 38 || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Alaska') || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Hawaii')) { $this->enabled = true; }

This gets a cost to come up to alaska now, but FREE SHIPPING $0 is also still an option, how to get it out ?

14 Mar 2011, 12:58 AM
#29
ajeh avatar

ajeh

Oba-san

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

Re: Show Item is FREE shipping in the CART.

Sounds like you have an error on the file when you made that last change ...

What debug logs do you see in the:
/cache

when you make that change?

I put it in the shipping.php class and the shipping module ...

I am not sure what you have in the tpl_shopping_cart_default.php but I am guessing you have an IF to manage the icon so you would need it there too ...

14 Mar 2011, 1:06 AM
#30
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

shipping.php ? not tpl_shpping_cart.php

cache ?
[13-Nov-2010 18:54:38] PHP Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in efpsupply\includes\templates\theme226\templates\tpl_shopping_cart_default.php on line 133

tpl_shpping_cart.php

<?php echo '<br />' . (zen_get_show_product_switch($product['id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($product['id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');?>

UPS.php

if ($order->delivery['country']['id'] == 38 || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Alaska') || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Hawaii')) { $this->enabled = true; }

shipping.php

if ($order->delivery['country']['id'] == 38 || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Alaska') || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Hawaii')) { $this->enabled = true; }

Alaska still showing FREE option. CANADA still working PERFECTLY..

14 Mar 2011, 1:16 AM
#31
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

Also now, the excluded ones do not seem to be passing the weights ?
United Parcel Service (1 x 0.06lbs) (Ground)

14 Mar 2011, 1:18 AM
#32
ajeh avatar

ajeh

Oba-san

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

Re: Show Item is FREE shipping in the CART.

That is a very old debug log ... do you have a new one that is generated today?

Are you testing this on the checkout or the shipping estimator?

14 Mar 2011, 1:27 AM
#33
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

Can I get it to create a new one ?

on checkout.. logged in and can complete the purchase if I want to buy from myself :-)

would you like to log in as me on the site to see ? I have all the addresses to use in the address book on my account.

14 Mar 2011, 2:16 AM
#34
ajeh avatar

ajeh

Oba-san

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

Re: Show Item is FREE shipping in the CART.

You may send me a Private Message with the login information and when I get so free time I will try to see what is happening ...

14 Mar 2011, 2:41 AM
#35
ajeh avatar

ajeh

Oba-san

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

Re: Show Item is FREE shipping in the CART.

Check the file:
/includes/classes/shipping.php

Do you have this code in there:

  function calculate_boxes_weight_and_tare() {
    global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes;

// bof: add back weight for Canada, Alaska and Hawaii
    global $order, $cart;
    if ($order->delivery['country']['id'] == 38 || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Alaska') || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Hawaii')) {
      $total_weight += $_SESSION['cart']->free_shipping_weight;
    }
// eof: add back weight for Canada, Alaska and Hawaii

    if (is_array($this->modules)) {
14 Mar 2011, 2:55 AM
#36
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

Will also be on my chat on the site if you want to talk faster :-)

function calculate_boxes_weight_and_tare() {
global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes;

// bof: allow for Canada, Alaska, Hawaii

if ($order->delivery['country']['id'] == 38 || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Alaska') || ($order->delivery['country']['id'] == 223 && $order->delivery['state'] == 'Hawaii')) { $this->enabled = true; }

// eof: allow for Canada, Alaska, Hawaii

CHANGED IT TO YOURS, think i put the wrong code in the shipping.php
but same results it looks like

14 Mar 2011, 3:00 AM
#37
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

added the spaces from the comments away from the code
and now it seems the weight is comming up in the shipping
even if it does not in the spot above the cart table.

but the free shipping is still showing for those states, is progreess though :-)

14 Mar 2011, 3:03 AM
#38
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

If canada is the only one of the thee that is NOT showing the FREE SHIPPING
then could it be in my zone setups ? as AK & HI are the only two showing free shipping
so must be somethinig else that is getting them to prompt still ?

14 Mar 2011, 3:10 AM
#39
ajeh avatar

ajeh

Oba-san

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

Re: Show Item is FREE shipping in the CART.

Go to phpMyAdmin and browse the table:
zones

what are the settings for:
Alaska
Hawaii

Browse the table:
countries

what are the settings for:
United States
Canada

14 Mar 2011, 3:38 AM
#40
gloerick avatar

gloerick

Zen Follower

Join Date:
Feb 2006
Location:
Boise, ID
Posts:
330
Plugin Contributions:
0

Re: Show Item is FREE shipping in the CART.

zone_id zone_country_id zone_code zone_name
2 223 AK Alaska
21 223 HI Hawaii

countries_id countries_name countries_iso_code_2 countries_iso_code_3 address_format_id
223 United States US USA 2
38 Canada CA CAN 2

this wat you are looking for ?