onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Urgent: Price on Request #606

Closed fredericalpers closed 1 year ago

fredericalpers commented 1 year ago

Current state

(1) in #492 we removed price on request from the field list, this is now causing problems in customized templates so that price on request is not displayed at all or prices are partially visible.

In these templates we use the following line of code e.g.:

<?php if(strtolower($currentEstate['preisAufAnfrage']) === 'ja' || strtolower($currentEstate['preisAufAnfrage']) === 'yes' || strtolower($currentEstate['preisAufAnfrage']) === 'si') { ?>

(2) Also the following code does not check for lower or uppercases, which can cause problems as well:

private function displayTextPriceOnRequest($recordModified, $field){ if($recordModified['preisAufAnfrage'] === __("Yes", "onoffice-for-wp-websites") && !empty($recordModified[$field])) { $recordModified[ $field ] = esc_html__('Price on request', 'onoffice-for-wp-websites'); } }

Desired state

(1) Price on request must be added back to the field list for the above query to work. See screenshot below. Backwards compatibility must also be given for all other possibilities if the field is also added to the field list.

preisAufAnfrage-old

(2) Please also implement a check for lowerCase for all strings.

fredericalpers commented 1 year ago

@yeneastgate @dai-eastgate please prioritize this issue, so we can release it with v4.13

dai-eastgate commented 1 year ago

@fredericalpers Ok, I got it. We will check and fix it asap.

dai-eastgate commented 1 year ago

@fredericalpers I would like to confirm with you that the backward compatibility you mentioned means:

  1. checkbox "Show price on request" activated & field "price on request" is not added to the field list => "price on request" feature works
  2. checkbox "Show price on request" deactivated & field "price on request" is added to the field list => "price on request" feature works
  3. checkbox "Show price on request" activated & field "price on request" is added to the field list => "price on request" feature works
  4. checkbox "Show price on request" deactivated & field "price on request" is not added to the field list => "price on request" feature doesn't work. Please let me know your opinion about this, thanks!

By the way, the "check for lowerCase for all strings" will be checked only in the "price on request" function, right?

fredericalpers commented 1 year ago

@fredericalpers I would like to confirm with you that the backward compatibility you mentioned means:

  1. checkbox "Show price on request" activated & field "price on request" is not added to the field list => "price on request" feature works
  2. checkbox "Show price on request" deactivated & field "price on request" is added to the field list => "price on request" feature works
  3. checkbox "Show price on request" activated & field "price on request" is added to the field list => "price on request" feature works
  4. checkbox "Show price on request" deactivated & field "price on request" is not added to the field list => "price on request" feature doesn't work. Please let me know your opinion about this, thanks!

By the way, the "check for lowerCase for all strings" will be checked only in the "price on request" function, right?

yes, please go ahead and try to fix it. Thank you :)

dai-eastgate commented 1 year ago

Hi @fredericalpers, @andernath: (1) Price on request must be added back to the field list for the above query to work. See screenshot below. Backwards compatibility must also be given for all other possibilities if the field is also added to the field list. => Backwards compatibility is fixed for all other possibilities if the field is also added to the field list. (2) Please also implement a check for lowerCase for all strings. => We have redirected to check condition in another way so this logic will be removed. I also recorded a video, please watch this and let me know your opinion. Thanks! https://files.fm/u/79rdprv8n

fredericalpers commented 1 year ago

Hi @fredericalpers, @andernath: (1) Price on request must be added back to the field list for the above query to work. See screenshot below. Backwards compatibility must also be given for all other possibilities if the field is also added to the field list. => Backwards compatibility is fixed for all other possibilities if the field is also added to the field list. (2) Please also implement a check for lowerCase for all strings. => We have redirected to check condition in another way so this logic will be removed. I also recorded a video, please watch this and let me know your opinion. Thanks! https://files.fm/u/79rdprv8n

Looks good! We will review it in depth on monday, thank you :)

fredericalpers commented 1 year ago

Merge and ready for release.