Skip to content

Solidus E-Commerce extension to manage italian billing addresses attributes like VAT Number, Personal Tax Code, etc...

License

Notifications You must be signed in to change notification settings

welaika/solidus_billing_address

Repository files navigation

Solidus Billing Address

Build Status

Manage italian billing address requirements in Solidus! Mamma mia!

This extension adds some new attributes to billing address form in solidus_frontend, like:

  • VAT number
  • Personal tax code (e.g. "Codice fiscale" in Italy)
  • Billing email (e.g. "PEC Address" in Italy)
  • Electroning invoicing code (e.g. "Codice destinatario fatturazione elettronica" in Italy)

It also validates the presence of customer last name.

Demo (frontend)

Billing address for a private customer

Demo - Billing address for a private customer

Billing address for a business customer

Demo - Billing address for a business customer

Shipping address (no need for billing only attributes)

Demo shipping address

Installation

Add solidus_billing_address to your Gemfile:

gem 'solidus_billing_address'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g solidus_billing_address:install

Testing

I usually test with PostgreSQL locally. For this to work, you need a role named postgres. If you don't have it, you can create a superuser role with

createuser -s postgres

Bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs, and Rubocop static code analysis. The dummy app can be regenerated by using rake test_app.

bundle
DB=postgres bundle exec rake

You can also test against a specific solidus branch with:

SOLIDUS_BRANCH=v2.9 DB=postgres bundle exec rake

When testing your application's integration with this extension you may use its factories. Simply add this require statement to your spec_helper:

require 'solidus_billing_address/factories'

Releasing

Your new extension version can be released using gem-release like this:

bundle exec gem bump -v VERSION --tag --push --remote upstream && gem release

Author

made with ❤️ and ☕️ by weLaika

License

Copyright (c) 2019 weLaika, released under the New BSD License

About

Solidus E-Commerce extension to manage italian billing addresses attributes like VAT Number, Personal Tax Code, etc...

Resources

License

Stars

Watchers

Forks

Packages

No packages published