steveosoule
5/14/2013 - 6:43 PM

miva-get-and-set-cookie-for-AB-test.html

miva-get-and-set-cookie-for-AB-test.html

<mvt:comment>BEGIN: Read/Write Cookie</mvt:comment>
<mvt:item name="toolkit" param="vacreate|cookies|s.http_cookie|;" />
<mvt:if expr="NOT ISNULL l.settings:cookies">
    <mvt:foreach iterator="cookie" array="cookies">
        <mvt:item name="toolkit" param="gettoken|l.all_settings:cookie,=,1|name" />
        <mvt:item name="toolkit" param="gettoken|l.all_settings:cookie,=,2|value" />
        <mvt:if expr="g.name EQ 'Checkout_Version_Cookie'">
            <mvt:item name="toolkit" param="vassign|Checkout_Version_Cookie|g.value" />
        </mvt:if>
    </mvt:foreach>
</mvt:if>

<mvt:if expr="g.Checkout_Version_Cookie NE '' AND g.Checkout_Version EQ ''">
    <mvt:item name="toolkit" param="vassign|Checkout_Version|g.Checkout_Version_Cookie"/>
</mvt:if>

<mvt:if expr="g.viewOOPC EQ 'true'">
  <mvt:item name="toolkit" param="sassign|Checkout_Version|OOPC"/>
    <mvt:item name="toolkit" param="setcookie|g.Checkout_Version|Checkout_Version_Cookie|720|0" />
<mvt:elseif expr="g.viewOOPC EQ 'false'">
    <mvt:item name="toolkit" param="sassign|Checkout_Version|default"/>
    <mvt:item name="toolkit" param="setcookie|g.Checkout_Version|Checkout_Version_Cookie|720|0" />
</mvt:if>
<mvt:comment>END: Read/Write Cookie</mvt:comment>