Skip to the content
Documentation

exp:expbackfillordersiteaccess

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

Infer the siteaccess of orders placed before ezorder.siteaccess was recorded (dry run unless --apply)

Usage

./console exp:expbackfillordersiteaccess [options]
php bin/php/expbackfillordersiteaccess.php [options]

Help

The output of ./console help exp:expbackfillordersiteaccess (the script run with --help), without the standard options:

Usage: bin/php/expbackfillordersiteaccess.php [OPTION]...
Infer the siteaccess of orders that have none (placed before Exponential 6.0.15 recorded it)
from the content tree each site siteaccess serves: an order whose products all lie in the tree of
exactly one site (its PathPrefix node, else its RootNode) gets that siteaccess; orders matching none
or several stay unknown. Administrations (admin, editor ...) never take orders and are left out,
decided as the siteaccess menu decides them ([AdminSiteAccessMenu] AdminSiteAccessList[], else the
design). Siteaccesses named with --exclude are never chosen either: the next candidate can win, and an
order only excluded siteaccesses serve stays unknown. An order that has a siteaccess is never changed.
Without --apply nothing is written: the siteaccesses considered, excluded and left out are listed,
then each order with the siteaccess it would get, or why it stays unknown.

Example: php bin/php/expbackfillordersiteaccess.php
         php bin/php/expbackfillordersiteaccess.php --prefer-deepest-root
         php bin/php/expbackfillordersiteaccess.php --exclude=site_mobile,site_preview
         php bin/php/expbackfillordersiteaccess.php --exclude=site_mobile --exclude=site_preview --prefer-deepest-root
         php bin/php/expbackfillordersiteaccess.php --apply


Options:
  --apply                Write the inferred siteaccesses (the default is a dry run that changes nothing)
  --prefer-deepest-root  Off by default. Only for public sites with nested roots (a shop inside another site's tree):
                           of several sites that serve every product, take the one whose root is deepest when it is the only one that deep
  --exclude=VALUE...     Never choose these siteaccesses: a comma list, and the option may be repeated (--exclude=a,b --exclude=c).
                           A name not in AvailableSiteAccessList is a warning, not an error

Options

Option Value Description
--apply - Write the inferred siteaccesses (the default is a dry run that changes nothing)
--prefer-deepest-root - Off by default. Only for public sites with nested roots (a shop inside another site's tree): of several sites that serve every product, take the one whose root is deepest when it is the only one that deep
--exclude required Never choose these siteaccesses: a comma list, and the option may be repeated (--exclude=a,b --exclude=c). A name not in AvailableSiteAccessList is a warning, not an error

Standard options

Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.

Source

bin/php/expbackfillordersiteaccess.php, kernel/private/classes/commands/expbackfillordersiteaccess.php

See also

Generated example: exp:expbackfillordersiteaccess

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.