| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Checkout Menu | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I have an issue for my x-cart 5.3.1 site. In the checkout menu I want to change the field 'city' from input text into a drop-down and populate the <selected> option with data from my data base just like country field.
I'm new with X-Cart 5.3, anyone can help me with some advice.
__________________
alex |
|||||||
#2
|
|||||||||
|
|||||||||
![]() It depends on how you want the field to behave.
If you search the source code for "state_id" word, you'll get the idea of how many files must be edited to make the field work exactly like the state field does at the moment. However, you may try to replace the input field with a select box without changing the database structure. This will require a custom module. If you decide to try this, the files you should look into are skins/customer/address/form/body.twig and classes/XLite/View/Address.php. I believe you will have to "decorate" \XLite\View\Address::getSchemaFields() method and make it return your custom field class (extended from \XLite\View\FormField\Select\ASelect).
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|