0

I am having problems with the address template, when I add a new client it adds fine, but when registering the addresses it does not do it correctly, it leaves all the instructions for this untranslated, example: Default Billing Address {{depend prefix}} {{var prefix}} {{/ depend}} {{depend middlename}} {{var middlename}} {{/ depend}} {{depend suffix}} {{var suffix}} {{ / depend}} {{depend firstname}} ...

I leave a screenshot enter image description here

asked Feb 11, 2021 at 15:50
1
  • The above solution seems to work by changing the value find in SQL query ,but we need to override this core file. Commented Apr 26, 2022 at 11:40

2 Answers 2

1

A better solution (without any PHP files modifications):

SELECT s.attribute_set_id
 INTO @id
 FROM eav_attribute_set AS s
 INNER JOIN eav_attribute_group AS g
 ON g.attribute_set_id = s.attribute_set_id AND 2 = s.entity_type_id AND 'Default' = s.attribute_set_name
;
DELETE FROM eav_attribute_set WHERE 2 = attribute_set_id;
ALTER TABLE eav_attribute_group DROP FOREIGN KEY EAV_ATTR_GROUP_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID;
ALTER TABLE eav_attribute_group
 ADD CONSTRAINT EAV_ATTR_GROUP_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID
 FOREIGN KEY (attribute_set_id) REFERENCES eav_attribute_set (attribute_set_id) ON DELETE CASCADE ON UPDATE CASCADE
;
UPDATE eav_attribute_set SET attribute_set_id = 2 WHERE @id = attribute_set_id;
UPDATE eav_entity_attribute SET attribute_set_id = 2 WHERE @id = attribute_set_id;
UPDATE eav_entity SET attribute_set_id = 2 WHERE @id = attribute_set_id;

Then flush the Magento's cache.

answered Oct 7, 2022 at 1:14
0

Ok I've solved this issue, maybe it could help someone else, I have to say that I had migrated from M-1.8.1 to M-2.4.0 so I dont know you, but when I did it I had problems with eav_attribute_set table and if you wanted to continous with the migration you had to change Default for Default_1, ..., Default_8 and after migrate all data, in this table you found new records into, well I ran this query in mySQL :

select * from eav_attribute_set as eas inner join eav_attribute_group as eag on eag.attribute_set_id=eas.attribute_set_id where eas.entity_type_id=2 and eas.attribute_set_name='Default';

I took the value of attribute_set_id and change the file vendor/module-customer/API/ AddressMetadataInterface.php there I changed const ATTRIBUTE_SET_ID_ADDRESS = 2 for ATTRIBUTE_SET_ID_ADDRESS = the value of attribute_set_id that I got in the previous step (in my case was 13)

and that's it

I know is not a good practice change files in magento core, so you should do it in your child theme.

Maybe you should read this https://github.com/magento/magento2/issues/5873

answered Feb 16, 2021 at 22:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.