Skip to content

Instantly share code, notes, and snippets.

@csavoronin
Created October 28, 2024 05:21
Show Gist options
  • Save csavoronin/414ffadc9872e186a2afc7ee14557077 to your computer and use it in GitHub Desktop.
Save csavoronin/414ffadc9872e186a2afc7ee14557077 to your computer and use it in GitHub Desktop.
[!] CS-Cart: Add-ons: Comments and reviews: Administrator can't add post for category. Fixed.
diff --git a/design/backend/templates/addons/discussion/views/discussion_manager/components/discussion.tpl b/design/backend/templates/addons/discussion/views/discussion_manager/components/discussion.tpl
index 53872d42c8ee7de6ccfe0fa5f0f40e98eae7c7ef..090b00caf755b66962c01c96973ebc14c358b2d4 100644
--- a/design/backend/templates/addons/discussion/views/discussion_manager/components/discussion.tpl
+++ b/design/backend/templates/addons/discussion/views/discussion_manager/components/discussion.tpl
@@ -5,11 +5,11 @@
{$is_allowed_to_bulk_delete_reviews = fn_check_permissions("discussion", "m_delete", "admin")}
{$is_owned_object = $runtime.company_id == $object_company_id}
{$is_company_reviews = $discussion.object_type === "Addons\Discussion\DiscussionObjectTypes::COMPANY"|enum}
- {$allow_save = $is_allowed_to_update_reviews && !($runtime.company_id && (!$is_owned_object || $is_company_reviews))}
+ {$allow_save = $is_allowed_to_update_reviews && !("MULTIVENDOR"|fn_allowed_for && $runtime.company_id && (!$is_owned_object || $is_company_reviews))}
<div class="{if $selected_section !== "discussion" && $runtime.controller !== "discussion"}hidden{/if}" id="content_discussion">
<div class="clearfix">
<div class="buttons-container buttons-bg pull-right">
- {if $is_allowed_to_add_reviews && !($runtime.company_id && (!$is_owned_object || $is_company_reviews))}
+ {if $is_allowed_to_add_reviews && !("MULTIVENDOR"|fn_allowed_for && $runtime.company_id && (!$is_owned_object || $is_company_reviews))}
{if $discussion.object_type == "Addons\Discussion\DiscussionObjectTypes::TESTIMONIALS_AND_LAYOUT"|enum}
{capture name="adv_buttons"}
{include file="common/popupbox.tpl"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment