Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/app/functions/fn.products.php b/app/functions/fn.products.php
index 8f6f692ddf..571518b9bc 100644
--- a/app/functions/fn.products.php
+++ b/app/functions/fn.products.php
@@ -358,6 +358,10 @@ function fn_get_product_data(//phpcs:ignore Squiz.Commenting.FunctionComment.Typ
$product_data['product_features'] = fn_get_product_features_list($product_data, ProductFeaturesDisplayOn::ALL);
}
+ if ($product_data['company_id']) {
+ $product_data['company_name'] = fn_get_company_name($product_data['company_id']);
+ }
+
$product_data = fn_normalize_product_overridable_fields($product_data);
$product_data['detailed_params']['info_type'] = 'D';
diff --git a/design/backend/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_button.tpl b/design/backend/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_button.tpl
index 025ce46a03..9ec89621b5 100644
--- a/design/backend/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_button.tpl
+++ b/design/backend/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_button.tpl
@@ -36,7 +36,7 @@
{btn
type="list"
text=$title
- class="cm-dialog-opener cm-dialog-auto-size"
+ class="cm-dialog-opener cm-dialog-auto-size cm-dialog-destroy-on-close"
href=$href
data=["data-ca-dialog-title" => $title]
}
diff --git a/design/backend/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_form.tpl b/design/backend/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_form.tpl
index b87c4f8e5c..56c0450d70 100644
--- a/design/backend/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_form.tpl
+++ b/design/backend/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_form.tpl
@@ -10,7 +10,7 @@
<input type="hidden" name="thread[communication_type]" value="{$communication_type}" />
- <div id="new_message_{$thread_id}" class="add_message_form--wrapper">
+ <div id="new_message_{$object_id}" class="add_message_form--wrapper">
<div class="control-group">
<label for="thread_message_subject_{$object_id}" class="control-label vendor-communication-add-message__title cm-required">{__("subject")}</label>
diff --git a/design/themes/responsive/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_form.tpl b/design/themes/responsive/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_form.tpl
index c8d2f01d99..d63ce615de 100644
--- a/design/themes/responsive/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_form.tpl
+++ b/design/themes/responsive/templates/addons/vendor_communication/views/vendor_communication/components/new_thread_form.tpl
@@ -22,7 +22,13 @@
<div id="new_thread_message_{$object_id}">
<div class="ty-control-group">
- <label for="thread_msg_{$object_id}" class="ty-control-group__title cm-required">{__("vendor_communication.your_message_to_vendor_name", ["[vendor_name]" => $vendor_name])}</label>
+ <label for="thread_msg_{$object_id}" class="ty-control-group__title cm-required">
+ {if $vendor_name}
+ {__("vendor_communication.your_message_to_vendor_name", ["[vendor_name]" => $vendor_name])}
+ {else}
+ {__("vendor_communication.your_message_to_admin")}
+ {/if}
+ </label>
<textarea id="thread_msg_{$object_id}" name="thread[message]" class="ty-input-textarea ty-input-text-large" rows="5" cols="72">{$initial_message}</textarea>
</div>
<!--new_thread_message_{$object_id}--></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment