Jump to content

Recommended Posts

Posted

as the title, the client registration order type only support the standard template .

 

i suggest to make it support other template if the template ar made for that . we need to make our own registration template and we need to preserve the default standard without touching it .

 

 

 

Posted

i will put here a manual Howto do it yourself .

 

open plugins\order\lib\order_types\registration\order_type_registration.php and search :

public function editSettings(array $vars) {
  $rules = array(
   'template' => array(
    'valid' => array(
     'rule' => array("compares", "==", "standard"),
     'message' => Language::_("OrderTypeRegistration.!error.template.valid", true)
    )
   )
  );
  $this->Input->setRules($rules);
  if ($this->Input->validates($vars))
   return $vars;
}

in the rule add your own template name like :

public function editSettings(array $vars) {
  $rules = array(
   'template' => array(
    'valid' => array(
     'rule' => array("compares", "==", "standard"),
     'rule' => array("compares", "==", "your_template"),
     'message' => Language::_("OrderTypeRegistration.!error.template.valid", true)
    )
   )
  );
  $this->Input->setRules($rules);
  if ($this->Input->validates($vars))
   return $vars;
}

in our case we want the registration support some setting that we have set in admin side ; so change

public function supportsMultipleGroups() {
  return null;
}

to

public function supportsMultipleGroups() {
  return true;
}

in the setting file you can add your own settings .

 

but i suggest to create a new order type  for this .

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...