Jump to content

(Solved) Carriers showing up after a page refresh only


Recommended Posts

Hi all,

 

I am looking into an issue with the carrier selection:

I have 3 carriers, the prices of which I have set up according to weight.

They ship to 15 different zones and work flawlessly.

For 1 zone, RM, I have set up an additional carrier (0-9999 kg) that gives a free sending from $25000 (pesos). So far so good. When somebody checks out there does not seem to be any problem and all works, Except when somebody buys for more than 25000 and lives in RM.

Then the infamous "no carriers" error shows up.

 

The strange thing is that after a page refresh the carriers show up in the desired way.

It is always first "no carrier" and after I hit F5 it shows up after all, just as desired. So the configuration of the carriers is ok. To make matters more strange, it has always worked good until a few days ago.

 

Anybody any idea what could be the issue? I am sort of out of ideas, so any help would be really appreciated.

 

Maybe it also helps to state another minor issue with the checkout (which does not bother me that much, but maybe could be helpful in finding the problem): When changing the adress after saving it, the prices of the sending only rise (according to the chosen delivery adress) and do not fall. Again it shows the proper price after a page refresh.

 

I use the one page checkout and PS 1.4.5.1 (which suits my needs, so not really interested in upgrading, as there has been made some customizing already).

 

Thanks again!!

Edited by decorocco (see edit history)
Link to comment
Share on other sites

Javascript issue, for sure.

 

In chrome, before entering that page, open the debug console by hitting f12. Then, after accessding the page, check if you have a red mark in the bottom right part of the console. If you do, report the error here

Link to comment
Share on other sites

Hi Nemo, thank you for looking into this!

I did as you wrote and indeed there is a red icon. So I suppose you are right about the JS.

I opened the console and made a screen dump of what has to be the code of the error.

Can you see any solution maybe or a workaround for this? (other than the "please refresh your page to see the available carriers" message that I made of the "no carriers available" error)...

 

Many thanks in advance!!

Rocco

post-364579-0-92522400-1366951876_thumb.jpg

Link to comment
Share on other sites

Hi Nemo, here are is the code:

 

{if !$opc}
<script type="text/javascript">
//<![CDATA[
 var baseDir = '{$base_dir_ssl}';
 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'}";
 var txtProducts = "{l s='products'}";
 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>
{/if}{if !$virtual_cart && $giftAllowed && $cart->gift == 1}
<script type="text/javascript">
{literal}
// <![CDATA[
   $('document').ready( function(){
    $('#gift_div').toggle('slow');
   });
//]]>
{/literal}
</script>
{/if}
{if !$opc}
{capture name=path}{l s='Shipping'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}
{/if}
{if !$opc}<h1>{l s='Shipping'}</h1>{else}<h1>{l s='2. Choose your delivery method'}</h1>{/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.php', true)}" 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 $virtual_cart}
<input id="input_virtual_carrier" class="hidden" type="hidden" name="id_carrier" value="0" />
{else}

Link to comment
Share on other sites

Hi Nemo, did you have time to look at the code? Or maybe there is someone else that could take a look. I have the impression that it s a minor thing, but my coding skills are second to none, so any help would be great!!

Link to comment
Share on other sites

Here it is

 

{if !$opc}
<script type="text/javascript">
//<![CDATA[
 var baseDir = '{$base_dir_ssl}';
 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'}";
 var txtProducts = "{l s='products'}";
 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 !$virtual_cart && $giftAllowed && $cart->gift == 1}
<script type="text/javascript">
{literal}
// <![CDATA[
$('document').ready( function(){
		$('#gift_div').toggle('slow');
});
//]]>
{/literal}
</script>
{/if}

 

Just part of it. replace down to the line I posted

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...