AgeCheck Template Blocks
Please also read the Guide to Customizing Magento template files.
Date Of Birth widget
The extension provides a new form widget for the Date Of Birth, shown implemented in the template pages below.
This widget shows different form fields, depending if the customers current default billing address is in the country that has been selected to allow the SofortIdent age verification:
Country of default Billing Address allows SofortIdent verification
In the configuration of the extension, the countries for which the SofortIdent verification is to be available are selectable. If the Country of the current default Billing Address (or the address entered on the Customer Registration page) allows the SofortIdent verification the related notice is shown:
The checkbox below the notice allows to opt-out of the SofortIdent verification, the customer will then be taken to the Sending of ID-Document page instead.
Without SofortIdent verification
For Billing Address countries where SofortIdent verification is not offered the related notice is committed, and the customer will be taken to the Sending of ID-Document page then:
Verified Date of Birth
For a verified Date of Birth (either through the SofortIdent process or by your stores Administrator through ID-Documents) a related notice is shown. The input fields for the Date of Birth are then disabled for data entry.
app/design/frontend/<package>/<your template>/template/agecheck/widget/dob.phtml Default file which is used if the "Perform verification of Age" configuration setting is disabled: app/design/frontend/<package>/<your template>/template/agecheck/widget/dob/default.phtml
Customer Registration Page
Modify the Customer Registration Page to use the extensions provided DOB Widget, instead of the Magento default one:
Customer Registration Page template file
app/design/frontend/<package>/<your template>/template/customer/form/register.phtml On Magento 1.6+ maybe also here: app/design/frontend/<package>/<your template>/template/persistent/customer/form/register.phtml
We advice to rearrange the Date Of Birth widget inside the template file to a different position as the standard one.
As the chosen Address Country is relevant if the SofortIdent verification block is shown, we recommend to locate the DOB Widget below the Address block (before the Login Information block):
<input type="hidden" name="default_billing" value="1" /> <input type="hidden" name="default_shipping" value="1" /> </div> <?php endif; ?> /* Around line 150: Implement the AgeCheck DOB Widget */ <?php $_dob = $this->getLayout()->createBlock('agecheck/widget_dob') ?> <?php if ($_dob->isEnabled()): ?> <?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?> <?php endif ?> /* From here on the original template continues */ <div class="fieldset"> <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
Customer Account Edit Page
Modify the Account Information Page (of the customers account) to use the extensions provided DOB Widget, instead of the Magento default one:
Customer Account Information template file
app/design/frontend/<package>/<your template>/template/customer/form/edit.phtml On Magento 1.6+ maybe also here: app/design/frontend/<package>/<your template>/template/persistent/customer/form/edit.phtml
We advice to rearrange the Date Of Birth widget inside the template file to a different position as the standard one:
/* Around line 58 */ <?php $_dob = $this->getLayout()->createBlock('sofortident/widget_dob') ?> <?php if ($_dob->isEnabled()): ?> <?php echo $_dob->setDate($this->getCustomer()->getDob())->toHtml() ?> <?php endif ?> /* From here on the original template continues */ <div class="fieldset" style="display:none;"> <h2 class="legend"><?php echo $this->__('Change Password') ?></h2>
Submit ID-Document
If the customer is opting out to use the SofortIdent verification (or if it is not available for his default Billing Address Country), he is redirected to this page to upload a copy of his ID. Or to receive a description on how to proceed with his age verification by sending a copy of his ID via mail:
Submit ID-Document template file
app/design/frontend/<package>/<your template>/template/agecheck/customer/verification.phtml
Any uploaded document is stored on the server and associated with the Customer Account. On each upload a Administrator Notification will be created to indicate that the customer has requested verification of his Date of Birth.
The text block below the form is a CMS Static Block, which allows to easily create its content:
- Name this Static Block
agecheck_verification_document
or otherwise AgeCheck will be unable to include the text.
Require to Login or Register before Purchase of Product with Age requirement
When a product is added to the cart, which age limit is not met by the customer (or his age not yet been verified), then the product is automatically removed from the cart. And the customer redirected to following page to login to his existing account or register:
Forced Login or Registration template file
app/design/frontend/<package>/<your template>/template/agecheck/customer/login.phtml
Age limit unsatisfied during purchase of Product
For logged in customers, where the age limit is not met for a product added to the cart (or his age not yet been verified), then the product is automatically removed from the cart. And the customer redirected to the following notification page:
Product purchase denied template file
app/design/frontend/<package>/<your template>/template/agecheck/purchase/denied.phtml