PHP code example of aoepeople / aoe_sessionvars
1. Go to this page and download the library: Download aoepeople/aoe_sessionvars library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aoepeople / aoe_sessionvars example snippets
xml
<frontend>
<aoe_sessionvars>
<vars>
<coupon_code>
<getParameterName>cp</getParameterName>
<cookieName>MAGENTO_CP</cookieName>
<validate><![CDATA[/^[^$|\s+$]/]]></validate>
<scope>customer</scope>
</coupon_code>
</vars>
</aoe_sessionvars>
</frontend>
xml
<frontend>
<aoe_sessionvars>
<country>
<getParameterName>country</getParameterName>
<cookieName />
<validate><![CDATA[/^[A-Za-z]{2}$/]]></validate>
<scope />
<defaultValue>en</defaultValue>
<defaultValue_1>en-us</defaultValue_1>
</country>
<lang>
<getParameterName>lang</getParameterName>
<cookieName />
<validate><![CDATA[/^([A-Za-z]{2})-([A-Za-z]{2})$/]]></validate>
<scope />
<defaultValue>en-us</defaultValue>
</lang>
</aoe_sessionvars>
</frontend>