RegionFormTrait
Step 1: choice of the order payment region.
The localization region is preselected (/en/ means the euro). When the customer picks another
one, the cart and summary are recalculated in that region's currency and VAT and the customer
is told that the currency changed. It is a separate form (not an address field) so that the
recalculation shows in the adjacent summary before the address is filled in.
The choice is stored in the unfinished checkout together with the localization it was made on (CheckoutRegionTrait). On an actual region change the selected shipping and payment are dropped, because their prices are per currency and may not exist in the new region; the customer picks them again in step 2.
Table of Contents
Methods
- onRegionSuccess() : void
- createComponentRegionForm() : Form
- regionItems() : array<int, string>
- Returns usable regions (active, with an active non-internal currency) as "Name (currency)".
Methods
onRegionSuccess()
public
onRegionSuccess(Form $form) : void
Parameters
- $form : Form
createComponentRegionForm()
protected
createComponentRegionForm() : Form
Return values
FormregionItems()
Returns usable regions (active, with an active non-internal currency) as "Name (currency)".
private
regionItems() : array<int, string>