regards,
M
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
Ahah, you could ask to Q to make you pink!jty wrote:@madimar, why is your name blue
I know Q & D are red and the others are green but you're blue. Can I be pink
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
account/register.php
account/edit.php (if you want to avoid that a customer remove the company field content after registration)
checkout/register.php
checkout/guest.php
Ah, you will need also to slightly modify corresponding template files in order to show the error message in case of validation failure.
M
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
http://www.web.nzplayer.com/index.php?r ... duct_id=95
M
Sent from my DesireHD.
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
It's not that difficult. Let's walk you through it.sferris wrote:I already added the * to the fields in checkout, to at least make people think they are required. Which controller files would I need to look at? I can usually figure stuff out if I see an example, but nothing was jumping out at me when I looked.
Open catalog/view/theme/default/template/account/register.tpl and find this line:
Code: Select all
<tr>
<td><?php echo $entry_company; ?></td>
<td><input type="text" name="company" value="<?php echo $company; ?>" /></td>
</tr>
Code: Select all
<tr>
<td><span class="required">*</span> <?php echo $entry_company; ?></td>
<td><input type="text" name="company" value="<?php echo $company; ?>" /><?php if ($error_company) { ?>
<span class="error"><?php echo $error_company; ?></span>
<?php } ?></td>
</tr>
Code: Select all
if (isset($this->error['zone'])) {
$this->data['error_zone'] = $this->error['zone'];
} else {
$this->data['error_zone'] = '';
}
Code: Select all
if (isset($this->error['company'])) {
$this->data['error_company'] = $this->error['company'];
} else {
$this->data['error_company'] = '';
}
Code: Select all
if ($this->request->post['country_id'] == '') {
$this->error['country'] = $this->language->get('error_country');
}
Code: Select all
if ($this->request->post['company'] == '') {
$this->error['company'] = $this->language->get('error_company');
}
Code: Select all
$_['error_company'] = 'Warning: Company name required';
Does someone know how to do this within the checkout form?
Just can't get it to work properly. Got it to do the verification ( I think, it will not continue without a company filled in) but no error message is generated.
Can someone help?
Regards,
Martijn
Attachments
require company field
Thank you for the files, It also works for OC 1.5.6reason8 wrote:Thanks avvici -arvixe- I have made it onto a vQmod if anyone requires it and it works for OC 1.5.5.1 see attached.
Question, How do you let this work in the checkout page, I mean like the page where people can place their order without login --> Direct Order page.
I believe it's something with checkout/checkout.php ?
Best regards,
Nawid
check/register.tpl
catalog/controller/checkout/register.php
catalog/language/english/checkout/register.php
I'm having trouble with the middle file since the format of that file doesn't match the format of the controller/account/register.php file.
Can anyone help with that file? or is there a way to disable creating an account from in the checkout process to force everyone to have to use the regular account creation page?
Thanks.
Users browsing this forum: No registered users and 141 guests