|
|
|
|
|
/membership/form/
/membership/form/
|
|
|
|
<forms:form id="membership_form" recordsubmissions="true" onsubmitredirect="/membership/success/?sale_id=[? $sale_id ?]" onsubmitemailsubject="[? 'New Member: ' + $_POST['contact_first_name'] + ' ' + $_POST['contact_last_name'] ?]" onsubmitemail="false" onsubmitserver="onFormSubmit($membership_form.getValuesForComponent())">
<ajax:event id="selected_product_ajaxevent" updateregions="selected_product_ajaxregion" />
<ajax:event id="payment_ajaxevent" updateregions="total_paymentmethod_ajaxregion" />
<div class="fieldset">
<h4>Membership Type</h4>
<logic:if test="!(\Framework\DOM\CurrentContext::getIsInEmail())" evaluateat="render">
<forms:row type="one_column" label="">
<forms:radiobuttongroup name="product_id" validations="mandatory">
<div class="template-productFlexContainer">
<data:repeater datasource="\Components\Commerce\Products::getAllForCategoryAndBrand(5, null)" as="product" dataorder="[? [['product_price_base', 'ASC']] ?]" datafilter="[? [['product_is_offline', '=', 0]] ?]">
<div class="template-productFlex">
<logic:variable as="isSelected" value="" />
<ajax:event id="productSelected_ajaxevent" updateregions="productSelected_ajaxregion" />
<ajax:region id="productSelected_ajaxregion">
<logic:variable as="isSelected" value="productSelected" />
</ajax:region>
<forms:radiobutton datacolumn="product_id" valuechecked="[? $product['product_id'] ?]" label="" validations="mandatory" onchangeajax="payment_ajaxevent, selected_product_ajaxevent, productSelected_ajaxevent">
<h3 style="margin-top: 0;">
<strong>[? ' $' + round(\Components\Commerce\Products::getColumn($product['product_id'],'product_price'), 2) ?]</strong>
</h3>
<p>[? $product['product_title'] ?]</p></forms:radiobutton>
</div>
</data:repeater>
</div>
</forms:radiobuttongroup>
</forms:row>
</logic:if>
<logic:else>
<forms:row label="Membership Type"><forms:editbox id="product_id" /></forms:row>
</logic:else>
</div>
<logic:if test="!(\Components\Customers\Contacts::currentIsLoggedIn())">
<div class="fieldset accent-bg">
<h4>Create an Account</h4>
<p>If you have an existing account, please login <a href="/community/login/">here</a>. Otherwise, create an account below.</p>
<templates:row>
<templates:column width="6">
<forms:row label="Email Address" type="one_column">
<forms:editbox id="contact_email" datacolumn="contact_email" validations="mandatory,email" transformations="tolower" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Password" type="one_column">
<forms:password datacolumn="contact_password" id="contact_password" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
</div>
<div class="fieldset">
<h4>Personal Information</h4>
<templates:row>
<templates:column width="6">
<forms:row label="First Name" type="one_column">
<forms:editbox id="contact_first_name" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Last Name" type="one_column">
<forms:editbox id="contact_last_name" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<templates:row>
<templates:column width="12">
<forms:row label="Phone" type="one_column">
<forms:editbox id="contact_phone" datacolumn="contact_phone" validations="numeric" />
</forms:row>
</templates:column>
</templates:row>
<div class="custom-address">
<forms:address id="contact_address" validations="mandatory" rowtype="one_column" />
</div>
</div>
</logic:if>
<logic:else>
<forms:hidden id="contact_register_email" datacolumn="contact_email" />
<forms:hidden id="contact_register_first_name" datacolumn="contact_first_name" />
<forms:hidden id="contact_register_last_name" datacolumn="contact_last_name" />
<div class="fieldset">
<h4>Personal Information</h4>
<p>Click <a href="/community/profile/">here</a> to update your profile. Not you? Logout <a href="/community/logout/">here</a>.</p>
<templates:row>
<templates:column width="6">
<forms:row label="Email Address" type="one_column">
<input type="text" value="[? \Components\Customers\Contacts::currentEmail() ?]" readonly disabled style="text-transform: lowercase" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Full Name" type="one_column">
<input type="text" value="[? \Components\Customers\Contacts::currentFullName() ?]" readonly disabled />
</forms:row>
</templates:column>
</templates:row>
</div>
</logic:else>
<ajax:region id="selected_product_ajaxregion">
<!-- If selected is Couple -->
<logic:if test="$product_id.value == 389">
<div class="fieldset">
<h4>Partner's Information</h4>
<ajax:event id="counterContactDetails_ajaxevent" updateregions="counterContactDetails_ajaxregion" />
<ajax:region id="counterContactDetails_ajaxregion">
<div style="position: relative;">
<forms:row label="Additional Contacts qty" class="counter">
<forms:spinbox id="counterContactDetails" valuemin="1" valuemax="1" value="1" onchangeajax="counterContactDetails_ajaxevent" />
</forms:row>
<logic:if test="$counterContactDetails.value > 0">
<data:repeater datasource="createCounter($counterContactDetails.value)" as="item">
<style>.counter { display: none; } </style>
<forms:form id="additional_contact_partner" datacolumn="additional_contact_partner">
<templates:row>
<templates:column width="6">
<forms:row type="one_column" label="First Name">
<forms:editbox id="ac_first_name_[? $item ?]" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row type="one_column" label="Last Name">
<forms:editbox id="ac_last_name_[? $item ?]" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<forms:row type="one_column" label="E-mail Address">
<forms:editbox id="ac_email_[? $item ?]" datacolumn="contact_email" transformations="tolower" validations="mandatory,email" />
</forms:row>
</forms:form>
</data:repeater>
</logic:if>
</div>
</ajax:region>
</div>
</logic:if>
<!-- If family is selected -->
<logic:else test="$product_id.value == 308">
<div class="fieldset">
<h4>Additional Contact Information</h4>
<ajax:event id="counterContactDetails_ajaxevent" updateregions="counterContactDetails_ajaxregion" />
<ajax:region id="counterContactDetails_ajaxregion">
<div style="position: relative;">
<forms:row label="Additional Contacts qty" class="counter">
<forms:spinbox id="counterContactDetails" valuemin="1" valuemax="5" value="1" onchangeajax="counterContactDetails_ajaxevent" />
</forms:row>
<logic:if test="$counterContactDetails.value > 0">
<data:repeater datasource="createCounter($counterContactDetails.value)" as="item">
<logic:if test="$counterContactDetails.getValue() == '5'">
<style>.counter .spinBoxUp { background-color: #ccc; pointer-events: none; } </style>
</logic:if>
<forms:form id="[? 'additional_contact_family_' + $item ?]" datacolumn="[? 'additional_contact_family_' + $item ?]">
<h5><strong>[? $item ?]. ADDITIONAL CONTACT INFORMATION</strong></h5>
<p>Add each of the additional member contacts below. Not including the main contact.</p>
<templates:row>
<templates:column width="6">
<forms:row type="one_column" label="First Name">
<forms:editbox id="ac_first_name_[? $item ?]" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row type="one_column" label="Last Name">
<forms:editbox id="ac_last_name_[? $item ?]" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<templates:row>
<templates:column width="7">
<forms:row type="one_column" label="E-mail Address">
<forms:editbox id="ac_email_[? $item ?]" datacolumn="contact_email" transformations="tolower" validations="mandatory,email" />
</forms:row>
</templates:column>
<templates:column width="5">
<forms:row label="Relationship" type="one_column">
<forms:combobox id="relationship_type_combobox_[? $item ?]" validations="mandatory" showvalueoption="true" value="" datacolumn="relationship_type_id" datasource="getRelationshipTypes(\Components\Customers\Contacts::currentContactId(), $membership_form.getValuesForComponent())" as="relationship_type" datatitle="$relationship_type['relationship_type_title']" datavalue="$relationship_type['relationship_type_id']"/>
</forms:row>
</templates:column>
</templates:row>
<br />
<br />
</forms:form>
</data:repeater>
</logic:if>
</div>
</ajax:region>
</div>
</logic:else>
<!-- If selected is Student -->
<logic:else test="$product_id.getValue() == 31">
<div class="fieldset">
<h4>Student Membership</h4>
<blockquote>
<em>Available to high-school and/or full-time college students only. Photo of a valid Student ID is required.</em>
</blockquote>
<forms:row type="one_column" label="Student ID Photo"><forms:fileupload id="contact_student_id" validations="mandatory" /></forms:row>
</div>
</logic:else>
<!-- If selected is Concession -->
<logic:else test="$product_id.getValue() == 358">
<div class="fieldset">
<h4>Concession Membership</h4>
<blockquote>
<em>Insert details here</em>
</blockquote>
<forms:row type="one_column" label="Proof of concession member"><forms:fileupload id="contact_concession_id" validations="mandatory" /></forms:row>
</div>
</logic:else>
</ajax:region>
<ajax:region id="total_paymentmethod_ajaxregion">
<logic:if test="$product_id.value">
<div class="fieldset">
<h4>Payment</h4>
<!-- Payment -->
<logic:variable as="product" value="[? \Components\Commerce\Products::get($product_id.getValue()) ?]" />
<forms:row label="Amount:">
<h3 style="font-weight: 300 !important;">
[? ' $' + round(\Components\Commerce\Products::getColumn($product['product_id'],'product_price'), 2) ?]
</h3>
</forms:row>
<forms:paymentmethod productid="[? $product['product_id'] ?]" completecart="true" recurring="true" recurringamount="[? $product['recurring_sale_amount'] ?]" recurringinterval="[?? \Components\Commerce\RecurringSales::renderInterval($product) ??]" showpaymentformonzerovalue="true" />
</div>
</logic:if>
</ajax:region>
</forms:form>
<forms:form id="membership_form" recordsubmissions="true" onsubmitredirect="/membership/success/?sale_id=[? $sale_id ?]" onsubmitemailsubject="[? 'New Member: ' + $_POST['contact_first_name'] + ' ' + $_POST['contact_last_name'] ?]" onsubmitemail="false" onsubmitserver="onFormSubmit($membership_form.getValuesForComponent())">
<ajax:event id="selected_product_ajaxevent" updateregions="selected_product_ajaxregion" />
<ajax:event id="payment_ajaxevent" updateregions="total_paymentmethod_ajaxregion" />
<div class="fieldset">
<h4>Membership Type</h4>
<logic:if test="!(\Framework\DOM\CurrentContext::getIsInEmail())" evaluateat="render">
<forms:row type="one_column" label="">
<forms:radiobuttongroup name="product_id" validations="mandatory">
<div class="template-productFlexContainer">
<data:repeater datasource="\Components\Commerce\Products::getAllForCategoryAndBrand(5, null)" as="product" dataorder="[? [['product_price_base', 'ASC']] ?]" datafilter="[? [['product_is_offline', '=', 0]] ?]">
<div class="template-productFlex">
<logic:variable as="isSelected" value="" />
<ajax:event id="productSelected_ajaxevent" updateregions="productSelected_ajaxregion" />
<ajax:region id="productSelected_ajaxregion">
<logic:variable as="isSelected" value="productSelected" />
</ajax:region>
<forms:radiobutton datacolumn="product_id" valuechecked="[? $product['product_id'] ?]" label="" validations="mandatory" onchangeajax="payment_ajaxevent, selected_product_ajaxevent, productSelected_ajaxevent">
<h3 style="margin-top: 0;">
<strong>[? ' $' + round(\Components\Commerce\Products::getColumn($product['product_id'],'product_price'), 2) ?]</strong>
</h3>
<p>[? $product['product_title'] ?]</p></forms:radiobutton>
</div>
</data:repeater>
</div>
</forms:radiobuttongroup>
</forms:row>
</logic:if>
<logic:else>
<forms:row label="Membership Type"><forms:editbox id="product_id" /></forms:row>
</logic:else>
</div>
<logic:if test="!(\Components\Customers\Contacts::currentIsLoggedIn())">
<div class="fieldset accent-bg">
<h4>Create an Account</h4>
<p>If you have an existing account, please login <a href="/community/login/">here</a>. Otherwise, create an account below.</p>
<templates:row>
<templates:column width="6">
<forms:row label="Email Address" type="one_column">
<forms:editbox id="contact_email" datacolumn="contact_email" validations="mandatory,email" transformations="tolower" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Password" type="one_column">
<forms:password datacolumn="contact_password" id="contact_password" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
</div>
<div class="fieldset">
<h4>Personal Information</h4>
<templates:row>
<templates:column width="6">
<forms:row label="First Name" type="one_column">
<forms:editbox id="contact_first_name" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Last Name" type="one_column">
<forms:editbox id="contact_last_name" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<templates:row>
<templates:column width="12">
<forms:row label="Phone" type="one_column">
<forms:editbox id="contact_phone" datacolumn="contact_phone" validations="numeric" />
</forms:row>
</templates:column>
</templates:row>
<div class="custom-address">
<forms:address id="contact_address" validations="mandatory" rowtype="one_column" />
</div>
</div>
</logic:if>
<logic:else>
<forms:hidden id="contact_register_email" datacolumn="contact_email" />
<forms:hidden id="contact_register_first_name" datacolumn="contact_first_name" />
<forms:hidden id="contact_register_last_name" datacolumn="contact_last_name" />
<div class="fieldset">
<h4>Personal Information</h4>
<p>Click <a href="/community/profile/">here</a> to update your profile. Not you? Logout <a href="/community/logout/">here</a>.</p>
<templates:row>
<templates:column width="6">
<forms:row label="Email Address" type="one_column">
<input type="text" value="[? \Components\Customers\Contacts::currentEmail() ?]" readonly disabled style="text-transform: lowercase" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row label="Full Name" type="one_column">
<input type="text" value="[? \Components\Customers\Contacts::currentFullName() ?]" readonly disabled />
</forms:row>
</templates:column>
</templates:row>
</div>
</logic:else>
<ajax:region id="selected_product_ajaxregion">
<!-- If selected is Couple -->
<logic:if test="$product_id.value == 389">
<div class="fieldset">
<h4>Partner's Information</h4>
<ajax:event id="counterContactDetails_ajaxevent" updateregions="counterContactDetails_ajaxregion" />
<ajax:region id="counterContactDetails_ajaxregion">
<div style="position: relative;">
<forms:row label="Additional Contacts qty" class="counter">
<forms:spinbox id="counterContactDetails" valuemin="1" valuemax="1" value="1" onchangeajax="counterContactDetails_ajaxevent" />
</forms:row>
<logic:if test="$counterContactDetails.value > 0">
<data:repeater datasource="createCounter($counterContactDetails.value)" as="item">
<style>.counter { display: none; } </style>
<forms:form id="additional_contact_partner" datacolumn="additional_contact_partner">
<templates:row>
<templates:column width="6">
<forms:row type="one_column" label="First Name">
<forms:editbox id="ac_first_name_[? $item ?]" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row type="one_column" label="Last Name">
<forms:editbox id="ac_last_name_[? $item ?]" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<forms:row type="one_column" label="E-mail Address">
<forms:editbox id="ac_email_[? $item ?]" datacolumn="contact_email" transformations="tolower" validations="mandatory,email" />
</forms:row>
</forms:form>
</data:repeater>
</logic:if>
</div>
</ajax:region>
</div>
</logic:if>
<!-- If family is selected -->
<logic:else test="$product_id.value == 308">
<div class="fieldset">
<h4>Additional Contact Information</h4>
<ajax:event id="counterContactDetails_ajaxevent" updateregions="counterContactDetails_ajaxregion" />
<ajax:region id="counterContactDetails_ajaxregion">
<div style="position: relative;">
<forms:row label="Additional Contacts qty" class="counter">
<forms:spinbox id="counterContactDetails" valuemin="1" valuemax="5" value="1" onchangeajax="counterContactDetails_ajaxevent" />
</forms:row>
<logic:if test="$counterContactDetails.value > 0">
<data:repeater datasource="createCounter($counterContactDetails.value)" as="item">
<logic:if test="$counterContactDetails.getValue() == '5'">
<style>.counter .spinBoxUp { background-color: #ccc; pointer-events: none; } </style>
</logic:if>
<forms:form id="[? 'additional_contact_family_' + $item ?]" datacolumn="[? 'additional_contact_family_' + $item ?]">
<h5><strong>[? $item ?]. ADDITIONAL CONTACT INFORMATION</strong></h5>
<p>Add each of the additional member contacts below. Not including the main contact.</p>
<templates:row>
<templates:column width="6">
<forms:row type="one_column" label="First Name">
<forms:editbox id="ac_first_name_[? $item ?]" datacolumn="contact_first_name" validations="mandatory" />
</forms:row>
</templates:column>
<templates:column width="6">
<forms:row type="one_column" label="Last Name">
<forms:editbox id="ac_last_name_[? $item ?]" datacolumn="contact_last_name" validations="mandatory" />
</forms:row>
</templates:column>
</templates:row>
<templates:row>
<templates:column width="7">
<forms:row type="one_column" label="E-mail Address">
<forms:editbox id="ac_email_[? $item ?]" datacolumn="contact_email" transformations="tolower" validations="mandatory,email" />
</forms:row>
</templates:column>
<templates:column width="5">
<forms:row label="Relationship" type="one_column">
<forms:combobox id="relationship_type_combobox_[? $item ?]" validations="mandatory" showvalueoption="true" value="" datacolumn="relationship_type_id" datasource="getRelationshipTypes(\Components\Customers\Contacts::currentContactId(), $membership_form.getValuesForComponent())" as="relationship_type" datatitle="$relationship_type['relationship_type_title']" datavalue="$relationship_type['relationship_type_id']"/>
</forms:row>
</templates:column>
</templates:row>
<br />
<br />
</forms:form>
</data:repeater>
</logic:if>
</div>
</ajax:region>
</div>
</logic:else>
<!-- If selected is Student -->
<logic:else test="$product_id.getValue() == 31">
<div class="fieldset">
<h4>Student Membership</h4>
<blockquote>
<em>Available to high-school and/or full-time college students only. Photo of a valid Student ID is required.</em>
</blockquote>
<forms:row type="one_column" label="Student ID Photo"><forms:fileupload id="contact_student_id" validations="mandatory" /></forms:row>
</div>
</logic:else>
<!-- If selected is Concession -->
<logic:else test="$product_id.getValue() == 358">
<div class="fieldset">
<h4>Concession Membership</h4>
<blockquote>
<em>Insert details here</em>
</blockquote>
<forms:row type="one_column" label="Proof of concession member"><forms:fileupload id="contact_concession_id" validations="mandatory" /></forms:row>
</div>
</logic:else>
</ajax:region>
<ajax:region id="total_paymentmethod_ajaxregion">
<logic:if test="$product_id.value">
<div class="fieldset">
<h4>Payment</h4>
<!-- Payment -->
<logic:variable as="product" value="[? \Components\Commerce\Products::get($product_id.getValue()) ?]" />
<forms:row label="Amount:">
<h3 style="font-weight: 300 !important;">
[? ' $' + round(\Components\Commerce\Products::getColumn($product['product_id'],'product_price'), 2) ?]
</h3>
</forms:row>
<forms:paymentmethod productid="[? $product['product_id'] ?]" completecart="true" recurring="true" recurringamount="[? $product['recurring_sale_amount'] ?]" recurringinterval="[?? \Components\Commerce\RecurringSales::renderInterval($product) ??]" showpaymentformonzerovalue="true" />
</div>
</logic:if>
</ajax:region>
</forms:form>
|
|
{"togglable_footerCTA":null,"togglable_memberCTA":"on","togglable_testCTA":null,"togglable_newslettercta":null}
{"togglable_footerCTA":null,"togglable_memberCTA":"on","togglable_testCTA":null,"togglable_newslettercta":null}
|
|
.fieldset
{
border: 1px solid hwb(356.13deg 19.61% 19.61% / 10%);
margin-bottom: 2rem;
padding-top: 3rem;
position: relative;
padding: 3rem 2rem 1rem;
}
.fieldset.accent-bg
{
background-color: rgb(250, 237, 237);
}
.fieldset h4
{
background: #d90f31;
display: inline-block;
color: #fff;
padding: 10px 3rem;
position: absolute;
top: -20px;
left: -10px;
font-weight: 500;
}
.fieldset h4:after
{
position: absolute;
content: "";
width: 0;
height: 0;
border-style: solid;
border-width: 0 9px 5px 0;
border-color: transparent #d90f31 transparent transparent;
bottom: -5px;
left: 1px;
}
@media(min-width: 700px)
{
.custom-address oncord-address
{
display: flex;
flex-wrap: wrap;
}
.custom-address .formRow
{
flex: 1 1 auto;
}
.custom-address .formRow:first-child
{
flex: 1 1 100%;
}
}
fieldset h4 {
background: #720c1c;
color: #fff;
display: inline-block;
font-weight: 500;
left: -10px;
padding: 10px 3rem;
position: absolute;
top: -20px;
}
fieldset h4:after {
border-color: transparent #720c1c transparent transparent;
border-style: solid;
border-width: 0 9px 5px 0;
bottom: -5px;
content: "";
height: 0;
left: 1px;
position: absolute;
width: 0;
}
.template-productFlex label.s8-radiobutton-container input ~ .s8-radiobutton {
border: none;
}
span.template-selectedProduct {}
.counter {
bottom: 0;
position: absolute;
right: 0;
}
.counter .formRowCol1 {
display: none;
min-width: 100px;
width: auto;
}
.counter .formRowLabel {
color: #989898;
font-size: 2rem;
letter-spacing: 2px;
padding-top: 0.8rem;
text-transform: uppercase;
}
.counter .spinBox > input {
display: none !important;
}
.counter .spinBoxDown:before {
content: '-' !important;
}
.counter .spinBoxUp, .counter .spinBoxDown {
background: #720c1c;
bottom: 0;
color: #fff;
display: inline-block;
height: 2rem;
line-height: 2rem;
opacity: 1;
position: static;
right: 0;
text-align: center;
top: 0;
width: 2rem;
}
.counter .spinBoxUp:before, .counter .spinBoxDown:before {
border: 0 none;
content: '+';
font-size: 1.2rem;
height: 100%;
left: 0;
position: static;
top: 0;
transform: none;
width: 100%;
}
.template-productFlex {
align-items: center;
background: #333333;
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
min-height: 230px;
padding: 25px;
position: relative;
text-align: center;
}
.template-productFlex .s8-radiobutton-container {
opacity: 1 !important;
}
.template-productFlex .s8-radiobutton-container {
min-height: unset !important;
min-width: unset !important;
}
.template-productFlex input, .template-productFlex .s8-radiobutton-container {
border-radius: 0;
height: 100%;
left: 0;
opacity: 0;
position: absolute;
top: 0;
width: 100%;
}
.template-productFlex input[type="radio"]:checked ~ .s8-radiobutton::before {
background: #dc1836;
border-radius: 50px;
color: #ffffff;
content: "SELECTED";
display: block;
font-size: 11px;
height: auto;
letter-spacing: 1px;
opacity: 1;
padding: 1px 20px;
position: absolute;
right: 20px;
text-transform: uppercase;
top: 20px;
visibility: visible;
width: auto;
}
.s8-radiobuttongroup
{
display: block !important;
}
.template-productFlexContainer {
padding: 0;
margin: 0;
display: grid !important;
align-items: center;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-gap: 1.5rem;
}
select
{
width: 100% !important;
background-color: transparent;
border: 0;
border-bottom: 2px solid currentColor;
border-radius: 0;
height: 3.1em;
}
blockquote
{
background-color: #efefef;
border-left: 5px solid #dc1836;
padding: 1rem 1.5rem;
margin: 0;
}
.fieldset
{
border: 1px solid hwb(356.13deg 19.61% 19.61% / 10%);
margin-bottom: 2rem;
padding-top: 3rem;
position: relative;
padding: 3rem 2rem 1rem;
}
.fieldset.accent-bg
{
background-color: rgb(250, 237, 237);
}
.fieldset h4
{
background: #d90f31;
display: inline-block;
color: #fff;
padding: 10px 3rem;
position: absolute;
top: -20px;
left: -10px;
font-weight: 500;
}
.fieldset h4:after
{
position: absolute;
content: "";
width: 0;
height: 0;
border-style: solid;
border-width: 0 9px 5px 0;
border-color: transparent #d90f31 transparent transparent;
bottom: -5px;
left: 1px;
}
@media(min-width: 700px)
{
.custom-address oncord-address
{
display: flex;
flex-wrap: wrap;
}
.custom-address .formRow
{
flex: 1 1 auto;
}
.custom-address .formRow:first-child
{
flex: 1 1 100%;
}
}
fieldset h4 {
background: #720c1c;
color: #fff;
display: inline-block;
font-weight: 500;
left: -10px;
padding: 10px 3rem;
position: absolute;
top: -20px;
}
fieldset h4:after {
border-color: transparent #720c1c transparent transparent;
border-style: solid;
border-width: 0 9px 5px 0;
bottom: -5px;
content: "";
height: 0;
left: 1px;
position: absolute;
width: 0;
}
.template-productFlex label.s8-radiobutton-container input ~ .s8-radiobutton {
border: none;
}
span.template-selectedProduct {}
.counter {
bottom: 0;
position: absolute;
right: 0;
}
.counter .formRowCol1 {
display: none;
min-width: 100px;
width: auto;
}
.counter .formRowLabel {
color: #989898;
font-size: 2rem;
letter-spacing: 2px;
padding-top: 0.8rem;
text-transform: uppercase;
}
.counter .spinBox > input {
display: none !important;
}
.counter .spinBoxDown:before {
content: '-' !important;
}
.counter .spinBoxUp, .counter .spinBoxDown {
background: #720c1c;
bottom: 0;
color: #fff;
display: inline-block;
height: 2rem;
line-height: 2rem;
opacity: 1;
position: static;
right: 0;
text-align: center;
top: 0;
width: 2rem;
}
.counter .spinBoxUp:before, .counter .spinBoxDown:before {
border: 0 none;
content: '+';
font-size: 1.2rem;
height: 100%;
left: 0;
position: static;
top: 0;
transform: none;
width: 100%;
}
.template-productFlex {
align-items: center;
background: #333333;
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
min-height: 230px;
padding: 25px;
position: relative;
text-align: center;
}
.template-productFlex .s8-radiobutton-container {
opacity: 1 !important;
}
.template-productFlex .s8-radiobutton-container {
min-height: unset !important;
min-width: unset !important;
}
.template-productFlex input, .template-productFlex .s8-radiobutton-container {
border-radius: 0;
height: 100%;
left: 0;
opacity: 0;
position: absolute;
top: 0;
width: 100%;
}
.template-productFlex input[type="radio"]:checked ~ .s8-radiobutton::before {
background: #dc1836;
border-radius: 50px;
color: #ffffff;
content: "SELECTED";
display: block;
font-size: 11px;
height: auto;
letter-spacing: 1px;
opacity: 1;
padding: 1px 20px;
position: absolute;
right: 20px;
text-transform: uppercase;
top: 20px;
visibility: visible;
width: auto;
}
.s8-radiobuttongroup
{
display: block !important;
}
.template-productFlexContainer {
padding: 0;
margin: 0;
display: grid !important;
align-items: center;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-gap: 1.5rem;
}
select
{
width: 100% !important;
background-color: transparent;
border: 0;
border-bottom: 2px solid currentColor;
border-radius: 0;
height: 3.1em;
}
blockquote
{
background-color: #efefef;
border-left: 5px solid #dc1836;
padding: 1rem 1.5rem;
margin: 0;
}
|
|
|
|
<?php
function onFormSubmit($arrValues)
{
$arrContact['contact_first_name'] = $arrValues['contact_first_name'];
$arrContact['contact_last_name'] = $arrValues['contact_last_name'];
$arrContact['contact_email'] = $arrValues['contact_email'];
$arrContact['contact_password'] = $arrValues['contact_password'];
// save first contact
$iContactId = \Components\Customers\Contacts::save($arrContact);
\Components\Customers\Contacts::currentLoginViaContactId($iContactId);
if ($arrValues['product_id'] == 389)
{
$arrPartner = $arrValues['additional_contact_partner'];
$iPartnerContactId = \Components\Customers\Contacts::save($arrPartner);
if ($iPartnerContactId)
{
\Components\Customers\Contacts\Relationships::create($iContactId, $iPartnerContactId, 'I2I_Partner');
}
}
else if ($arrValues['product_id'] == 308)
{
$i = 1;
$strFormName = 'additional_contact_family_' . $i;
while (isset($arrValues[$strFormName]))
{
$arrFamilyContact = $arrValues[$strFormName];
$strRelationship = $arrFamilyContact['relationship_type_id'];
varDump($arrFamilyContact);
unset($arrFamilyContact['relationship_type_id']);
$iFamilyContactId = \Components\Customers\Contacts::save($arrFamilyContact);
if ($iFamilyContactId)
{
\Components\Customers\Contacts\Relationships::create($iContactId, $iFamilyContactId, $strRelationship);
}
$i++;
$strFormName = 'additional_contact_family_' . $i;
}
}
}
function createCounter($last)
{
return range(1, $last);
}
function updatePreferencesOnSubmit($arrValues, $iContactId = NULL)
{
if(!$iContactId)
{
$iContactId = \Components\Customers\Contacts::currentContactId(true);
}
}
function getRelationshipCategory($strType1, $strType2)
{
if($strType1 == 'Individual' && $strType2 == 'Individual')
{
return 'I2I';
}
if($strType1 == 'Individual' && $strType2 == 'Company')
{
return 'I2C';
}
if($strType1 == 'Company' && in_array($strType2, ['Individual', '']))
{
return 'I2C';
}
if($strType1 == 'Company' && $strType2 == 'Company')
{
return 'C2C';
}
return 'I2I';
}
function getContactType($arrContact)
{
if(!is_array($arrContact))
{
$arrContact = \Components\Customers\Contacts::get($arrContact);
}
if(isset($arrContact['contact_type']))
{
return $arrContact['contact_type'];
}
return null;
}
function renderRelationship($arrContact1, $arrContact2, $strRelationshipType)
{
if(!is_array($arrContact1))
{
$arrContact1 = \Components\Customers\Contacts::get($arrContact1);
}
if(!is_array($arrContact2))
{
$arrContact2 = \Components\Customers\Contacts::get($arrContact2);
}
$strContact1Name = \Components\Customers\Contacts::renderName($arrContact1);
$strContact2Name = \Components\Customers\Contacts::renderName($arrContact2);
$strRelationshipTitle = \Components\Customers\Contacts\Relationships\Types::getColumn($strRelationshipType, 'relationship_type_title');
if(strpos($strRelationshipType, "I2C") === 0 && $arrContact1['contact_type'] == 'Company')
{
return $strContact2Name . ' is ' . $strRelationshipTitle . ' of ' . $strContact1Name;
}
return $strContact1Name . ' is ' . $strRelationshipTitle . ' of ' . $strContact2Name;
}
function getRelationshipTypes($iContactId1, $arrContact2)
{
$strRelationshipCategory = getRelationshipCategory(getContactType($iContactId1), getContactType($arrContact2));
$arrRelationshipTypes = \Components\Customers\Contacts\Relationships\Types::getAllForRelationshipCategory($strRelationshipCategory);
foreach ($arrRelationshipTypes as &$arrRelationshipType)
{
$arrRelationshipType['relationship_type_title'] = renderRelationship($arrContact2, $iContactId1, $arrRelationshipType['relationship_type_id']);
}
//varDump($arrRelationshipTypes);
return $arrRelationshipTypes;
}
function createRelationship($arrValues)
{
foreach($arrValues as $strField => $strValue)
{
if(str_starts_with($strField, 'contact_'))
{
$arrContact[$strField] = $arrValues[$strField];
}
}
// Try to auto merge the contact with an existing one
\Components\Customers\Contacts::autoMerge($arrContact);
$iContactId1 = $arrContact['contact_id'];
$iContactId2 = \Components\Customers\Contacts::currentContactId(true);
$arrRelationship = [];
$arrRelationship['relationship_type_id'] = 'I2I_Partner';
$arrRelationship['contact_id_1'] = $iContactId1;
$arrRelationship['contact_id_2'] = $iContactId2;
$arrRelationship['contact1_can_edit_contact2'] = 1;
$arrRelationship['contact2_can_edit_contact1'] = 0;
\Components\Customers\Contacts\Relationships::save($arrRelationship);
}
?>
<?php
function onFormSubmit($arrValues)
{
$arrContact['contact_first_name'] = $arrValues['contact_first_name'];
$arrContact['contact_last_name'] = $arrValues['contact_last_name'];
$arrContact['contact_email'] = $arrValues['contact_email'];
$arrContact['contact_password'] = $arrValues['contact_password'];
// save first contact
$iContactId = \Components\Customers\Contacts::save($arrContact);
\Components\Customers\Contacts::currentLoginViaContactId($iContactId);
if ($arrValues['product_id'] == 389)
{
$arrPartner = $arrValues['additional_contact_partner'];
$iPartnerContactId = \Components\Customers\Contacts::save($arrPartner);
if ($iPartnerContactId)
{
\Components\Customers\Contacts\Relationships::create($iContactId, $iPartnerContactId, 'I2I_Partner');
}
}
else if ($arrValues['product_id'] == 308)
{
$i = 1;
$strFormName = 'additional_contact_family_' . $i;
while (isset($arrValues[$strFormName]))
{
$arrFamilyContact = $arrValues[$strFormName];
$strRelationship = $arrFamilyContact['relationship_type_id'];
varDump($arrFamilyContact);
unset($arrFamilyContact['relationship_type_id']);
$iFamilyContactId = \Components\Customers\Contacts::save($arrFamilyContact);
if ($iFamilyContactId)
{
\Components\Customers\Contacts\Relationships::create($iContactId, $iFamilyContactId, $strRelationship);
}
$i++;
$strFormName = 'additional_contact_family_' . $i;
}
}
}
function createCounter($last)
{
return range(1, $last);
}
function updatePreferencesOnSubmit($arrValues, $iContactId = NULL)
{
if(!$iContactId)
{
$iContactId = \Components\Customers\Contacts::currentContactId(true);
}
}
function getRelationshipCategory($strType1, $strType2)
{
if($strType1 == 'Individual' && $strType2 == 'Individual')
{
return 'I2I';
}
if($strType1 == 'Individual' && $strType2 == 'Company')
{
return 'I2C';
}
if($strType1 == 'Company' && in_array($strType2, ['Individual', '']))
{
return 'I2C';
}
if($strType1 == 'Company' && $strType2 == 'Company')
{
return 'C2C';
}
return 'I2I';
}
function getContactType($arrContact)
{
if(!is_array($arrContact))
{
$arrContact = \Components\Customers\Contacts::get($arrContact);
}
if(isset($arrContact['contact_type']))
{
return $arrContact['contact_type'];
}
return null;
}
function renderRelationship($arrContact1, $arrContact2, $strRelationshipType)
{
if(!is_array($arrContact1))
{
$arrContact1 = \Components\Customers\Contacts::get($arrContact1);
}
if(!is_array($arrContact2))
{
$arrContact2 = \Components\Customers\Contacts::get($arrContact2);
}
$strContact1Name = \Components\Customers\Contacts::renderName($arrContact1);
$strContact2Name = \Components\Customers\Contacts::renderName($arrContact2);
$strRelationshipTitle = \Components\Customers\Contacts\Relationships\Types::getColumn($strRelationshipType, 'relationship_type_title');
if(strpos($strRelationshipType, "I2C") === 0 && $arrContact1['contact_type'] == 'Company')
{
return $strContact2Name . ' is ' . $strRelationshipTitle . ' of ' . $strContact1Name;
}
return $strContact1Name . ' is ' . $strRelationshipTitle . ' of ' . $strContact2Name;
}
function getRelationshipTypes($iContactId1, $arrContact2)
{
$strRelationshipCategory = getRelationshipCategory(getContactType($iContactId1), getContactType($arrContact2));
$arrRelationshipTypes = \Components\Customers\Contacts\Relationships\Types::getAllForRelationshipCategory($strRelationshipCategory);
foreach ($arrRelationshipTypes as &$arrRelationshipType)
{
$arrRelationshipType['relationship_type_title'] = renderRelationship($arrContact2, $iContactId1, $arrRelationshipType['relationship_type_id']);
}
//varDump($arrRelationshipTypes);
return $arrRelationshipTypes;
}
function createRelationship($arrValues)
{
foreach($arrValues as $strField => $strValue)
{
if(str_starts_with($strField, 'contact_'))
{
$arrContact[$strField] = $arrValues[$strField];
}
}
// Try to auto merge the contact with an existing one
\Components\Customers\Contacts::autoMerge($arrContact);
$iContactId1 = $arrContact['contact_id'];
$iContactId2 = \Components\Customers\Contacts::currentContactId(true);
$arrRelationship = [];
$arrRelationship['relationship_type_id'] = 'I2I_Partner';
$arrRelationship['contact_id_1'] = $iContactId1;
$arrRelationship['contact_id_2'] = $iContactId2;
$arrRelationship['contact1_can_edit_contact2'] = 1;
$arrRelationship['contact2_can_edit_contact1'] = 0;
\Components\Customers\Contacts\Relationships::save($arrRelationship);
}
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/membership/
/membership/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|