agnostack / magento_extension Goto Github PK
View Code? Open in Web Editor NEWZendesk's Magento 1 extension
License: Other
Zendesk's Magento 1 extension
License: Other
Currently, a lot of stuff is logged. Our log file becomes approx. 500 MB in 14 days. Could you either massively reduce logging or add an option to disable (debug) logging?
cant find any option for whatsapp notification or starting a new conversation
First, thanks for everyone's work on this. This module is very useful. However, I personally feel that the architecture of models is too much astray from core Magento modeling conventions.
For example, Mage::getModel('zendesk/api_tickets')->get(1)
loader ought to instead have its method named load
as in Mage_Core_Model_Abstract
.
Also, Zendesk_Zendesk_Model_Api_Abstract::_call
should really be part of a resource model, as to emulate the data mapper design patterns of Magento.
In following these kinds of patterns, this module will be much easier to extend and develop with, as developers will have a natural syntax to follow.
magento_extension/src/app/code/community/Zendesk/Zendesk/Helper/Data.php
Lines 697 to 702 in 047a2c8
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.magento_extension/src/app/code/community/Zendesk/Zendesk/Helper/Data.php
Lines 575 to 580 in 047a2c8
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.magento_extension/src/app/code/community/Zendesk/Zendesk/Helper/Data.php
Lines 686 to 691 in 047a2c8
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.Because of security reasons we have changed the default admin path for the backend (URL) within our local.xml.
I noticed that it is not possible to connect the API from Zendesk to Magento when this is not '.../admin'.
I found an entry within the file '/app/code/community/Zendesk/Zendesk/conrollers/ApiController.php'
I've been trying to make some changes but this isn't working.
However, when I use the default settings it's able to connect:
Any ideas? Thank you
I couldn't find any further information about the version requirements so i'm gonna ask it over here.
The ZenDesk documentation page mentions that the module/plugin requires PHP v5.5+. We are running 5.4 and haven't seen any problem yet, so far.
Am i going to get those later when some piece of code is executed which really needs PHP 5.5?
My guess is that development for this module has been on 5.5 and older versions hasn't been tested. For the sake of ease, version 5.5+ was mentioned.
Thanks in advance
I add after this code for show in the widget the same language always, but doesn't work:
<script> zE(function() { zE.setLocale('es-419'); }); </script>/app/code/community/Zendesk/Zendesk/data/zendesk_setup/data-upgrade-2.0.5-2.0.6.php
src/app/code/community/Zendesk/Zendesk/data/zendesk_setup/data-upgrade-1.4.2-2.0.0.php
src/app/code/community/Zendesk/Zendesk/Model/Observer.php
May be I made something wrong?
When no default global details are saved, the extension doesn't work. For this to work we'd need to enable API tokens to be generated at a store level.
Using version 2.3.1 and getting this error.
PHP Fatal error: Uncaught Error: Call to a member function getBackend() on boolean in /app/code/core/Mage/Eav/Model/Entity/Abstract.php:816#012Stack trace:#12#0
/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1377): Mage_Eav_Model_Entity_Abstract->isAttributeStatic('zendesk_id')#12#1
/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(321): Mage_Eav_Model_Entity_Collection_Abstract->_getAttributeConditionSql('zendesk_id', Array, 'left')#12#2
/app/code/community/Zendesk/Zendesk/Model/Customer.php(12): Mage_Eav_Model_Entity_Collection_Abstract->addAttributeToFilter('zendesk_id', Array, 'left')#12#3
/app/code/local/Aoe/Scheduler/Model/Observer.php(75): Zendesk_Zendesk_Model_Customer->syncronize(Object(Aoe_Scheduler_Model_Schedule))#12#4 /app/code/core/Mage/Core/Model/App.php(1358): Aoe_Scheduler_Model_Observer->dispatch(Object(Vari in
/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816
magento_extension/src/app/code/community/Zendesk/Zendesk/Helper/Data.php
Lines 576 to 581 in 047a2c8
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.If a Customer doesn't exists, the API response with the Code 404
.
Technically this is correct, but if you monitor your server requests it's confusing, because you can't differentiate between "real" 404 and the 404 from the API.
Is there a way to "fix" this?
Should the log
action not be a part of the ACL config in Zendesk_Zendesk_Adminhtml_ZendeskController::_isAllowed()
?
On our specific environment, the Magento app inside Zendesk was not able to connect. I fixed it by adding the following lines to Zendesk_Zendesk_ApiController
:
if (!$tokenString && isset($_SERVER['REDIRECT_REMOTE_USER'])) {
$tokenString = $_SERVER['REDIRECT_REMOTE_USER'];
}
Hi. Is the extension compatible with Magento Commerce v2.3.2
The latest release was more than one year ago.
When setting "Create tickets from Contact Us form" to "No" and saving it then this sets "Send Emails To" of contact form to NULL which in essence means that the contact form won't send emails to any address.
In the api controller there is a method authorise which checks if the token provided is valid. The code does a regular expression
preg_match('/Token token="([a-z0-9]+)"/', $tokenString
The tokens I repeatedly generated in Zendesk contain both uppercase and lowercase letters. I don't understand in the current code how it would work for anyone unless they were lucky enough to get a token containing only lowercase letters.
The expression should be modified as such /Token token="([a-zA-Z0-9]+)"/
magento_extension/src/app/code/community/Zendesk/Zendesk/Helper/Data.php
Lines 475 to 480 in 047a2c8
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.When visiting the Zendesk > Dashboard page in the admin 2 Strict notices appear in system.log
Strict Notice: Only variables should be passed by reference in /app/code/community/Zendesk/Zendesk/Block/Adminhtml/Dashboard/Grids.php on line 72
Strict Notice: Only variables should be passed by reference in /app/code/community/Zendesk/Zendesk/Block/Adminhtml/Dashboard/Grids.php on line 76
using version 1.4.0 of the extension in magento EE 1.12.0.2
PHP 5.4.4-14+deb7u5 (cli) (built: Oct 3 2013 09:24:58)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
Notes
To be able to reproduce this, at least 1 view must be chosen under Zendesk > Configuration ("Views to show on dashboards")
When one changes Zendesk's host mapping from "yourdomain.zendesk.com" to "yoursubdomain.yourdomain.com" or any other "yourdomain.com" through Zendesk's settings, under "Account" > "Branding" > "Host Mapping", the Zendesk Magento extension can use the new host mapping as the "Zendesk Domain" under the "General" configuration of the extension. The API and mostly everything works except one thing...
If one also selects "Yes" for "Create tickets from Contact Us form" in the Zendesk Magento extension, under the "Customer Frontend" configuration, this silently changes the Contact Us form's email to "[email protected]" or "[email protected]". This email might not exist which leads to lots of missing Contact Us form submissions. The "Zendesk Domain" should enforce only "yourdomain.zendesk.com" URLs or check for the "yourdomain.zendesk.com" using the API and set the Contact Us form email as such.
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.Because of patch, Mage_Adminhtml_Controller_Action::_isAllowed()
changed from a default true
to Mage::getSingleton('admin/session')->isAllowed('admin')
. Extensions should now override this method in order to work for custom ACL users.
Quick fix is adding the following to ZendeskController.php
:
protected function _isAllowed() {
return true;
}
The Zendesk plugin should use proper ACL for this, like: return Mage::getSingleton('admin/session')->isAllowed('ENTER RESOURCE IDENTIFIER HERE');
magento_extension/src/app/code/community/Zendesk/Zendesk/Helper/Data.php
Lines 459 to 464 in 047a2c8
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.Hi Team,
Anything we need to do the update for CSP(Content Security Policy)?
Thanks,
Jeeva
We had some customer e-mail addresses with invalid chars in it that somehow ended up in Magento. I don't know how they got there, because Magento wouldn't normally accept those. Anyway, it caused the initial sync to fail at those customers, because Zendesk didn't accept the invalid address.
The actual problem is that when you run the sync again (after I fixed those invalid addresses), it tries to create the Zendesk user fields again, while they already exist from the initial (failed) sync and exits with an error ('Key: has already been taken').
I worked around it by deleting the user fields in Zendesk, but maybe the sync should store that those fields have been created earlier in the sync to prevent this.
Extension stuffs a Zendesk logo at the top of the admin configuration page in the Magento admin. However, the image is served from a Zendesk server, not the Magento system. The URL to the logo is hardcoded to use HTTP, but (hopefully) all Magento admin run over a secure connection.
The URL is at https://github.com/zendesk/magento_extension/blob/master/src/skin/adminhtml/default/default/zendesk/zendesk.css#L37
h3.zendesk-header {
background: url(http://cdn.zendesk.com/images/zendesk-logo.png) no-repeat scroll 0 0 transparent;
height: 65px;
overflow: hidden;
padding: 0;
text-indent: -9999px;
width: 200px;
}
Ideally, the image should be served locally. Suggested fix would be to add the image to the skin directory and change the line code to:
h3.zendesk-header {
background: url(zendesk-logo.png) no-repeat scroll 0 0 transparent;
height: 65px;
overflow: hidden;
padding: 0;
text-indent: -9999px;
width: 200px;
}
Hi,
We are having problems with API URL generation because we are using different sub-domains for the frontend and backend. This is core functionality that should ideally be supported. It's used often on multi-server setups where the admin panel might work on a separate server to the frontend.
For example:
http://www.example.com/ (frontend)
https://adminpanel.example.com/ (backend)
You are using a frontend router for the API controller, which is only loaded in the frontend.
When I am in the admin panel this method:
class Zendesk_Zendesk_Block_Adminhtml_Config_Buttons_MagentoTest extends Mage_Adminhtml_Block_System_Config_Form_Field
{
public function getTestUrl()
{
return Mage::getUrl('zendesk/api/users/1');
}
}
Links to https://adminpanel.example.com/zendesk/api but it should be linking to http://www.example.com/zendesk/api. I'm not sure what other issues exist with the module as I haven't been able to get as far as getting SSO and the order callbacks working yet.
Could I ask that you test your module with a different front/backend domain name please?
Many thanks
I've got warning in system.log
Warning: Division by zero in app/code/community/Zendesk/Zendesk/Model/Observer.php on line 173
I run a lot of unit tests which do not cause the frontcontroller to be inited/dispatched. These tests break when certain events require design & layout be loaded.
The above referenced code runs when layouts are loaded and it looks to the front controller to determine an active handle/route path.
This assumes that Mage_Core_Model_App::run() is called, which is only necessary if you are dispatching an http request. Shell scripts, cron jobs, unit tests for example, may have some need to load layout but not run a full request->response cycle.
I think the easiest solution here would be simply to do an if check on the frontController being an instance of Mage_Core_Controller_Varien_Front before trying to access the getActionName var.
"Create tickets from Contact Us form" is set to "Yes" yet it does not seem to do anything when a contact form submission is sent.
Things that should be update
I haven't looked into what is causing it, but while this module is enabled we are unable to place orders under customer accounts who have thousands of orders because it exceeds the PHP memory limit.
If i find anything i will update.
I've search for this on the new Magento Connect and it isn't listed. Thus people can install remotely and are required to manually install. Yes, I know... people can manually install it but for those who prefer to go through connect and also allow for updates to show up, manually isn't the best way.
On a side note, great magento extension, thank you for the hard work!!!!!
Cheers!
The link of the web portal configuration in Magento / zendesk / configuration / support channels appears to be linking to an outdated URL: https://mycompany.zendesk.com/settings/portal
the web portal has been deprecated and has been replaced by helpcenter: https://support.zendesk.com/hc/en-us/articles/203664396-Migrating-from-the-Web-portal-to-the-Help-Center
The new URL would loook like: https://mycompany.zendesk.com/hc/admin/general_settings ?
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.Older snippet code is built here if not in config: https://github.com/zendesk/magento_extension/blob/master/src/app/code/community/Zendesk/Zendesk/Model/Observer.php#L85
and is inserted into config using this upgrade script:
https://github.com/zendesk/magento_extension/blob/master/src/app/code/community/Zendesk/Zendesk/data/zendesk_setup/data-upgrade-2.0.5-2.0.6.php
Can you publish your module to packagist.org to allow simple: composer require zendesk/magento1-zendesk
or composer require zendesk/openmage-zendesk
?
Currently waiting on translations.
I receive this message when I test connection on backend
https://gyazo.com/069a7d1c2b238603bdf8885ebe97b9d2
And the logs says:
Call to https://xxx.zendesk.com/api/v2/users/me.json resulted in: Invalid chunk size "" unable to read chunked body
It works when I test connection using curl -u. It doesn't work in Magento, but works in curl.
I also clear the 2 empty spaces that the API generates (at the begin and at the end, it generates two empty spaces while copy and paste).
2017-01-27T15:11:12+00:00 DEBUG (7): Array
(
[url] => https://abc.zendesk.com/api/v2/tickets.json
[method] => POST
[data] => {"name":"test","email":"[email protected]","telephone":"666565","comment":"ta adsdtas comments","hideit":"","description":"ta adsdtas comments"}
)
2017-01-27T15:11:13+00:00 DEBUG (7): array (
'error' => 'RecordInvalid',
'description' => 'Record validation errors',
'details' =>
array (
'base' =>
array (
0 =>
array (
'description' => 'Description: cannot be blank',
'error' => 'BlankValue',
'ticket_field_id' => 21414565,
'ticket_field_type' => 'FieldDescription',
),
),
),
)
When i call Mage::getModel('zendesk/api_tickets')->create($pData); it gives me above error response in zendesk.log file. I am missing something there?
magento_extension/src/app/code/community/Zendesk/Zendesk/Helper/Data.php
Lines 696 to 701 in 047a2c8
TODO
comment in 047a2c8 when #164 was merged. cc @agnostack.When saving in the system > configuration, if system is camel case sensitive, then there is an error.
TO fix it, you need to either rename in /app/code/community/Zendesk/Zendesk/Model/Api "ConfigSets.php" by Configsets.php or change all reference "zendesk/api_configsets" by "zendesk/api_configSets"
Best,
Gabriel.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.