Draygon Posted May 1, 2014 Share Posted May 1, 2014 (edited) I need to remove one simple little word from my carrier in the carrier options during the checkout process. That word..."Free". Long story short, I had to create my own customer carrier for items over 150 lbs, ok great, I cannot get live rate quotes for that carrier (even longer story), as it is a freight carrier, those rates must be manually quoted and separate from the purchase (ok fine) but since I cannot flat rate (I can but am not going to) and cannot get live quote, I have no price to input for shipping this method thus PS defaults to "Free" when you have no price associated with that carrier. I just need to remove the word "Free" from that carrier and preferably, that carrier only. Thanks in advance, Draygon Edited May 2, 2014 by Draygon (see edit history) Link to comment Share on other sites More sharing options...
Whispar1 Posted May 1, 2014 Share Posted May 1, 2014 Can you provide a link to site so we can test it? Is the "free" showing in the cost column of the shopping cart? Also, is the "free shipping" column next to the carrier in the BO unchecked? Link to comment Share on other sites More sharing options...
Draygon Posted May 1, 2014 Author Share Posted May 1, 2014 Yes, free shipping is not selected as an option. PS is using the word "Free" as the default since it is not getting live rate quotes nor am I imputing any rates for regions, weight or price. As this is a freight option I must quote this manually. The word "Free" in the price column could lead to sour customers. Thank you for any help you can provide. Link to comment Share on other sites More sharing options...
Whispar1 Posted May 1, 2014 Share Posted May 1, 2014 What version of PS are you using and is it the default theme. Can you provide a link to your site? Link to comment Share on other sites More sharing options...
Draygon Posted May 1, 2014 Author Share Posted May 1, 2014 Version 1.6.05. Link to site below. Things to consider, free shipping is provided to customers for orders above $5,000 so free shipping is expected and I am ok (unfortunately) with my free shipping option and freight carrier showing for items that are over 150 lbs. Also, I do not have all weight calculations for the few products I do have in the store. However, please add the "Ermator S36" to the cart for a precise demonstration to the issue. This item is under $5,000 but over 150 lbs. So it prompts the "Freight Carrier" as it should, but it says free in the price column. Link to site: http://www.rev53.com/Shop/prestashop/en/ Link to comment Share on other sites More sharing options...
Whispar1 Posted May 1, 2014 Share Posted May 1, 2014 Is this the "free shipping" you are referring to? What is interesting is that if you refresh the page, it changes to 0.00 Link to comment Share on other sites More sharing options...
Draygon Posted May 1, 2014 Author Share Posted May 1, 2014 I'd noticed that as well. But it does not only happen with a refresh, moving to another page would also yield the same result. While I must fix the "Free Shipping" there as that is a nuisance as well, but that is not the one. When you add to cart and move through the check-out process when you get to shipping/carrier options, it shows "Free" for the price. I definitely need to get rid of that. Link to comment Share on other sites More sharing options...
Whispar1 Posted May 1, 2014 Share Posted May 1, 2014 (edited) Yes, that free shipping is a problem. Last year I finally just commented out the lines in blockcart.tpl because changing the translation to 0.00 doesn't help - still looks free <!--comment out these two lines to remove shiping block--> <!--<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span> <span>{l s='Shipping' mod='blockcart'}</span>--> As far as the order process, I see what you mean - you may be able to do something similar in order-carrier.tpl The section that controls this is delivery_option_price and it's is around line 345 in my version (1.5.3.1) Probably not the best way but in the absence of a real solution, work-arounds will do the job. Just backup the file before changing anything. Edited May 1, 2014 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Draygon Posted May 2, 2014 Author Share Posted May 2, 2014 Were you referring to line 345 in order-carrier.tpl? As I am using 1.6.0.5 that file does not have a line 345. I feel as if you have steered me in the right direction and after tinkering around with the code a bit, there is something to this file, I just cannot figure which lines in connection to others that need to be tinkered with. Link to comment Share on other sites More sharing options...
Draygon Posted May 2, 2014 Author Share Posted May 2, 2014 Here is the code for that file for anyone who can help. What I need to do is remove the word "Free" from the carrier price. Since I've set up a customer carrier for freight, I need to quote rates separately and later from the order process. Since the rates are not live quoted and not flat rated for region, it presents a problem when it displays the price as "Free" in the carrier selection screen of the checkout process. Ideally, I'd only want to remove the word from that specific carrier, but will accept all instances of the word gone in the same area. Here is the code. Hopefully this is the file to make this happen. {if !$opc} <script type="text/javascript"> //<![CDATA[ var orderProcess = 'order'; var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}'; var currencyRate = '{$currencyRate|floatval}'; var currencyFormat = '{$currencyFormat|intval}'; var currencyBlank = '{$currencyBlank|intval}'; var txtProduct = "{l s='Product' js=1}"; var txtProducts = "{l s='Products' js=1}"; var orderUrl = '{$link->getPageLink("order", true)|addslashes}'; var msg = "{l s='You must agree to the terms of service before continuing.' js=1}"; {literal} function acceptCGV() { if ($('#cgv').length && !$('input#cgv:checked').length) { alert(msg); return false; } else return true; } {/literal} //]]> </script> {else} <script type="text/javascript"> var txtFree = "{l s='Free'}"; </script> {/if} {if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} <script type="text/javascript"> {literal} // <![CDATA[ $('document').ready( function(){ if ($('input#gift').is(':checked')) $('p#gift_div').show(); }); //]]> {/literal} </script> {/if} {if !$opc} {capture name=path}{l s='Shipping:'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} {/if} {if !$opc} <div id="carrier_area"> {else} <div id="carrier_area" class="opc-main-block"> {/if} {if !$opc} <h1>{l s='Shipping:'}</h1> {else} <h2><span>2</span> {l s='Delivery methods'}</h2> {/if} {if !$opc} {assign var='current_step' value='shipping'} {include file="$tpl_dir./order-steps.tpl"} {include file="$tpl_dir./errors.tpl"} <form id="form" action="{$link->getPageLink('order', true, NULL, "multi-shipping={$multi_shipping}")|escape:'html'}" method="post" onsubmit="return acceptCGV();"> {else} <div id="opc_delivery_methods" class="opc-main-block"> <div id="opc_delivery_methods-overlay" class="opc-overlay" style="display: none;"></div> {/if} <div class="order_carrier_content"> {if isset($virtual_cart) && $virtual_cart} <input id="input_virtual_carrier" class="hidden" type="hidden" name="id_carrier" value="0" /> {else} <h3 class="carrier_title">{l s='Choose your delivery method'}</h3> <div id="HOOK_BEFORECARRIER"> {if isset($carriers) && isset($HOOK_BEFORECARRIER)} {$HOOK_BEFORECARRIER} {/if} </div> {if isset($isVirtualCart) && $isVirtualCart} <p class="warning">{l s='No carrier is needed for this order.'}</p> {else} {if $recyclablePackAllowed} <p class="checkbox"> <input type="checkbox" name="recyclable" id="recyclable" value="1" {if $recyclable == 1}checked="checked"{/if} autocomplete="off"/> <label for="recyclable">{l s='I would like to receive my order in recycled packaging.'}.</label> </p> {/if} <div class="delivery_options_address"> {if isset($delivery_option_list)} {foreach $delivery_option_list as $id_address => $option_list} <h3> {if isset($address_collection[$id_address])} {l s='Choose a shipping option for this address:'} {$address_collection[$id_address]->alias} {else} {l s='Choose a shipping option'} {/if} </h3> <div class="delivery_options"> {foreach $option_list as $key => $option} <div class="delivery_option {if ($option@index % 2)}alternate_{/if}item"> <input class="delivery_option_radio" type="radio" name="delivery_option[{$id_address}]" onchange="{if $opc}updateCarrierSelectionAndGift();{else}updateExtraCarrier('{$key}', {$id_address});{/if}" id="delivery_option_{$id_address}_{$option@index}" value="{$key}" {if isset($delivery_option[$id_address]) && $delivery_option[$id_address] == $key}checked="checked"{/if} /> <label for="delivery_option_{$id_address}_{$option@index}"> <table class="resume"> <tr> <td class="delivery_option_logo"> {foreach $option.carrier_list as $carrier} {if $carrier.logo} <img src="{$carrier.logo}" alt="{$carrier.instance->name}"/> {else if !$option.unique_carrier} {$carrier.instance->name} {if !$carrier@last} - {/if} {/if} {/foreach} </td> <td> {if $option.unique_carrier} {foreach $option.carrier_list as $carrier} <div class="delivery_option_title">{$carrier.instance->name}</div> {/foreach} {if isset($carrier.instance->delay[$cookie->id_lang])} <div class="delivery_option_delay">{$carrier.instance->delay[$cookie->id_lang]}</div> {/if} {/if} {if count($option_list) > 1} {if $option.is_best_grade} {if $option.is_best_price} <div class="delivery_option_best delivery_option_icon">{l s='The best price and speed'}</div> {else} <div class="delivery_option_fast delivery_option_icon">{l s='The fastest'}</div> {/if} {else} {if $option.is_best_price} <div class="delivery_option_best_price delivery_option_icon">{l s='The best price'}</div> {/if} {/if} {/if} </td> <td> <div class="delivery_option_price"> {if $option.total_price_with_tax && (!isset($free_shipping) || (isset($free_shipping) && !$free_shipping))} {if $use_taxes == 1} {if $priceDisplay == 1} {convertPrice price=$option.total_price_without_tax} {l s='(tax excl.)'} {else} {convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'} {/if} {else} {convertPrice price=$option.total_price_without_tax} {/if} {else} {l s='Free'} {/if} </div> </td> </tr> </table> <table class="delivery_option_carrier {if isset($delivery_option[$id_address]) && $delivery_option[$id_address] == $key}selected{/if} {if $option.unique_carrier}not-displayable{/if}"> {foreach $option.carrier_list as $carrier} <tr> {if !$option.unique_carrier} <td class="first_item"> <input type="hidden" value="{$carrier.instance->id}" name="id_carrier" /> {if $carrier.logo} <img src="{$carrier.logo}" alt="{$carrier.instance->name}"/> {/if} </td> <td> {$carrier.instance->name} </td> {/if} <td {if $option.unique_carrier}class="first_item" colspan="2"{/if}> <input type="hidden" value="{$carrier.instance->id}" name="id_carrier" /> {if isset($carrier.instance->delay[$cookie->id_lang])} {$carrier.instance->delay[$cookie->id_lang]}<br /> {if count($carrier.product_list) <= 1} ({l s='Product concerned:'} {else} ({l s='Products concerned:'} {/if} {* This foreach is on one line, to avoid tabulation in the title attribute of the acronym *} {foreach $carrier.product_list as $product} {if $product@index == 4}<acronym title="{/if}{if $product@index >= 4}{$product.name}{if isset($product.attributes) && $product.attributes} {$product.attributes|escape:'htmlall':'UTF-8'}{/if}{if !$product@last}, {else}">...</acronym>){/if}{else}{$product.name}{if isset($product.attributes) && $product.attributes} {$product.attributes|escape:'htmlall':'UTF-8'}{/if}{if !$product@last}, {else}){/if}{/if}{/foreach} {/if} </td> </tr> {/foreach} </table> </label> </div> {/foreach} </div> <div class="hook_extracarrier" id="HOOK_EXTRACARRIER_{$id_address}">{if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}</div> {foreachelse} <p class="warning" id="noCarrierWarning"> {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} {if empty($address->alias)} {l s='No carriers available.'} {else} {l s='No carriers available for the address "%s".' sprintf=$address->alias} {/if} {if !$address@last} <br /> {/if} {foreachelse} {l s='No carriers available.'} {/foreach} </p> {/foreach} {/if} </div> <div style="display: none;" id="extra_carrier"></div> {if $giftAllowed} <h3 class="gift_title">{l s='Gift'}</h3> <p class="checkbox"> <input type="checkbox" name="gift" id="gift" value="1" {if $cart->gift == 1}checked="checked"{/if} autocomplete="off"/> <label for="gift">{l s='I would like my order to be gift wrapped.'}</label> <br /> {if $gift_wrapping_price > 0} ({l s='Additional cost of'} <span class="price" id="gift-price"> {if $priceDisplay == 1}{convertPrice price=$total_wrapping_tax_exc_cost}{else}{convertPrice price=$total_wrapping_cost}{/if} </span> {if $use_taxes}{if $priceDisplay == 1} {l s='(tax excl.)'}{else} {l s='(tax incl.)'}{/if}{/if}) {/if} </p> <p id="gift_div" class="textarea"> <label for="gift_message">{l s='If you\'d like, you can add a note to the gift:'}</label> <textarea rows="5" cols="35" id="gift_message" name="gift_message">{$cart->gift_message|escape:'htmlall':'UTF-8'}</textarea> </p> {/if} {/if} {/if} {if $conditions AND $cms_id} <h3 class="condition_title">{l s='Terms of service'}</h3> <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} autocomplete="off"/> <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions}" class="iframe">{l s='(Read the Terms of Service)'}</a> </p> <script type="text/javascript"> $(document).ready(function() { $("a.iframe").fancybox({ 'type' : 'iframe', 'width':600, 'height':600 }); }); </script> {/if} </div> {if !$opc} <p class="cart_navigation submit"> <input type="hidden" name="step" value="3" /> <input type="hidden" name="back" value="{$back}" /> {if !$is_guest} {if $back} <a href="{$link->getPageLink('order', true, NULL, "step=1&back={$back}&multi-shipping={$multi_shipping}")|escape:'html'}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a> {else} <a href="{$link->getPageLink('order', true, NULL, "step=1&multi-shipping={$multi_shipping}")|escape:'html'}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a> {/if} {else} <a href="{$link->getPageLink('order', true, NULL, "multi-shipping={$multi_shipping}")|escape:'html'}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a> {/if} {if isset($virtual_cart) && $virtual_cart || (isset($delivery_option_list) && !empty($delivery_option_list))} <input type="submit" name="processCarrier" value="{l s='Next'} »" class="exclusive" /> {/if} </p> </form> {else} <h3>{l s='Leave a message'}</h3> <div> <p>{l s='If you would like to add a comment about your order, please write it in the field below.'}</p> <p><textarea cols="120" rows="3" name="message" id="message">{if isset($oldMessage)}{$oldMessage|escape:'htmlall':'UTF-8'}{/if}</textarea></p> </div> </div> {/if} </div> Link to comment Share on other sites More sharing options...
Whispar1 Posted May 2, 2014 Share Posted May 2, 2014 Yes, your lines may be different since I am using 1.5.3 Try this, scroll down until you get to this section: <div class="delivery_option_price"> {if $option.total_price_with_tax && (!isset($free_shipping) || (isset($free_shipping) && !$free_shipping))} {if $use_taxes == 1} {if $priceDisplay == 1} {convertPrice price=$option.total_price_without_tax} {l s='(tax excl.)'} {else} {convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'} {/if} {else} {convertPrice price=$option.total_price_without_tax} {/if} {else} {l s='Free'} Try changing the 'Free' to '--' or 'TBD' or whatever you want that to say. See if that works. On a side note, whenever I change a tpl file, I like to put a comment above the line showing what I changed so that I can troubleshoot later if it creates a problem..... In this case something like this: {/if} {else} {l s='TBD'} <!--Changed from 'Free'--> 1 Link to comment Share on other sites More sharing options...
Draygon Posted May 2, 2014 Author Share Posted May 2, 2014 Something about you being "Da Man!". Only one additional change to that from what you posted. In the line you quoted You can opt to use '' with no value. However, there is one additional spot higher in the code around line 48 I believe it was that also had the same reference. Making the same change does it. Also, I'm using Dreamweaver for my code changes. This little option when saving..."Would you like to update links?" I was selecting yes when I needed to select NO. Problem all fixed! Link to comment Share on other sites More sharing options...
Draygon Posted May 2, 2014 Author Share Posted May 2, 2014 <!--comment out these two lines to remove shiping block--> <!--<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span> <span>{l s='Shipping' mod='blockcart'}</span>--> When you say comment out are you saying "Delete" those lines entirely? Link to comment Share on other sites More sharing options...
Whispar1 Posted May 2, 2014 Share Posted May 2, 2014 Glad to hear it worked. And yes - never update links - it will screw everything up No - not delete. When you add this <!-- at the beginning of the code you want to comment out and --> at the end, it does not delete the code - just "hides" it in a sense. The above code I posted without the comment tags looks like this: <span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span> <span>{l s='Shipping' mod='blockcart'}</span> You will see I also made a comment above so I know why I did what I did. It's a way to make "notes" if you will that do not affect the code <!--comment out these two lines to remove shipping block--> 1 Link to comment Share on other sites More sharing options...
Draygon Posted May 2, 2014 Author Share Posted May 2, 2014 I commented out the exact lines you mentioned and in the blockcart I still get "Free Shipping". Dang it. So close... Link to comment Share on other sites More sharing options...
Whispar1 Posted May 2, 2014 Share Posted May 2, 2014 Odd... here is mine - no shipping line at all. Maybe 1.6 has another place that needs to be changed? Link to comment Share on other sites More sharing options...
Draygon Posted May 2, 2014 Author Share Posted May 2, 2014 I DUDDITS! I was modifying the wrong blockcart.tpl file. I was not looking in themes/modules/blockcart I was just looking at the standard block cart. You're still the man Whispar! Link to comment Share on other sites More sharing options...
Whispar1 Posted May 2, 2014 Share Posted May 2, 2014 Great!! This is a frustrating issue for sure - glad it is working better. Link to comment Share on other sites More sharing options...
BlueBell Posted June 25, 2014 Share Posted June 25, 2014 Draygon, I tried the code by commenting it out. For me it works half-way. After commenting it out, the drop down cart window looks like this: So, no shipping showing. But then, as I go to checkout and enter an email address to create an account, it brings me to a new window (this is even BEFORE filling in the mailing address). And then the cart drop window looks like this: As you see, the shipping cost was added somewhere behind the scenes. And I don't know how to fix that. I changed the codes back, just in case. Link to comment Share on other sites More sharing options...
flyclothing Posted September 8, 2014 Share Posted September 8, 2014 Navigate to /public_html/themes/your-theme/js/modules/blockcart/ajax-cart.js locate: if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1) $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); else if (typeof(freeShippingTranslation) != 'undefined') $('.ajax_cart_shipping_cost').html(freeShippingTranslation); and replace it with: $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); PART 2 Navigate to public_html/themes/your-theme/modules/blockcart/blockcart.tpl Locate: <span class="price cart_block_shipping_cost ajax_cart_shipping_cost"> {if $shipping_cost_float == 0} {l s='Free shipping!' mod='blockcart'} {else} {$shipping_cost} {/if} </span> And replace it with: <span class="price cart_block_shipping_cost ajax_cart_shipping_cost"> I used this too as a mod and now get $0.00 pricing in the cart until an address is input. Link to comment Share on other sites More sharing options...
BambiCodes Posted January 16, 2015 Share Posted January 16, 2015 I did all of this and it works great. BUT on the Shopping Cart Summary page, I deleted an item or decreased the quantity of a product and the FREE SHIPPING comes back! I'm using one page check out, PrestaShop v. 1.6.0.9. Thank you in advance. Link to comment Share on other sites More sharing options...
BambiCodes Posted January 18, 2015 Share Posted January 18, 2015 Ok... I figured out my issue. Localization >>> Translations >>> Modify Front Office Translations Free is located under OPC and Shopping Cart. Link to comment Share on other sites More sharing options...
aliaspt Posted April 9, 2015 Share Posted April 9, 2015 Has anybody tried changing translations for installed modules>blockcart. I would have liked to try this instead of changing the code but I get a 403 permission denied error. Link to comment Share on other sites More sharing options...
omega26 Posted February 12, 2016 Share Posted February 12, 2016 (edited) For those who are dealing with this issueJust go to themes/blockcart/translations, search "free shipping!" then go to lang/en.php and change this line$_LANG['shopping-cart_ecba3578d8cd65126d4a47c76b3c9c2d'] = 'Free Shipping!';I changed it for 'next page'Do the same in blockcart module translation in B.O and for each languageHope it helps (Sorry for my bad english)Pour les Français qui ont ce problème :Allez dans themes/blockcart/translations et cherchez "livraison offerte!" puis allez dans lang/fr.php et changer cette ligne$_LANG['shopping-cart_ecba3578d8cd65126d4a47c76b3c9c2d'] = 'Livraison offerte!';Perso, je l'ai modifié par 'Page suivante'Faire la même chose dans la trad du module blockcart en B.O et pour chaque langueet le problème disparaît Edited February 12, 2016 by omega26 (see edit history) Link to comment Share on other sites More sharing options...
Loe- Posted February 20, 2017 Share Posted February 20, 2017 For those who are dealing with this issue Just go to themes/blockcart/translations, search "free shipping!" then go to lang/en.php and change this line $_LANG['shopping-cart_ecba3578d8cd65126d4a47c76b3c9c2d'] = 'Free Shipping!'; I changed it for 'next page' Do the same in blockcart module translation in B.O and for each language Hope it helps (Sorry for my bad english) Pour les Français qui ont ce problème : Allez dans themes/blockcart/translations et cherchez "livraison offerte!" puis allez dans lang/fr.php et changer cette ligne $_LANG['shopping-cart_ecba3578d8cd65126d4a47c76b3c9c2d'] = 'Livraison offerte!'; Perso, je l'ai modifié par 'Page suivante' Faire la même chose dans la trad du module blockcart en B.O et pour chaque langue et le problème disparaît where did you find this?.. at given link it is not visible in my installation. Link to comment Share on other sites More sharing options...
omega26 Posted February 23, 2017 Share Posted February 23, 2017 Sorry the correct path is themes/yourtheme/module/blockcart/translations then you go to lang/en.php and change this line$_LANG['shopping-cart_ecba3578d8cd65126d4a47c76b3c9c2d'] = 'Free Shipping!'; I changed it for = 'next page'Do the same in blockcart module translation in B.O and for each language Link to comment Share on other sites More sharing options...
Recommended Posts