community store: Change position for zip / city fields
Permalink
Im setting up the community store from github. Everything works really great.
For europe i like to change the position of some address fields. I could manage it for the checkout form. But not for the showed address after it is safed in the checkout process.
Ho can i change the order of zip before city there? Has anyone an advice for this?!
thanks a lot,
Roland
For europe i like to change the position of some address fields. I could manage it for the checkout form. But not for the showed address after it is safed in the checkout process.
Ho can i change the order of zip before city there? Has anyone an advice for this?!
thanks a lot,
Roland
Thanks for your answer appliculture! Happy birthday Switzerland :-)
Yes i did this already. An could change the fields for the forms. That was obvious for me. But when you fill out the forms and go one step further the address for the bill ist visible ase one output (city, zip). And here I didn't found where to change the position (Also for eMail).
best regards, Roland
Yes i did this already. An could change the fields for the forms. That was obvious for me. But when you fill out the forms and go one step further the address for the bill ist visible ase one output (city, zip). And here I didn't found where to change the position (Also for eMail).
best regards, Roland
Hello,
on the last step, the address is taken from the user object. It's the function getAddress() in the file src/CommunityStore/Customer/Customer.php
You would need to find a way to override that file though and I am not sure if it's even doable.
Since you are already overriding the single page, maybe you could also override the controller, put the getAddress function there and call it like that. Frankly, I don't know if it's a viable option but that's all I can think of right now.
on the last step, the address is taken from the user object. It's the function getAddress() in the file src/CommunityStore/Customer/Customer.php
You would need to find a way to override that file though and I am not sure if it's even doable.
Since you are already overriding the single page, maybe you could also override the controller, put the getAddress function there and call it like that. Frankly, I don't know if it's a viable option but that's all I can think of right now.
Thank you mnakalay
I could change the address there. Great!
Do I see this correctly: i can't override this file by using a folder in applications?
I could do it with the checkout form by adding the file in /applications/single_pages/checkout.php
But the the Customer.php is in a src-folder from the package and could not be overritten, right?
best regards, roland
I could change the address there. Great!
Do I see this correctly: i can't override this file by using a folder in applications?
I could do it with the checkout form by adding the file in /applications/single_pages/checkout.php
But the the Customer.php is in a src-folder from the package and could not be overritten, right?
best regards, roland
that's also my understanding but to be honest, a lot of things about overriding in 5.7 are not that clear yet and there might be a way but nobody seems to know about it.
You can create your own version of this file by copying /packages/community_store/single_pages/checkout.php to /application/single_pages/checkout.php and make your modifications there..
Mikhaél
ps. great to see that we are several people working with C5 in Switzerland