Download the PHP package pixelant/pxa-site-choice-recommendation without Composer

On this page you can find all versions of the php package pixelant/pxa-site-choice-recommendation. 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 pxa-site-choice-recommendation

Site choice recommendation

What does it do?

Suggest localized version of site depends on user location and user language. It will show bar on top of the page with possibility to choose site language. Select box options are sorted by priority calculated by checking user location and accept language.

Note: To get option based on user location, a EventListner needs to be created in a separate extension.

How to install it

Like a regular extension you need to do a few steps.

  1. Composer install composer require pixelant/pxa-site-choice-recommendation
  2. Go to extension manager to isntall extension.
  3. Include TypoScript. There are two options to include:
    • Site choice recommendation - default configuration required for extension to work
    • Site choice JS and CSS assets - will include Js and Css libs

Extension plugins

Extension has two plugins:

  1. Choice bar extension - Loaded by ajax to propose user to change site version. Can't be added on a page.
  2. Site choice recommendation splash page - Use as page content in order to show for user ALL available choices. Just select corresponding site choice configuration in order to show it's options.

How to create site choice configuration

Create new record "Site Choice Configuration". It could be created in any storage folder. "Site Choice Configuration" tabs: Main "General" tab:

"Choices" tab include available site choices for bar and splash page. Each site choice require next configration fields:

Expected results

After TypoScript is included and Site Choice Configuration is connected to root page, you should get bar with proposal of best matching country / region based on location. Note: bar will remain invisible in case you already has visited website localization version that best match you location/language.

Enable choices based on user location

Extension has "built in" support to suggest options based on user location.

To enable it, you will need to create a EventListner in a separate extension and also download GeoLite2-Country.mmdb from MaxMind, available from https://www.maxmind.com.

Example:

1. Registering the event listener

Following is an example of how to enable the IPDetecor.

In file your_extension_name/Configuration/Services.yaml file add following:

2. The event listener class

Create file your_extension_name/Classes/EventListener/IpDetectorFactoryEvent.php file add following:

3. GeoLite2-Country dababase

Download GeoLite2-Country.mmdb from MaxMind and save in folder: your_extension_name/Resources/Private/GeoIp2/GeoLite2-Country.mmdb.


All versions of pxa-site-choice-recommendation with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
typo3/cms-core Version ^10.4
geoip2/geoip2 Version ~2.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 pixelant/pxa-site-choice-recommendation contains the following files

Loading the files please wait ....