Announcement

Collapse
No announcement yet.

Free Template helper extension for EspoCRM created by devcrm.it

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Free Template helper extension for EspoCRM created by devcrm.it

    Hello guys!
    I'm glad to communicate that today we've released new extension which will give you a possibility to get translated strings from EspoCRM and add them to your email or pdf templates. You can not only get labels in specific languages for fields, but also translations of options for field.

    If anyone will want we can also create new helper which will let you a possibility to get a translation in any lagunage of current value of record. For example you're using EspoCRM in english language and you want to use translation of current status in PDF. Now you can only translate specific status which you'll define in helper.

    We've described everything in repo: https://github.com/dubas-pro/ext-template-helper
    There is also an extension page where you can download installer: https://devcrm.it/template-helper

    Enjoy!
    Attached Files
    Last edited by emillod; 01-13-2021, 11:55 AM.

  • #2
    emillod nice

    hum, i don't understand something :
    {{dubasTranslateOption scope='Task' field='status' value='Canceled' language='de_DE'}}

    Why you put the value of field status in hard (Canceled) ? This value is from database so it can be Accepted, Declined, Tentative (for acceptanceStatus sample)?

    have you find a way to resolve the translation of a field (value in database) ?

    sample : field status : Accepted, Declined, Tentative.

    {{translate status language='fr_FR'}} ?
    maybe so :

    {{translate field='status' value='{{status}}' language='fr_FR'}} ?

    I have not find a way for do that.

    Regards

    Comment


    • #3
      Originally posted by item View Post
      emillod nice

      hum, i don't understand something :
      {{dubasTranslateOption scope='Task' field='status' value='Canceled' language='de_DE'}}

      Why you put the value of field status in hard (Canceled) ? This value is from database so it can be Accepted, Declined, Tentative (for acceptanceStatus sample)?

      have you find a way to resolve the translation of a field (value in database) ?

      sample : field status : Accepted, Declined, Tentative.

      {{translate status language='fr_FR'}} ?
      maybe so :

      {{translate field='status' value='{{status}}' language='fr_FR'}} ?

      I have not find a way for do that.

      Regards
      item i have an idea for that. I'll release an update in few hours/days with new helper.
      For now i just need these two, that's why i've release this two

      Comment


      • #4
        item i've managed to find time for that today
        Here you have third helper which will let you to translate actual value of field

        I did that based on field id. Thanks to that argument i'm able to track specific record through global entityManager. After that i'm just calling specific field and that's it. After that i'm taking translation for value.



        I'll release update today or tomorrow

        Comment


        • #5
          Hi emillod

          are you saying you have find a solution !? :s

          i see : {{dubasTranslateValue id scope='Task' field='status' language='pl_PL'}}

          this is the really "hard requirement"
          Entity : meeting
          PrintToPdf : Meeting
          but meeting is related to Users/Contacts/Leads
          there are custom field : status on meeting_user table, same in contact_meeting and lead_meeting.

          so if i do :

          {{#each contacts}}
          Contact name: {{name}} -> {{dubasTranslateValue id scope='Meeting' field='status' language='pl_PL'}}
          {{/each}}

          work ? if yes... direct pull request to Yuri
          Last edited by item; 01-13-2021, 10:50 PM.

          Comment


          • #6
            Originally posted by item View Post
            Hi emillod

            are you saying you have find a solution !? :s

            i see : {{dubasTranslateValue id scope='Task' field='status' language='pl_PL'}}

            this is the really "hard requirement"
            Entity : meeting
            PrintToPdf : Meeting
            but meeting is related to Users/Contacts/Leads
            there are custom field : status on meeting_user table, same in contact_meeting and lead_meeting.

            so if i do :

            {{#each contacts}}
            Contact name: {{name}} -> {{dubasTranslateValue id scope='Meeting' field='status' language='pl_PL'}}
            {{/each}}

            work ? if yes... direct pull request to Yuri
            Test that first :P I've checked only this helper with one field status, but it should work.
            I think Yuri could do that in better and nicer way.

            Hmm.. It's possible that if you want to check status of related contact (if he accepted a meeting) it'll require creating another helper with another id. Id of contact.. So it'll require id of meeting and id of contact.. I can do that if you want.

            Comment


            • item
              item commented
              Editing a comment
              Yes you are right : Yuri can do best but .. (many todo i think)
              maybe this help :
              $meeting = $entityManager->getEntity('Meeting', $id);
              $meeting->loadLinkMultipleField('contacts', ['status' => 'acceptanceStatus']);
              $meeting->loadLinkMultipleField('leads', ['status' => 'acceptanceStatus']);

              Actually i am migrating all ours customisation to v6.x .. so i have no time to other :s
              Regards..

          • #7
            Hello Guys,
            we just released new version of extension.
            1. Fixed compatibility issues
            2. Switched to ext-template
            3. Added dubasSpellAmount helper
            4. Added dubasSpellNumber helper

            Download URL: https://devcrm.it/download/?file=34e...f-b06e9746b7db

            Comment

            Working...
            X