- Posts: 66
- Thank you received: 1
Custom field Link - default values concatenated
6 years 1 month ago #322811
by yanliom
Custom field Link - default values concatenated was created by yanliom
-- 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
-- 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
Please Log in or Create an account to join the conversation.
6 years 1 month ago #322813
by nicolas
Replied by nicolas on topic Custom field Link - default values concatenated
Hi,
Try adding the code:
before the line:
in the file administrator/components/com_hikashop/classes/field.php and that should fix the problem.
Try adding the code:
Code:
if(strlen(trim($value)) < 1 && !empty($field->field_default))
$value = $field->field_default;
Code:
if(preg_match('#(?:"?([^"]+)"?:)?(https?:\/\/.*)#i', $value, $m)) {
Please Log in or Create an account to join the conversation.
Time to create page: 0.204 seconds