Contact Kontakt Alle Awards anzeigen
Contact
Alle Awards anzeigen

Number Sequence Generator

recently-reviewed

last reviewed: 16.08.2021

Master Data Management

Autor:

Pimcore Core Team

Version

v2.0.1

Last updated

Compatible Pimcore Version

v5.0

Contact

Pimcore Core Team

Issues

https://github.com/pimcore/number-sequence-generator/issues

1  Reviewer

reviewed on 16.08.2021

Elements

Number Sequence Generator

Master Data Management

Zusammenfassung

Generates continous numbers for example for order numbers or customer numbers.


Readme

Number Sequence Generator Bundle

Continues numbers

Generates continous numbers for example for order numbers or customer numbers.

public function exampleAction(Pimcore\Bundle\NumberSequenceGeneratorBundle\Generator $generator) {
    /*
    * Generates the next order number (increments current order number by 1)
    * If no order number was generated before it will start with 10000
    */
    $next = $generator->getNext('ordernumber', 10000);

    /*
    * Receive the current order number without incrementing the counter.
    */
    $current = $generator->getCurrent('ordernumber');

    /*
    * Sets the order number to 35017 in the database.
    */
    $generator->setCurrent('ordernumber', 35017);
}

Random numbers (either numeric or alphanumeric)

Generates unique random numbers.

public function __construct(Generator $generator)
{
    $this->generator = $generator;
}

public function generateCode()
{
    $code = $this->generator->generateCode("vouchercode", \Pimcore\Bundle\NumberSequenceGeneratorBundle\RandomGenerator::ALPHANUMERIC, 32);
}

Upgrade to Pimcore XI

  • Update to latest (allowed) bundle version in Pimcore X and execute all migrations.
  • Then update to Pimcore XI.

Documentation Overview

Review status

recently-reviewed

last reviewed: 16.08.2021

?>

Autor:

Pimcore Core Team

Version

v2.0.1

Last updated

Compatible Pimcore Version

v5.0

Contact

Pimcore Core Team

Issues

https://github.com/pimcore/number-sequence-generator/issues

1  Reviewer

reviewed on 16.08.2021

Elements