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 .

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...