AbanteCart Community
Shopping Cart Operations => Support => Topic started by: smallfish on March 22, 2013, 04:31:48 AM
-
Can abantecart modify the address format in "country" at the backend admin?
I have tried removed the "city" and "postcode" but the frontend store still needs me to input the city and postcode.
How to solve it?
Thank you!
First Name = {firstname}
Last Name = {lastname}
Company = {company}
Address 1 = {address_1}
Address 2 = {address_2}
City = {city} <--- delete
Postcode = {postcode} <--- delete
Zone = {zone}
Zone Code = {zone_code}
Country = {country}
-
It seems that abantecart doesn't implement this feature right now. Please fix it.
Thank you!
-
Yes, you can do this.
Go System ->Localization -> Countries.
Select country and add the format.
-
But it doesn't work. There is no effect after I have added the format. I open the registered page and change address at checkout page, it still needs me to input postcode and city. Please check it and fix it.
Thank you!
Yes, you can do this.
Go System ->Localization -> Countries.
Select country and add the format.
-
Data of new account form validates in file
public_html/storefront/model/account/customer.php method validateRegistrationData, line #174
you can remove check for city
if ((strlen(utf8_decode($data['city'])) < 3) || (strlen(utf8_decode($data['city'])) > 128)) {
$error['city'] = $this->language->get('error_city');
}
or just comment.
Also you can open file public_html/storefront/controller/pages/account/create.php
and change 'required' => true by 'required' => false
$this->data['form'][ 'city' ] = $form->getFieldHtml( array(
'type' => 'input',
'name' => 'city',
'value' => $this->request->post['city'],
'required' => true ));
-
Athough the following modification can solve it. But my customers also came from various countries.
So that I still need it to check the city and postcode. The best solution should allow me to modify the address format in backend for each countries and abantecart should check the format for each countries at frontend. The original design should allow to modify the address format for each countries but abantecart do not implment it. Hope the fix can be released in the coming new version.
Thank.
Data of new account form validates in file
public_html/storefront/model/account/customer.php method validateRegistrationData, line #174
you can remove check for city
if ((strlen(utf8_decode($data['city'])) < 3) || (strlen(utf8_decode($data['city'])) > 128)) {
$error['city'] = $this->language->get('error_city');
}
or just comment.
Also you can open file public_html/storefront/controller/pages/account/create.php
and change 'required' => true by 'required' => false
$this->data['form'][ 'city' ] = $form->getFieldHtml( array(
'type' => 'input',
'name' => 'city',
'value' => $this->request->post['city'],
'required' => true ));
-
first of all sorry for bringing this old post back to life again but I got a series of question. I've been searching for a way to remove address from registration in my previous CMS without any luck (since I'm selling only downloadable goods) and I guess I'll convert to AbanteCart now.
I've tried the last way "'required' => false" and event tough required star where removed, when I click continue the usual errors came up when I left those fields empty. ofc adding the first way and removing check fixed that.
Now my fist two question is: can I remove all addresses from registration without facing any problem in core functions? and where I can find the file to rearrange the register page and remove address fields?
next question is: what about guest checkout?