Giter Club home page Giter Club logo

magento_extension's People

Contributors

7ochem avatar agrohs avatar buheryfi avatar chnorton avatar dadah89 avatar danielbreves avatar iandjx avatar jeremiahcurrier avatar joseconsador avatar kaipiyann avatar manted avatar mhhansen avatar miogalang avatar mmolina avatar mystix avatar nghiwill avatar oscar-wagento avatar pdeuter avatar rgranadino avatar rjocoleman avatar rsbowers avatar samgavinio avatar schumacherfm avatar spinsch avatar sr972 avatar steved avatar string-sweep avatar thekindofme avatar vbuck avatar yoshdog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento_extension's Issues

Make Logging Optional / Reduce Logging

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?

whatsapp

cant find any option for whatsapp notification or starting a new conversation

Re-architect models

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.

is this only always payment? or can this be refund?

'type' => $transactionData['txn_type'], //TODO is this only always payment? or can this be refund?
'reference' => $transactionData['txn_id'], //TODO validate this is the correct value
'gateway' => $gateway, //TODO validate this is the correct value
'status' => $payment->getCcCidStatus(), //TODO validate this is the correct value
'meta' => array(
'display_price' => $this->formatPrice($transactionAmount, $currency),


This issue was generated by todo based on a TODO comment in 047a2c8 when #164 was merged. cc @agnostack.

get without tax

'without_tax' => $this->formatPrice($order->getGrandTotal() - $order->getTaxAmount(), $currency), // TODO: get without tax
'tax' => $this->formatPrice($order->getTaxAmount(), $currency) // TODO: get tax
),
'timestamps' => array(
'created_at' => $order->getCreatedAt(),
'updated_at' => $order->getUpdatedAt(),


This issue was generated by todo based on a TODO comment in 047a2c8 when #164 was merged. cc @agnostack.

Connection to API - different admin path URL not working

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'.

image 2015-07-09 at 10 58 24 vorm

I found an entry within the file '/app/code/community/Zendesk/Zendesk/conrollers/ApiController.php'
image 2015-07-09 at 10 54 45 vorm

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:

image 2015-07-09 at 11 00 10 vorm

Any ideas? Thank you

Is PHP 5.5 really the minimum required version?

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

Widget specific language

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?

PHP Fatal error: Uncaught Error: Call to a member function getBackend() on boolean

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

API Response Code

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?

Magento app unable to connect (i.e., authorise)

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'];
}

Compatibility Question

Hi. Is the extension compatible with Magento Commerce v2.3.2
The latest release was more than one year ago.

Token regular expression is case sensitive

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]+)"/

Strict notices when visiting admin grid page

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")

Zendesk Host Mapping - Email Misconfiguration

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.

SSO not working after SUPEE-6285 patch

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');

!!!!!!!: read version from config.xml

// TODO!!!!!!!: read version from config.xml
// $configSettings = Mage::getSingleton('Zendesk_Zendesk/config');
// Mage::log(json_encode($configSettings), null, 'zendesk.log');
$this->getResponse()->setHeader('X-Extension-Version', '3.0.0');
return $this;
}


This issue was generated by todo based on a TODO comment in 047a2c8 when #164 was merged. cc @agnostack.

Duplicate User field creation when initial customer sync failed

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.

Broken HTTPS when viewing admin config

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;
}

Different subdomain for frontend/backend cause module issues

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

Warning: Division by zero

I've got warning in system.log
Warning: Division by zero in app/code/community/Zendesk/Zendesk/Model/Observer.php on line 173

Assumption Mage::app()->getFrontController() is set

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.

https://github.com/zendesk/magento_extension/blob/master/src/app/code/community/Zendesk/Zendesk/Model/Observer.php#L23

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.

readme files updates

Things that should be update

  • API calls possible
  • New translations
  • Contribution

Memory leak on admin order creation

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.

Magento Connect not listing this...

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!

Composer and Packagist

Can you publish your module to packagist.org to allow simple: composer require zendesk/magento1-zendesk or composer require zendesk/openmage-zendesk ?

Invalid chunk size "" unable to read chunked body

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).

Description: cannot be blank

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?

validate this is the correct value

'id' => $transactionData['transaction_id'], //TODO validate this is the correct value
'type' => $transactionData['txn_type'], //TODO is this only always payment? or can this be refund?
'reference' => $transactionData['txn_id'], //TODO validate this is the correct value
'gateway' => $gateway, //TODO validate this is the correct value
'status' => $payment->getCcCidStatus(), //TODO validate this is the correct value
'meta' => array(


This issue was generated by todo based on a TODO comment in 047a2c8 when #164 was merged. cc @agnostack.

Camel case error.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.