State display order issue (Membership Pro 2.25.1 on Joomla 4.0.3)

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #147232 by hide10
I'm currently testing Membership Pro 2.25.1 on Joomla 4.0.3. I noticed that the states in the new Membership Pro have Japanese prefectures registered. Also, the order of states_2_code is correct according to Japanese customs.

In a previous topic you provided me with an override file for register.php. However, register.php has been significantly modified in the latest Membership Pro.

I modified this register.php as follows and tested it (line: 356-362). However, the pull-down menu does not display in the order of states_2_code.
Code:
//get state         $query->clear()             ->select('state_2_code AS value, state_name AS text')             ->from('#__osmembership_states')             ->where('country_id=' . (int) $countryId)             ->where('published = 1')             ->order('state_2_code');

Would you please provide a new modified file of register.php?

P.S.
At this point, I haven't checked state.php, but I probably need that file as well.

register.php
components/com_osmembership/controller/override/register.php
state.php
administrator/components/com_osmembership/libraries/mpf/form/field/state.php

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #147236 by Tuan Pham Ngoc
Hello

You are right. Since you have file register.php overriden, the modification to components/com_osmembership/controller/register.php does not have effect anymore

You should also modified the file administrator/components/com_osmembership/libraries/mpf/form/field/state.php

Please do the modification and let us know if you need more help

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #147244 by hide10
Hi Tuan,

Thank you for sending me the appropriate information. My issue was solved!

Thanks!

Please Log in or Create an account to join the conversation.

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 9 months ago #147857 by hide10

You should also modified the file administrator/components/com_osmembership/libraries/mpf/form/field/state.php


Is it possible to use override for modifying state.php?

Thanks

Please Log in or Create an account to join the conversation.

More
3 years 9 months ago #147858 by Tuan Pham Ngoc
Sorry. That field could not be overridden
The following user(s) said Thank You: hide10

Please Log in or Create an account to join the conversation.