Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

 
Reply
   X-Cart forums > News and Announcements
 
Thread Tools
  #51  
Old 07-26-2015, 09:56 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

To add to the above - 2 site upgrades have this issue - one coming from 4.6.6, the other from 4.4.5. It seems like on both the majority of the custom language variables are just not being assigned to smarty. In most cases these are "txt_" variables.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #52  
Old 07-26-2015, 11:39 PM
 
aim aim is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 928
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

Quote:
Originally Posted by cflsystems
Finding another issue with static pages and in general with the whole site - language variables.
Current store I am working on has about 8000 of them. On any given page only about 100 are being assigned to smarty and can be used in templates. None of the ones used in static pages from the old store work with the new one - they are just not in the $lng array.

Where is all this being assigned? Does it use some sort of cache? And how come only 100, give or take, are included in $lng array no matter which page is loaded?

Lang variables may work in 2 modes .

1) $config['General']['use_cached_lng_vars'] == 'Y' (the cache is stored in the var/cache/cache_get_language_vars_.en file)

or

2) $config['General']['use_cached_lng_vars'] == 'N' (the cache is stored in files like 2ef14b268f96456859103cc35ea458fbc7110ac6.file.welc ome.tpl.php.hash.en.php)


It seems your store works in the
"$config['General']['use_cached_lng_vars'] == 'N'" mode.


Try to enable the " Use cache for language variables " setting to fix the problem with static pages and assigned variables
http://demo.x-cart.com/demo_goldplus/admin/configuration.php#tr_use_cached_lng_vars

Thank you.
__________________
Sincerely yours,
Ildar Amankulov
Head of Maintenance group
Reply With Quote
  #53  
Old 07-27-2015, 05:52 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

That's not the case. Your suggestion does not work.

Both stores have this option OFF on 4.6.6 and 4.4.5 carts. Everything works there as it should. It is an upgrade so the option is OFF on the upgraded store as well. And the language variables are not assigned. I tried with the option ON and it is the same result.

On top of that the next option - Do not check if templates are changed (Smarty compile_check). - must be checked. Otherwise "clear XC cache" from Maintenance page in admin does not clear templates_c directory. I had this issue on every store I upgraded to 4.7.3.

So there is a big deal of changes in these settings in 4.7.x. I can live with the templates_c directory issue but the language variables is a real one and needs to be fixed.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #54  
Old 07-27-2015, 07:49 AM
 
aim aim is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 928
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

Quote:
Originally Posted by cflsystems
That's not the case. Your suggestion does not work.

Both stores have this option OFF on 4.6.6 and 4.4.5 carts. Everything works there as it should. It is an upgrade so the option is OFF on the upgraded store as well. And the language variables are not assigned. I tried with the option ON and it is the same result.

Have you cleared the var/cache dir after the " Use cache for language variables " setting is enabled ?

By the way,
starting with X-Cart version 4.7.0 the tool was renamed from 'Clear templates/X-Cart Cache' to 'Clear X-Cart Cache' because the Clear templates operation is no longer needed and the tool no longer does it. However, we kept the ability to clear compiled templates for the http://www.yoursite.com/xcart/cleanup.php script.

Why do you need to clear var/templates_c dir ?

4.7.x uses
$templater->compile_id = $templater->getCompileId();
http://www.smarty.net/docs/en/variable.compile.id.tpl
feature.

getCompileId() is defined as combination of the active pre/post smarty filters and the current skin


Code:
$key = ''; $key .= (!empty($this->registered_filters['post']) ? serialize($this->registered_filters['post']) : ''); $key .= (!empty($this->registered_filters['pre']) ? serialize($this->registered_filters['pre']) : ''); $key .= $config['alt_skin']; $key .= (defined('DEVELOPMENT_MODE') ? 'dev' : '');
__________________
Sincerely yours,
Ildar Amankulov
Head of Maintenance group
Reply With Quote
  #55  
Old 07-27-2015, 08:05 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

Quote:
Originally Posted by aim
Have you cleared the var/cache dir after the " Use cache for language variables " setting is enabled ?

Yes I did. No change, language variables do not exist.

Quote:
Originally Posted by aim
Why do you need to clear var/templates_c dir ?

Because without this option ON any changes to templates do not take. Any changes to language variables content also don't reflect on site front. Clearing the cache does not clear/update cached templates so changes do not show.
The only way all of this to work is to have the option active and clear the cache every time change is made.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #56  
Old 07-27-2015, 08:52 AM
 
aim aim is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 928
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

Quote:
Originally Posted by cflsystems
Yes I did. No change, language variables do not exist.



I have uploaded the
bt_parse_smarty_lang_static_pages_0145375-4.7.0-4.7.3-notFA.diff
patch


Quote:
Originally Posted by cflsystems

Because without this option ON any changes to templates do not take. Any changes to language variables content also don't reflect on site front. Clearing the cache does not clear/update cached templates so changes do not show.
The only way all of this to work is to have the option active and clear the cache every time change is made.

Could you uploaded your DB to investigate the issues ?

https://bt.x-cart.com/view.php?id=44962
__________________
Sincerely yours,
Ildar Amankulov
Head of Maintenance group
Reply With Quote
  #57  
Old 07-27-2015, 09:07 AM
 
aim aim is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 928
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

bt_parse_smarty_lang_static_pages_0145375-4.7.0-4.7.3-notFA.diff
__________________
Sincerely yours,
Ildar Amankulov
Head of Maintenance group
Reply With Quote
  #58  
Old 07-27-2015, 09:58 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

This does not seem to help. The {$lng.variable} in static page still doesn't show.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #59  
Old 07-28-2015, 12:45 AM
 
aim aim is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 928
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

Quote:
Originally Posted by cflsystems
This does not seem to help. The {$lng.variable} in static page still doesn't show.

Please upload your DB and raw page content to the ticket
https://bt.x-cart.com/view.php?id=44962

Thank you.
__________________
Sincerely yours,
Ildar Amankulov
Head of Maintenance group
Reply With Quote
  #60  
Old 07-29-2015, 04:47 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3

Ok here is the story. After looking in db directly the language variable in question was not found. It vanished.
Before I posted about this I was able to find it in admin and it was showing. This is a direct upgrade to 4.7.3. It looks like the upgrade did put all the info in the new store.
After changing settings and cache back and forth multiple times hundreds of language variables where deleted. This is not good. There is something wrong with that.

I copied them from the live site again, applied the patch provided. It seems to be working now.

BTW before applying the patch it still didn't work with the info present in db. It worked only after applying this patch so the patch is necessary.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
aim (07-29-2015)
Reply
   X-Cart forums > News and Announcements



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:53 PM.

   

 
X-Cart forums © 2001-2020