GithubHelp home page GithubHelp logo

dotmailer / dotmailer-magento-extension Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 27.0 3.32 MB

The official Engagement Cloud for Magento extension

Home Page: https://dotdigital.com/integrations/magento

License: MIT License

PHP 87.51% HTML 6.02% JavaScript 4.43% XSLT 1.93% CSS 0.11%
magento email transactional-emails cart dotmailer newsletter magento-extension transaction-data

dotmailer-magento-extension's People

Contributors

adeelq avatar andrewgretton avatar bsstaveley avatar cdiacon avatar dotzygis avatar jasperzeinstra avatar maikel-koek avatar obsergiu avatar paulpartington-cti avatar sertlab avatar sharath-kumar avatar simon-letch avatar sta1r avatar trglen avatar

Stargazers

 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

dotmailer-magento-extension's Issues

Aggregated data (beta)

Enabling the following core magento functionality:

System > Sales > Dashboard > Aggregated data (beta)

Causes our Dashboard under Marketing automation not to load. Even though the feature in Magento is in Beta we should look into why this happens and resolve it.

Transactional data discontinued

Sync setting will always show the data "Not enabled in account" for :

  • Order Sync
  • Quote Sync
  • Wishlist Sync
  • Review Sync
  • Catalog Sync

Imports table clean

We have to clean the importer table using the cleaner cronjob ddg_automation_cleaner.

This will include all imports older then a month.

Order Contents - Review displays a blank screen

According to Magento's system.log, the following error is produced
ERR (3): Warning: include(Dotdigitalgroup/Email/Helper/Review.php): failed to open stream: No such file or directory in /routeToMagentoWebSite/lib/Varien/Autoload.php on line 94

ERR (3): Warning: include(): Failed opening 'Dotdigitalgroup/Email/Helper/Review.php' for inclusion (include_path='/routeToMagentoWebSite/app/code/local:/routeToMagentoWebSite/app/code/community:/routeToMagentoWebSite/app/code/core:/routeToMagentoWebSite/lib:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /routeToMagentoWebSite/lib/Varien/Autoload.php on line 94

Connot add/edit Transactional Emails are installing v5.1.0

I get error 500 after attempting to create new transactional emails or edit existing ones in the Magento admin System > Transactional Emails
This was working in v5.0.4.
Looking at the logs, this error gets thrown...
exception 'Mage_Core_Exception' with message 'Invalid block type: ddg_automation/system_email_template_edit' in /chroot/home/pexwhole/prelaunch.pexwholesale.co.uk/html/app/Mage.php:595

System.xml fields hidden when store views are selected

There are certain fields which should be (and are marked as) available on the store view scope, but the section and/or group are marked as only show for website and show for default. If the parent is hidden, the child won't be seen. This is especially important with abandoned carts (<connector_lost_baskets>) as we were unable to select different abandoned cart trigger emails for our multilingual site.

Abandoned Carts config level change to store view

Customers section config in Abandoned Carts config tab can be set on store view level but Abandoned Carts tab is only set to be visible on website level which make it impossible for Customers section config to be set on store view level.

Improved Importer

This is making alterations to improve 2 things, adding priority to contacts syncing as this is the most valuable data to a merchant. And allowing multiple bulk syncs to occur at the same time to improve performance with large or multi website instances.

Subscriber_updated records filling up email_importer

On a fresh install into a dotmailer account that already contains a suppression list can sometimes result in the email_importer being filled with subscriber_updated.

Reason being when a contact sync is processed we receive a fault file from dotmailer of contacts who are suppressed. We then update the core newsletter subscriber table that the contact is unsubscribed. As a result we trigger the subscriber save after event, which we observe resulting in a row being added to email_importer. These imports then fail as the contact is suppressed.

The observer on this event needs to be updated to ignore subscriber updates on unsubscribed contacts to stop this from occurring.

Import Automation Job code generates warning

This is the warning:

Warning: chdir(): No such file or directory (errno 2) in /opt/magento/htdocs/lib/Varien/Io/File.php on line 497

The warning could be avoided with following change
screen shot 2015-12-03 at 15 12 05

Model load in loop.

Dotdigitalgroup_Email_Block_Basket

Instead of loading model in a loop, you can get product from already loaded $quoteItems. You can load all needed information this way:
$product = $quoteItem->getProduct();
$productUrl = $product->getProductUrl();

Bad modman clone link in readme.md

You should change this:

modman clone https://github.com/dotagency/dotmailer_magento.git

to this:

modman clone https://github.com/dotmailer/dotmailer-magento-extension.git

customer_register_success

This event is not fired when a customer's account is created during the checkout process. As a result the observer for new customer enrolment automation is not fired and enrollment does not happen.

We should extend Mage_Sales_Model_Service_Quote and rewrite submitOrder function to fire our event or listen to sales_model_service_quote_submit_success , sales_model_service_quote_submit_before, sales_model_service_quote_submit_after events and check if quote is filled with new user data for registration and do our thing then.

Problem with member sync - Table prefixes?

Hi, I'm having the following error when running the subscriber sync manually...
a:5:{i:0;s:295:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pexwhole_magento_staging.newsletter_subscriber' doesn't exist, query was: UPDATE p3x_email_contactAScLEFT JOINnewsletter_subscriberASsON c.customer_id = s.customer_id SETc.subscriber_status=s.subscriber_status";i:1;s:2709:"#0 /chroot/home/pexwhole/staging.pexwholesale.co.uk/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
It appears that it's looking up a default table name, whereas my installation uses prefixes... p3x_

Database exception when Dotdigitalgroup_Email_Model_Cron->orderAndQuoteSync CRON job runs

Since installing the extension a few days ago, I've seen over 40 of these error messages in the var/log/exception.log file.

If you need more information in order to fix this issue, please let me know.

Exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1' and code '42000' in /var/www/example.com/htdocs/lib/Zend/Db/Statement/Pdo.php:264
Stack trace:

#0 /var/www/example.com/htdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute( Array(2) )
   #    Array
   #    (
   #        [0] => 1
   #        [1] => "2016-04-14 21:15:38"
   #    )
#1 /var/www/example.com/htdocs/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute( Array(2) )
   #    Array
   #    (
   #        [0] => 1
   #        [1] => "2016-04-14 21:15:38"
   #    )
#2 /var/www/example.com/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute( Array(2) )
   #    Array
   #    (
   #        [0] => 1
   #        [1] => "2016-04-14 21:15:38"
   #    )
#3 /var/www/example.com/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query( "UPDATE `email_quote` SET `imported` = ?, `updated_at` = ?, `modified` = null WHERE (quote_id IN ())", Array(2) )
   #    Array
   #    (
   #        [0] => 1
   #        [1] => "2016-04-14 21:15:38"
   #    )
#4 /var/www/example.com/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query( "UPDATE `email_quote` SET `imported` = ?, `updated_at` = ?, `modified` = null WHERE (quote_id IN ())", Array(2) )
   #    Array
   #    (
   #        [0] => 1
   #        [1] => "2016-04-14 21:15:38"
   #    )
#5 /var/www/example.com/htdocs/lib/Zend/Db/Adapter/Abstract.php(632): Varien_Db_Adapter_Pdo_Mysql->query( "UPDATE `email_quote` SET `imported` = ?, `updated_at` = ?, `modified` = null WHERE (quote_id IN ())", Array(2) )
   #    Array
   #    (
   #        [0] => 1
   #        [1] => "2016-04-14 21:15:38"
   #    )
#6 /var/www/example.com/htdocs/.modman/dotmailer-magento-extension/code/Dotdigitalgroup/Email/Model/Resource/Quote.php(64): Zend_Db_Adapter_Abstract->update( "email_quote", Array(3), "quote_id IN ()" )
   #    Array
   #    (
   #        [imported] => 1
   #        [updated_at] => "2016-04-14 21:15:38"
   #        [modified] => Object( Zend_Db_Expr )
   #    )
#7 /var/www/example.com/htdocs/.modman/dotmailer-magento-extension/code/Dotdigitalgroup/Email/Model/Quote.php(214): Dotdigitalgroup_Email_Model_Resource_Quote->setImported( Array() )
   #    Array()
#8 /var/www/example.com/htdocs/.modman/dotmailer-magento-extension/code/Dotdigitalgroup/Email/Model/Quote.php(92): Dotdigitalgroup_Email_Model_Quote->_exportQuoteForWebsiteInSingle( Object( Mage_Core_Model_Website ) )
#9 /var/www/example.com/htdocs/.modman/dotmailer-magento-extension/code/Dotdigitalgroup/Email/Model/Cron.php(100): Dotdigitalgroup_Email_Model_Quote->sync()
#10 /var/www/example.com/htdocs/.modman/dotmailer-magento-extension/code/Dotdigitalgroup/Email/Model/Cron.php(114): Dotdigitalgroup_Email_Model_Cron->quoteSync()
#11 [internal function]: Dotdigitalgroup_Email_Model_Cron->orderAndQuoteSync( Object( Aoe_Scheduler_Model_Schedule ) )
#12 /var/www/example.com/htdocs/.modman/Aoe_Scheduler/app/code/community/Aoe/Scheduler/Model/Schedule.php(207): call_user_func_array( Array(2), Array(1) )
   #    Array
   #    (
   #        [0] => Object( Dotdigitalgroup_Email_Model_Cron )
   #        [1] => "orderAndQuoteSync"
   #    )
   #    Array
   #    (
   #        [0] => Object( Aoe_Scheduler_Model_Schedule )
   #    )
#13 /var/www/example.com/htdocs/.modman/Aoe_Scheduler/app/code/community/Aoe/Scheduler/Model/Schedule.php(593): Aoe_Scheduler_Model_Schedule->runNow( true )
#14 /var/www/example.com/htdocs/.modman/Aoe_Scheduler/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process()
#15 /var/www/example.com/htdocs/app/code/core/Mage/Core/Model/App.php(1343): Aoe_Scheduler_Model_Observer->dispatch( Object( Varien_Event_Observer ) )
#16 /var/www/example.com/htdocs/app/code/core/Mage/Core/Model/App.php(1322): Mage_Core_Model_App->_callObserverMethod( Object( Aoe_Scheduler_Model_Observer ), "dispatch", Object( Varien_Event_Observer ) )
#17 /var/www/example.com/htdocs/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent( "default", Array(4) )
   #    Array
   #    (
   #        [include_groups] => Array()
   #        [exclude_groups] => Array()
   #        [include_jobs] => Array()
   #        [exclude_jobs] => Array()
   #    )
#18 /var/www/example.com/htdocs/.modman/Aoe_Scheduler/shell/scheduler.php(404): Mage::dispatchEvent( "default", Array(4) )
   #    Array
   #    (
   #        [include_groups] => Array()
   #        [exclude_groups] => Array()
   #        [include_jobs] => Array()
   #        [exclude_jobs] => Array()
   #    )
#19 /var/www/example.com/htdocs/.modman/Aoe_Scheduler/shell/scheduler.php(37): Aoe_Scheduler_Shell_Scheduler->cronAction()
#20 /var/www/example.com/htdocs/.modman/Aoe_Scheduler/shell/scheduler.php(430): Aoe_Scheduler_Shell_Scheduler->run()

Coding standards

Commented-out code detected, Multi-line function call not indented correctly, Expected 1 space after comma in function call

Bug in 5.1.0: postContactsTransactionalData is broken

Since the method uses the undefined order class attribute connector_id the REST API call always fails since ContactIdentifier is mandatory.
Following notice is generated:

Notice: Undefined property: Dotdigitalgroup_Email_Model_Connector_Order::$connector_id in /opt/magento/.modman/dotmailer-magento-extension/code/Dotdigitalgroup/Email/Model/Apiconnector/Client.php on line 670

This could be fixed by following patch. Please verify this - thanks!
screen shot 2015-12-02 at 18 53 38

Performance issue with Collection at Dotdigitalgroup_Email_Model_Adminhtml_Observer

Hello!

We have faced with performance issue, tied with using of Magento collection in Dotdigitalgroup_Email_Model_Adminhtml_Observer class.

Code below creates Collection based on big amount of entries that significantly affect overall performance of server CPU. This happens for all unlogged users (case when $customerId is empty).

protected function addContactsFromWebsiteSegments($customerId, $segmentIds, $websiteId){
...
$contact = Mage::getModel('ddg_automation/contact')->getCollection()
            ->addFieldToFilter('customer_id', $customerId)
            ->addFieldToFilter('website_id', $websiteId)
            ->getFirstItem();
...

Function addContactsFromWebsiteSegments() had been added at V4.0.0 release.

Best practice from Magento is to divide collection into pages (using method setPageSize()) or to limit number of selected rows.

So we have made changes below to solve performance issue:

$contact = Mage::getModel('ddg_automation/contact')->getCollection()
            ->addFieldToFilter('customer_id', $customerId)
            ->addFieldToFilter('website_id', $websiteId)
            ->setPageSize(1)
            ->getFirstItem();

Please let me know if it may somehow affects plugin's functionality.

Thanks,
Maxim.

Installation beacon firing on disabled api..triggers exception

Fatal error: Call to a member function getAccountInfo() on boolean in Dotdigitalgroup/Email/Helper/Data.php on line 1070

Above is thrown when api is disabled but installation beacon still tries to get api client and make api call but returned client is a boolean false since it is disabled,

Remove SMS

Remove SMS functionallity from the module. This feature can be used in dotmailer itself

Admin section api username invalid

The config value for apiuser pass is obsucre but the value checked is raw, this may show the api auth is invalid and disable.

Check if pass changed and validate according to the config encoding used.

Single Orders - JsonValueIncompatibleWithSchema

When we create and attempt to import "Single Orders" this error is being displayed on a number of sites. My assumption is we are altering the JSON type/schema between bulk and single inserts.

JsonValueIncompatibleWithSchema. A value named 'custom' of type List already exists in this collection and new values must be of this type. ERROR_TRANSACTIONAL_DATA_VALIDATION_FAILED

Order Connector generates errors using strlen() function

Hello,

Quite minor issue, but is still filling up our logs with PHP warnings.

ERR (3): Warning: strlen() expects parameter 1 to be string, array given

Line 288

protected function _limitLength($value)
{
    if (strlen($value) > 250)
        $value = substr($value, 0, 250);
    return $value;
}

The function does not check if $value is an array.

Unrecognized method 'getFirstItem()' when saving product review

Steps to reproduce

  • Login as customer on frontend and leave review on a product
  • Login to admin, find review, change to "Approved" and save review:
    edit_review___customer_reviews___reviews_and_ratings___catalog
  • You will see the following error in the error log:
2016-04-13T18:29:21+00:00 DEBUG (7): Exception message: Unrecognized method 'getFirstItem()'
Trace: #0 /var/www/html/.modman/dotmailer-magento-extension/code/Dotdigitalgroup/Email/Model/Customer/Observer.php(204): Zend_Db_Select->__call('getFirstItem', Array)
#1 /var/www/html/.modman/dotmailer-magento-extension/code/Dotdigitalgroup/Email/Model/Customer/Observer.php(204): Varien_Db_Select->getFirstItem()
#2 /var/www/html/app/code/core/Mage/Core/Model/App.php(1343): Dotdigitalgroup_Email_Model_Customer_Observer->reviewSaveAfter(Object(Varien_Event_Observer))
#3 /var/www/html/app/code/core/Mage/Core/Model/App.php(1322): Mage_Core_Model_App->_callObserverMethod(Object(Dotdigitalgroup_Email_Model_Customer_Observer), 'reviewSaveAfter', Object(Varien_Event_Observer))
#4 /var/www/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('review_save_aft...', Array)
#5 /var/www/html/app/code/core/Mage/Core/Model/Abstract.php(466): Mage::dispatchEvent('review_save_aft...', Array)
#6 /var/www/html/app/code/core/Mage/Core/Model/Abstract.php(319): Mage_Core_Model_Abstract->_afterSave()
#7 /var/www/html/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php(130): Mage_Core_Model_Abstract->save()
#8 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_Product_ReviewController->saveAction()
#9 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('save')
#10 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /var/www/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#12 /var/www/html/app/Mage.php(685): Mage_Core_Model_App->run(Array)
#13 /var/www/html/index.php(132): Mage::run('', 'store')
#14 {main}

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.