-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,540 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
app/code/community/Ebizmarts/MailChimp/Block/Adminhtml/System/Config/ResendEcommerceData.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
/** | ||
* mc-magento Magento Component | ||
* | ||
* @category Ebizmarts | ||
* @package mc-magento | ||
* @author Ebizmarts Team <[email protected]> | ||
* @copyright Ebizmarts (http://ebizmarts.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @date: 5/27/16 1:16 PM | ||
* @file: ResendEcommerceData.php | ||
*/ | ||
class Ebizmarts_MailChimp_Block_Adminhtml_System_Config_ResendEcommerceData | ||
extends Mage_Adminhtml_Block_System_Config_Form_Field | ||
{ | ||
protected function _construct() | ||
{ | ||
parent::_construct(); | ||
$this->setTemplate('ebizmarts/mailchimp/system/config/resendecommercedata.phtml'); | ||
} | ||
|
||
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) | ||
{ | ||
return $this->_toHtml(); | ||
} | ||
|
||
public function getButtonHtml() | ||
{ | ||
$scopeArray = explode('-', Mage::helper('mailchimp')->getScopeString()); | ||
if (Mage::helper('mailchimp')->getIfConfigExistsForScope(Ebizmarts_MailChimp_Model_Config::GENERAL_MCSTOREID, $scopeArray[1], $scopeArray[0])) { | ||
$label = $this->helper('mailchimp')->__('Resend Ecommerce Data'); | ||
$button = $this->getLayout()->createBlock('adminhtml/widget_button') | ||
->setData( | ||
array( | ||
'id' => 'resendecommercedata_button', | ||
'label' => $label, | ||
'onclick' => 'javascript:resendecommerce(); return false;', | ||
'title' => $this->helper('mailchimp')->__('Resend Ecommerce Data current scope') | ||
) | ||
); | ||
|
||
return $button->toHtml(); | ||
} | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getMessage() | ||
{ | ||
$message = 'Are you sure you want to delete the local data in order to send all items again?\nAutomations will work normally but the synchronization process for the old data will take longer than resetting the MailChimp store.'; | ||
return $this->helper('mailchimp')->__($message); | ||
} | ||
|
||
public function getAjaxCheckUrl() | ||
{ | ||
$scopeString = Mage::helper('mailchimp')->getScopeString(); | ||
return Mage::helper('adminhtml')->getUrl('adminhtml/ecommerce/resendEcommerceData', array('scope' => $scopeString)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.