Skip to content

Commit

Permalink
feat: remove legacy zendesk snippets (#2913)
Browse files Browse the repository at this point in the history
* feat: remove legacy zendesk snippets

* refactor: remove unused import
  • Loading branch information
asadali145 authored Mar 27, 2024
1 parent 76cf880 commit 8c76333
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
11 changes: 0 additions & 11 deletions cms/templates/product_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@
{% render_bundle 'header' %}
{% endblock %}

{% block scripts %}
{{ block.super }}
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
if (SETTINGS.zendesk_config.help_widget_enabled) {
zE('webWidget', 'helpCenter:setSuggestions', { search: '{{page.product.title}}'});
}
});
</script>
{% endblock %}

{% block content %}
<div>
{% include "partials/hero.html" %}
Expand Down
16 changes: 0 additions & 16 deletions mitxpro/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,5 @@
});
</script>
{% endblock %}
{% if zendesk_config.help_widget_enabled and not request.path|startswith:'/certificate/' %}
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
if (typeof zE !== 'undefined') {
zE('webWidget', 'prefill', {
name: {
value: '{{user.name}}',
},
email: {
value: '{{user.email}}',
}
});
}
});
</script>
{% endif %}
</body>
</html>
8 changes: 0 additions & 8 deletions static/js/components/forms/CheckoutForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { Modal, ModalHeader, ModalBody } from "reactstrap"

import Markdown from "../Markdown"

import { ZendeskAPI } from "react-zendesk"

import { formatErrors, formatSuccessMessage } from "../../lib/form"
import {
calculateDiscount,
Expand Down Expand Up @@ -249,12 +247,6 @@ export class InnerCheckoutForm extends React.Component<InnerProps, InnerState> {
}

const dataConsent = basket.data_consents[0]
if (SETTINGS.zendesk_config.help_widget_enabled) {
ZendeskAPI("webWidget", "helpCenter:setSuggestions", {
search: item.content_title
})
}

return (
<React.Fragment>
<Form className="checkout-page container">
Expand Down

0 comments on commit 8c76333

Please sign in to comment.