Пример #1
0
 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/install/complete'), 'method' => 'post'));
     $form->setFieldContainerIdPrefix('data');
     $form->setUseContainer(true);
     $this->setForm($form);
     $accountWithLoginUrl = $this->getUrl('*/install/install', array('mode' => Remarkety_Mgconnector_Model_Install::MODE_INSTALL_LOGIN));
     $fieldset = $form->addFieldset('general', array('legend' => $this->__('Install Remarkety extension')));
     $fieldset->addField('mode', 'hidden', array('name' => 'data[mode]', 'value' => 'install_create'));
     $headingHtml = '<p><b>' . $this->__('Thank you for installing the Remarkety Magento plugin.
             You are one click away from finishing setting up Remarkety on your store and sending effective, targeted emails!') . '</b><br><br>' . $this->__('The plugin will automatically create a Magento WebService API user so that
             Remarkety can synchronize with your store.') . '</p><hr/>' . '<h2>' . $this->__('Create a new Remarkety account') . '</h2>' . '<p>' . sprintf($this->__('Already registered to Remarkety? <a href="%s">Click here</a>'), $accountWithLoginUrl) . '</p>';
     $instruction = $fieldset->addField('instruction', 'note', array('text' => '', 'label' => false, 'after_element_html' => $headingHtml));
     $instruction->getRenderer()->setTemplate('mgconnector/element.phtml');
     $html = '<small style="float:left;width:100%;">' . sprintf($this->__('Already registered to Remarkety? <a href="%s">Click here</a>'), $accountWithLoginUrl) . '</small>';
     $fieldset->addField('email', 'text', array('label' => $this->__('Email address for the Remarkety account:'), 'name' => 'data[email]', 'required' => true, 'class' => 'validate-email', 'style' => 'float:left'));
     $fieldset->addField('first_name', 'text', array('label' => $this->__('First Name:'), 'name' => 'data[first_name]', 'required' => true, 'class' => 'required-entry'));
     $fieldset->addField('last_name', 'text', array('label' => $this->__('Last Name:'), 'name' => 'data[last_name]', 'required' => true, 'class' => 'required-entry'));
     $fieldset->addField('phone', 'text', array('label' => $this->__('Phone:'), 'name' => 'data[phone]', 'required' => true, 'class' => 'required-entry'));
     $fieldset->addField('password', 'password', array('label' => $this->__('Password:'******'name' => 'data[password]', 'required' => true, 'class' => 'required-entry'));
     $fieldset->addField('store_id', 'select', array('name' => 'data[store_id]', 'label' => $this->__('Sync Remarkety with this view:'), 'required' => true, 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false)));
     $fieldset->addField('terms', 'checkbox', array('label' => false, 'name' => 'data[terms]', 'checked' => false, 'value' => '1', 'class' => 'required-entry', 'after_element_html' => $this->__('I agree to Remarkety’s <a href="%s">terms of use</a>.', '#')));
     $fieldset->addField('create', 'note', array('label' => false, 'name' => 'button', 'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>' . $this->__('Create New Account And Connect') . '</span></span></button>'));
     //         $fieldset->addField('login', 'note', array(
     //             'label' => false,
     //             'name' => 'button',
     //             'after_element_html' => '<button type="button" class="save"
     //             onclick="window.location = \'' . $this->getUrl('*/install/install', array('mode' => Remarkety_Mgconnector_Model_Install::MODE_INSTALL_LOGIN)) . '\'"
     //             ><span><span>'
     //                 . $this->__('I Already Have An Account') . '</span></span></button>',
     //         ));
     return parent::_prepareForm();
 }
Пример #2
0
 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/install/complete'), 'method' => 'post'));
     $form->setFieldContainerIdPrefix('data');
     $form->setUseContainer(true);
     $this->setForm($form);
     $fieldset = $form->addFieldset('general', array('legend' => $this->__('Upgrade Remarkety extension')));
     $fieldset->addField('mode', 'hidden', array('name' => 'data[mode]', 'value' => 'upgrade'));
     $instruction = $fieldset->addField('instruction', 'note', array('text' => '', 'label' => false, 'after_element_html' => '<p style="font-weight:bold;">' . $this->__('Thank you for installing the Remarkety Magento plugin.
             You are one click away from finishing setting up Remarkety on your store and sending effective, targeted emails!') . '<br><br>' . $this->__('It seems that you have already installed Remarkety on this website before. This
             version of the plugin will create a new API key, and automatically inform
             Remarkety. If this is a mistake, please <a href="%s">click here</a>.</p>', $this->getUrl('*/install/install', array('mode' => 'install_create')))));
     $instruction->getRenderer()->setTemplate('mgconnector/element.phtml');
     $fieldset->addField('button', 'note', array('label' => false, 'name' => 'button', 'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>' . $this->__('Complete Installation') . '</span></span></button>'));
     return parent::_prepareForm();
 }
Пример #3
0
 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/*/complete'), 'method' => 'post'));
     $form->setFieldContainerIdPrefix('data');
     $form->setUseContainer(true);
     $this->setForm($form);
     $fieldset = $form->addFieldset('general', array('legend' => $this->__('Installation Complete')));
     $fieldset->addField('mode', 'hidden', array('name' => 'data[mode]', 'value' => 'complete'));
     $instruction = $fieldset->addField('instruction', 'note', array('text' => '', 'label' => false, 'after_element_html' => '<p style="font-weight:bold;">' . $this->__('Installation complete!') . '</p>'));
     $instruction->getRenderer()->setTemplate('mgconnector/element.phtml');
     $response = Mage::getSingleton('core/session')->getRemarketyLastResponseMessage();
     $response = !empty($response) ? unserialize($response, true) : array();
     $fieldset->addField('response', 'note', array('label' => false, 'after_element_html' => !empty($response['info']) ? $response['info'] : $this->__('There is no response to display')));
     $fieldset->addField('button', 'note', array('label' => false, 'name' => 'button', 'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>' . $this->__('Done') . '</span></span></button>'));
     return parent::_prepareForm();
 }
Пример #4
0
 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/queue/save'), 'method' => 'post'));
     $form->setFieldContainerIdPrefix('data');
     $form->setUseContainer(true);
     $this->setForm($form);
     $fieldset = $form->addFieldset('general', array('legend' => $this->__('Remarkety Configuration')));
     $fieldset->addField('mode', 'hidden', array('name' => 'data[mode]', 'value' => 'configuration'));
     $fieldset->addField('intervals', 'text', array('label' => $this->__('Intervals:'), 'name' => 'data[intervals]', 'required' => true, 'after_element_html' => '<small style="float:left;width:100%;">' . $this->__('This defines the queue retry interval.<br/>
         		Type the amount of minutes between retries, separated by commas. For example "1,3,10" -
                 the second attempt will be after 1 minute, third after 3 minutes,<br/>
                 and fourth after 10 minutes. If the last attempt is unsuccessful,
                 the status will be changed to "failed" and will not be retried anymore.') . '</small>', 'value' => Mage::getStoreConfig('remarkety/mgconnector/intervals'), 'style' => 'float:left'));
     $button = $fieldset->addField('button', 'note', array('label' => false, 'name' => 'button', 'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>' . $this->__('Save') . '</span></span></button>'));
     $button->getRenderer()->setTemplate('mgconnector/element.phtml');
     return parent::_prepareForm();
 }
Пример #5
0
 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/*/install'), 'method' => 'post'));
     $form->setFieldContainerIdPrefix('data');
     $form->setUseContainer(true);
     $this->setForm($form);
     $fieldset = $form->addFieldset('general', array('legend' => $this->__('Remarkety')));
     $fieldset->addField('mode', 'hidden', array('name' => 'data[mode]', 'value' => 'complete'));
     $instruction = $fieldset->addField('instruction', 'note', array('text' => '', 'label' => false, 'after_element_html' => '<p style="font-weight:bold;font-size:25px;">' . $this->__('Welcome to Remarkety - What\'s next?') . '</p>
         <ol style="list-style-type:decimal;margin-left:20px;font-weight:bold;font-size:12px;">
             <li>Sign in to your account <a href="https://app.remarkety.com/?utm_source=plugin&utm_medium=link&utm_campaign=magento-plugin" target="_blank">here</a></li>
             <li>Create campaigns, send emails and monitor results.</li>
             <li>Increase sales and customer\'s Life Time Value</li>
             <li>Need help? We are here for you: <a href="mailto:support@remarkety.com">support@remarkety.com</a> <a href="tel:%28%2B1%20800%20570-7564">(+1 800 570-7564)</a></li>
         </ol>
         '));
     $instruction->getRenderer()->setTemplate('mgconnector/element.phtml');
     return parent::_prepareForm();
 }