Giter Club home page Giter Club logo

siretmanagement's Introduction

Siret Management

Manage the siret number and Intra Community VAT number for your customers, linked with INSEE API to check SIRET and SIREN validity, and provide automatic illing of address fields.

Installation

Composer

Add it in your main thelia composer.json file

composer require thelia/siret-management-module

Configuration

You need to set public consumer key and secret in backOffice of SiretManagement module if you want to use the INSEE API to check SIRET numbers anbd get company information.

To create an account and get the keys, got to https://api.insee.fr/catalogue/site/themes/wso2/subthemes/insee/pages/item-info.jag?name=Sirene&version=V3&provider=insee

Template integration

To display input fields to your customer, you have to change register.html and account-update.html.

register.html

In register.html, add the following hook call :

{hook name="siret.check" mode='create'}

To allow automatic filling of address fields, add the following hook call :

{hook name="siret.js"}

account-update.html

In account-update.html, add the following hook call :

{hook name="siret.check" mode='update'}

The siret.js hook call is not required, as the address fields are not present in the account-update.html file.

A template is provided for default and modern template.

This module has no dependency on JQuery.

You can override the siret.html file in your own template for a custom integration.

Suggestion for default template

In register.html

                </fieldset>

                {hook name="siret.check" mode='create'}

                <fieldset id="register-login" class="panel panel-info">
{block name="javascript-initialization"}
{hook name="register.javascript-initialization"}
{hook name="siret.js"}
{/block}

In account-update.html

          </fieldset>

          {hook name="siret.check" mode='update'}

          {form_field field="newsletter"}

Suggestion for modern template

In register.html

                </fieldset>

                {hook name="siret.check" mode='update'}

                {form_field field="newsletter"}

In account-update.html

{block name="javascript" append}
  {encore_entry_script_tags entry="register"}
  {hook name="siret.js"}
{/block}
      </div>

      {hook name="siret.check" mode='create'}

      <fieldset id="register-login">

siretmanagement's People

Contributors

lopes-vincent avatar zawaze avatar arthurlashermes avatar thomas-dsm avatar thomasdasilva avatar leanormandon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.