Forums / Built-in Shipping and Payment Modules / Free Shipping Not Working

Free Shipping Not Working

Results 1 to 20 of 29
11 Dec 2013, 00:36
#1
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Free Shipping Not Working

Hello:

I am in the process of rebuilding an old FrontPage site with ZenCart and am having trouble getting the free shipping to work. I have activated the free shipper module and have the sort order set to 0 but the product will not show free shipping. I have the product marked for "always free shipping" also. Don't know what I am doing wrong.

This is the url for the product if that will help:

http://www.petluxuryboutique.com/shop/index.php?main_page=product_info&cPath=68&products_id=221

Thanks for your help. :smile:

Silver
11 Dec 2013, 00:45
#2
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

If you just want to show the Free Shipping image, you need to turn it on for the Product Type ...

That Product is 8lbs ... yet, it is Free Shipping ... is it Free Shipping or 8lbs where you need to charge for shipping on it? :lookaroun
11 Dec 2013, 01:10
#3
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

Hi Linda:

Thanks for the reply. I remember you have helped me in the past. My shipping is not set up for weight, it is set for amount. I'm still not quite sure what you mean or what I should do???

Thanks,

Silver
11 Dec 2013, 13:53
#4
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

Go to the Catalog ... Product Types ... and hit EDIT LAYOUT ...

Change the setting to YES on:
Product Free Shipping Image Status - Catalog
Show the Free Shipping image/text in the catalog?
11 Dec 2013, 19:07
#5
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

Linda:

All of those setting are set correctly. I even uploaded the "free shipping" image and it is still not showing??? What to do?

Kind regards,

Silver
11 Dec 2013, 19:14
#6
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

If you switch for a minute to Classic Template ... does it show?
11 Dec 2013, 20:37
#7
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

No it does not???

Silver
11 Dec 2013, 23:34
#8
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

Go to the Tools ... Developers Tool Kit ... and in the bottom input box enter:
$flag_show_product_info_free_shipping

Does it show among the listings:
/includes/modules/pages/product_info/main_template_vars.php

Line #198 : $flag_show_product_info_free_shipping = zen_get_show_product_switch($_GET['products_id'], 'always_free_shipping_image_switch');


/includes/templates/template_default/templates/tpl_product_info_display.php

Line #76 : <?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?> 


Can you check that Product and ensure that it is marked Always Free Shipping YES

Have you other Products that are marked as Always Free Shipping YES
11 Dec 2013, 23:56
#9
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

This is the error message I get"

Error: No matching Configuration Keys were found ... $flag_show_product_info_free_shipping

Product is market Yes "always free shipping"

I now have other products marked free shipping and they aren't showing either.

Thanks,

Silver
12 Dec 2013, 04:21
#10
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

Can you check that the file:
/includes/modules/pages/product_info/main_template_vars.php

is the current v151 file?

It looks like it is not as you should have in it code referencing:
$flag_show_product_info_free_shipping

and so should your template file:
/includes/templates/template_default/templates/tpl_product_info_display.php

and if using templates and overrides:
/includes/templates/your_template_dir/templates/tpl_product_info_display.php
12 Dec 2013, 04:42
#11
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

I am sorry Linda, but I really don't understand what you are trying to say.

This file: /includes/modules/pages/product_info/main_template_vars.php is there but I don't know what you mean <<<is the current v151 file?>>>

This is a 1.51 version. I just don't understand what you are trying to tell me. Should part of this file be replaced with something else?

Regards,

Silver
12 Dec 2013, 13:57
#12
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

Let's start slow ...

If you look at the file:
/includes/modules/pages/product_info/main_template_vars.php

in your editor, you should be able to search it for:
$flag_show_product_info_free_shipping

You should also be able to open your files for:
/includes/templates/template_default/templates/tpl_product_info_display.php

and if using templates and overrides:
/includes/templates/your_template_dir/templates/tpl_product_info_display.php

and also search then for:
$flag_show_product_info_free_shipping

Do you find that variable in those files?

From what you are indicating, this is a clean install and not an upgrade to v151, correct?
12 Dec 2013, 16:33
#13
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

Linda:

I only found that variable in the first file. The following is what I found:

In the first file:
/includes/modules/pages/product_info/main_template_vars.php

I found:
$flag_show_product_info_free_shipping = zen_get_show_product_switch($_GET['products_id'], 'always_free_shipping_image_switch');

In the second file:

/includes/templates/template_default/templates/tpl_product_info_display.php

I found: This is as close to that file as I could find.
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>

In the third file:

/includes/templates/your_template_dir/templates/tpl_product_info_display.php

Again I found:
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>

This file: $flag_show_product_info_free_shipping was not found in the last two files.

Yes, this a clean v15.1 install.

Thanks again for your help here!

Silver
12 Dec 2013, 16:58
#14
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

In the file:
/includes/modules/pages/product_info/main_template_vars.php

you should see a section of code for:
// build show flags from product type layout settings
  $flag_show_product_info_starting_at = zen_get_show_product_switch($_GET['products_id'], 'starting_at');
  $flag_show_product_info_model = zen_get_show_product_switch($_GET['products_id'], 'model') == 1 and $products_model !='';
  $flag_show_product_info_weight = zen_get_show_product_switch($_GET['products_id'], 'weight') == 1 and $products_weight !=0;
  $flag_show_product_info_quantity = zen_get_show_product_switch($_GET['products_id'], 'quantity') == 1;
  $flag_show_product_info_manufacturer = zen_get_show_product_switch($_GET['products_id'], 'manufacturer') and !empty($manufacturers_name);
  $flag_show_product_info_in_cart_qty = zen_get_show_product_switch($_GET['products_id'], 'in_cart_qty');
  $flag_show_product_info_reviews = zen_get_show_product_switch($_GET['products_id'], 'reviews');
  $flag_show_product_info_reviews_count = zen_get_show_product_switch($_GET['products_id'], 'reviews_count');
  $flag_show_product_info_date_available = zen_get_show_product_switch($_GET['products_id'], 'date_available');
  $flag_show_product_info_date_added = zen_get_show_product_switch($_GET['products_id'], 'date_added');
  $flag_show_product_info_url = zen_get_show_product_switch($_GET['products_id'], 'url');
  $flag_show_product_info_additional_images = zen_get_show_product_switch($_GET['products_id'], 'additional_images');
  $flag_show_product_info_free_shipping = zen_get_show_product_switch($_GET['products_id'], 'always_free_shipping_image_switch');
  require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCTS_QUANTITY_DISCOUNTS));


In the template files:
/includes/templates/template_default/templates/tpl_product_info_display.php
/includes/templates/your_template_dir/templates/tpl_product_info_display.php

you should see code for:
<!--eof Product Price block -->

<!--bof free ship icon  -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon  -->

 <!--bof Product description -->


Do you see any of that?

Was this a clean install or an upgrade for v151?
12 Dec 2013, 17:18
#15
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

Linda:

The first block of code I have but the second block is missing:

<!--bof Product description -->

This is it:

<!--bof free ship icon -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon -->

<!--bof Attributes Module -->

The following is the second one: /includes/templates/your_template_dir/templates/tpl_product_info_display.php

<!--eof Product Price block -->

<!--bof free ship icon -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon -->

<!--bof Attributes Module -->

Again: Appears to be missing: <!--bof Product description -->

yes, I am using v1.5.1 clean install.

Silver
12 Dec 2013, 17:23
#16
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

In your two template files, add the code in RED:
<!--eof Product Price block -->


<!--bof free ship icon  -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon  -->

 <!--bof Product description -->


See if it now shows the Free Shipping icon on these Products marked as Always Free Shipping YES ...
12 Dec 2013, 17:42
#17
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

I know this may sound stupip but should I also include:

<!--bof Product description --> ???

because I didn't see that either?

Silver
12 Dec 2013, 18:00
#18
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

No, maybe that was removed in your templates and overrides or something ...

You might seriously consider getting a clean download of v151 and comparing it to your site to see what else might be missing ...

There should be a number of files with references to the:
$flag_show_product_info_free_shipping

and you say you do not have any ... so either you did not do the search right in the Developer's Tool Kit or other files are for some reason missing things ...

How did you install v151? Did you download it from the link on the Home Page or from somewhere else?
12 Dec 2013, 18:05
#19
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Posts:
563
Plugin Contributions:
0

Re: Free Shipping Not Working

I downloaded it from the link on the homepage. I'm not exactly sure what I should do now. Should I try and place that code or just do another install? Is there a way to do another install over top of what I have now?

Silver
12 Dec 2013, 18:23
#20
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping Not Working

The block of code in RED is what manages when the Free Shipping icon shows ...

In the original template file, it is between the sections for Product Price and Product Description:
<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . '<meta itemprop="currency" content="' . $_SESSION['currency'] . '" />' . '<span itemprop="price">' . zen_get_products_display_price((int)$_GET['products_id']) . '</span>';
?></h2>
<!--eof Product Price block -->

<!--bof free ship icon  -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon  -->

 <!--bof Product description -->
<?php if ($products_description != '') { ?>
<div id="productDescription" class="productGeneral biggerText"><span itemprop="description"><?php echo stripslashes($products_description); ?></span></div>
<?php } ?>
<!--eof Product description -->
<br class="clearBoth" />

<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
  // do nothing
} else {


You, for some reason, do not have that block of code so the icon never displays ...

I use Beyond Compare to see what original files are like compared to current files and also test the files in:
/includes/templates/templates_default

to the files in:
/includes/templates/your_template_dir

to see what changes have been made or what might be out of date or missing current code as some templates are made from older versions ...