Bine ati venit!

Install Guide Legal Entity & Natural Person Italian Address

Please install first the extension on your test server to avoid innapropiate installs which may lead to loss of database data, possible incompatibilities with other extensions or other external causes. We do not give support for innapropiate installs of the extension.

 

1. Installation

I. Backup your database and the store code (all your Magento).
II. If Compilation is enabeld in Admin > System > Tools > Compilation, please disable it.
III. Enable cache in Admin.
IV. Copy the contents of dir step_1 in your Magento dir and than the contents of the step_2 dir.
V. Flush Cache Storage button in Admin > System > Cache Management.
VI. You can enable the features of the extension for one or more websites and for one ore more store views.
a) In Admin > System > Configuration, change to "Main Website" or to any other website you wish. The scope of the configuration can be changed in the top left dropdown 'Current Configuration Scope'.
A new option will show in the Configuration menu, under CUSTOMERS section, named 'Legal Entity & Natural Person' (Persona giuridica & Persona fisica).
When entering this new menu option, if an error occures saying '404 not found' than logout and login from admin. After you are logged in again, Magento already added permissions for your current admin user.
Set in Legal Entity & Natural Person > Settings > Enabled = "Yes". It will allow the extension to function at current website level.
b) Next, change the scope of the configuration to the "Default Store View" or any other store view you wish to enable the extension.
In same configuration section CUSTOMERS > Legal Entity & Natural Person,
set "Enable IT Address on Frontend" to "Yes"
VII. Copy the extension templates and layout config XML files in your theme.
app/design/frontend/default/default/layout/checkoutit.xml
app/design/frontend/default/default/layout/customerit.xml
app/design/frontend/default/default/template/checkoutit/
app/design/frontend/default/default/template/customerit/
These files and dirs should be placed in app/design/frontend/{~my_package~}/{~my_theme~}/default/layout/ and app/design/frontend/{~my_package~}/{~my_theme~}/default/templates/.
If you are not used to Magento's design packages and themes please check: http://www.magentocommerce.com/design_guide.
VIII. Flush Cache Storage button in Admin > System > Cache Management.
IX. Enable Compilation back if it was enabled before (at II).

After all above, the extension should fully work on your store (as is configured by default).
You may want to make a test and visit the frontend pages. Make a new account and add a new address. By default the extension's fields will show only for "Country" = 'Italy'.
2. Extension Configuration

In website configuration scope, Admin > System > Configuration > Legal Entity & Natural Person:
  • Settings > "Allow only for Countries":
    By default is set to Italy so the italian address model (italian fields: cf, piva and customer type) will show only if the frontend customer selects in the country field Italy.
    You may set here additional countries if you would like to.
    If there are any countries set in this configuration that the Italian address model will show for all countries (the countries set by you in General > Countries Options > Allow Countries).

  • Settings > "Shipping - Allow Ambiguous Address Edits":
    By defalt is set to No.
    In Multishipping pages if a customer decides to change the shipping address than he is redirected to a My Account > Address Edit form. As configured by default CF and/or P.IVA are not dispalyed
    in an address for shipping for legal or natural. If the original address was created for billing, with CF and P.IVA, than these 2 fields can be replaced with empty values.
    To avoid this case, this configuration should be set to 'No'.
    The 'Force' option will not disable edits but will use both billing and shipping address UI. The customer will see than that the address is saved as for billing
    and can decide wether to change it or not.

  • Settings > "Billing - Allow Ambiguous Address Edits":
    Same as "Shipping - Allow Ambiguous Address Edits".
    By default is set to 'Yes' because the billing address has all the additional fields (CF and/or P.IVA).
    Unless you set to show more fields in shipping address than in billing address, this configuration should be set to "Yes".
    Abstraction, if you set in legal entity billing address to display only CF and in the shipping address to display only P.IVA than both "Billing - Allow Ambiguous Address Edits" and "Shipping - Allow Ambiguous Address Edits" should be set to "No". The 2 addresses are not compatible anymore - different required fields.

  • Settings > "Use Default Shipping Address":
    Use default shipping address at checkout. If set to yes than it will not show radio buttons and Fiscal Code.
    e.g: Configuration used in case you don't want to display Fiscal Code at checkout step - section Shipping Address. All fields of the shipping address will be as it is in Magento Default (company, vat id, firstname, lastname, ...).
    It makes sense not to display Cutomer Type (the radio buttons) to make this section more user friendly.
    The field 'Company' will tell if the address if for 'natural person' or 'legal entity'. If company is empty than customer type is set in background as 'natural person', otherwise is set as 'legal entity'.
    In this case only please set this option to 'Yes'.

  • Settings > "Show VAT ID in Default Shipping Address":
    This configuration activates only if 'Use Default Shipping Address' is 'Yes'.
    You may not want to display VAT ID in shipping address. This configuration is set by default to 'No'.

  • Address Fields Configuration:
    The italian fields that can be added to the entities Legal Entity (Azienda / Persona giuridica) and Natural Person (Privato/ Person fisica) are Fiscal Code (Codice Fiscale)
    , VAT Number (Parita IVA), 'Is address for billing' (Usa indirizzo per la fatturazione) and 'Is address for shipping' (È l'indirizzo per la spedizione).
    In the configuration table you can set where a field is displayed or required (For Billing Address / For Shipping Address for For Billing Address / For Shipping Address).
    Company and P.IVA be disabled in all sections.
    For P.IVA and Codice Fiscale there is a built-in Javascript and server side validation. Please check or uncheck the valdation checkbox as you see fit.
    The 'Customer Type' field is displayed in this table but can't be changed, since is required in all sections.
    A field that is not visible can't be set to required.
    Disabled fields are set by default as not visible and not required. These fields are also ignored on frontend pages and cleaned before the address is saved.
    When setting the field "Is address for billing" to show in a section than a checkbox will show on frontend pages (mostly in My Account > Address Edit form)
    asking the customer if the address is exclusively for billing. Same for "Is address for billing".
    For any of "Is address for billing" or "Is address for shipping", if the field is visible or not visible in all sections that the field will not display (User Itenrface improvement).
    In general this any of these 2 fields should be visible if there are additional fields displayed. By default 'Natural Person & For Billing Address' and 'Legal Entity & For Billing Address'
    have "Is address for billing" because the customer needs to fill CF and P.IVA.
3. Customizing the Fields in Store Layout

  • Fields order on frontend:
    If you need to change the order of the fields in My Account > Address Edit or One Page Checkout > Shipping Address Information and Billing Address Information pages please edit these files:
    app/design/frontend/{~my_package~}/{~my_theme~}/template/customerit/edit.phtml
    app/design/frontend/{~my_package~}/{~my_theme~}/template/checkoutit/onepage/billing.phtml
    app/design/frontend/{~my_package~}/{~my_theme~}/template/checkoutit/onepage/shipping.phtml

    Is important to make clean edits in these theme files, otherwise the Javascript code that shows/hides the field may not work because of broken html.
  • Address Templates:
    To change the Address Templates that can be seen in Addresses Summary, invoice and shipment PDF's, One Page Checkout progress blocks in the right column,
    dropdown with saved addresses in One Page Checkout page and other pages:
    In Admin > System > Configuration > CUSTOMERS > Customer Configuration > Address Templates change the values of Text, Text One Line, HTML, PDF, JavaScript Template.
    If you didn't saved the Customer Configuration before than the default templates for the extension should be already loaded.
    Otherwise plase open the file app/code/local/LenpIt/CustomerIt/etc/config.xml and copy paste these templates values from between XML tags:
           <text> ... </text>
           <oneline> ... </oneline>
           <html> ... </html>
           <pdf> ... </pdf>
           <js_template> ... <js_template>
    
    Note that HTML, PDF and JavaScript Template values should be without the html special characters. Replace "<" with "<" and ">" with ">".
    The address templates in the file app/code/local/LenpIt/CustomerIt/etc/config.xml should not be changed.
4. Vat Number Configuration for Magento 1.7+

The field VAT Number from addresses was added starting with Magento 1.7.0.0.
This Magento new feature adds EU VIES validation and better tax calculation for intra-EU or domestic seller country, according with EU legislation.
An extensive documenation about this feature you can find in the VAT related chapters in the latest Magento User Guide.

The extension does not change the default behaviour of the field (attribute) VAT number (vat_id).
It merely shows or hides the VAT number (vat_id) field for legal entity or natural person.

The extension needs to have Admin > System > Configuration > CUSTOMER > Customer Configuration > Create New Account Options > "Show VAT Number on Frontend" = 'Yes'.
If your're in a single store Magento install you may set this in Default Config scope.
If your're in a multi store Magento install you should set this configuration in the website scope,
the website in which you have the extension enabled (see 1. IV.).

There is another TAX/VAT Number field attached to the customer entity (not customer address entity). The attribute code is 'taxvat'.
This attribute is not touched by this extension in any way. As Magento User Guide recommends, this field should be used only for extra-EU customers.

 

If you need more instructions or there is something unclear regarding this guide
please email at info@innovo.ro or Contact Us