Custom field Link - default values concatenated

  • Posts: 64
  • Thank you received: 1
  • Hikashop Business
3 years 8 months ago #322811

-- url of the page with the problem -- : www.seemybag.gr/
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.20

Hello,

I'm using default values for my link custom field. For the Url and for the Text.

When I edit the values of the custom field in the Order form the values for Text and Url are concatenated.

Example default values:
-Text: "Click here"
-Url: " example.com "

Result:
-Text: "Click here:https://example.com"
-Url: "Click here:https://example.com"

See attached screenshots.

Yannis



Attachments:

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 8 months ago #322813

Hi,

Try adding the code:

if(strlen(trim($value)) < 1 && !empty($field->field_default))
			$value = $field->field_default;
before the line:
if(preg_match('#(?:"?([^"]+)"?:)?(https?:\/\/.*)#i', $value, $m)) {
in the file administrator/components/com_hikashop/classes/field.php and that should fix the problem.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum