Download the PHP package ongr/currency-exchange-bundle without Composer

On this page you can find all versions of the php package ongr/currency-exchange-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package currency-exchange-bundle

ONGR Currency Exchange Bundle

This bundle provides an easy way to display price in multiple currencies. It gives a solution to fetch and store current currency rates, to convert prices and display them in Twig templates.

Stable Release Build Status Coverage Status Quality Score

Documentation

The documentation of the bundle can be found in Resources/doc/

Installation

Follow 5 quick steps to setup this bundle.

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

Register bundles in app/AppKernel.php:

Step 3: Update Elasticsearch Mapping

This bundle provides Elasticsearch document to store currency rates. Add this bundle to your ES manager's mapping to associate it:

Step 4: Configure the Bundle

Configure the currencies you need in config.yml file.

That's it for setup, jump to the next chapter to learn how to use this bundle.

Usage

The main parts of this bundle are a command to update currency rates and Twig helpers to display price in various currencies.

Before converting prices you need to fetch the latest currency rates:

Tip: setup a cron job to update currencies daily in your production environment.

Now you are ready to use currency conversion logic in your templates. Here is a simple example how to convert currency:

In this example the number 2 represents the number of decimal points. It will print the following information:

To learn more read about provided Twig helpers or check example currency switching implementation.

License

This package is licensed under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.


All versions of currency-exchange-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
symfony/symfony Version ~2.7|~3.0
doctrine/cache Version ~1.4
ongr/elasticsearch-bundle Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ongr/currency-exchange-bundle contains the following files

Loading the files please wait ....