CoolCMS API

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

regionItems()

Returns usable regions (active, with an active non-internal currency) as "Name (currency)".

private regionItems() : array<int, string>
Return values
array<int, string>
On this page

Search results