Author Topic: update language definition upon extension upgrade  (Read 3138 times)

yonghan

  • Guest
update language definition upon extension upgrade
« on: September 26, 2015, 03:21:15 AM »
Hi admins, I'm trying to update language definition during extension upgrade process. I have put the update query in install.sql or install.php but it doesn't works. Are there additional code that I need to run in order to get the language definition changed? Thanks.

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1600
  • Karma: +93/-1
    • View Profile
Re: update language definition upon extension upgrade
« Reply #1 on: September 26, 2015, 10:25:51 AM »
If you insert into database, do not forget to clear the cache for languages:

      $this->cache->delete('language_definitions');

“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

yonghan

  • Guest
Re: update language definition upon extension upgrade
« Reply #2 on: September 26, 2015, 10:27:54 AM »
Thanks a lot. I will try it again.

yonghan

  • Guest
Re: update language definition upon extension upgrade
« Reply #3 on: September 26, 2015, 10:46:36 AM »
It's not working eCommerce Core. It's not working. Is it correct to place the language definition update query in install.php for extension upgrade purpose? Thanks

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4152
  • Karma: +251/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: update language definition upon extension upgrade
« Reply #4 on: September 27, 2015, 09:50:35 AM »
For upgrade of extension you do not use install.php.

You need to provide upgrade XML property in extension config.xml file.
It is very similar to install property
It should be like this:
Code: [Select]
<upgrade>
    <sql>[file name].sql</sql>
    <trigger>[filen ame].php</trigger>
</upgrade>

We will add this to the manual soon
We need your help to build better free open source eCommerce platform for everyone.
See how you can help

yonghan

  • Guest
Re: update language definition upon extension upgrade
« Reply #5 on: September 28, 2015, 09:15:43 AM »
Thanks a lot abantecart. It works.

 

Powered by SMFPacks Social Login Mod