Jump to content

[SOLVED] Customer cannot change or create address


Recommended Posts

Hi!

 

I have following problem: When costumer tries to change address it returns error: dni is invalid. I don't even need this field. The very same code runs on my local computer without any problem. How is this possible? I have tried to solve it with removing required class but this has no effect.

 

So my question is: how to disable dni?

Edited by Bassman's (see edit history)
Link to comment
Share on other sites

It's 1.5.4.1.

 

Actually if i change address format it returns errors for missing/invalid values there too.

  • country ID is invalid
  • address2 is invalid
  • phone is invalid
  • dni is invalid
  • invalid token
  • The field address2 is required.
  • The field phone is required.
  • The field dni is required.

 

I want the address to look like:

firstname lastname

address1
address2
postcode city
 
So i do not need country ID since it's one-country-store for now, address 2 and phone should be optional and i do not need dni or it should be optional.
  •  
Edited by Bassman's (see edit history)
Link to comment
Share on other sites

It was working perfectly for a while. But than it just stopped. No, use my own theme which is generally just visually modified default theme. I have change it to original default theme and tried again but with no effect. I wasn't changing any classes or controllers neither address.tpl. I tried also with replacing files with backup files from the day of installation. Nothing.

 

I have changed only address format in back-office but that worked fine.

 

Are there any tables in database that could contain format that require dni, countryID and address2? I could try to update it to 1.5.6 but I am kind of affraid that this will overwrite my translations that i've been creating for a long time.

 

At this point I have no idea what has gone wrong.  :)

Link to comment
Share on other sites

On local server i get Notice - i don't know if this is relevant, however, i'll just post it.
 
Notice: Undefined index: in D:\wamp\www\prestashop\cache\smarty\compile\4338b576cf8e60467cfc928aff26296fb4067730.file.addresses.tpl.php on line [/size]204
 
Line 204 is

<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['address']->value['formated'][smarty_modifier_replace($_smarty_tpl->tpl_vars['key']->value,',','')], 'htmlall', 'UTF-8');?>
Link to comment
Share on other sites

Problem was in database!!!! Somehow those required fields ended up in table ps_required_field. Finally, after few weeks torturing. I wish someone told me that I could check this table ... Anyhow, case is closed although that I has monologue in this thread. But another question remains: how was that even possible. What stored those values in that table?

Edited by Bassman's (see edit history)
  • Like 1
Link to comment
Share on other sites

At prestashop forge i was told thath under the customer listings is button that says "Set required fields for this section". I've never seen that before so someone with access to the store must have been messing around with that. All questions are answered now.

Link to comment
Share on other sites

  • 11 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...