Hello.
I run a digital download site and have spent all evening to find a solution for my problem.
I want to remove fields from my register form and that is the total Your adress part
(from Compagny to the State part).
I do not need that info from my buyers because it will only scare them off.
Most of my buyers want a quick sale without all this extra fields to fill in.
I can find all this data also in the receipts I get from paypal if I need to.
Can anyone tell me what to do..
I have edit create.php and create.tpl but I keep getting errors.
the "not required" fields are no problem but I can not get the required fields removed without errors and bugs.
Thank you in advance !!
I run a digital download site and have spent all evening to find a solution for my problem.
I want to remove fields from my register form and that is the total Your adress part
(from Compagny to the State part).
I do not need that info from my buyers because it will only scare them off.
Most of my buyers want a quick sale without all this extra fields to fill in.
I can find all this data also in the receipts I get from paypal if I need to.
Can anyone tell me what to do..
I have edit create.php and create.tpl but I keep getting errors.
the "not required" fields are no problem but I can not get the required fields removed without errors and bugs.
Thank you in advance !!
After i deleted them from create.php and create.tpl , i went to catalog>model>account>customer.php and i deleted them from there too( on line 8 ).Now it seems to work , you should try it on a test shop. Respect!
Hi! I need to do exactly the same!After i deleted them from create.php and create.tpl , i went to catalog>model>account>customer.php and i deleted them from there too( on line 8 ).Now it seems to work , you should try it on a test shop. Respect!
I see you say, after you deleted them. Could you ve more specific? What lines of code should I delete? Sorry, I don´t know too much about codes, so all I can do is look for a code and change it with other one (copy /paste), that´s all and I really need to do that!
thxs,
Astier
I ment after I deleted the rows like country , adress and others from the tpl and the controller.
You should delete the lines of code you dont need anymore.
As an example in the tpl, to remove field company , delete
You should delete the lines of code you dont need anymore.
As an example in the tpl, to remove field company , delete
Code: Select all
<tr>
<td><?php echo $entry_company; ?></td>
<td><input type="text" name="company" value="<?php echo $company; ?>" /></td>
</tr>
Excuse my ignorance but to see if it is clear:
I should delete this kind of code from the create.tpl, the create.php or the customer.php? Sorry but I dont know what you mean with "deleted the rows..." (maybe a language isuue, english is not my first language)
thxs for your answer anyway!
I should delete this kind of code from the create.tpl, the create.php or the customer.php? Sorry but I dont know what you mean with "deleted the rows..." (maybe a language isuue, english is not my first language)
thxs for your answer anyway!
If you want to delete all adress fields
In create.tpl delete code
In create.php delete
In catalog/model/account/customer.php on line 8 delete
Hope it works for you too , for us it did! 
In create.tpl delete code
Code: Select all
<b style="margin-bottom: 2px; display: block;"><?php echo $text_your_address; ?></b>
<div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
<table>
<tr>
<td width="150"><?php echo $entry_company; ?></td>
<td><input type="text" name="company" value="<?php echo $company; ?>" /></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_address_1; ?></td>
<td><input type="text" name="address_1" value="<?php echo $address_1; ?>" />
<?php if ($error_address_1) { ?>
<span class="error"><?php echo $error_address_1; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><?php echo $entry_address_2; ?></td>
<td><input type="text" name="address_2" value="<?php echo $address_2; ?>" /></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_city; ?></td>
<td><input type="text" name="city" value="<?php echo $city; ?>" />
<?php if ($error_city) { ?>
<span class="error"><?php echo $error_city; ?></span>
<?php } ?></td>
</tr>
<tr>
<td id="postcode"><?php echo $entry_postcode; ?></td>
<td><input type="text" name="postcode" value="<?php echo $postcode; ?>" />
<?php if ($error_postcode) { ?>
<span class="error"><?php echo $error_postcode; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_country; ?></td>
<td><select name="country_id" id="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/create/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>'); $('#postcode').load('index.php?route=account/create/postcode&country_id=' + this.value);">
<option value="FALSE"><?php echo $text_select; ?></option>
<?php foreach ($countries as $country) { ?>
<?php if ($country['country_id'] == $country_id) { ?>
<option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
<?php if ($error_country) { ?>
<span class="error"><?php echo $error_country; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_zone; ?></td>
<td><select name="zone_id">
</select>
<?php if ($error_zone) { ?>
<span class="error"><?php echo $error_zone; ?></span>
<?php } ?></td>
</tr>
</table>
</div>
Code: Select all
if ((strlen(utf8_decode($this->request->post['address_1'])) < 3) || (strlen(utf8_decode($this->request->post['address_1'])) > 128)) {
$this->error['address_1'] = $this->language->get('error_address_1');
}
if ((strlen(utf8_decode($this->request->post['city'])) < 3) || (strlen(utf8_decode($this->request->post['city'])) > 128)) {
$this->error['city'] = $this->language->get('error_city');
}
$this->load->model('localisation/country');
$country_info = $this->model_localisation_country->getCountry($this->request->post['country_id']);
if ($country_info && $country_info['postcode_required']) {
if ((strlen(utf8_decode($this->request->post['postcode'])) < 2) || (strlen(utf8_decode($this->request->post['postcode'])) > 10)) {
$this->error['postcode'] = $this->language->get('error_postcode');
}
}
if ($this->request->post['country_id'] == 'FALSE') {
$this->error['country'] = $this->language->get('error_country');
}
if ($this->request->post['zone_id'] == 'FALSE') {
$this->error['zone'] = $this->language->get('error_zone');
}
In catalog/model/account/customer.php on line 8 delete
Code: Select all
, address_1 = '" . $this->db->escape($data['address_1']) . "', address_2 = '" . $this->db->escape($data['address_2']) . "', city = '" . $this->db->escape($data['city']) . "', postcode = '" . $this->db->escape($data['postcode']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "'

I am almost there!
but I have one problem and maybe you can help me!!
I delete exactly the code lines you told me to and everything looks fine, no address fields there.
BUT, when I register a user it displays an error code.
One thing that caugth my attention is that in the customer php code, in the place where I delete the lines you told me to it ends with this
$this->db->escape($data['company']) . "'[here it was the code I deleted]");
without my text:
maybe some of those quote marks should be deleted too?
this is the error log it displays
thnaks again, I hope you know what I did wrong!
but I have one problem and maybe you can help me!!
I delete exactly the code lines you told me to and everything looks fine, no address fields there.
BUT, when I register a user it displays an error code.
One thing that caugth my attention is that in the customer php code, in the place where I delete the lines you told me to it ends with this
$this->db->escape($data['company']) . "'[here it was the code I deleted]");
without my text:
Code: Select all
$this->db->escape($data['company']) . "'");
this is the error log it displays
Code: Select all
Notice: Undefined index: company in /home/hosting-account/domains/test-store-domain/public_html/catalog/model/account/customer.php on line 7Notice: Undefined index: address_1 in /home/hosting-account/domains/test-store-domain/public_html/catalog/model/account/customer.php on line 8Notice: Undefined index: address_2 in /home/hosting-account/domains/test-store-domain/public_html/catalog/model/account/customer.php on line 9Notice: Undefined index: city in /home/hosting-account/domains/test-store-domain/public_html/catalog/model/account/customer.php on line 10Notice: Undefined index: postcode in /home/hosting-account/domains/test-store-domain/public_html/catalog/model/account/customer.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /home/hosting-account/domains/test-store-domain/public_html/index.php:92) in /home/hosting-account/domains/test-store-domain/public_html/system/engine/controller.php on line 27
I think you have not deleted all the code from customer.php , if you delete all fields from the adress like in the example above , you will have to delete those entries from customer.php.
it is must the admiminstator 's responbility,we have no rights.
Buy Maplestory Mesos Cheap Maplestory Mesos Buy RS Gold Runescape Gold
Done!!!!!!!
This is what it was missing to delete in catalog/model/account/customer.php
This is what it was missing to delete in catalog/model/account/customer.php
And a line before the ones you told me:$data['company'] = ucwords(strtolower(trim($data['company'])));
$data['address_1'] = ucwords(strtolower(trim($data['address_1'])));
$data['address_2'] = ucwords(strtolower(trim($data['address_2'])));
$data['city'] = ucwords(strtolower(trim($data['city'])));
$data['postcode'] = strtoupper(trim($data['postcode']));
Thank you very much for your help, I hope I can help someone in the future!!!, company = '" . $this->db->escape($data['company']) . "'
Hello
I did all setting but I saw thse errors after registration
catalog/model/account/customer.php on line 7Warning: Cannot modify header information - headers
system/engine/controller.php on line 27
Anybody cna help me about the reason pelase?
Regards
I did all setting but I saw thse errors after registration
catalog/model/account/customer.php on line 7Warning: Cannot modify header information - headers
system/engine/controller.php on line 27
Anybody cna help me about the reason pelase?
Regards
Is a download at the end of the topic http://forum.opencart.com/viewtopic.php?f=21&t=30473
All the respect!
All the respect!
I only edited create.tpl
Removed fax, company, address 2, zone and country.
It seems to work, but Do I have surprises waiting for me?
It can't be that easy?
Edit: version 1.4.9.3
Only problem is that some fileds have moved to the left:
http://bildr.no/view/881610
Removed fax, company, address 2, zone and country.
It seems to work, but Do I have surprises waiting for me?
It can't be that easy?

Edit: version 1.4.9.3
Only problem is that some fileds have moved to the left:
http://bildr.no/view/881610
Anbefalt vibrator
Dildo i glass og metall
Myke sex leketøy i silikon
Tromas wrote:I only edited create.tpl
Removed fax, company, address 2, zone and country.
It seems to work, but Do I have surprises waiting for me?
It can't be that easy?
Edit: version 1.4.9.3
Only problem is that some fileds have moved to the left:
http://bildr.no/view/881610
To solve the thing with your fields "moving to the left" you have to replace:
Code: Select all
<td><span class="required">*</span> <?php echo $entry_address_1; ?></td>
Code: Select all
<td width="150"><span class="required">*</span> <?php echo $entry_address_1; ?></td>
Just so you know, removing those lines in the .tpl wasn't enough in my case. It worked all right in a local install of 1.9.3, but when I put it online I had to edit the model and controller files or I would get "Undefined Index" errors (maybe something to do with error reporting settings?).
Who is online
Users browsing this forum: No registered users and 19 guests