Jump to content

Smarty error unrecognized tag 'var' [Solved]


Recommended Posts

Hi All,

I'm getting error when trying to update delivery or billing adrresses on my account page, could someone help me to solve that problem?

PrestaShop Version: 1.4.0.17

error code :


Fatal error: Smarty error: [in /home/public_html/themes/prestashop/address.tpl line 147]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590) in /home/public_html/tools/smarty_v2/Smarty.class.php on line 1095


BR,
Marius

Link to comment
Share on other sites

Hi Marius,

I had the same problem, guess Smarty had a problem with the brackets {} used in the document.ready.function
Therefore added and moved {literal} in the source beginning on line 147 in:


   [removed]
       {literal}
               $(document).ready(function(){
                   var ajaxurl = '{/literal}{$ajaxurl}{literal}';
                   $('#id_country').change(function() {
                       $.ajax({
                           type: "GET",
                           url: ajaxurl+"vatnumber/ajax.php?id_country="+$('#id_country').val(),
                           success: function(isApplicable){
                               if(isApplicable == "1")
                               {
                                   $('#vat_area').show();
                                   $('#vat_number').show();
                               }
                               else
                               {
                                   $('#vat_area').hide();
                               }
                           }
                       });
                   });
               });
       {/literal}
       [removed]



Probably there is a better way to solve this however it works again...

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  • 1 year later...

Hello, i have a same problem, but where is the DOCUMENT to change LITERAL ? in Smarty_Compiler.class.php ? or Smarty.class.php

 

thanks a lot

 

hello altaleto

 

they talked about address.tpl template file, you can find out this file in themes/your_theme/ directory

Link to comment
Share on other sites

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...