For that its not just to remove * from your tpl files, you also have to remove its validation from particular controller. Example if you wants to remove city validation from account registration than you have to remove city's validation from catalog/controller/account/register.php file's validate() function,
Add Comment to above lines of code so it will bypass city's validation and remove * from your theme's template/account/register.tpl file's city input field,
Code: Select all
if ((utf8_strlen($this->request->post['city']) < 2) || (utf8_strlen($this->request->post['city']) > 128)) {
$this->error['city'] = $this->language->get('error_city');
}
Code: Select all
<span class="required">*</span>
Most Useful Extensions || Most Selling Extensions
Opencart Development || Opencart Designing || eCommerce Project
✔ Join more than 5000 Happy Opencart Store Owners enjoying the extensions designed and developed by Opcrat, Opencart Partner.
Best why use ( style="display:none") as below
<tr style="display:none">
<td><span class="required">*</span> <?php echo $entry_telephone; ?></td>
<td><input type="text" name="telephone" value="<?php echo $telephone; ?>" />
<?php if ($error_telephone) { ?>
<span class="error"><?php echo $error_telephone; ?></span>
<?php } ?></td>
</tr>
If required go to (catalog/controller/account/register.php) and add /* */ do disable code.
/*
if (isset($this->error['telephone'])) {
$this->data['error_telephone'] = $this->error['telephone'];
} else {
$this->data['error_telephone'] = '';
}
*/
<tr style="display:none">
<td><span class="required">*</span> <?php echo $entry_telephone; ?></td>
<td><input type="text" name="telephone" value="<?php echo $telephone; ?>" />
<?php if ($error_telephone) { ?>
<span class="error"><?php echo $error_telephone; ?></span>
<?php } ?></td>
</tr>
If required go to (catalog/controller/account/register.php) and add /* */ do disable code.
/*
if (isset($this->error['telephone'])) {
$this->data['error_telephone'] = $this->error['telephone'];
} else {
$this->data['error_telephone'] = '';
}
*/
I would like to change what fields are required in the checkout page and the return page, but do not quite understand how to do it based on these responses.
I have my own custom theme so that I would not edit any of the default files, but If i have to change controller files (those are located outside of the theme folder, correct?)
Is that okay?
Is that the best practice to make the store work the way *I* need it to?
Any advice or links to other threads about this topic?
Thanks
I have my own custom theme so that I would not edit any of the default files, but If i have to change controller files (those are located outside of the theme folder, correct?)
Is that okay?
Is that the best practice to make the store work the way *I* need it to?
Any advice or links to other threads about this topic?
Thanks
You can read How do I remove registration form fields?tillieb wrote:I have my own custom theme so that I would not edit any of the default files, but If i have to change controller files (those are located outside of the theme folder, correct?)
Is that okay?
Is that the best practice to make the store work the way *I* need it to?
and if you need to modificate controller, the best think to do is use vQmod.
Who is online
Users browsing this forum: No registered users and 10 guests