Skip to main content

ValidatorPlaceOrder

Short description

You can define checks for submitting the order in this template. For example, you can check if the terms and conditions or the cancellation rights were accepted by placing a check mark in the relevant check box.

Template ValidatorPlaceOrder

Variables

These variables are available in this container.

  • $AgeRestrictionCheck — Returns the value of the check box for confirming the age.

  • $CustomerSign — Returns the customer reference that was entered and sent.

  • $KlarnaTermsAndConditionsCheck — Returns the value of the check box for confirming the Klarna terms and conditions.

  • $NewsletterCheck — Returns the value of the check box for confirming the newsletter registration.

  • $OrderInfoText — Returns the customer’s additional notes and special requests.

  • $PayoneDirectDebitMandateCheck — Returns the value of the check box for confirming the direct debit mandate.

  • $PayoneInvoiceCheck — Returns the value of the check box for confirming PAYONE.

  • $PrivacyPolicyCheck — Returns the value of the check box for confirming the privacy policy.

  • $TermsAndConditionsCheck — Returns the value of the check box for confirming the terms and conditions.

  • $WithdrawalCheck — Returns the value of the check box for confirming the cancellation rights.

Examples

{%

	# Example for ValidatorPlaceOrder
	if(!$TermsAndConditionsCheck)
	{
		$_errorCode = 16; # Please read our General Terms and Conditions and confirm them by selecting the choice box.

		AddError($_errorCode);
	}


	# Example for ValidatorCustomerShippingAddress
	$_shippingAddress = GetCheckoutCustomerShippingAddressFromRequest();

	if(strlen($_shippingAddress->FirstName) < 2
		|| strlen($_shippingAddress->LastName) < 2)
	{
		$_errorCode = 39; #Please enter name and surname.

		AddError($_errorCode);
	}

%}
To top