mobilenow - Version 1.0.1.14

Version Notes

Highly tested release. More themes and options to follow.

Download this release

Release Info

Developer Redstage, LLC / MobileNowApp.com
Extension mobilenow
Version 1.0.1.14
Comparing to
See all releases


Code changes from version 1.0.1.5 to 1.0.1.14

Files changed (56) hide show
  1. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow.php +22 -10
  2. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit.php +11 -5
  3. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Custombuttons.php +17 -26
  4. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customcatalog.php +1 -2
  5. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customlayoutbuttons.php +3 -2
  6. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customlink.php +1 -1
  7. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customtabs/Design.php +21 -0
  8. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customtabs/Layout.php +21 -0
  9. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customtabs/Theme.php +21 -0
  10. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customthemelabel.php +19 -0
  11. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customthememessage.php +18 -0
  12. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Generaladvanced.php +22 -0
  13. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Generalthemesavebutton.ph +22 -0
  14. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Overlay.php +18 -0
  15. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Advsettings.php +40 -48
  16. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Design.php +192 -139
  17. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Form.php +139 -75
  18. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Layout.php +27 -18
  19. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tabs.php +14 -41
  20. app/code/community/Redstage/Mobilenow/Helper/Data.php +96 -74
  21. app/code/community/Redstage/Mobilenow/Helper/Theme.php +109 -87
  22. app/code/community/Redstage/Mobilenow/Model/Design/Package.php +156 -177
  23. app/code/community/Redstage/Mobilenow/Model/Feed.php +52 -0
  24. app/code/community/Redstage/Mobilenow/Model/Mobilenow.php +7 -1
  25. app/code/community/Redstage/Mobilenow/Model/Mysql4/Mobilenow.php +4 -7
  26. app/code/community/Redstage/Mobilenow/Model/Resource/Layout.php +56 -67
  27. app/code/community/Redstage/Mobilenow/Model/Themesubsettings.php +291 -7
  28. app/code/community/Redstage/Mobilenow/controllers/Adminhtml/MobilenowController.php +512 -590
  29. app/code/community/Redstage/Mobilenow/etc/config.xml +43 -2
  30. app/code/community/Redstage/Mobilenow/etc/system.xml +29 -25
  31. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.0-0.1.1.php +1 -1
  32. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.1-0.1.2.php +2 -3
  33. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.2-0.1.3.php +1 -2
  34. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.4-0.1.5.php +11 -0
  35. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.5-0.1.6.php +10 -0
  36. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.6-0.1.7.php +10 -0
  37. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.7-0.1.8.php +10 -0
  38. app/design/adminhtml/default/default/template/mobilenow/widget/advsettings.phtml +7 -0
  39. app/design/adminhtml/default/default/template/mobilenow/widget/design.phtml +36 -32
  40. app/design/adminhtml/default/default/template/mobilenow/widget/design/link.phtml +0 -1
  41. app/design/adminhtml/default/default/template/mobilenow/widget/form.phtml +89 -5
  42. app/design/adminhtml/default/default/template/mobilenow/widget/layout.phtml +36 -25
  43. app/design/frontend/redstage-mobilenow/default/template/catalog/product/view/options/type/default.phtm +30 -0
  44. app/design/frontend/redstage-mobilenow/default/template/catalog/product/view/options/type/select.phtm +40 -0
  45. app/design/frontend/redstage-mobilenow/default/template/catalog/product/view/options/wrapper/bottom.phtm +29 -0
  46. app/design/frontend/redstage-mobilenow/default/template/catalog/product/view/type/options/configurable.phtm +48 -0
  47. app/design/frontend/redstage-mobilenow/default/template/mobilenow/banner.phtml +7 -4
  48. app/design/frontend/redstage-mobilenow/default/template/page/html/header.phtml +47 -30
  49. package.xml +5 -5
  50. skin/adminhtml/default/default/css/mobilenow.css +21 -2
  51. skin/adminhtml/default/default/css/tinybox/images/preload.gif +0 -0
  52. skin/adminhtml/default/default/css/tinybox/images/rhino.jpg +0 -0
  53. skin/adminhtml/default/default/css/tinybox/style.css +8 -0
  54. skin/adminhtml/default/default/css/ui-lightness/jquery-ui-1.10.3.custom.css +2 -1
  55. skin/adminhtml/default/default/js/mobilenow.js +19 -12
  56. skin/adminhtml/default/default/mobilenow_images/gif-load.gif +0 -0
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow.php CHANGED
@@ -1,16 +1,28 @@
1
  <?php
2
 
3
 
4
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow extends Mage_Adminhtml_Block_Widget_Grid_Container{
 
 
 
5
 
6
- public function __construct()
7
- {
8
-
9
- $this->_controller = "adminhtml_mobilenow";
10
  $this->_blockGroup = "mobilenow";
11
- $this->_headerText = Mage::helper("mobilenow")->__("MobileNow: Manage Mobile Themes");
12
- $this->_addButtonLabel = Mage::helper("mobilenow")->__("Add New Mobile Theme");
13
- parent::__construct();
14
-
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
1
  <?php
2
 
3
 
4
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow extends Mage_Adminhtml_Block_Widget_Grid_Container
5
+ {
6
+ public function __construct()
7
+ {
8
 
9
+ $this->_controller = "adminhtml_mobilenow";
 
 
 
10
  $this->_blockGroup = "mobilenow";
11
+ $this->_headerText = Mage::helper("mobilenow")->__("MobileNow: Manage Mobile Themes");
12
+
13
+ $loadId = Mage::helper('mobilenow')->getDefaultSubsettingId();
14
+
15
+ if($loadId!='')
16
+ {
17
+ $this->_addButton('btnAdd', array(
18
+ 'label' => Mage::helper("mobilenow")->__("Add New Mobile Theme"),
19
+ 'onclick' => "setLocation('" . $this->getUrl('*/*/new', array('load_id' => $loadId)) . "')",
20
+ 'class' => 'add'
21
+ ));
22
+
23
+ parent::__construct();
24
+
25
+ $this->_removeButton('add');
26
+ }
27
+ }
28
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit.php CHANGED
@@ -16,11 +16,17 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit extends Mage_Adminhtml_B
16
  "class" => "inline_save_as_top",
17
  "title" => '',
18
  ), -100);
19
- $this->_addButton("saveandcontinue", array(
20
- "label" => Mage::helper("mobilenow")->__("Save And Continue Edit"),
21
- "onclick" => "saveAndContinueEdit()",
22
- "class" => "save",
23
- ), -100);
 
 
 
 
 
 
24
  $this->_formScripts[] = "
25
  function saveAndContinueEdit(){
26
  editForm.submit($('edit_form').action+'back/edit/');
16
  "class" => "inline_save_as_top",
17
  "title" => '',
18
  ), -100);
19
+
20
+ if( (Mage::registry("mobilenow_data") && !Mage::registry("mobilenow_data")->getId() ) ||
21
+ $this->helper('mobilenow')->isTemplateCustom(Mage::registry("subsettings_data")->getId()))
22
+ {
23
+ $this->_addButton("saveandcontinue", array(
24
+ "label" => Mage::helper("mobilenow")->__("Save And Continue Edit"),
25
+ "onclick" => "saveAndContinueEdit()",
26
+ "class" => "save",
27
+ ), -100);
28
+ }
29
+
30
  $this->_formScripts[] = "
31
  function saveAndContinueEdit(){
32
  editForm.submit($('edit_form').action+'back/edit/');
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Custombuttons.php CHANGED
@@ -16,38 +16,29 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Custombuttons e
16
  if($checkForParentToReset->getPrimary()==1) $setflag=1;
17
  else $setflag='';
18
  }
19
- $html = '
20
- <tr>
21
- <td class="value" colspan="2">
22
- <!--<button class="scalable save_as save" type="button" title="Save As.." id="save_as"><span>Save As..</span></button>-->
23
- <a class="inline_save_as link_button_cls scalable save" title="" href="#inline_save_as"><span class="save">Save As..</span></a>
24
- </td>
25
- </tr>
26
- <tr>';
27
- if(Mage::registry("subsettings_data")->getPrimary()!=1 && $setflag!=1){
28
- $html .= '<td class="value" colspan="2">
29
- <!--<button class="scalable save" type="button" title="Save Settings.." id="save_settings"><span>Save Settings..</span></button>-->
30
- <a class="save_settings_link link_button_cls scalable save" title="" href="#inline_save_setting" id="save_settings_old"><span class="save">Save Settings..</span></a>
31
- </td>
32
- </tr>';
33
- }
34
- if($setflag || (Mage::registry("subsettings_data")->getParent()==0 && Mage::registry("subsettings_data")->getPrimary()==1)){
35
- $html .= '<tr><td class="value" style="width:290px;"></td></tr>
36
- <tr><td class="value" colspan="2">
37
- <!--<button class="scalable" type="button" title="Reset Settings to Default" id="reset_settings"><span>Reset Settings to Default</span></button>-->
38
  <a class="reset_settings_link link_button_rst scalable" title="" href="#inline_reset_setting" id="reset_settings" href="#"><span>Reset Settings to Default</span></a>
39
- </td></tr>';
40
- }
41
- if(!$setflag && Mage::registry("subsettings_data")->getPrimary()==0){
42
- $html.='<tr><td class="value" style="width:330px;"></td></tr>
43
- <tr>
44
  <td class="value" colspan="2">
45
  <!--<button class="scalable delete" type="button" title="Delete Custom Sub Settings" id="delete_settings"><span class="delete">Delete Custom Sub Settings</span></button>-->
46
  <a class="inline_delete link_button_dlt scalable delete" title="" href="#inline_delete"><span class="delete">Delete Custom Sub Settings</span></a>
47
  </td>
48
  </tr>
49
- ';
50
- }
51
  return $html;
52
  }
53
  }
16
  if($checkForParentToReset->getPrimary()==1) $setflag=1;
17
  else $setflag='';
18
  }
19
+
20
+ $html = '';
21
+ if(Mage::registry("subsettings_data")->getPrimary()!=1 && $setflag!=1){
22
+ /* $html .= '<tr><td class="value" colspan="2">
23
+ <!--<button class="scalable save" type="button" title="Save Settings.." id="save_settings"><span>Save Settings..</span></button>-->
24
+ <a class="save_settings_link link_button_cls scalable save" title="" href="#inline_save_setting" id="save_settings_old"><span class="save">Save Settings..</span></a>
25
+ </td>
26
+ </tr>'; */
27
+ }
28
+ if($setflag || (Mage::registry("subsettings_data")->getParent()==0 && Mage::registry("subsettings_data")->getPrimary()==1)){
29
+ /*$html .= '<tr><td class="value" colspan="2">
 
 
 
 
 
 
 
 
30
  <a class="reset_settings_link link_button_rst scalable" title="" href="#inline_reset_setting" id="reset_settings" href="#"><span>Reset Settings to Default</span></a>
31
+ </td></tr>'; */
32
+ }
33
+ if(!$setflag && Mage::registry("subsettings_data")->getPrimary()==0){
34
+ /*$html.='<tr>
 
35
  <td class="value" colspan="2">
36
  <!--<button class="scalable delete" type="button" title="Delete Custom Sub Settings" id="delete_settings"><span class="delete">Delete Custom Sub Settings</span></button>-->
37
  <a class="inline_delete link_button_dlt scalable delete" title="" href="#inline_delete"><span class="delete">Delete Custom Sub Settings</span></a>
38
  </td>
39
  </tr>
40
+ ';*/
41
+ }
42
  return $html;
43
  }
44
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customcatalog.php CHANGED
@@ -14,8 +14,7 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customcatalog e
14
  <strong>Product Views</strong>
15
  <hr/>';
16
  /*<strong>List View - <a href="#" class="link-color">View in Preview Window</a></strong>*/
17
- $html .= ' <strong>List View</strong>
18
- </td>
19
  </tr>';
20
  return $html;
21
  }
14
  <strong>Product Views</strong>
15
  <hr/>';
16
  /*<strong>List View - <a href="#" class="link-color">View in Preview Window</a></strong>*/
17
+ $html .= ' </td>
 
18
  </tr>';
19
  return $html;
20
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customlayoutbuttons.php CHANGED
@@ -16,11 +16,12 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customlayoutbut
16
  if($checkForParentToReset->getPrimary()==1) $setflag=1;
17
  else $setflag='';
18
  }
19
- $html = ' <tr>
20
  <td class="value" colspan="2">
21
  <a class="inline_save_as link_button_cls scalable save" title="" href="#inline_save_as_layout"><span class="save">Save As..</span></a>
22
  </td>
23
- </tr>';
 
24
  if(Mage::registry("subsettings_data")->getPrimary()!=1 && $setflag!=1){
25
  $html .='<tr>
26
  <td class="value" colspan="2">
16
  if($checkForParentToReset->getPrimary()==1) $setflag=1;
17
  else $setflag='';
18
  }
19
+ /*$html = ' <!--<tr>
20
  <td class="value" colspan="2">
21
  <a class="inline_save_as link_button_cls scalable save" title="" href="#inline_save_as_layout"><span class="save">Save As..</span></a>
22
  </td>
23
+ </tr>-->';*/
24
+ $html = '';
25
  if(Mage::registry("subsettings_data")->getPrimary()!=1 && $setflag!=1){
26
  $html .='<tr>
27
  <td class="value" colspan="2">
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customlink.php CHANGED
@@ -32,7 +32,7 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customlink exte
32
  $html = '<tr>
33
  <td class="value"><label>Links</label>
34
  </td><td>
35
- <table cellspacing="0" cellpadding="0" width="360px">
36
  <tr>
37
  <td class="value">
38
  <table cellspacing="0" cellpadding="0" width="100%">
32
  $html = '<tr>
33
  <td class="value"><label>Links</label>
34
  </td><td>
35
+ <table cellspacing="0" cellpadding="0" width="360px" class="advanced_settings">
36
  <tr>
37
  <td class="value">
38
  <table cellspacing="0" cellpadding="0" width="100%">
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customtabs/Design.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customtabs_Design extends Mage_Adminhtml_Block_Widget
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ /**
6
+ * renderer
7
+ *
8
+ * @param Varien_Data_Form_Element_Abstract $element
9
+ */
10
+
11
+ public function render(Varien_Data_Form_Element_Abstract $element) {
12
+
13
+ $html = '<ul>
14
+ <li><a href="#general_homepage" id="design-general-homepage">General / Homepage</a></li>
15
+ <li><a href="#catalog_page" id="design-catalog-page">Catalog Page</a></li>
16
+ <li><a href="#produt_page" id="design-product-page">Product Page</a></li>
17
+ </ul>';
18
+ return $html;
19
+ }
20
+ }
21
+ ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customtabs/Layout.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customtabs_Layout extends Mage_Adminhtml_Block_Widget
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ /**
6
+ * renderer
7
+ *
8
+ * @param Varien_Data_Form_Element_Abstract $element
9
+ */
10
+
11
+ public function render(Varien_Data_Form_Element_Abstract $element) {
12
+
13
+ $html = '<ul>
14
+ <li><a href="#general_layout_homepage" id="layout-general-homepage">General / Homepage</a></li>
15
+ <li><a href="#catalog_layout_page" id="layout-catalog-page">Catalog Page</a></li>
16
+ <li><a href="#produt_layout_page" id="layout-product-page">Product Page</a></li>
17
+ </ul>';
18
+ return $html;
19
+ }
20
+ }
21
+ ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customtabs/Theme.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customtabs_Theme extends Mage_Adminhtml_Block_Widget
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+ /**
6
+ * renderer
7
+ *
8
+ * @param Varien_Data_Form_Element_Abstract $element
9
+ */
10
+ public function render(Varien_Data_Form_Element_Abstract $element)
11
+ {
12
+
13
+ $html = '<div class="mobile-theme-tabs">
14
+ <span class="mobile-theme-tab"><a href="#general_homepage" id="theme-general-homepage">Preview Homepage</a></span>
15
+ <span class="mobile-theme-tab"><a href="#catalog_page" id="theme-catalog-page">Preview Catalog Page</a></span>
16
+ <span class="mobile-theme-tab"><a href="#produt_page" id="theme-product-page">Preview Product Page</a></span>
17
+ </div>';
18
+ return $html;
19
+ }
20
+ }
21
+ ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customthemelabel.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customthemelabel
3
+ extends Mage_Adminhtml_Block_Widget
4
+ implements Varien_Data_Form_Element_Renderer_Interface
5
+ {
6
+ /**
7
+ * renderer
8
+ *
9
+ * @param Varien_Data_Form_Element_Abstract $element
10
+ */
11
+
12
+ public function render(Varien_Data_Form_Element_Abstract $element)
13
+ {
14
+ $html = '<div>Choose a preset theme to jumpstart your customization! Choose from the dropdown below and preview to the right.
15
+ If nothing loads, click the “Update Preview” button to reload the theme.</div>';
16
+ return $html;
17
+ }
18
+ }
19
+ ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customthememessage.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customthememessage
3
+ extends Mage_Adminhtml_Block_Widget
4
+ implements Varien_Data_Form_Element_Renderer_Interface
5
+ {
6
+ /**
7
+ * renderer
8
+ *
9
+ * @param Varien_Data_Form_Element_Abstract $element
10
+ */
11
+
12
+ public function render(Varien_Data_Form_Element_Abstract $element)
13
+ {
14
+ $html = '<div>*If you would like to load a different preset template, <a href='.$this->getUrl('mobilenow/adminhtml_mobilenow/new/').'>Create a New Mobile Theme</a> and choose one there!</div>';
15
+ return $html;
16
+ }
17
+ }
18
+ ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Generaladvanced.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Generaladvanced
3
+ extends Mage_Adminhtml_Block_Widget
4
+ implements Varien_Data_Form_Element_Renderer_Interface
5
+ {
6
+ /**
7
+ * renderer
8
+ *
9
+ * @param Varien_Data_Form_Element_Abstract $element
10
+ */
11
+
12
+ public function render(Varien_Data_Form_Element_Abstract $element)
13
+ {
14
+ $html = '<tr><td colspan="2"><div class="entry-edit-head advanced-edit-head" style="cursor:pointer">
15
+ <h4 class="icon-head head-edit-form fieldset-legend">Advanced Settings</h4>
16
+ <span class="click-expand" style="float:right">Click to expand</span>
17
+ </div></td>
18
+ </tr>';
19
+ return $html;
20
+ }
21
+ }
22
+ ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Generalthemesavebutton.ph ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Generalthemesavebutton extends Mage_Adminhtml_Block_Widget implements Varien_Data_Form_Element_Renderer_Interface
3
+ {
4
+ /**
5
+ * renderer
6
+ *
7
+ * @param Varien_Data_Form_Element_Abstract $element
8
+ */
9
+
10
+ public function render(Varien_Data_Form_Element_Abstract $element) {
11
+ //You can write html for your button here
12
+ $html = '<tr> <td class="label">&nbsp;</td>
13
+ <td class="value">
14
+ <button style="" onclick="continueToDesign()" class="scalable save continue_step" type="button" title="Save" id="general_theme_save">
15
+ <span><span><span>Save</span></span></span>
16
+ </button>
17
+ </td>
18
+ </tr>';
19
+ return $html;
20
+ }
21
+ }
22
+ ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Overlay.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Overlay
3
+ extends Mage_Adminhtml_Block_Widget
4
+ implements Varien_Data_Form_Element_Renderer_Interface
5
+ {
6
+ /**
7
+ * renderer
8
+ *
9
+ * @param Varien_Data_Form_Element_Abstract $element
10
+ */
11
+
12
+ public function render(Varien_Data_Form_Element_Abstract $element)
13
+ {
14
+ $html = '<div class="overlay" ></div>';
15
+ return $html;
16
+ }
17
+ }
18
+ ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Advsettings.php CHANGED
@@ -14,10 +14,8 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Advsettings extends
14
  {
15
  if(Mage::registry("mobilenow_data"))
16
  {
17
- $reg_data = Mage::registry("mobilenow_data");
18
- $socialLinkData = json_decode($reg_data['social_links']);
19
  $cartInputData = json_decode($reg_data['cart_inputs']);
20
- if($socialLinkData->show_social_links ==1)$social_checked=true;
21
  if($cartInputData->show_cart_discount ==1)$cart_discount_checked=true;
22
  if($cartInputData->show_cart_shipping_quote ==1)$cart_shippng_quote_checked=true;
23
  }
@@ -38,40 +36,7 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Advsettings extends
38
  'class' => '',
39
  'required' => false,
40
  "note" => "If you want to override any CSS classes, you may do that here!"
41
- ));
42
- $fieldset->addField('show_social_links', 'checkbox', array(
43
- 'label' => Mage::helper('mobilenow')->__('Show Social Links?'),
44
- 'name' => 'show_social_links',
45
- 'class' => '',
46
- 'required' => false,
47
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
48
- 'checked' => $social_checked,
49
- ));
50
- $fieldset ->addField("facebook_link", "text", array(
51
- "label" => Mage::helper("mobilenow")->__("Facebook"),
52
- "class" => "",
53
- "required" => false,
54
- "name" => "facebook_link",
55
- ));
56
- $fieldset ->addField("twitter_link", "text", array(
57
- "label" => Mage::helper("mobilenow")->__("Twitter"),
58
- "class" => "",
59
- "required" => false,
60
- "name" => "twitter_link",
61
- ));
62
- $fieldset ->addField("pinterest_link", "text", array(
63
- "label" => Mage::helper("mobilenow")->__("Pinterest"),
64
- "class" => "",
65
- "required" => false,
66
- "name" => "pinterest_link",
67
- ));
68
- $fieldset ->addField("google_link", "text", array(
69
- "label" => Mage::helper("mobilenow")->__("Google+"),
70
- "class" => "",
71
- "required" => false,
72
- "name" => "google_link",
73
- "note" => "Input your social profile links above and the social icons will appear in the footer of your theme."
74
- ));
75
  $fieldset->addField('show_cart_discount', 'checkbox', array(
76
  'label' => Mage::helper('mobilenow')->__('Cart - Show Discount Code Input'),
77
  'name' => 'show_cart_discount',
@@ -94,6 +59,41 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Advsettings extends
94
  'class' => '',
95
  'required' => false
96
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  if (Mage::getSingleton("adminhtml/session")->getMobilenowData())
98
  {
99
  $form->setValues(Mage::getSingleton("adminhtml/session")->getMobilenowData());
@@ -101,23 +101,15 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Advsettings extends
101
  }
102
  elseif(Mage::registry("mobilenow_data"))
103
  {
104
- $prefiled_values = Mage::registry("mobilenow_data")->getData();
105
-
106
 
107
- //advanced settings page
108
- $socialLinkData = json_decode($prefiled_values['social_links']);
109
  $cartInputData = json_decode($prefiled_values['cart_inputs']);
110
 
111
- $prefiled_values['custom_css'] = $prefiled_values['css_override'];
112
- $prefiled_values['show_social_links'] = $socialLinkData->show_social_links;
113
- $prefiled_values['facebook_link'] = $socialLinkData->facebook_link;
114
- $prefiled_values['twitter_link'] = $socialLinkData->twitter_link;
115
- $prefiled_values['pinterest_link'] = $socialLinkData->pinterest_link;
116
- $prefiled_values['google_link'] = $socialLinkData->google_link;
117
  $prefiled_values['show_cart_discount'] = $cartInputData->show_cart_discount;
118
  $prefiled_values['show_cart_shipping_quote'] = $cartInputData->show_cart_shipping_quote;
119
 
120
-
121
  $form->setValues($prefiled_values);
122
  }
123
  return parent::_prepareForm();
14
  {
15
  if(Mage::registry("mobilenow_data"))
16
  {
17
+ $reg_data = Mage::registry("mobilenow_data");
 
18
  $cartInputData = json_decode($reg_data['cart_inputs']);
 
19
  if($cartInputData->show_cart_discount ==1)$cart_discount_checked=true;
20
  if($cartInputData->show_cart_shipping_quote ==1)$cart_shippng_quote_checked=true;
21
  }
36
  'class' => '',
37
  'required' => false,
38
  "note" => "If you want to override any CSS classes, you may do that here!"
39
+ ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  $fieldset->addField('show_cart_discount', 'checkbox', array(
41
  'label' => Mage::helper('mobilenow')->__('Cart - Show Discount Code Input'),
42
  'name' => 'show_cart_discount',
59
  'class' => '',
60
  'required' => false
61
  ));
62
+
63
+ $fieldset->addField('show_social_links', 'checkbox', array(
64
+ 'label' => Mage::helper('mobilenow')->__('Show Social Links?'),
65
+ 'name' => 'show_social_links',
66
+ 'class' => '',
67
+ 'required' => false,
68
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
69
+ 'checked' => $social_checked,
70
+ ));
71
+ $fieldset->addField("facebook_link", "text", array(
72
+ "label" => Mage::helper("mobilenow")->__("Facebook"),
73
+ "class" => "",
74
+ "required" => false,
75
+ "name" => "facebook_link",
76
+ ));
77
+ $fieldset->addField("twitter_link", "text", array(
78
+ "label" => Mage::helper("mobilenow")->__("Twitter"),
79
+ "class" => "",
80
+ "required" => false,
81
+ "name" => "twitter_link",
82
+ ));
83
+ $fieldset->addField("pinterest_link", "text", array(
84
+ "label" => Mage::helper("mobilenow")->__("Pinterest"),
85
+ "class" => "",
86
+ "required" => false,
87
+ "name" => "pinterest_link",
88
+ ));
89
+ $fieldset->addField("google_link", "text", array(
90
+ "label" => Mage::helper("mobilenow")->__("Google+"),
91
+ "class" => "",
92
+ "required" => false,
93
+ "name" => "google_link",
94
+ "note" => "Input your social profile links above and the social icons will appear in the footer of your theme."
95
+ ));
96
+
97
  if (Mage::getSingleton("adminhtml/session")->getMobilenowData())
98
  {
99
  $form->setValues(Mage::getSingleton("adminhtml/session")->getMobilenowData());
101
  }
102
  elseif(Mage::registry("mobilenow_data"))
103
  {
104
+ $prefiled_values = Mage::registry("mobilenow_data")->getData();
 
105
 
106
+ //advanced settings page
 
107
  $cartInputData = json_decode($prefiled_values['cart_inputs']);
108
 
109
+ $prefiled_values['custom_css'] = $prefiled_values['css_override'];
 
 
 
 
 
110
  $prefiled_values['show_cart_discount'] = $cartInputData->show_cart_discount;
111
  $prefiled_values['show_cart_shipping_quote'] = $cartInputData->show_cart_shipping_quote;
112
 
 
113
  $form->setValues($prefiled_values);
114
  }
115
  return parent::_prepareForm();
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Design.php CHANGED
@@ -13,7 +13,8 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
13
  protected function _prepareForm()
14
  {
15
  if(Mage::registry("subsettings_data"))
16
- {
 
17
  if(Mage::registry("subsettings_data")->getShowSearchCartArea()==1)$checked=true;
18
  if(Mage::registry("subsettings_data")->getShowHomePageBanner()==1)$bannerChecked=true;
19
  if(Mage::registry("subsettings_data")->getShowNewsletter()==1)$newsletterChecked=true;
@@ -34,64 +35,83 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
34
  if(Mage::registry("subsettings_data")->getShowFullReviewsOnProductPage()==1)$shflreChecked=true;
35
  if(Mage::registry("subsettings_data")->getShowRelatedProducts()==1)$shrlChecked=true;
36
  }
 
37
  $form = new Varien_Data_Form();
38
- $this ->setForm($form);
39
- $fieldset = $form->addFieldset("preset_subsettings",array('class'=>'preset_subsettings'));
40
- if($this->getRequest()->getParam('id'))
41
- $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/edit',array('id'=>$this->getRequest()->getParam("id")));
42
- else
43
- $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/new',array('id'=>$this->getRequest()->getParam("id")));
44
-
45
- $fieldset->addField('preset_sub_settings', 'select', array(
46
- 'label' => Mage::helper('mobilenow')->__('Preset Sub Settings'),
47
- 'class' => 'select_theme_name',
48
- 'required' => false,
49
- 'name' => 'preset_sub_settings',
50
- 'onclick' => "",
51
- 'onchange' => 'preloadSubsettings(\''.$newRedrict.'\')',
52
- 'values' => Mage::helper('mobilenow')->getSubsettings()
53
- ));
54
- $fieldset->addField('custom_design_buttons', 'text', array(
55
- 'name'=>'custom_design_buttons',
 
 
 
 
 
 
 
 
 
 
56
  ));
57
- $form->getElement('custom_design_buttons')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_custombuttons'));
58
  /*******************************************General / Home Page**********************************************/
59
- $fieldset = $form->addFieldset('general_homepage',array());
60
- $fieldset ->addField('base_mobile_theme', 'select', array(
61
- 'label' => Mage::helper('mobilenow')->__('Base Mobile Theme'),
62
- 'values' => array('1'=>'Blank / Text'),
63
- 'name' => 'base_mobile_theme',
64
- 'class' => '',
65
- 'required' => false
66
- ));
67
- $fieldset->addField('logo_fielname', 'hidden', array(
 
 
68
  'label' => '',
69
- 'name' => 'logo_fielname',
70
  ));
71
  $fieldset->addField('logo_preview_filename', 'hidden', array(
72
  'label' => '',
73
  'name' => 'logo_preview_filename',
74
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  $fieldset->addField('logo_image_display', 'text', array(
76
  'name'=>'logo_image_display',
77
  ));
78
  $form->getElement('logo_image_display')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_logoimagedisplay'));
79
- $fieldset->addField('logo', 'file', array(
80
- 'label' => Mage::helper('mobilenow')->__('Logo'),
81
- 'value' => 'Uplaod',
82
- 'name' => 'logo'
83
- ));
84
  $fieldset->addField('background_color', 'text', array(
85
  'label' => Mage::helper('mobilenow')->__('Background Color'),
86
  'name' => 'background_color',
87
  'class' => 'minicolors input-color',
88
  'value' => '#aaaaaa',
89
  'required' => false
90
- ));
91
- $fieldset->addField('custom_design_link', 'text', array(
92
- 'name'=>'custom_design_link',
93
  ));
94
- $form->getElement('custom_design_link')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customlink'));
95
  $fieldset->addField('links_color', 'text', array(
96
  'label' => Mage::helper('mobilenow')->__('Links Color'),
97
  'name' => 'links_color',
@@ -136,10 +156,7 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
136
  'onclick' => 'this.value = this.checked ? 1 : 0;',
137
  'checked' => $bannerChecked,
138
  ));
139
- $fieldset->addField('banner_image_display', 'text', array(
140
- 'name'=>'banner_image_display',
141
- ));
142
- $form->getElement('banner_image_display')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_bannerimagedisplay'));
143
  $fieldset->addField('banner_fielname', 'hidden', array(
144
  'label' => '',
145
  'name' => 'banner_fielname',
@@ -153,19 +170,26 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
153
  'value' => 'Uplaod',
154
  'name' => 'homepage_banner'
155
  ));
 
 
 
 
 
 
156
  $fieldset->addField('homepage_banner_url', 'text', array(
157
  'label' => Mage::helper('mobilenow')->__('Homepage Banner URL'),
158
  'name' => 'homepage_banner_url',
159
  'class' => '',
160
  'required' => false
161
  ));
162
- $fieldset->addField('subheader_section', 'textarea', array(
163
- 'label' => Mage::helper('mobilenow')->__('SubHeader Section [HTML] (empty = Off)'),
164
- 'name' => 'subheader_section',
 
165
  'class' => '',
166
  'required' => false
167
  ));
168
-
169
  $fieldset->addField('categories1', 'radios', array(
170
  'label' => Mage::helper('mobilenow')->__('Categories'),
171
  'name' => 'categories',
@@ -173,7 +197,7 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
173
  'values' => array(
174
  array('value'=>'1')
175
  ),
176
- 'after_element_html' => '<label class="radio_label" for="categories1">Mobile Menu</label>'
177
  ));
178
  $fieldset->addField('categories2', 'radios', array(
179
  'label' =>'',
@@ -182,7 +206,7 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
182
  'values' => array(
183
  array('value'=>'2')
184
  ),
185
- 'after_element_html' => '<label class="radio_label " for="categories2">Show All</label>'
186
  ));
187
  // $fieldset->addField('categories', 'radios', array(
188
  // 'label' => Mage::helper('mobilenow')->__('Categories'),
@@ -217,34 +241,12 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
217
  'value' => '#aaaaaa',
218
  'required' => false
219
  ));
220
- $fieldset->addField('homepage_custom_code', 'textarea', array(
221
- 'label' => Mage::helper('mobilenow')->__('Homepage Custom Code [HTML] (empty = Off)'),
222
- 'name' => 'homepage_custom_code',
223
- 'class' => '',
224
- 'required' => false
225
- ));
226
- $fieldset->addField('pre_footer_section', 'textarea', array(
227
- 'label' => Mage::helper('mobilenow')->__('Pre-Footer Section [HTML] (empty = Off)'),
228
- 'name' => 'pre_footer_section',
229
- 'class' => '',
230
- 'required' => false
231
- ));
232
- $fieldset->addField('footer_section', 'textarea', array(
233
- 'label' => Mage::helper('mobilenow')->__('Footer Section [HTML] (empty = Off)'),
234
- 'name' => 'footer_section',
235
- 'class' => '',
236
- 'required' => false
237
- ));
238
- // $fieldset->addField('show_desktop_version_link', 'checkbox', array(
239
- // 'label' => Mage::helper('mobilenow')->__('Show Desktop Version Link?'),
240
- // 'name' => 'show_desktop_version_link',
241
- // 'class' => '',
242
- // 'required' => false
243
- // ));
244
- $fieldset->addField('custom_design_title', 'text', array(
245
  'name'=>'custom_design_title',
246
  ));
247
- $form->getElement('custom_design_title')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customtext'));
 
248
  $fieldset->addField('button_background_color', 'text', array(
249
  'label' => Mage::helper('mobilenow')->__('Button Background Color'),
250
  'name' => 'button_background_color',
@@ -266,6 +268,47 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
266
  'value' => '#aaaaaa',
267
  'required' => false
268
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  /*******************************************Catalog Page**********************************************/
270
  $fieldset = $form->addFieldset('catalog_page',array());
271
  $fieldset->addField('show_breadcrumbs', 'checkbox', array(
@@ -290,45 +333,20 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
290
  'value' => '#aaaaaa',
291
  'required' => false
292
  ));
293
- /* $fieldset->addField('default_catalog_view', 'radios', array(
294
- 'label' => Mage::helper('mobilenow')->__('Default Catalog View'),
295
- 'name' => 'default_catalog_view',
296
- 'onclick' => "",
297
- 'onchange' => "",
298
- 'value' => '1',
299
- 'values' => array(
300
- array('value'=>'1','label'=>' Grid'),
301
- array('value'=>'2','label'=>' List'),
302
- )
303
- ));
304
- $fieldset->addField('show_grid_list_choice', 'checkbox', array(
305
- 'label' => Mage::helper('mobilenow')->__('Show Grid / List Choice'),
306
- 'name' => 'show_grid_list_choice',
307
- 'class' => '',
308
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
309
- 'required' => false,
310
- 'checked' => $gridChecked
311
- )); */
312
- $fieldset->addField('number_of_products_choice_steps', 'text', array(
313
- 'label' => Mage::helper('mobilenow')->__('Number of Products Choice Steps (Comma delimited, ALL = Show All)'),
314
- 'name' => 'number_of_products_choice_steps',
315
- 'class' => 'validate-per-page-value-list input-color',
316
  'required' => false
317
  ));
318
- $fieldset->addField('number_of_products_per_page', 'text', array(
319
- 'label' => Mage::helper('mobilenow')->__('Number of Products Per Page (default) ALL = Show All'),
320
- 'name' => 'number_of_products_per_page',
321
- 'class' => 'validate-per-page-value input-color',
 
322
  'required' => false
323
  ));
324
- $fieldset->addField('show_sortby_dropdown', 'checkbox', array(
325
- 'label' => Mage::helper('mobilenow')->__('Show Sort By Dropdown'),
326
- 'name' => 'show_sortby_dropdown',
327
- 'class' => '',
328
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
329
- 'required' => false,
330
- 'checked'=>$sortChecked
331
- ));
332
  $fieldset->addField('sort_options', 'checkboxes', array(
333
  'label' => Mage::helper('mobilenow')->__('Sort Options'),
334
  'name' => 'sort_options[]',
@@ -342,33 +360,7 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
342
  'onclick' => "",
343
  'onchange' => "",
344
  'value' => array('1', '5'),
345
- ));
346
- $fieldset->addField('toolbar_bg_color', 'text', array(
347
- 'label' => Mage::helper('mobilenow')->__('Toolbar Background Color'),
348
- 'name' => 'toolbar_bg_color',
349
- 'class' => 'minicolors input-color',
350
- 'value' => '#aaaaaa',
351
- 'required' => false
352
- ));
353
- $fieldset->addField('toolbar_text_color', 'text', array(
354
- 'label' => Mage::helper('mobilenow')->__('Toolbar Text Color'),
355
- 'name' => 'toolbar_text_color',
356
- 'class' => 'minicolors input-color',
357
- 'value' => '#aaaaaa',
358
- 'required' => false
359
- ));
360
- $fieldset->addField('show_pagination', 'radios', array(
361
- 'label' => Mage::helper('mobilenow')->__('Show Pagination'),
362
- 'name' => 'show_pagination',
363
- 'onclick' => "",
364
- 'onchange' => "",
365
- 'value' => '1',
366
- 'values' => array(
367
- array('value'=>'1','label'=>' Top'),
368
- array('value'=>'2','label'=>' Bottom'),
369
- array('value'=>'3','label'=>' Both'),
370
- )
371
- ));
372
  $fieldset->addField('pagination_bg_color', 'text', array(
373
  'label' => Mage::helper('mobilenow')->__('Pagination Background Color'),
374
  'name' => 'pagination_bg_color',
@@ -390,10 +382,12 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
390
  'value' => '#aaaaaa',
391
  'required' => false
392
  ));
393
- $fieldset->addField('custom_design_catalog', 'text', array(
 
394
  'name'=>'custom_design_catalog',
395
  ));
396
- $form->getElement('custom_design_catalog')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customcatalog'));
 
397
  $fieldset->addField('show_image_border', 'checkbox', array(
398
  'label' => Mage::helper('mobilenow')->__('Show Image Border'),
399
  'name' => 'show_image_border',
@@ -504,6 +498,65 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_
504
  'value' => '#aaaaaa',
505
  'required' => false
506
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  /*******************************************Product Page**********************************************/
508
  $fieldset = $form->addFieldset('produt_page', array());
509
  $fieldset->addField('productpage_title_color', 'text', array(
13
  protected function _prepareForm()
14
  {
15
  if(Mage::registry("subsettings_data"))
16
+ {
17
+ if(Mage::registry("subsettings_data")->getUseStoreLogo()==1)$storeLogochecked=true;
18
  if(Mage::registry("subsettings_data")->getShowSearchCartArea()==1)$checked=true;
19
  if(Mage::registry("subsettings_data")->getShowHomePageBanner()==1)$bannerChecked=true;
20
  if(Mage::registry("subsettings_data")->getShowNewsletter()==1)$newsletterChecked=true;
35
  if(Mage::registry("subsettings_data")->getShowFullReviewsOnProductPage()==1)$shflreChecked=true;
36
  if(Mage::registry("subsettings_data")->getShowRelatedProducts()==1)$shrlChecked=true;
37
  }
38
+
39
  $form = new Varien_Data_Form();
40
+ $this->setForm($form);
41
+ if(Mage::app()->getRequest()->getActionName()=='new'){
42
+ $fieldset = $form->addFieldset("preset_subsettings",array('class'=>'preset_subsettings'));
43
+ if($this->getRequest()->getParam('id'))
44
+ $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/edit',array('id'=>$this->getRequest()->getParam("id")));
45
+ else
46
+ $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/new',array('id'=>$this->getRequest()->getParam("id")));
47
+
48
+ $fieldset->addField('preset_sub_settings', 'select', array(
49
+ 'label' => Mage::helper('mobilenow')->__('Preset Template'),
50
+ 'class' => 'select_theme_name',
51
+ 'required' => false,
52
+ 'name' => 'preset_sub_settings',
53
+ 'onclick' => "",
54
+ 'onchange' => 'preloadSubsettings(\''.$newRedrict.'\')',
55
+ 'values' => Mage::helper('mobilenow')->getSubsettings(),
56
+ 'disabled' => true,
57
+ ));
58
+
59
+ $fieldset->addField('custom_design_buttons', 'text', array(
60
+ 'name'=>'custom_design_buttons',
61
+ ));
62
+ $form->getElement('custom_design_buttons')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_custombuttons'));
63
+ }
64
+
65
+ $fieldset = $form->addFieldset('custom_tabs',array('class'=>'custom_tabs'));
66
+ $fieldset->addField('custom_design_tabs', 'label', array(
67
+ 'name'=>'custom_design_tabs',
68
  ));
69
+ $form->getElement('custom_design_tabs')->setRenderer(Mage::app()->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customtabs_design'));
70
  /*******************************************General / Home Page**********************************************/
71
+ $fieldset = $form->addFieldset('general_homepage',array('legend'=>Mage::helper("mobilenow")->__(""),'class'=>'general_basic'));
72
+
73
+ $fieldset->addField('use_store_logo', 'checkbox', array(
74
+ 'label' => Mage::helper('mobilenow')->__('Use Store View Logo'),
75
+ 'name' => 'use_store_logo',
76
+ 'class' => '',
77
+ 'required' => false,
78
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
79
+ 'checked' => $storeLogochecked,
80
+ ));
81
+ $fieldset->addField('logo_filename', 'hidden', array(
82
  'label' => '',
83
+ 'name' => 'logo_filename',
84
  ));
85
  $fieldset->addField('logo_preview_filename', 'hidden', array(
86
  'label' => '',
87
  'name' => 'logo_preview_filename',
88
  ));
89
+
90
+ $fieldset->addField('logo', 'file', array(
91
+ 'label' => Mage::helper('mobilenow')->__('Mobile Logo'),
92
+ 'value' => 'Upload',
93
+ 'name' => 'logo'
94
+ ));
95
+
96
+ $fieldset->addField('logo_image_url', 'text', array(
97
+ 'label' => Mage::helper('mobilenow')->__('Mobile Logo Image Url'),
98
+ 'name' => 'logo_image_url',
99
+ 'class' => '',
100
+ 'required' => false
101
+ ));
102
+
103
  $fieldset->addField('logo_image_display', 'text', array(
104
  'name'=>'logo_image_display',
105
  ));
106
  $form->getElement('logo_image_display')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_logoimagedisplay'));
107
+
 
 
 
 
108
  $fieldset->addField('background_color', 'text', array(
109
  'label' => Mage::helper('mobilenow')->__('Background Color'),
110
  'name' => 'background_color',
111
  'class' => 'minicolors input-color',
112
  'value' => '#aaaaaa',
113
  'required' => false
 
 
 
114
  ));
 
115
  $fieldset->addField('links_color', 'text', array(
116
  'label' => Mage::helper('mobilenow')->__('Links Color'),
117
  'name' => 'links_color',
156
  'onclick' => 'this.value = this.checked ? 1 : 0;',
157
  'checked' => $bannerChecked,
158
  ));
159
+
 
 
 
160
  $fieldset->addField('banner_fielname', 'hidden', array(
161
  'label' => '',
162
  'name' => 'banner_fielname',
170
  'value' => 'Uplaod',
171
  'name' => 'homepage_banner'
172
  ));
173
+
174
+ $fieldset->addField('banner_image_display', 'text', array(
175
+ 'name'=>'banner_image_display',
176
+ ));
177
+ $form->getElement('banner_image_display')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_bannerimagedisplay'));
178
+
179
  $fieldset->addField('homepage_banner_url', 'text', array(
180
  'label' => Mage::helper('mobilenow')->__('Homepage Banner URL'),
181
  'name' => 'homepage_banner_url',
182
  'class' => '',
183
  'required' => false
184
  ));
185
+
186
+ $fieldset->addField('homepage_banner_image_url', 'text', array(
187
+ 'label' => Mage::helper('mobilenow')->__('Homepage Banner Image URL'),
188
+ 'name' => 'homepage_banner_image_url',
189
  'class' => '',
190
  'required' => false
191
  ));
192
+
193
  $fieldset->addField('categories1', 'radios', array(
194
  'label' => Mage::helper('mobilenow')->__('Categories'),
195
  'name' => 'categories',
197
  'values' => array(
198
  array('value'=>'1')
199
  ),
200
+ 'after_element_html' => '<label class="radio_label" for="categories1"><b>Mobile Menu -></b><div style="width:300px"><i>Show a collapsed categories menu and allow your visitors to drill into each category and sub category with a single easy tough.</i></div></label>'
201
  ));
202
  $fieldset->addField('categories2', 'radios', array(
203
  'label' =>'',
206
  'values' => array(
207
  array('value'=>'2')
208
  ),
209
+ 'after_element_html' => '<label class="radio_label " for="categories2"><b>Show All -></b><div style="width:300px"><i>Show a category listing of all of your store’s categories.</i></div></label>'
210
  ));
211
  // $fieldset->addField('categories', 'radios', array(
212
  // 'label' => Mage::helper('mobilenow')->__('Categories'),
241
  'value' => '#aaaaaa',
242
  'required' => false
243
  ));
244
+
245
+ /*$fieldset->addField('custom_design_title', 'text', array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  'name'=>'custom_design_title',
247
  ));
248
+ $form->getElement('custom_design_title')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customtext'));*/
249
+
250
  $fieldset->addField('button_background_color', 'text', array(
251
  'label' => Mage::helper('mobilenow')->__('Button Background Color'),
252
  'name' => 'button_background_color',
268
  'value' => '#aaaaaa',
269
  'required' => false
270
  ));
271
+
272
+ $fieldset->addField('general_homepage_advanced', 'text', array(
273
+ 'name'=>'general_homepage_advanced',
274
+ ));
275
+ $form->getElement('general_homepage_advanced')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_generaladvanced'));
276
+
277
+ $fieldset->addField('custom_design_link', 'text', array(
278
+ 'name'=>'custom_design_link',
279
+ 'class' => 'advanced_settings',
280
+ ));
281
+ $form->getElement('custom_design_link')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customlink'));
282
+ $fieldset->addField('subheader_section', 'textarea', array(
283
+ 'label' => Mage::helper('mobilenow')->__('SubHeader Section [HTML] (empty = Off)'),
284
+ 'name' => 'subheader_section',
285
+ 'class' => 'advanced_settings',
286
+ 'required' => false
287
+ ));
288
+ $fieldset->addField('homepage_custom_code', 'textarea', array(
289
+ 'label' => Mage::helper('mobilenow')->__('Homepage Custom Code [HTML] (empty = Off)'),
290
+ 'name' => 'homepage_custom_code',
291
+ 'class' => 'advanced_settings',
292
+ 'required' => false
293
+ ));
294
+ $fieldset->addField('pre_footer_section', 'textarea', array(
295
+ 'label' => Mage::helper('mobilenow')->__('Pre-Footer Section [HTML] (empty = Off)'),
296
+ 'name' => 'pre_footer_section',
297
+ 'class' => 'advanced_settings',
298
+ 'required' => false
299
+ ));
300
+ $fieldset->addField('footer_section', 'textarea', array(
301
+ 'label' => Mage::helper('mobilenow')->__('Footer Section [HTML] (empty = Off)'),
302
+ 'name' => 'footer_section',
303
+ 'class' => 'advanced_settings',
304
+ 'required' => false
305
+ ));
306
+ // $fieldset->addField('show_desktop_version_link', 'checkbox', array(
307
+ // 'label' => Mage::helper('mobilenow')->__('Show Desktop Version Link?'),
308
+ // 'name' => 'show_desktop_version_link',
309
+ // 'class' => '',
310
+ // 'required' => false
311
+ // ));
312
  /*******************************************Catalog Page**********************************************/
313
  $fieldset = $form->addFieldset('catalog_page',array());
314
  $fieldset->addField('show_breadcrumbs', 'checkbox', array(
333
  'value' => '#aaaaaa',
334
  'required' => false
335
  ));
336
+ $fieldset->addField('toolbar_bg_color', 'text', array(
337
+ 'label' => Mage::helper('mobilenow')->__('Toolbar Background Color'),
338
+ 'name' => 'toolbar_bg_color',
339
+ 'class' => 'minicolors input-color',
340
+ 'value' => '#aaaaaa',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  'required' => false
342
  ));
343
+ $fieldset->addField('toolbar_text_color', 'text', array(
344
+ 'label' => Mage::helper('mobilenow')->__('Toolbar Text Color'),
345
+ 'name' => 'toolbar_text_color',
346
+ 'class' => 'minicolors input-color',
347
+ 'value' => '#aaaaaa',
348
  'required' => false
349
  ));
 
 
 
 
 
 
 
 
350
  $fieldset->addField('sort_options', 'checkboxes', array(
351
  'label' => Mage::helper('mobilenow')->__('Sort Options'),
352
  'name' => 'sort_options[]',
360
  'onclick' => "",
361
  'onchange' => "",
362
  'value' => array('1', '5'),
363
+ ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  $fieldset->addField('pagination_bg_color', 'text', array(
365
  'label' => Mage::helper('mobilenow')->__('Pagination Background Color'),
366
  'name' => 'pagination_bg_color',
382
  'value' => '#aaaaaa',
383
  'required' => false
384
  ));
385
+
386
+ /*$fieldset->addField('custom_design_catalog', 'text', array(
387
  'name'=>'custom_design_catalog',
388
  ));
389
+ $form->getElement('custom_design_catalog')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customcatalog'));*/
390
+
391
  $fieldset->addField('show_image_border', 'checkbox', array(
392
  'label' => Mage::helper('mobilenow')->__('Show Image Border'),
393
  'name' => 'show_image_border',
498
  'value' => '#aaaaaa',
499
  'required' => false
500
  ));
501
+ /* $fieldset->addField('default_catalog_view', 'radios', array(
502
+ 'label' => Mage::helper('mobilenow')->__('Default Catalog View'),
503
+ 'name' => 'default_catalog_view',
504
+ 'onclick' => "",
505
+ 'onchange' => "",
506
+ 'value' => '1',
507
+ 'values' => array(
508
+ array('value'=>'1','label'=>' Grid'),
509
+ array('value'=>'2','label'=>' List'),
510
+ )
511
+ ));
512
+ $fieldset->addField('show_grid_list_choice', 'checkbox', array(
513
+ 'label' => Mage::helper('mobilenow')->__('Show Grid / List Choice'),
514
+ 'name' => 'show_grid_list_choice',
515
+ 'class' => '',
516
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
517
+ 'required' => false,
518
+ 'checked' => $gridChecked
519
+ ));
520
+ **/
521
+ $fieldset->addField('general_catalog_advanced', 'text', array(
522
+ 'name'=>'general_catalog_advanced',
523
+ ));
524
+ $form->getElement('general_catalog_advanced')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_generaladvanced'));
525
+ $fieldset->addField('number_of_products_choice_steps', 'text', array(
526
+ 'label' => Mage::helper('mobilenow')->__('Number of Products Choice Steps (Comma delimited, ALL = Show All)'),
527
+ 'name' => 'number_of_products_choice_steps',
528
+ 'class' => 'validate-per-page-value-list input-color advanced_settings',
529
+ 'required' => false
530
+ ));
531
+ $fieldset->addField('number_of_products_per_page', 'text', array(
532
+ 'label' => Mage::helper('mobilenow')->__('Number of Products Per Page (default) ALL = Show All'),
533
+ 'name' => 'number_of_products_per_page',
534
+ 'class' => 'validate-per-page-value input-color advanced_settings',
535
+ 'required' => false
536
+ ));
537
+ $fieldset->addField('show_sortby_dropdown', 'checkbox', array(
538
+ 'label' => Mage::helper('mobilenow')->__('Show Sort By Dropdown'),
539
+ 'name' => 'show_sortby_dropdown',
540
+ 'class' => 'advanced_settings',
541
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
542
+ 'required' => false,
543
+ 'checked'=>$sortChecked
544
+ ));
545
+
546
+ $fieldset->addField('show_pagination', 'radios', array(
547
+ 'label' => Mage::helper('mobilenow')->__('Show Pagination'),
548
+ 'name' => 'show_pagination',
549
+ 'class' => 'advanced_settings',
550
+ 'onclick' => "",
551
+ 'onchange' => "",
552
+ 'value' => '1',
553
+ 'values' => array(
554
+ array('value'=>'1','label'=>' Top'),
555
+ array('value'=>'2','label'=>' Bottom'),
556
+ array('value'=>'3','label'=>' Both'),
557
+ )
558
+ ));
559
+
560
  /*******************************************Product Page**********************************************/
561
  $fieldset = $form->addFieldset('produt_page', array());
562
  $fieldset->addField('productpage_title_color', 'text', array(
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Form.php CHANGED
@@ -1,95 +1,159 @@
1
  <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- protected function _construct()
5
- {
6
  parent::_construct();
7
- $this->setTemplate('mobilenow/widget/form.phtml');
8
- }
9
- protected function _prepareForm()
10
- {
11
- $form = new Varien_Data_Form();
12
- $this ->setForm($form);
13
- $fieldset = $form->addFieldset("mobilenow_form", array("legend"=>Mage::helper("mobilenow")->__("Mobile Theme Basic Settings")));
14
- $fieldset ->addField("theme_name", "text", array(
15
- "label" => Mage::helper("mobilenow")->__("Theme Name"),
16
- "class" => "required-entry",
17
- "required" => true,
18
- "name" => "theme_name",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  ));
20
- $fieldset ->addField("mobile_device_design_interface", "select", array(
21
- "label" => Mage::helper("mobilenow")->__("Mobile Device Design Interface"),
22
- "values" => Mage::helper("mobilenow")->getValueArrayMobileDevice(),
23
- "name" => "mobile_device_design_interface",
24
- "class" => "required-entry",
25
- "required" => true,
26
- "note" => "This version of MobileNow has a iPhone/SmartPhone design interface. Future versions will include iPad, 7 Inch Tablets and other Android interfaces.",
27
- ));
28
- $fieldset ->addField("user_agent_regex_values", "multiselect", array(
29
- "label" => Mage::helper("mobilenow")->__("User Agent RegEx Values"),
30
- "values" => Mage::helper("mobilenow")->getValueArrayUserAgent(),
31
- "name" => "user_agent_regex_values",
32
- "class" => "required-entry",
33
- "required" => true,
34
- "note" => "<span>Choose the user agents that you want to trigger this mobile theme.</span><br><br><span>Hold CTRL + Click to select multiple values.</span><br><br><span>You can change this value in the future, if you create additional themes.</span>",
35
  ));
36
- if (!Mage::app()->isSingleStoreMode()) {
37
- $fieldset ->addField('store_id', 'multiselect', array(
38
- "name" => "stores[]",
39
- "label" => Mage::helper("mobilenow")->__("Store View"),
40
- "title" => Mage::helper("mobilenow")->__("Store View"),
41
- "required" => true,
42
- "values" => Mage::getSingleton("adminhtml/system_store")
43
- ->getStoreValuesForForm(false, true),
44
  ));
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
- else {
47
- $fieldset ->addField("store_id", "hidden", array(
48
- "name" => "stores[]",
49
- "value" => Mage::app()->getStore(true)->getId()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
52
- $fieldset ->addField("user_agent_regex_custom_values", "text", array(
53
- "label" => Mage::helper("mobilenow")->__("User Agent RegEx Custom Values"),
54
- "class" => "",
55
- "required" => false,
56
- "name" => "user_agent_regex_custom_values",
57
- "note" => "Input your custom User Agent RegEx Values separated by the Pipe \"|\" Character.",
 
 
58
  ));
59
- $fieldset ->addField("exclude_user_agent_regex_custom_values", "text", array(
60
- "label" => Mage::helper("mobilenow")->__("Exclude User Agent RegEx Custom Values"),
61
- "class" => "",
62
- "required" => false,
63
- "name" => "exclude_user_agent_regex_custom_values",
64
- "note" => "You can force the exclusion of any User Agent in this custom field.",
 
 
65
  ));
66
- $fieldset ->addField("status", "select", array(
67
- "label" => Mage::helper("mobilenow")->__("Status"),
68
- "values" => Mage::helper("mobilenow")->getValueArrayStatus(),
69
- "name" => "status",
70
- "class" => "required-entry",
71
- "required" => true,
 
72
  ));
 
73
  $fieldset->addField('hidden_theme_sub_setting_name', 'hidden', array(
74
- 'label' => Mage::helper('mobilenow')->__(''),
75
- 'name' => 'hidden_theme_sub_setting_name',
76
- 'class' => '',
77
- 'required' => false
78
  ));
79
- $fieldset->addField('general_theme_savebutton', 'text', array(
80
- 'name'=>'general_theme_savebutton',
 
81
  ));
 
82
  $form->getElement('general_theme_savebutton')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_generalthemesavebutton'));
83
-
84
-
85
- if (Mage::getSingleton("adminhtml/session")->getMobilenowData())
86
- {
87
  $form->setValues(Mage::getSingleton("adminhtml/session")->getMobilenowData());
88
  Mage::getSingleton("adminhtml/session")->setMobilenowData(null);
89
- }
90
- elseif(Mage::registry("mobilenow_data"))
91
- {
92
- $form->setValues(Mage::registry("mobilenow_data")->getData());
 
 
 
 
 
 
93
  }
94
  return parent::_prepareForm();
95
  }
1
  <?php
2
+
3
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
4
+
5
+ protected function _construct() {
6
  parent::_construct();
7
+ $this->setTemplate('mobilenow/widget/form.phtml');
8
+ }
9
+
10
+ protected function _prepareForm() {
11
+ if (Mage::registry("mobilenow_data")) {
12
+ $reg_data = Mage::registry("mobilenow_data");
13
+ $socialLinkData = json_decode($reg_data['social_links']);
14
+ if ($socialLinkData->show_social_links == 1)
15
+ $social_checked = true;
16
+ }
17
+ $form = new Varien_Data_Form();
18
+ $this->setForm($form);
19
+
20
+ $fieldset = $form->addFieldset("preset_subsettings",array('legend'=>Mage::helper("mobilenow")->__("Choose Preset Template"),
21
+ 'class'=>'preset_subsettings'));
22
+ if($this->getRequest()->getParam('id'))
23
+ $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/edit',array('id'=>$this->getRequest()->getParam("id")));
24
+ else
25
+ $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/new',array('id'=>$this->getRequest()->getParam("id")));
26
+
27
+ Mage::getSingleton("adminhtml/session")->setTemplatePresetId("");
28
+
29
+ if($this->getRequest()->getParam("load_id")){
30
+ Mage::getSingleton("adminhtml/session")->setTemplatePresetId($this->getRequest()->getParam("load_id"));
31
+ }
32
+
33
+ $fieldset->addField('custom_theme_label', 'label', array(
34
+ 'name'=>'custom_theme_label'
35
  ));
36
+
37
+ $form->getElement('custom_theme_label')->setRenderer(Mage::app()->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customthemelabel'));
38
+
39
+ $fieldset->addField('template_preset_id', 'select', array(
40
+ 'label' => Mage::helper('mobilenow')->__('Preset Template'),
41
+ 'class' => 'select_theme_name',
42
+ 'required' => true,
43
+ 'name' => 'template_preset_id',
44
+ 'onchange' => 'preloadThemeSubsettings(\''.$newRedrict.'\')',
45
+ 'values' => Mage::helper('mobilenow')->getSubsettings(),
46
+ 'value' => Mage::getSingleton("adminhtml/session")->getTemplatePresetId(),
 
 
 
 
47
  ));
48
+
49
+ $fieldset->addField('custom_theme_tabs', 'label', array(
50
+ 'name'=>'custom_theme_tabs',
 
 
 
 
 
51
  ));
52
+ $form->getElement('custom_theme_tabs')->setRenderer(Mage::app()->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customtabs_theme'));
53
+
54
+ if(Mage::app()->getRequest()->getActionName()!='new'){
55
+ $fieldset->addField('overlay_template_section', 'label', array(
56
+ 'name'=>'overlay_template_section',
57
+ ));
58
+ $form->getElement('overlay_template_section')->setRenderer(Mage::app()->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_overlay'));
59
+
60
+ $fieldset = $form->addFieldset("mobilenow_form_label", array("legend" => Mage::helper("mobilenow")->__(""),"class" => ''));
61
+ $fieldset->addField('custom_theme_message', 'label', array( 'name'=>'custom_theme_message'));
62
+ $form->getElement('custom_theme_message')->setRenderer(Mage::app()->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customthememessage'));
63
  }
64
+
65
+ $fieldset = $form->addFieldset("mobilenow_form", array("legend" => Mage::helper("mobilenow")->__("Mobile Theme Basic Settings"),
66
+ "class" => 'mobile_settings')
67
+ );
68
+
69
+ $fieldset->addField("theme_name", "text", array(
70
+ "label" => Mage::helper("mobilenow")->__("Theme Name"),
71
+ "class" => "required-entry",
72
+ "required" => true,
73
+ "name" => "theme_name",
74
+ ));
75
+
76
+ $fieldset->addField("status", "select", array(
77
+ "label" => Mage::helper("mobilenow")->__("Status"),
78
+ "values" => Mage::helper("mobilenow")->getValueArrayStatus(),
79
+ "name" => "status",
80
+ "class" => "required-entry",
81
+ "required" => true,
82
  ));
83
+ /********************************************Mobile Now Adavanced*******************************/
84
+
85
+ $fieldset = $form->addFieldset('mobilenow_form_advanced', array("legend" => Mage::helper("mobilenow")->__("Mobile Theme Advanced Settings"),
86
+ "class" => 'mobile_settings', 'expanded' => true));
87
+
88
+ if (!Mage::app()->isSingleStoreMode()) {
89
+ $fieldset->addField('store_id', 'multiselect', array(
90
+ "name" => "stores[]",
91
+ "label" => Mage::helper("mobilenow")->__("Store View"),
92
+ "title" => Mage::helper("mobilenow")->__("Store View"),
93
+ "required" => false,
94
+ 'value' => 0,
95
+ "values" => Mage::getSingleton("adminhtml/system_store")
96
+ ->getStoreValuesForForm(false, true),
97
+ ));
98
+ } else {
99
+ $fieldset->addField("store_id", "hidden", array(
100
+ "name" => "stores[]",
101
+ "value" => Mage::app()->getStore(true)->getId()
102
+ ));
103
  }
104
+
105
+ $fieldset->addField("user_agent_regex_values", "multiselect", array(
106
+ "label" => Mage::helper("mobilenow")->__("User Agent RegEx Values"),
107
+ "values" => Mage::helper("mobilenow")->getValueArrayUserAgent(),
108
+ 'value' => 0,
109
+ "name" => "user_agent_regex_values",
110
+ "required" => false,
111
+ "note" => "<span>Choose the user agents that you want to trigger this mobile theme.</span><br><br><span>Hold CTRL + Click to select multiple values.</span><br><br><span>You can change this value in the future, if you create additional themes.</span>",
112
  ));
113
+
114
+
115
+ $fieldset->addField("user_agent_regex_custom_values", "text", array(
116
+ "label" => Mage::helper("mobilenow")->__("User Agent RegEx Custom Values"),
117
+ "class" => "",
118
+ "required" => false,
119
+ "name" => "user_agent_regex_custom_values",
120
+ "note" => "Input your custom User Agent RegEx Values separated by the Pipe \"|\" Character.",
121
  ));
122
+
123
+ $fieldset->addField("exclude_user_agent_regex_custom_values", "text", array(
124
+ "label" => Mage::helper("mobilenow")->__("Exclude User Agent RegEx Custom Values"),
125
+ "class" => "",
126
+ "required" => false,
127
+ "name" => "exclude_user_agent_regex_custom_values",
128
+ "note" => "You can force the exclusion of any User Agent in this custom field.",
129
  ));
130
+
131
  $fieldset->addField('hidden_theme_sub_setting_name', 'hidden', array(
132
+ 'label' => Mage::helper('mobilenow')->__(''),
133
+ 'name' => 'hidden_theme_sub_setting_name',
134
+ 'class' => '',
135
+ 'required' => false
136
  ));
137
+
138
+ /*$fieldset->addField('general_theme_savebutton', 'text', array(
139
+ 'name' => 'general_theme_savebutton',
140
  ));
141
+
142
  $form->getElement('general_theme_savebutton')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_generalthemesavebutton'));
143
+ */
144
+ if (Mage::getSingleton("adminhtml/session")->getMobilenowData()) {
 
 
145
  $form->setValues(Mage::getSingleton("adminhtml/session")->getMobilenowData());
146
  Mage::getSingleton("adminhtml/session")->setMobilenowData(null);
147
+ } elseif (Mage::registry("mobilenow_data")->getId()) {
148
+ $prefiled_values = Mage::registry("mobilenow_data")->getData();
149
+ $socialLinkData = json_decode($prefiled_values['social_links']);
150
+
151
+ $prefiled_values['show_social_links'] = $socialLinkData->show_social_links;
152
+ $prefiled_values['facebook_link'] = $socialLinkData->facebook_link;
153
+ $prefiled_values['twitter_link'] = $socialLinkData->twitter_link;
154
+ $prefiled_values['pinterest_link'] = $socialLinkData->pinterest_link;
155
+ $prefiled_values['google_link'] = $socialLinkData->google_link;
156
+ $form->setValues($prefiled_values);
157
  }
158
  return parent::_prepareForm();
159
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Layout.php CHANGED
@@ -15,25 +15,34 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Layout extends Mage_
15
  $form = new Varien_Data_Form();
16
  $this ->setForm($form);
17
 
18
- $fieldset = $form->addFieldset("preset_layout_subsettings",array('class'=>'preset_subsettings'));
19
- if($this->getRequest()->getParam('edit'))
20
- $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/edit',array('id'=>$this->getRequest()->getParam("id")));
21
- else
22
- $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/new',array('id'=>$this->getRequest()->getParam("id")));
23
- $fieldset->addField('preset_layout_sub_settings', 'select', array(
24
- 'label' => Mage::helper('mobilenow')->__('Preset Sub Settings'),
25
- 'class' => 'select_theme_name',
26
- 'required' => false,
27
- 'name' => 'preset_layout_sub_settings',
28
- 'onclick' => "",
29
- 'onchange' => 'preloadLayoutSubsettings(\''.$newRedrict.'\')',
30
- 'values' => Mage::helper('mobilenow')->getSubsettings()
31
- ));
32
- $fieldset->addField('custom_layout_buttons', 'text', array(
33
- 'name'=>'custom_layout_buttons',
34
- ));
35
- $form->getElement('custom_layout_buttons')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customlayoutbuttons'));
 
 
 
 
36
 
 
 
 
 
 
37
 
38
  /*******************************************General / Home Page**********************************************/
39
  $fieldset = $form->addFieldset('general_layout_homepage',array());
15
  $form = new Varien_Data_Form();
16
  $this ->setForm($form);
17
 
18
+ if(Mage::app()->getRequest()->getActionName()=='new')
19
+ {
20
+ $fieldset = $form->addFieldset("preset_layout_subsettings",array('class'=>'preset_subsettings'));
21
+ if($this->getRequest()->getParam('edit'))
22
+ $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/edit',array('id'=>$this->getRequest()->getParam("id")));
23
+ else
24
+ $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/new',array('id'=>$this->getRequest()->getParam("id")));
25
+ $fieldset->addField('preset_layout_sub_settings', 'select', array(
26
+ 'label' => Mage::helper('mobilenow')->__('Preset Template'),
27
+ 'class' => 'select_theme_name',
28
+ 'required' => false,
29
+ 'name' => 'preset_layout_sub_settings',
30
+ 'onclick' => "",
31
+ 'onchange' => 'preloadLayoutSubsettings(\''.$newRedrict.'\')',
32
+ 'values' => Mage::helper('mobilenow')->getSubsettings(),
33
+ 'disabled' => true
34
+ ));
35
+ $fieldset->addField('custom_layout_buttons', 'text', array(
36
+ 'name'=>'custom_layout_buttons',
37
+ ));
38
+ $form->getElement('custom_layout_buttons')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customlayoutbuttons'));
39
+ }
40
 
41
+ $fieldset = $form->addFieldset('custom_tabs',array('class'=>'custom_tabs'));
42
+ $fieldset->addField('custom_design_tabs', 'label', array(
43
+ 'name'=>'custom_design_tabs',
44
+ ));
45
+ $form->getElement('custom_design_tabs')->setRenderer(Mage::app()->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_customtabs_layout'));
46
 
47
  /*******************************************General / Home Page**********************************************/
48
  $fieldset = $form->addFieldset('general_layout_homepage',array());
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tabs.php CHANGED
@@ -15,50 +15,23 @@ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tabs extends Mage_Adminh
15
  "title" => Mage::helper("mobilenow")->__("General Theme Settings"),
16
  "content" => $this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tab_form")->toHtml(),
17
  ));
18
- if(Mage::app()->getRequest()->getActionName()!='new'){
19
- $this->addTab("design", array(
20
- "label" => Mage::helper("mobilenow")->__("Theme Design"),
21
- "title" => Mage::helper("mobilenow")->__("Theme Design"),
22
- "content" => $this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tab_design")->toHtml(),
23
- ));
24
- $this->addTab("theme_layouts", array(
25
- "label" => Mage::helper("mobilenow")->__("Theme Layouts"),
26
- "title" => Mage::helper("mobilenow")->__("Theme Layouts"),
27
- "content" =>$this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tab_layout")->toHtml(),
28
- ));
29
- $this->addTab("advanced_settings", array(
30
- "label" => Mage::helper("mobilenow")->__("Advanced Settings"),
31
- "title" => Mage::helper("mobilenow")->__("Advanced Settings"),
32
- "content" => $this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tab_advsettings")->toHtml(),
33
- ));
34
- }
35
- /*$this->addTab("analytics", array(
36
- "label" => Mage::helper("mobilenow")->__("Analytics"),
37
- "title" => Mage::helper("mobilenow")->__("Analytics"),
38
- "content" => 'Analytics content will be updated soon',
39
  ));
40
- $this->addTab("submission_history", array(
41
- "label" => Mage::helper("mobilenow")->__("Submission History"),
42
- "title" => Mage::helper("mobilenow")->__("Submission History"),
43
- "content" => 'Submission History content will be updated soon',
44
  ));
45
- $this->addTab("cache_management", array(
46
- "label" => Mage::helper("mobilenow")->__("Cache Management"),
47
- "title" => Mage::helper("mobilenow")->__("Cache Management"),
48
- "content" => 'Cache Management content will be updated soon',
49
  ));
50
- $this->addTab("social_networking", array(
51
- "label" => Mage::helper("mobilenow")->__("Social Networking"),
52
- "title" => Mage::helper("mobilenow")->__("Social Networking"),
53
- "content" => 'Social Networking content will be updated soon',
54
- ));
55
- $this->addTab("push_notification", array(
56
- "label" => Mage::helper("mobilenow")->__("Push Notification"),
57
- "title" => Mage::helper("mobilenow")->__("Push Notification"),
58
- "content" => 'Push Notification content will be updated soon',
59
- ));*/
60
- //if($this->getRequest()->getParam('load_id') || $this->getRequest()->getParam('reset_id'))
61
- //$this->setActiveTab('design');
62
  if($this->getRequest()->getParam('active_tab'))
63
  $this->setActiveTab($this->getRequest()->getParam('active_tab'));
64
  return parent::_beforeToHtml();
15
  "title" => Mage::helper("mobilenow")->__("General Theme Settings"),
16
  "content" => $this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tab_form")->toHtml(),
17
  ));
18
+
19
+ $this->addTab("design", array(
20
+ "label" => Mage::helper("mobilenow")->__("Theme Design"),
21
+ "title" => Mage::helper("mobilenow")->__("Theme Design"),
22
+ "content" => $this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tab_design")->toHtml(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ));
24
+ $this->addTab("theme_layouts", array(
25
+ "label" => Mage::helper("mobilenow")->__("Theme Layouts"),
26
+ "title" => Mage::helper("mobilenow")->__("Theme Layouts"),
27
+ "content" =>$this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tab_layout")->toHtml(),
28
  ));
29
+ $this->addTab("advanced_settings", array(
30
+ "label" => Mage::helper("mobilenow")->__("Advanced Settings"),
31
+ "title" => Mage::helper("mobilenow")->__("Advanced Settings"),
32
+ "content" => $this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tab_advsettings")->toHtml(),
33
  ));
34
+
 
 
 
 
 
 
 
 
 
 
 
35
  if($this->getRequest()->getParam('active_tab'))
36
  $this->setActiveTab($this->getRequest()->getParam('active_tab'));
37
  return parent::_beforeToHtml();
app/code/community/Redstage/Mobilenow/Helper/Data.php CHANGED
@@ -48,6 +48,7 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
48
  $data_array[19]='Tablet';
49
  return($data_array);
50
  }
 
51
  static public function getValueArrayUserAgent()
52
  {
53
  $data_array=array();
@@ -57,6 +58,7 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
57
  }
58
  return($data_array);
59
  }
 
60
  static public function getOptionArrayStatus()
61
  {
62
  $data_array=array();
@@ -64,6 +66,7 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
64
  $data_array[0]='Inactive';
65
  return($data_array);
66
  }
 
67
  static public function getValueArrayStatus()
68
  {
69
  $data_array=array();
@@ -73,9 +76,11 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
73
  }
74
  return($data_array);
75
  }
 
76
  public function getSubsettings()
77
  {
78
  $getAllSubSettings=Mage::getModel("mobilenow/themesubsettings")->getCollection();
 
79
  foreach($getAllSubSettings as $getAllSubSetting)
80
  {
81
  if($getAllSubSetting->getSubsetname()!='')
@@ -83,26 +88,63 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
83
  }
84
  return($data_array);
85
  }
86
- public function processThemeDesignFormData($post_data,$button_type = '',$lastRecordId,$createnewThemeFlag,$preview = '0')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  {
88
  if($preview == '1'){
89
  $themeSubSettings['css_filename'] = md5($lastRecordId.'_preview').'.css';
90
  }else {
91
  $themeSubSettings['css_filename'] = md5($lastRecordId).'.css';
92
  }
93
- //echo '<pre>'; print_r($post_data); echo '</pre>';
94
  if($lastRecordId)
95
  {
96
  if('saveas_subset' != $button_type){
97
  if($createnewThemeFlag)
98
  {
99
- $themeSubSettings['themeid']='';
100
  $themeSubSettings['subsetname']=$post_data['hidden_theme_sub_setting_name'];
101
  }
102
  else
103
  {
104
  $themeSubSettings['themeid']=$lastRecordId;
105
- $themeSubSettings['subsetname']='';
106
  }
107
  }else{
108
  $themeSubSettings['subsetname']=$post_data['hidden_theme_sub_setting_name'];
@@ -115,48 +157,35 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
115
  $themeSubSettings['themeid']='';
116
  }
117
  if($preview == '0'){
118
- //Logo
119
- // if($_FILES['logo']['name']!=''){ $themeSubSettings['logo']=time().$_FILES['logo']['name'];}//else{$themeSubSettings['logo']='';}
120
- // if(trim($themeSubSettings['logo'])!='')
121
- // {
122
- // $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'logo'.DS;
123
- // $uploader = new Varien_File_Uploader('logo');
124
- // $uploader->setAllowedExtensions(array('jpg','jpeg','png','gif'));
125
- // $uploader->setAllowCreateFolders(true);
126
- // $uploader->setAllowRenameFiles(false);
127
- // $uploader->setFilesDispersion(false);
128
- // $uploader->save($path,$themeSubSettings['logo']);
129
- // if($post_data['logo_fielname'] != ''){
130
- // @unlink($path.$post_data['logo_fielname']);
131
- // }
132
- // }
133
- //var_dump($post_data['logo_preview_filename']);die;
134
  if($post_data['logo_preview_filename'] != ''){
135
  $themeSubSettings['logo'] = $post_data['logo_preview_filename'];
136
  if($lastRecordId){
137
  $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'logo';
138
  $newfile = $path.DS.$post_data['logo_preview_filename'];
139
  $file = $path.DS.'preview'.DS.$lastRecordId.DS.$post_data['logo_preview_filename'];
140
- //var_dump($post_data['logo_fielname']);var_dump($newfile);die;
141
  if (copy($file, $newfile)) {
142
- if($post_data['logo_fielname'] != ''){
143
  //@unlink($path.DS.$post_data['logo_fielname']);
144
  }
145
- //rmdir($path.DS.'preview'.DS.$lastRecordId);die;
146
  $new_path = $path.DS.'preview'.DS.$lastRecordId;
147
- //$this->remove_dir($new_path);
148
  }
149
  }
150
- } else if($post_data['logo_fielname'] != ''){
151
- $themeSubSettings['logo'] = $post_data['logo_fielname'];
152
  }
153
  } else {
154
  if($post_data['logo_preview_filename'] != ''){
155
  $themeSubSettings['logo'] ='preview'.DS.$lastRecordId.DS.$post_data['logo_preview_filename'];
156
- } else if($post_data['logo_fielname'] != ''){
157
- $themeSubSettings['logo'] = $post_data['logo_fielname'];
158
  }
159
  }
 
 
 
160
  //Body background color
161
  $themeSubSettings['bgcolor']=$post_data['background_color'];
162
  //Links
@@ -176,26 +205,6 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
176
  $themeSubSettings['searchcart']= json_encode(array('show_search_cart_area'=>$post_data['show_search_cart_area'],'search_cart_bg_color'=>$post_data['search_cart_bg_color'],'cart_link_color'=>$post_data['cart_link_color']));
177
  //Homepage Banner
178
  if($preview == '0'){
179
- // if($_FILES['homepage_banner']['name']!=''){ $homePageBannerImage=time().$_FILES['homepage_banner']['name'];}else{$homePageBannerImage='';}
180
- // $homePageBannerarr=array('show_home_page_banner'=>$post_data['show_home_page_banner'],
181
- // 'homepage_banner'=>$homePageBannerImage,
182
- // 'homepage_banner_url'=>$post_data['homepage_banner_url']);
183
- // if(trim($homePageBannerImage)!=''){
184
- // $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'banner'.DS;
185
- // $uploader = new Varien_File_Uploader('homepage_banner');
186
- // $uploader->setAllowedExtensions(array('jpg','jpeg','png','gif'));
187
- // $uploader->setAllowCreateFolders(true);
188
- // $uploader->setAllowRenameFiles(false);
189
- // $uploader->setFilesDispersion(false);
190
- // $uploader->save($path,$homePageBannerImage);
191
- // if($post_data['banner_fielname'] != ''){
192
- // @unlink($path.$post_data['banner_fielname']);
193
- // }
194
- // }else{
195
- // if($post_data['banner_fielname'] != ''){
196
- // $homePageBannerarr['homepage_banner'] = $post_data['banner_fielname'];
197
- // }
198
- // }
199
 
200
  $homePageBannerImage = '';
201
  if($post_data['banner_preview_filename'] != ''){
@@ -204,14 +213,13 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
204
  $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'banner';
205
  $newfile = $path.DS.$post_data['banner_preview_filename'];
206
  $file = $path.DS.'preview'.DS.$lastRecordId.DS.$post_data['banner_preview_filename'];
207
- //var_dump($post_data['logo_fielname']);var_dump($newfile);die;
208
  if (copy($file, $newfile)) {
209
  if($post_data['banner_fielname'] != ''){
210
  //@unlink($path.DS.$post_data['banner_fielname']);
211
  }
212
- //rmdir($path.DS.'preview'.DS.$lastRecordId);die;
213
  $new_path = $path.DS.'preview'.DS.$lastRecordId;
214
- //$this->remove_dir($new_path);
215
  }
216
  }
217
  } else {
@@ -219,7 +227,9 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
219
  }
220
  $homePageBannerarr=array('show_home_page_banner'=>$post_data['show_home_page_banner'],
221
  'homepage_banner'=>$homePageBannerImage,
222
- 'homepage_banner_url'=>$post_data['homepage_banner_url']);
 
 
223
  } else{
224
  $homePageBannerImage = '';
225
  if($post_data['banner_preview_filename'] != ''){
@@ -229,7 +239,9 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
229
  }
230
  $homePageBannerarr=array('show_home_page_banner'=>$post_data['show_home_page_banner'],
231
  'homepage_banner'=>$homePageBannerImage,
232
- 'homepage_banner_url'=>$post_data['homepage_banner_url']);
 
 
233
  }
234
 
235
  $themeSubSettings['homepagebanner']=json_encode($homePageBannerarr);
@@ -309,16 +321,6 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
309
  'c_layout_pag_top'=>$post_data['c_layout_pag_top']
310
  ));
311
 
312
-
313
- //saving catalog grid layout settings
314
- // $themeSubSettings['cataloglayoutgrid']=json_encode(array('c_grid_layout_product_image'=>$post_data['c_grid_layout_product_image'],
315
- // 'c_grid_layout_product_title'=>$post_data['c_grid_layout_product_title'],
316
- // 'c_grid_layout_product_price'=>$post_data['c_grid_layout_product_price'],
317
- // 'c_grid_layout_product_review'=>$post_data['c_grid_layout_product_review'],
318
- // 'c_grid_layout_product_learn'=>$post_data['c_grid_layout_product_learn'],
319
- // 'c_grid_layout_product_addtocart'=>$post_data['c_grid_layout_product_addtocart']
320
- // ));
321
-
322
  //saving catalog list layout settings
323
  $themeSubSettings['cataloglayoutlist']=json_encode(array('c_list_layout_product_image'=>$post_data['c_list_layout_product_image'],
324
  'c_list_layout_product_title'=>$post_data['c_list_layout_product_title'],
@@ -343,11 +345,17 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
343
  return $themeSubSettings;
344
  }
345
  public function setDesignAndLayoutFormData($subsettingsModel,$getSubsetDefaultId,$subsetParentId)
346
- {
347
  /*Condition that checks if a theme has a subset assigned and it's present, assigns the Parent value as preset
348
  dropdown value*/
349
- if($subsetParentId!='')$getSubsetDefaultId=$subsetParentId;
350
- else $getSubsetDefaultId=$getSubsetDefaultId;
 
 
 
 
 
 
351
  //Background Color
352
  //Links
353
  $decodeLinksData=json_decode($subsettingsModel->getLinks());
@@ -395,7 +403,7 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
395
  $decodeProductImageborderData=json_decode($subsettingsModel->getProductimagedetails());
396
  //Show
397
  $decodeProductShowData=json_decode($subsettingsModel->getShowproductdeails());
398
- //echo '<pre>'; print_r($subsettingsModel->getShowproductdeails()); echo '</pre>';exit;
399
  //Homepage Layout
400
  $hLayoutData = json_decode($subsettingsModel->getHomepagelayoutmain());
401
  //Catalog Layout main
@@ -407,10 +415,11 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
407
  //Product page
408
  $pLayoutData = json_decode($subsettingsModel->getProductlayoutmain());
409
 
410
- //var_dump($hLayoutData->h_layout_search_cart);
411
  $subsettingsModel->setData('preset_sub_settings', $getSubsetDefaultId)
412
  ->setData('background_color', $subsettingsModel->getBgcolor())
413
- ->setData('logo_fielname', $subsettingsModel->logo)
 
 
414
  ->setData('header_link_home', $decodeLinksData->header_link_home)
415
  ->setData('header_link_home_name', $decodeLinksData->header_link_home_name)
416
  ->setData('footer_link_home', $decodeLinksData->footer_link_home)
@@ -435,6 +444,7 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
435
  ->setData('show_home_page_banner', $decodeHomeBannerData->show_home_page_banner)
436
  ->setData('banner_fielname', $decodeHomeBannerData->homepage_banner)
437
  ->setData('homepage_banner_url', $decodeHomeBannerData->homepage_banner_url)
 
438
  ->setData('categories1', $decodeCategoryData->categories)
439
  ->setData('categories2', $decodeCategoryData->categories)
440
  ->setData('categories_background_color', $decodeCategoryData->categories_background_color)
@@ -525,22 +535,24 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
525
  ->setData('p_layout_relatedproduct', $pLayoutData->pbottom_layout_settings->p_layout_relatedproduct);
526
  return $subsettingsModel;
527
  }
 
528
  static public function _disableModule($moduleName)
529
  {
530
- $configValue = Mage::getStoreConfig('mobilenowsettings/mobilenowgeneral/status');
531
  $subscriptionstatus = json_decode(Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/subscription'));
532
  if($configValue==0 || $subscriptionstatus->subscritionStatus=='inactive'|| $subscriptionstatus->subscritionStatus=='' || $subscriptionstatus->daysRemaining<=0)
533
  {
534
  $outputPath = "advanced/modules_disable_output/$moduleName";
535
  if (!Mage::getStoreConfig($outputPath))
536
  {
537
- if($configValue==0)
538
  {
539
- Mage::getSingleton("adminhtml/session")->addError('The MobileNow extension is deactivated or there is no account set up within the configuration settings. Please set up an account within System->Configuration->MobileNow and activate the extension to unlock all of the features in MobileNow.' );
540
  }
541
- elseif($subscriptionstatus->subscritionStatus=='inactive'|| $subscriptionstatus->subscritionStatus=='')
542
  {
543
- Mage::getSingleton("adminhtml/session")->addError('There is no account set up within the configuration options. Go to <a target="_blank" href="http://mobilenowapp.com" >http://mobilenowapp.com</a> to get a free account' );
 
544
  }
545
  elseif($subscriptionstatus->daysRemaining<=0)
546
  {
@@ -550,6 +562,7 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
550
  }
551
  }
552
  }
 
553
  static public function getPreviewCategoryUrl()
554
  {
555
  //////////////////GetCategory Id to load in Iframe///////////////////////
@@ -567,6 +580,7 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
567
  }
568
  return $categoryURL;
569
  }
 
570
  static public function getPreviewProductUrl()
571
  {
572
  ///////////////Get product ID to Load in Iframe///////////////////////
@@ -598,5 +612,13 @@ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
598
  }
599
  }
600
 
 
 
 
 
 
 
 
 
601
  }
602
 
48
  $data_array[19]='Tablet';
49
  return($data_array);
50
  }
51
+
52
  static public function getValueArrayUserAgent()
53
  {
54
  $data_array=array();
58
  }
59
  return($data_array);
60
  }
61
+
62
  static public function getOptionArrayStatus()
63
  {
64
  $data_array=array();
66
  $data_array[0]='Inactive';
67
  return($data_array);
68
  }
69
+
70
  static public function getValueArrayStatus()
71
  {
72
  $data_array=array();
76
  }
77
  return($data_array);
78
  }
79
+
80
  public function getSubsettings()
81
  {
82
  $getAllSubSettings=Mage::getModel("mobilenow/themesubsettings")->getCollection();
83
+ $data_array[]= 'Select Preset Template';
84
  foreach($getAllSubSettings as $getAllSubSetting)
85
  {
86
  if($getAllSubSetting->getSubsetname()!='')
88
  }
89
  return($data_array);
90
  }
91
+
92
+ public function getSubsettingCollection()
93
+ {
94
+ $getAllSubSettings = Mage::getModel("mobilenow/themesubsettings")->getCollection()
95
+ ->addFieldToFilter('preview',array('neq' => 1));
96
+ $mobileNowTheme = Mage::getModel("mobilenow/mobilenow");
97
+ $data_array[]= 'Select Preset Template';
98
+ foreach($getAllSubSettings as $getAllSubSetting)
99
+ {
100
+ $subsetName = $getAllSubSetting->getSubsetname();
101
+ if($getAllSubSetting->getSubsetname()==''){
102
+ $subsetName = 'Custom Preset Template for Theme:-'.
103
+ $mobileNowTheme->load($getAllSubSetting->getThemeid())->getThemeName();
104
+ }
105
+
106
+ $data_array[$getAllSubSetting->getID()]= $subsetName;
107
+ }
108
+ return($data_array);
109
+ }
110
+
111
+ public function getDefaultSubsettingId()
112
+ {
113
+ $getDefaultSubSettings = Mage::getModel("mobilenow/themesubsettings")->getCollection()
114
+ ->addFieldToFilter('themesubsettings_id',array('eq' => 0))
115
+ ->addFieldToFilter('preview',array('neq' => 1));
116
+ $mobileNowTheme = Mage::getModel("mobilenow/mobilenow");
117
+ $data_array[]= '';
118
+ foreach($getDefaultSubSettings as $getDefaultSubSetting)
119
+ {
120
+ if( $getDefaultSubSetting->getSubsetname()!=''){
121
+ return $getDefaultSubSetting->getId();
122
+ }
123
+ }
124
+ return($data_array);
125
+ }
126
+
127
+ public function processThemeDesignFormData($post_data,$button_type = '',
128
+ $lastRecordId,$createnewThemeFlag,$preview = '0')
129
  {
130
  if($preview == '1'){
131
  $themeSubSettings['css_filename'] = md5($lastRecordId.'_preview').'.css';
132
  }else {
133
  $themeSubSettings['css_filename'] = md5($lastRecordId).'.css';
134
  }
135
+
136
  if($lastRecordId)
137
  {
138
  if('saveas_subset' != $button_type){
139
  if($createnewThemeFlag)
140
  {
141
+ $themeSubSettings['themeid']=$lastRecordId;
142
  $themeSubSettings['subsetname']=$post_data['hidden_theme_sub_setting_name'];
143
  }
144
  else
145
  {
146
  $themeSubSettings['themeid']=$lastRecordId;
147
+ //$themeSubSettings['subsetname']=$post_data['hidden_theme_sub_setting_name'];
148
  }
149
  }else{
150
  $themeSubSettings['subsetname']=$post_data['hidden_theme_sub_setting_name'];
157
  $themeSubSettings['themeid']='';
158
  }
159
  if($preview == '0'){
160
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  if($post_data['logo_preview_filename'] != ''){
162
  $themeSubSettings['logo'] = $post_data['logo_preview_filename'];
163
  if($lastRecordId){
164
  $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'logo';
165
  $newfile = $path.DS.$post_data['logo_preview_filename'];
166
  $file = $path.DS.'preview'.DS.$lastRecordId.DS.$post_data['logo_preview_filename'];
167
+
168
  if (copy($file, $newfile)) {
169
+ if($post_data['logo_filename'] != ''){
170
  //@unlink($path.DS.$post_data['logo_fielname']);
171
  }
172
+
173
  $new_path = $path.DS.'preview'.DS.$lastRecordId;
 
174
  }
175
  }
176
+ } else if($post_data['logo_filename'] != ''){
177
+ $themeSubSettings['logo'] = $post_data['logo_filename'];
178
  }
179
  } else {
180
  if($post_data['logo_preview_filename'] != ''){
181
  $themeSubSettings['logo'] ='preview'.DS.$lastRecordId.DS.$post_data['logo_preview_filename'];
182
+ } else if($post_data['logo_filename'] != ''){
183
+ $themeSubSettings['logo'] = $post_data['logo_filename'];
184
  }
185
  }
186
+ $themeSubSettings['use_store_logo'] = ($post_data['use_store_logo']!='')? $post_data['use_store_logo']:0;
187
+ $themeSubSettings['logo_image_url'] = $post_data['logo_image_url'];
188
+
189
  //Body background color
190
  $themeSubSettings['bgcolor']=$post_data['background_color'];
191
  //Links
205
  $themeSubSettings['searchcart']= json_encode(array('show_search_cart_area'=>$post_data['show_search_cart_area'],'search_cart_bg_color'=>$post_data['search_cart_bg_color'],'cart_link_color'=>$post_data['cart_link_color']));
206
  //Homepage Banner
207
  if($preview == '0'){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
  $homePageBannerImage = '';
210
  if($post_data['banner_preview_filename'] != ''){
213
  $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'banner';
214
  $newfile = $path.DS.$post_data['banner_preview_filename'];
215
  $file = $path.DS.'preview'.DS.$lastRecordId.DS.$post_data['banner_preview_filename'];
216
+
217
  if (copy($file, $newfile)) {
218
  if($post_data['banner_fielname'] != ''){
219
  //@unlink($path.DS.$post_data['banner_fielname']);
220
  }
221
+
222
  $new_path = $path.DS.'preview'.DS.$lastRecordId;
 
223
  }
224
  }
225
  } else {
227
  }
228
  $homePageBannerarr=array('show_home_page_banner'=>$post_data['show_home_page_banner'],
229
  'homepage_banner'=>$homePageBannerImage,
230
+ 'homepage_banner_url'=>$post_data['homepage_banner_url'],
231
+ 'homepage_banner_image_url'=>$post_data['homepage_banner_image_url']
232
+ );
233
  } else{
234
  $homePageBannerImage = '';
235
  if($post_data['banner_preview_filename'] != ''){
239
  }
240
  $homePageBannerarr=array('show_home_page_banner'=>$post_data['show_home_page_banner'],
241
  'homepage_banner'=>$homePageBannerImage,
242
+ 'homepage_banner_url'=>$post_data['homepage_banner_url'],
243
+ 'homepage_banner_image_url'=>$post_data['homepage_banner_image_url']
244
+ );
245
  }
246
 
247
  $themeSubSettings['homepagebanner']=json_encode($homePageBannerarr);
321
  'c_layout_pag_top'=>$post_data['c_layout_pag_top']
322
  ));
323
 
 
 
 
 
 
 
 
 
 
 
324
  //saving catalog list layout settings
325
  $themeSubSettings['cataloglayoutlist']=json_encode(array('c_list_layout_product_image'=>$post_data['c_list_layout_product_image'],
326
  'c_list_layout_product_title'=>$post_data['c_list_layout_product_title'],
345
  return $themeSubSettings;
346
  }
347
  public function setDesignAndLayoutFormData($subsettingsModel,$getSubsetDefaultId,$subsetParentId)
348
+ {
349
  /*Condition that checks if a theme has a subset assigned and it's present, assigns the Parent value as preset
350
  dropdown value*/
351
+ if($subsetParentId!=''){
352
+ $getSubsetDefaultId=$subsetParentId;
353
+ }
354
+ else $getSubsetDefaultId=$getSubsetDefaultId;
355
+
356
+
357
+ if($getSubsetDefaultId==0)
358
+ $getSubsetDefaultId= $subsettingsModel->getId();
359
  //Background Color
360
  //Links
361
  $decodeLinksData=json_decode($subsettingsModel->getLinks());
403
  $decodeProductImageborderData=json_decode($subsettingsModel->getProductimagedetails());
404
  //Show
405
  $decodeProductShowData=json_decode($subsettingsModel->getShowproductdeails());
406
+
407
  //Homepage Layout
408
  $hLayoutData = json_decode($subsettingsModel->getHomepagelayoutmain());
409
  //Catalog Layout main
415
  //Product page
416
  $pLayoutData = json_decode($subsettingsModel->getProductlayoutmain());
417
 
 
418
  $subsettingsModel->setData('preset_sub_settings', $getSubsetDefaultId)
419
  ->setData('background_color', $subsettingsModel->getBgcolor())
420
+ ->setData('logo_filename', $subsettingsModel->logo)
421
+ ->setData('use_store_logo', $subsettingsModel->use_store_logo)
422
+ ->setData('logo_image_url', $subsettingsModel->logo_image_url)
423
  ->setData('header_link_home', $decodeLinksData->header_link_home)
424
  ->setData('header_link_home_name', $decodeLinksData->header_link_home_name)
425
  ->setData('footer_link_home', $decodeLinksData->footer_link_home)
444
  ->setData('show_home_page_banner', $decodeHomeBannerData->show_home_page_banner)
445
  ->setData('banner_fielname', $decodeHomeBannerData->homepage_banner)
446
  ->setData('homepage_banner_url', $decodeHomeBannerData->homepage_banner_url)
447
+ ->setData('homepage_banner_image_url', $decodeHomeBannerData->homepage_banner_image_url)
448
  ->setData('categories1', $decodeCategoryData->categories)
449
  ->setData('categories2', $decodeCategoryData->categories)
450
  ->setData('categories_background_color', $decodeCategoryData->categories_background_color)
535
  ->setData('p_layout_relatedproduct', $pLayoutData->pbottom_layout_settings->p_layout_relatedproduct);
536
  return $subsettingsModel;
537
  }
538
+
539
  static public function _disableModule($moduleName)
540
  {
541
+ $configValue = Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/status');
542
  $subscriptionstatus = json_decode(Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/subscription'));
543
  if($configValue==0 || $subscriptionstatus->subscritionStatus=='inactive'|| $subscriptionstatus->subscritionStatus=='' || $subscriptionstatus->daysRemaining<=0)
544
  {
545
  $outputPath = "advanced/modules_disable_output/$moduleName";
546
  if (!Mage::getStoreConfig($outputPath))
547
  {
548
+ if($subscriptionstatus->subscritionStatus=='inactive'|| $subscriptionstatus->subscritionStatus=='')
549
  {
550
+ Mage::getSingleton("adminhtml/session")->addError('There is no account set up within the configuration options. Go to <a target="_blank" href="http://mobilenowapp.com" >http://mobilenowapp.com</a> to get a free account' );
551
  }
552
+ elseif($configValue==0)
553
  {
554
+ //Mage::getSingleton("adminhtml/session")->addError('The MobileNow extension is deactivated or there is no account set up within the configuration settings. Please set up an account within System->Configuration->MobileNow and activate the extension to unlock all of the features in MobileNow.' );
555
+ Mage::getSingleton("adminhtml/session")->addError('The mobilenow extension is not currently enabled, please <a target="_blank" href="'. Mage::helper('adminhtml')->getUrl('adminhtml/system_config/edit/section/mobilenowsettings').'" >Click Here</a> to enable MobileNow.');
556
  }
557
  elseif($subscriptionstatus->daysRemaining<=0)
558
  {
562
  }
563
  }
564
  }
565
+
566
  static public function getPreviewCategoryUrl()
567
  {
568
  //////////////////GetCategory Id to load in Iframe///////////////////////
580
  }
581
  return $categoryURL;
582
  }
583
+
584
  static public function getPreviewProductUrl()
585
  {
586
  ///////////////Get product ID to Load in Iframe///////////////////////
612
  }
613
  }
614
 
615
+ public function isTemplateCustom($id) {
616
+ $getSubSettings = Mage::getModel("mobilenow/themesubsettings")->load($id);
617
+
618
+ if($getSubSettings->getSource()=='CUSTOM'){
619
+ return true;
620
+ }
621
+ return false;
622
+ }
623
  }
624
 
app/code/community/Redstage/Mobilenow/Helper/Theme.php CHANGED
@@ -1,55 +1,56 @@
1
  <?php
2
- class Redstage_Mobilenow_Helper_Theme extends Mage_Core_Helper_Abstract
3
- {
4
-
5
  protected $_themeId = null;
6
- public function __construct()
7
- {
8
  $this->_themeId = Mage::getSingleton('core/session')->getMobileNowId();
9
- $this->_from = Mage::getSingleton('core/session')->getLoadFrom();
10
-
 
 
 
 
 
11
  }
12
- public function getTheme()
13
- {
14
- // return Mage::getSingleton('checkout/cart');
15
  }
16
-
17
- public function getThemeId()
18
- {
19
- return $this->_themeId;
 
 
 
 
 
 
 
 
 
 
20
  }
21
-
22
- public function getThemeData($val=''){
23
- if ($val== '') return false;
24
- $subsettings = unserialize(Mage::app()->getCache()->load("Mobiletheme".$this->_from.$this->_themeId));
25
- $subsettings->getData($val) ;
26
- //echo $subsettings;
27
- $final = $subsettings->getData($val) ;
28
- // return $final = json_decode($subsettings->getData($val));
29
- $check_json = json_decode($final);
30
- if (is_object($check_json))
31
- return $check_json;
32
- else
33
- return $final;
34
- }
35
-
36
- public function getSortbox(){
37
- // /$sort_array=array();
38
- $sort_array[1]=array('label'=>'Position','order'=>'position','dir'=>'asc');
39
- $sort_array[2]=array('label'=>'Price High -&gt Low','order'=>'price','dir'=>'desc');
40
- $sort_array[3]=array('label'=>'Price Low -&gt High','order'=>'price','dir'=>'asc');
41
- $sort_array[4]=array('label'=>'Name A -&gt Z','order'=>'name','dir'=>'asc');
42
- $sort_array[5]=array('label'=>'Name Z -&gt A','order'=>'name','dir'=>'desc');
43
- return $sort_array ;
44
- }
45
-
46
- //$a = $this->helper('mobilenow/theme')->getThemeData('homepagebanner');
47
- // $this->helper('mobilenow/theme')->getThemeId()
48
-
49
- function generateThemeCssFile($css_var_arr) {
50
- $values_array = array();
51
 
52
- $css_content = '.page{background-color: {%background_color%} ;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  .header-container .search-panel {
54
  background-color: {%search_cart_area_bg_color%};
55
  }
@@ -222,52 +223,73 @@ class Redstage_Mobilenow_Helper_Theme extends Mage_Core_Helper_Abstract
222
  .product-view .product-collateral .box-tags h2,
223
  .product-view .product-collateral .block-related h2,
224
  .product-view .product-collateral .box-reviews h2
225
- {
226
- background: {%breadcrumb_bg_color%} !important;
227
- padding:5px 3px;
228
- color: {%breadcrumb_font_color%} !important;
229
- }
230
- .product-view .product-collateral .box-description .std {
231
- color: {%product_description_color%} !important;
232
- }
233
- #product-attribute-specs-table table tr.even,#product-attribute-specs-table table tr.alt, #product-attribute-specs-table table tr:nth-of-type(2n) {
234
- background: {%additional_information_bg_color%} !important;
235
- color :{%additional_information_font_color%}!important;
236
- }
237
- #product-attribute-specs-table > tbody {
238
- background: {%additional_information_bg_color%} !important;
239
- color :{%additional_information_font_color%} !important;
240
- }
241
-
242
- #product-attribute-specs-table tbody tr, #product-attribute-specs-table tbody td {
243
- background: {%additional_information_bg_color%} !important;
244
- border: 1px solid {%background_color%};
245
- color : {%additional_information_font_color%} !important;
246
- }
247
- .box-collateral.box-reviews >*{
248
- background: {%full_reviews_bg_color%} !important;
249
- color :{%full_reviews_font_color%} !important;
250
- }
251
- ';
252
- $matches = array();
253
- preg_match_all("/\{\%([a-z_A-Z0-9]*)\%\}/", $css_content, $matches);
254
- $variables_array = $matches[1];
255
 
256
- if (count($variables_array) > 0)
257
- foreach ($variables_array as $key) {
258
- $values_array[] = $css_var_arr[$key];
259
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
 
261
- $new_variables_array = array();
262
- foreach ($variables_array as $variable) {
263
- $new_variables_array[] = '/\{\%' . $variable . '\%\}/';
264
  }
265
- $body_content = preg_replace($new_variables_array, $values_array, $css_content);
266
-
267
 
268
- return $body_content;
 
 
269
  }
270
-
 
 
 
 
 
271
  }
272
 
273
-
1
  <?php
2
+
3
+ class Redstage_Mobilenow_Helper_Theme extends Mage_Core_Helper_Abstract {
4
+
5
  protected $_themeId = null;
6
+
7
+ public function __construct() {
8
  $this->_themeId = Mage::getSingleton('core/session')->getMobileNowId();
9
+ $this->_from = Mage::getSingleton('core/session')->getLoadFrom();
10
+ }
11
+
12
+ public function getTheme() {
13
+ /**
14
+ * ::TODO::
15
+ */
16
  }
17
+
18
+ public function getThemeId() {
19
+ return $this->_themeId;
20
  }
21
+
22
+ public function getThemeData($val='') {
23
+ if ($val == '')
24
+ return false;
25
+ $subsettings = unserialize(Mage::app()->getCache()->load("Mobiletheme" . $this->_from . $this->_themeId));
26
+ $subsettings->getData($val);
27
+
28
+ $final = $subsettings->getData($val);
29
+
30
+ $check_json = json_decode($final);
31
+ if (is_object($check_json))
32
+ return $check_json;
33
+ else
34
+ return $final;
35
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
+ public function getSortbox() {
38
+ // /$sort_array=array();
39
+ $sort_array[1] = array('label' => 'Position', 'order' => 'position', 'dir' => 'asc');
40
+ $sort_array[2] = array('label' => 'Price High -&gt Low', 'order' => 'price', 'dir' => 'desc');
41
+ $sort_array[3] = array('label' => 'Price Low -&gt High', 'order' => 'price', 'dir' => 'asc');
42
+ $sort_array[4] = array('label' => 'Name A -&gt Z', 'order' => 'name', 'dir' => 'asc');
43
+ $sort_array[5] = array('label' => 'Name Z -&gt A', 'order' => 'name', 'dir' => 'desc');
44
+ return $sort_array;
45
+ }
46
+
47
+ //$a = $this->helper('mobilenow/theme')->getThemeData('homepagebanner');
48
+ // $this->helper('mobilenow/theme')->getThemeId()
49
+
50
+ function generateThemeCssFile($css_var_arr) {
51
+ $values_array = array();
52
+
53
+ $css_content = '.page{background-color: {%background_color%} ;}
54
  .header-container .search-panel {
55
  background-color: {%search_cart_area_bg_color%};
56
  }
223
  .product-view .product-collateral .box-tags h2,
224
  .product-view .product-collateral .block-related h2,
225
  .product-view .product-collateral .box-reviews h2
226
+ {
227
+ background: {%breadcrumb_bg_color%} !important;
228
+ padding:5px 3px;
229
+ color: {%breadcrumb_font_color%} !important;
230
+ }
231
+ .product-view .product-collateral .box-description .std {
232
+ color: {%product_description_color%} !important;
233
+ }
234
+ #product-attribute-specs-table table tr.even,#product-attribute-specs-table table tr.alt, #product-attribute-specs-table table tr:nth-of-type(2n) {
235
+ background: {%additional_information_bg_color%} !important;
236
+ color :{%additional_information_font_color%}!important;
237
+ }
238
+ #product-attribute-specs-table > tbody {
239
+ background: {%additional_information_bg_color%} !important;
240
+ color :{%additional_information_font_color%} !important;
241
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
 
243
+ #product-attribute-specs-table tbody tr, #product-attribute-specs-table tbody td {
244
+ background: {%additional_information_bg_color%} !important;
245
+ border: 1px solid {%background_color%};
246
+ color : {%additional_information_font_color%} !important;
247
+ }
248
+ .box-collateral.box-reviews >*{
249
+ background: {%full_reviews_bg_color%} !important;
250
+ color :{%full_reviews_font_color%} !important;
251
+ }
252
+ .totals table tr td, .totals table tr td .price, .cart-price span.price{ color:#000000 !important; }
253
+ .opc > li .step-title,
254
+ .account-login .page-title h1,
255
+ .page-title h1,
256
+ .page-title h2{ background-color: {%search_cart_area_bg_color%} !important;
257
+ text-transform:uppercase !important; }
258
+ .opc > li .step-title h2,.step-title h2{
259
+ font-family: inherit;
260
+ font-weight: bold;
261
+ font-size: 1em;
262
+ }
263
+ .messages li.success-msg li {
264
+ background: none repeat scroll 0 0 #084 !important;
265
+ }
266
+ .account-login .new-users,.account-login .registered-users,.account-create ul{ padding-top:10px; }
267
+ .account-login .new-users .fieldset,.account-login .registered-users .fieldset,
268
+ .my-account .box-account{ color: #4D4D4D !important;
269
+ font-size: 1em !important;
270
+ font-weight: 500 !important;
271
+ margin-bottom: 0.16667em !important; }
272
+ .customer-account-forgotpassword .page-title h1,.cart .page-title h1{ padding: 8px; }
273
+ ';
274
+
275
+ $matches = array();
276
+ preg_match_all("/\{\%([a-z_A-Z0-9]*)\%\}/", $css_content, $matches);
277
+ $variables_array = $matches[1];
278
 
279
+ if (count($variables_array) > 0)
280
+ foreach ($variables_array as $key) {
281
+ $values_array[] = $css_var_arr[$key];
282
  }
 
 
283
 
284
+ $new_variables_array = array();
285
+ foreach ($variables_array as $variable) {
286
+ $new_variables_array[] = '/\{\%' . $variable . '\%\}/';
287
  }
288
+ $body_content = preg_replace($new_variables_array, $values_array, $css_content);
289
+
290
+
291
+ return $body_content;
292
+ }
293
+
294
  }
295
 
 
app/code/community/Redstage/Mobilenow/Model/Design/Package.php CHANGED
@@ -1,221 +1,200 @@
1
  <?php
2
 
 
3
 
4
- class Redstage_Mobilenow_Model_Design_Package extends Mage_Core_Model_Design_Package
5
- {
6
- private static $_regexMatchCache = array();
7
  private static $_customThemeTypeCache = array();
8
-
9
- public function setPackageName($name = '')
10
- {
11
- //echo $_SERVER['HTTP_USER_AGENT'];exit;
12
- $cache = Mage::app()->getCache();
13
- $fr_admin = Mage::app()->getRequest()->getParam('isadmin');
14
- $ld_theme_id = Mage::app()->getRequest()->getParam('theme_id');
15
- $preview = Mage::app()->getRequest()->getParam('preview') ? Mage::app()->getRequest()->getParam('preview'):0;
16
-
17
- if( Mage::helper('core')->isModuleEnabled('Redstage_Mobilenow')){
18
-
19
- if($fr_admin==1 && $ld_theme_id){
20
- $themePackage = $this->_getThemesettingsValue($ld_theme_id);
21
- $m_themeid = $ld_theme_id;
22
- $themePackage_name = 'redstage-mobilenow';
23
- $from='preview';
24
- Mage::getSingleton('core/session')->setMobileNowId($m_themeid);
25
- Mage::getSingleton('core/session')->setLoadFrom($from);
26
-
27
- }
28
- else{
29
- $themePackage = $this->_checkUserAgentAgainstmobileNow();
30
- $from='front';
31
- $m_themeid =$themePackage['id'];
32
- if ($themePackage['ip_override']) {
33
- if ($themePackage['ip_override'] == $_SERVER['REMOTE_ADDR']){
34
- $themePackage_name= $themePackage['val'];
35
- Mage::getSingleton('core/session')->setMobileNowId($themePackage['id']);
36
- Mage::getSingleton('core/session')->setLoadFrom($from);
37
- }else{
38
- $themePackage=null;
39
- $themePackage_name= null;
40
- Mage::getSingleton('core/session')->setMobileNowId('');
41
- }
42
-
43
- } else{
44
- $themePackage_name= $themePackage['val'];
45
- Mage::getSingleton('core/session')->setMobileNowId($themePackage['id']);
46
- Mage::getSingleton('core/session')->setLoadFrom($from);
47
- }
48
- }
49
-
50
-
51
- if(!$cache->load("Mobiletheme".$from.$m_themeid)){
52
- $themeSubSettingsModel = Mage::getModel('mobilenow/themesubsettings');
53
- //$selectCurrentRecord = $themeSubSettingsModel->load($m_themeid,'themeid');
54
- $attributes = array('themeid'=> $m_themeid, 'preview'=> $preview);
55
-
56
- $selectCurrentRecord=$themeSubSettingsModel->loadByAttributes($attributes);
57
-
58
- $selectCurrentRecord->setData('social_links',$themePackage['social_links']) ;
59
- $selectCurrentRecord->setData('cart_inputs',$themePackage['cart_inputs']) ;
60
- $selectCurrentRecord->setData('analytics',$themePackage['analytics']) ;
61
- $cache->save(serialize($selectCurrentRecord), "Mobiletheme".$from.$m_themeid, array(), 60*60);
62
- }
63
- }
64
- //echo $themePackage_name;
65
- if (empty($name)) {
66
  // see, if exceptions for user-agents defined in config
67
-
68
- $customPackage = $this->_checkUserAgentAgainstRegexps('design/package/ua_regexp');
69
  if ($customPackage) {
70
  $this->_name = $customPackage;
71
- }
72
- elseif ($themePackage) {
73
- $this->_name = $themePackage_name;
74
-
75
- }
76
- else {
77
  $this->_name = Mage::getStoreConfig('design/package/name', $this->getStore());
78
  }
79
- }
80
- else {
81
  $this->_name = $name;
82
  }
83
-
84
  // make sure not to crash, if wrong package specified
85
  if (!$this->designPackageExists($this->_name, $this->getArea())) {
86
  $this->_name = self::DEFAULT_PACKAGE;
87
- }
88
-
89
  return $this;
90
  }
91
 
92
-
93
-
94
- protected function _checkUserAgentAgainstmobileNow($regexpsConfigPath='design/mobile_now')
95
- {
96
- if (empty($_SERVER['HTTP_USER_AGENT'])) {
97
  return false;
98
  }
99
-
100
- if (!empty(self::$_customThemeTypeCache[$regexpsConfigPath])) {
101
  return self::$_customThemeTypeCache[$regexpsConfigPath];
102
  }
103
-
104
-
105
  $regexps = $this->_generateRegexparryfromMobileNow();
106
 
107
  if (empty($regexps)) {
108
  return false;
109
  }
110
-
111
- if( $this->_getExcludePackageByUserAgent($regexps))
112
- return false;
113
- else{
114
- return self::getPackageByUserAgent($regexps, $regexpsConfigPath);
115
- }
116
-
117
- return self::getPackageByUserAgent($regexps, $regexpsConfigPath);
118
  }
119
 
 
 
 
 
120
 
121
- protected function _generateRegexparryfromMobileNow(){
122
- $store_id = Mage::app()->getStore()->getId();
123
- $collection = Mage::getModel("mobilenow/mobilenow")->getCollection();
124
- $resource = Mage::getSingleton('core/resource');
125
-
126
- $collection->getSelect()
127
- ->join(
128
- array('lk'=>$resource->getTableName('mobilenow/themestore')),
129
- 'lk.theme_id = main_table.theme_id',
130
- array('lk.store_id','lk.theme_id')
131
- );
132
- $collection->addStoreFilter($store_id);
133
- $exp_chek =array();
134
- foreach($collection as $themes){
135
- if($themes->getStatus()){
136
- $agents = Mage::helper('mobilenow')->getOptionArrayUserAgent();
137
- if(0==$themes->getUserAgentRegexValues()){
138
- $reg_val =array_keys($agents);
139
- array_shift($reg_val);
140
- }else
141
- $reg_val = explode(',', $themes->getUserAgentRegexValues());
142
- $reg_piped='';
143
-
144
- foreach($reg_val as $val){
145
- $reg_piped .=$agents[$val].'|';
146
- $exp_chek[$themes->getThemeId()]['regexp'] =rtrim($reg_piped.$themes->getUserAgentRegexCustomValues(),'|');
147
- $exp_chek[$themes->getThemeId()]['value'] = 'redstage-mobilenow';
148
- $exp_chek[$themes->getThemeId()]['exclude'] = $themes->getExcludeUserAgentRegexCustomValues() ;
149
- $exp_chek[$themes->getThemeId()]['ip_override'] = $themes->getIpOverride() ;
150
- $exp_chek[$themes->getThemeId()]['social_links'] = $themes->getSocialLinks() ;
151
- $exp_chek[$themes->getThemeId()]['cart_inputs'] = $themes->getCartInputs() ;
152
- $exp_chek[$themes->getThemeId()]['analytics'] = $themes->getAnalytics() ;
153
- }
154
-
155
- }
156
- }
157
- return $exp_chek;
158
-
159
- }
160
-
161
- protected function _getThemesettingsValue($ld_theme_id){
162
-
163
- $themes = Mage::getModel("mobilenow/mobilenow")->load($ld_theme_id);
164
-
165
- $settings['ip_override'] = $themes->getIpOverride() ;
166
- $settings['social_links'] = $themes->getSocialLinks() ;
167
- $settings['cart_inputs'] = $themes->getCartInputs() ;
168
- $settings['analytics'] = $themes->getAnalytics() ;
169
-
170
- return $settings ;
171
- }
172
- protected function _getExcludePackageByUserAgent(array $rules)
173
- {
174
-
175
- if(isset($rule['exclude'])){
176
- foreach ($rules as $rule) {
177
- $regexp = '/' . trim($rule['exclude'], '/') . '/';
178
- if (@preg_match($regexp, $_SERVER['HTTP_USER_AGENT'])) {
179
- //echo $rule['exclude'];
180
- return true;
181
- }
182
- }
183
- }
184
  return false;
185
  }
186
-
187
- public static function getPackageByUserAgent(array $rules, $regexpsConfigPath = 'path_mock')
188
- {
189
- foreach ($rules as $id=> $rule) {
190
  if (!empty(self::$_regexMatchCache[$rule['regexp']][$_SERVER['HTTP_USER_AGENT']])) {
191
-
192
- $pkg['val']=$rule['value'];
193
- $pkg['ip_override']=$rule['ip_override'];
194
- $pkg['social_links']=$rule['social_links'];
195
- $pkg['cart_inputs']=$rule['cart_inputs'];
196
- $pkg['analytics']=$rule['analytics'];
197
- $pkg['id']=$id;
198
- self::$_customThemeTypeCache[$regexpsConfigPath] = $pkg;
199
- return $pkg;
200
  }
201
 
202
  $regexp = '/' . trim($rule['regexp'], '/') . '/';
203
 
204
  if (@preg_match($regexp, $_SERVER['HTTP_USER_AGENT'])) {
205
  self::$_regexMatchCache[$rule['regexp']][$_SERVER['HTTP_USER_AGENT']] = true;
206
-
207
- $pkg['val']=$rule['value'];
208
- $pkg['id']=$id;
209
- $pkg['ip_override']=$rule['ip_override'];
210
- $pkg['social_links']=$rule['social_links'];
211
- $pkg['cart_inputs']=$rule['cart_inputs'];
212
- $pkg['analytics']=$rule['analytics'];
213
- self::$_customThemeTypeCache[$regexpsConfigPath] = $pkg;
214
- return $pkg;
215
  }
216
  }
217
 
218
  return false;
219
  }
220
-
221
  }
1
  <?php
2
 
3
+ class Redstage_Mobilenow_Model_Design_Package extends Mage_Core_Model_Design_Package {
4
 
5
+ private static $_regexMatchCache = array();
 
 
6
  private static $_customThemeTypeCache = array();
7
+
8
+ public function setPackageName($name = '') {
9
+ $cache = Mage::app()->getCache();
10
+ $fr_admin = Mage::app()->getRequest()->getParam('isadmin');
11
+ $ld_theme_id = Mage::app()->getRequest()->getParam('theme_id');
12
+ $preview = Mage::app()->getRequest()->getParam('preview') ? Mage::app()->getRequest()->getParam('preview') : 0;
13
+
14
+ if (Mage::helper('core')->isModuleEnabled('Redstage_Mobilenow')) {
15
+
16
+ if ($fr_admin == 1 && $ld_theme_id) {
17
+ $themePackage = $this->_getThemesettingsValue($ld_theme_id);
18
+ $m_themeid = $ld_theme_id;
19
+ $themePackage_name = 'redstage-mobilenow';
20
+ $from = 'preview';
21
+ Mage::getSingleton('core/session')->setMobileNowId($m_themeid);
22
+ Mage::getSingleton('core/session')->setLoadFrom($from);
23
+ } else {
24
+ $themePackage = $this->_checkUserAgentAgainstmobileNow();
25
+ $from = 'front';
26
+ $m_themeid = $themePackage['id'];
27
+ if ($themePackage['ip_override']) {
28
+ if ($themePackage['ip_override'] == $_SERVER['REMOTE_ADDR']) {
29
+ $themePackage_name = $themePackage['val'];
30
+ Mage::getSingleton('core/session')->setMobileNowId($themePackage['id']);
31
+ Mage::getSingleton('core/session')->setLoadFrom($from);
32
+ } else {
33
+ $themePackage = null;
34
+ $themePackage_name = null;
35
+ Mage::getSingleton('core/session')->setMobileNowId('');
36
+ }
37
+ } else {
38
+ $themePackage_name = $themePackage['val'];
39
+ Mage::getSingleton('core/session')->setMobileNowId($themePackage['id']);
40
+ Mage::getSingleton('core/session')->setLoadFrom($from);
41
+ }
42
+ }
43
+
44
+
45
+ if (!$cache->load("Mobiletheme" . $from . $m_themeid)) {
46
+ $themeSubSettingsModel = Mage::getModel('mobilenow/themesubsettings');
47
+
48
+ $attributes = array('themeid' => $m_themeid, 'preview' => $preview);
49
+
50
+ $selectCurrentRecord = $themeSubSettingsModel->loadByAttributes($attributes);
51
+
52
+ $selectCurrentRecord->setData('social_links', $themePackage['social_links']);
53
+ $selectCurrentRecord->setData('cart_inputs', $themePackage['cart_inputs']);
54
+ $selectCurrentRecord->setData('analytics', $themePackage['analytics']);
55
+ $cache->save(serialize($selectCurrentRecord), "Mobiletheme" . $from . $m_themeid, array(), 60 * 60);
56
+ }
57
+ }
58
+
59
+ if (empty($name)) {
 
 
 
 
 
60
  // see, if exceptions for user-agents defined in config
61
+ $customPackage = $this->_checkUserAgentAgainstRegexps('design/package/ua_regexp');
 
62
  if ($customPackage) {
63
  $this->_name = $customPackage;
64
+ } elseif ($themePackage) {
65
+ $this->_name = $themePackage_name;
66
+ } else {
 
 
 
67
  $this->_name = Mage::getStoreConfig('design/package/name', $this->getStore());
68
  }
69
+ } else {
 
70
  $this->_name = $name;
71
  }
72
+
73
  // make sure not to crash, if wrong package specified
74
  if (!$this->designPackageExists($this->_name, $this->getArea())) {
75
  $this->_name = self::DEFAULT_PACKAGE;
76
+ }
77
+
78
  return $this;
79
  }
80
 
81
+ protected function _checkUserAgentAgainstmobileNow($regexpsConfigPath='design/mobile_now') {
82
+ if (empty($_SERVER['HTTP_USER_AGENT'])) {
 
 
 
83
  return false;
84
  }
85
+
86
+ if (!empty(self::$_customThemeTypeCache[$regexpsConfigPath])) {
87
  return self::$_customThemeTypeCache[$regexpsConfigPath];
88
  }
89
+
90
+
91
  $regexps = $this->_generateRegexparryfromMobileNow();
92
 
93
  if (empty($regexps)) {
94
  return false;
95
  }
96
+
97
+ if ($this->_getExcludePackageByUserAgent($regexps))
98
+ return false;
99
+ else {
100
+ return self::getPackageByUserAgent($regexps, $regexpsConfigPath);
101
+ }
102
+
103
+ return self::getPackageByUserAgent($regexps, $regexpsConfigPath);
104
  }
105
 
106
+ protected function _generateRegexparryfromMobileNow() {
107
+ $store_id = Mage::app()->getStore()->getId();
108
+ $collection = Mage::getModel("mobilenow/mobilenow")->getCollection();
109
+ $resource = Mage::getSingleton('core/resource');
110
 
111
+ $collection->getSelect()
112
+ ->join(
113
+ array('lk' => $resource->getTableName('mobilenow/themestore')), 'lk.theme_id = main_table.theme_id', array('lk.store_id', 'lk.theme_id')
114
+ );
115
+ $collection->addStoreFilter($store_id);
116
+ $exp_chek = array();
117
+ foreach ($collection as $themes) {
118
+ if ($themes->getStatus()) {
119
+ $agents = Mage::helper('mobilenow')->getOptionArrayUserAgent();
120
+ if (0 == $themes->getUserAgentRegexValues()) {
121
+ $reg_val = array_keys($agents);
122
+ array_shift($reg_val);
123
+ }else
124
+ $reg_val = explode(',', $themes->getUserAgentRegexValues());
125
+ $reg_piped = '';
126
+
127
+ foreach ($reg_val as $val) {
128
+ $reg_piped .=$agents[$val] . '|';
129
+ $exp_chek[$themes->getThemeId()]['regexp'] = rtrim($reg_piped . $themes->getUserAgentRegexCustomValues(), '|');
130
+ $exp_chek[$themes->getThemeId()]['value'] = 'redstage-mobilenow';
131
+ $exp_chek[$themes->getThemeId()]['exclude'] = $themes->getExcludeUserAgentRegexCustomValues();
132
+ $exp_chek[$themes->getThemeId()]['ip_override'] = $themes->getIpOverride();
133
+ $exp_chek[$themes->getThemeId()]['social_links'] = $themes->getSocialLinks();
134
+ $exp_chek[$themes->getThemeId()]['cart_inputs'] = $themes->getCartInputs();
135
+ $exp_chek[$themes->getThemeId()]['analytics'] = $themes->getAnalytics();
136
+ }
137
+ }
138
+ }
139
+ return $exp_chek;
140
+ }
141
+
142
+ protected function _getThemesettingsValue($ld_theme_id) {
143
+
144
+ $themes = Mage::getModel("mobilenow/mobilenow")->load($ld_theme_id);
145
+
146
+ $settings['ip_override'] = $themes->getIpOverride();
147
+ $settings['social_links'] = $themes->getSocialLinks();
148
+ $settings['cart_inputs'] = $themes->getCartInputs();
149
+ $settings['analytics'] = $themes->getAnalytics();
150
+
151
+ return $settings;
152
+ }
153
+
154
+ protected function _getExcludePackageByUserAgent(array $rules) {
155
+
156
+ if (isset($rule['exclude'])) {
157
+ foreach ($rules as $rule) {
158
+ $regexp = '/' . trim($rule['exclude'], '/') . '/';
159
+ if (@preg_match($regexp, $_SERVER['HTTP_USER_AGENT'])) {
160
+ return true;
161
+ }
162
+ }
163
+ }
 
 
 
 
 
 
 
 
 
 
164
  return false;
165
  }
166
+
167
+ public static function getPackageByUserAgent(array $rules, $regexpsConfigPath = 'path_mock') {
168
+ foreach ($rules as $id => $rule) {
 
169
  if (!empty(self::$_regexMatchCache[$rule['regexp']][$_SERVER['HTTP_USER_AGENT']])) {
170
+
171
+ $pkg['val'] = $rule['value'];
172
+ $pkg['ip_override'] = $rule['ip_override'];
173
+ $pkg['social_links'] = $rule['social_links'];
174
+ $pkg['cart_inputs'] = $rule['cart_inputs'];
175
+ $pkg['analytics'] = $rule['analytics'];
176
+ $pkg['id'] = $id;
177
+ self::$_customThemeTypeCache[$regexpsConfigPath] = $pkg;
178
+ return $pkg;
179
  }
180
 
181
  $regexp = '/' . trim($rule['regexp'], '/') . '/';
182
 
183
  if (@preg_match($regexp, $_SERVER['HTTP_USER_AGENT'])) {
184
  self::$_regexMatchCache[$rule['regexp']][$_SERVER['HTTP_USER_AGENT']] = true;
185
+
186
+ $pkg['val'] = $rule['value'];
187
+ $pkg['id'] = $id;
188
+ $pkg['ip_override'] = $rule['ip_override'];
189
+ $pkg['social_links'] = $rule['social_links'];
190
+ $pkg['cart_inputs'] = $rule['cart_inputs'];
191
+ $pkg['analytics'] = $rule['analytics'];
192
+ self::$_customThemeTypeCache[$regexpsConfigPath] = $pkg;
193
+ return $pkg;
194
  }
195
  }
196
 
197
  return false;
198
  }
199
+
200
  }
app/code/community/Redstage/Mobilenow/Model/Feed.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_AdminNotification
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * AdminNotification Feed model
30
+ *
31
+ * @category Mage
32
+ * @package Mage_AdminNotification
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Redstage_Mobilenow_Model_Feed extends Mage_AdminNotification_Model_Feed
36
+ {
37
+ const XML_MOBILENOW_FEED_URL_PATH = 'system/mobilenownotification/feed_url';
38
+
39
+ public function getFeedUrl() {
40
+
41
+ if (is_null($this->_feedUrl)) {
42
+ $this->_feedUrl =
43
+ Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://'
44
+ . Mage::getStoreConfig(self::XML_MOBILENOW_FEED_URL_PATH);
45
+ }
46
+ return $this->_feedUrl;
47
+ }
48
+
49
+ public function observe() {
50
+ $model = Mage::getModel('mobilenow/feed')->checkUpdate();
51
+ }
52
+ }
app/code/community/Redstage/Mobilenow/Model/Mobilenow.php CHANGED
@@ -6,6 +6,12 @@ class Redstage_Mobilenow_Model_Mobilenow extends Mage_Core_Model_Abstract
6
 
7
  $this->_init("mobilenow/mobilenow");
8
 
9
- }
 
 
 
 
 
 
10
  }
11
 
6
 
7
  $this->_init("mobilenow/mobilenow");
8
 
9
+ }
10
+
11
+ public function getThemeIdByName( $themeName)
12
+ {
13
+ $themeSettings = $this->getCollection()->addFieldToFilter('theme_name',$themeName)->getFirstItem();
14
+ return $themeSettings->getId();
15
+ }
16
  }
17
 
app/code/community/Redstage/Mobilenow/Model/Mysql4/Mobilenow.php CHANGED
@@ -22,10 +22,9 @@ class Redstage_Mobilenow_Model_Mysql4_Mobilenow extends Mage_Core_Model_Mysql4_A
22
  $checkStores=$object->getStores();
23
  $checkStores[]='0';
24
  }
25
- //print_r($object->getData());
26
- //$themeStoreCollection = Mage::getModel('mobilenow/themestore')->getCollection()->addFieldToFilter('store_id', $object->getStores());
27
  $themeStoreCollection =$this->_getReadAdapter()->select()->from(array('themestore' => $this->getTable('mobilenow/themestore')))->where('themestore.store_id IN (?)', $checkStores);
28
- //echo $themeStoreCollection;exit;
29
  $themeStoreCollection=$this->_getReadAdapter()->fetchAll($themeStoreCollection);
30
  foreach($themeStoreCollection as $themeStore)
31
  {
@@ -39,8 +38,7 @@ class Redstage_Mobilenow_Model_Mysql4_Mobilenow extends Mage_Core_Model_Mysql4_A
39
  }
40
  $customCollectionUserAgentValues=explode('|',$mobilenowCollection->getUserAgentRegexCustomValues());
41
  $mergedCollectionUserAgent=array_filter(array_map('strtolower',array_merge($finalCollectionUserAgent,$customCollectionUserAgentValues)));
42
- //echo '<pre>';print_r($mergedCollectionUserAgent);echo '</pre>';
43
- /////////////// Processing User posted values////////
44
  $objectUserAgent=explode(',',$object->getUserAgentRegexValues());
45
  foreach($objectUserAgent as $objectAgent)
46
  {
@@ -56,8 +54,7 @@ class Redstage_Mobilenow_Model_Mysql4_Mobilenow extends Mage_Core_Model_Mysql4_A
56
  }
57
  }
58
  }
59
- //Check for the subscription details Free/Active subscription
60
- //echo '<pre>';print_r($object->getData());echo '</pre>';exit;
61
  if(Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/subscription'))
62
  $MnSubscription=json_decode(Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/subscription'));
63
  if(($MnSubscription->productId==2 && $object->getStatus()==1) || ($MnSubscription->productId==5 && $object->getStatus()==1))
22
  $checkStores=$object->getStores();
23
  $checkStores[]='0';
24
  }
25
+
 
26
  $themeStoreCollection =$this->_getReadAdapter()->select()->from(array('themestore' => $this->getTable('mobilenow/themestore')))->where('themestore.store_id IN (?)', $checkStores);
27
+
28
  $themeStoreCollection=$this->_getReadAdapter()->fetchAll($themeStoreCollection);
29
  foreach($themeStoreCollection as $themeStore)
30
  {
38
  }
39
  $customCollectionUserAgentValues=explode('|',$mobilenowCollection->getUserAgentRegexCustomValues());
40
  $mergedCollectionUserAgent=array_filter(array_map('strtolower',array_merge($finalCollectionUserAgent,$customCollectionUserAgentValues)));
41
+
 
42
  $objectUserAgent=explode(',',$object->getUserAgentRegexValues());
43
  foreach($objectUserAgent as $objectAgent)
44
  {
54
  }
55
  }
56
  }
57
+ //Check for the subscription details Free/Active subscription
 
58
  if(Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/subscription'))
59
  $MnSubscription=json_decode(Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/subscription'));
60
  if(($MnSubscription->productId==2 && $object->getStatus()==1) || ($MnSubscription->productId==5 && $object->getStatus()==1))
app/code/community/Redstage/Mobilenow/Model/Resource/Layout.php CHANGED
@@ -1,39 +1,34 @@
1
  <?php
2
 
3
- class Redstage_Mobilenow_Model_Resource_Layout extends Mage_Core_Model_Resource_Layout
4
- {
5
-
6
- public function fetchUpdatesByHandle($handle, $params = array())
7
- {
8
- $fr_admin = Mage::app()->getRequest()->getParam('isadmin');
9
- $ld_theme_id = Mage::app()->getRequest()->getParam('theme_id');
10
- $preview = Mage::app()->getRequest()->getParam('preview') ? Mage::app()->getRequest()->getParam('preview'):0;
11
- if($fr_admin==1 && $ld_theme_id){
12
- $store = Mage::app()->getRequest()->getParam('store_id');
13
-
14
-
15
- }else{
16
- $store = Mage::app()->getStore()->getId();
17
-
18
- }
19
-
20
- if(Mage::getSingleton('core/session')->getMobileNowId()){
21
-
22
- $bind = array(
23
- 'store_id' => $store,
24
- 'area' => Mage::getSingleton('core/design_package')->getArea(),
25
- 'package' => 'redstage-mobilenow',
26
- 'theme' => 'default'
27
- );
28
- }else{
29
- $bind = array(
30
- 'store_id' => $store,
31
- 'area' => Mage::getSingleton('core/design_package')->getArea(),
32
- 'package' => Mage::getSingleton('core/design_package')->getPackageName(),
33
- 'theme' => Mage::getSingleton('core/design_package')->getTheme('layout')
34
- );
35
- }
36
-
37
 
38
  foreach ($params as $key => $value) {
39
  if (isset($bind[$key])) {
@@ -45,42 +40,36 @@ class Redstage_Mobilenow_Model_Resource_Layout extends Mage_Core_Model_Resource_
45
 
46
  $readAdapter = $this->_getReadAdapter();
47
  if ($readAdapter) {
48
- if(Mage::getSingleton('core/session')->getMobileNowId()){
49
- $select = $readAdapter->select()
50
- ->from(array('layout_update' => $this->getMainTable()), array('xml'))
51
- ->join(array('link'=>$this->getTable('core/layout_link')),
52
- 'link.layout_update_id=layout_update.layout_update_id',
53
- '')
54
- ->join(array('theme'=>$this->getTable('mobilenow/themelayoutsettings')),
55
- 'theme.layout_link_id=link.layout_link_id AND theme.layout_update_id=layout_update.layout_update_id',
56
- '')
57
- ->where('link.store_id IN (0, :store_id)')
58
- ->where('link.area = :area')
59
- ->where('link.package = :package')
60
- ->where('link.theme = :theme')
61
- ->where('layout_update.handle = :layout_update_handle')
62
- ->where('theme.theme_id ='.Mage::getSingleton('core/session')->getMobileNowId())
63
- ->where('theme.preview ='.$preview)
64
- ->order('layout_update.sort_order ' . Varien_Db_Select::SQL_ASC);
65
- }else{
66
- $select = $readAdapter->select()
67
- ->from(array('layout_update' => $this->getMainTable()), array('xml'))
68
- ->join(array('link'=>$this->getTable('core/layout_link')),
69
- 'link.layout_update_id=layout_update.layout_update_id',
70
- '')
71
- ->where('link.store_id IN (0, :store_id)')
72
- ->where('link.area = :area')
73
- ->where('link.package = :package')
74
- ->where('link.theme = :theme')
75
- ->where('layout_update.handle = :layout_update_handle')
76
- ->order('layout_update.sort_order ' . Varien_Db_Select::SQL_ASC);
77
- }
78
-
79
 
80
  $result = join('', $readAdapter->fetchCol($select, $bind));
81
  }
82
 
83
  return $result;
84
- }
85
-
86
  }
1
  <?php
2
 
3
+ class Redstage_Mobilenow_Model_Resource_Layout extends Mage_Core_Model_Resource_Layout {
4
+
5
+ public function fetchUpdatesByHandle($handle, $params = array()) {
6
+ $fr_admin = Mage::app()->getRequest()->getParam('isadmin');
7
+ $ld_theme_id = Mage::app()->getRequest()->getParam('theme_id');
8
+ $preview = Mage::app()->getRequest()->getParam('preview') ? Mage::app()->getRequest()->getParam('preview') : 0;
9
+ if ($fr_admin == 1 && $ld_theme_id) {
10
+ $store = Mage::app()->getRequest()->getParam('store_id');
11
+ } else {
12
+ $store = Mage::app()->getStore()->getId();
13
+ }
14
+
15
+ if (Mage::getSingleton('core/session')->getMobileNowId()) {
16
+
17
+ $bind = array(
18
+ 'store_id' => $store,
19
+ 'area' => Mage::getSingleton('core/design_package')->getArea(),
20
+ 'package' => 'redstage-mobilenow',
21
+ 'theme' => 'default'
22
+ );
23
+ } else {
24
+ $bind = array(
25
+ 'store_id' => $store,
26
+ 'area' => Mage::getSingleton('core/design_package')->getArea(),
27
+ 'package' => Mage::getSingleton('core/design_package')->getPackageName(),
28
+ 'theme' => Mage::getSingleton('core/design_package')->getTheme('layout')
29
+ );
30
+ }
31
+
 
 
 
 
 
32
 
33
  foreach ($params as $key => $value) {
34
  if (isset($bind[$key])) {
40
 
41
  $readAdapter = $this->_getReadAdapter();
42
  if ($readAdapter) {
43
+ if (Mage::getSingleton('core/session')->getMobileNowId()) {
44
+ $select = $readAdapter->select()
45
+ ->from(array('layout_update' => $this->getMainTable()), array('xml'))
46
+ ->join(array('link' => $this->getTable('core/layout_link')), 'link.layout_update_id=layout_update.layout_update_id', '')
47
+ ->join(array('theme' => $this->getTable('mobilenow/themelayoutsettings')), 'theme.layout_link_id=link.layout_link_id AND theme.layout_update_id=layout_update.layout_update_id', '')
48
+ ->where('link.store_id IN (0, :store_id)')
49
+ ->where('link.area = :area')
50
+ ->where('link.package = :package')
51
+ ->where('link.theme = :theme')
52
+ ->where('layout_update.handle = :layout_update_handle')
53
+ ->where('theme.theme_id =' . Mage::getSingleton('core/session')->getMobileNowId())
54
+ ->where('theme.preview =' . $preview)
55
+ ->order('layout_update.sort_order ' . Varien_Db_Select::SQL_ASC);
56
+ } else {
57
+ $select = $readAdapter->select()
58
+ ->from(array('layout_update' => $this->getMainTable()), array('xml'))
59
+ ->join(array('link' => $this->getTable('core/layout_link')), 'link.layout_update_id=layout_update.layout_update_id', '')
60
+ ->where('link.store_id IN (0, :store_id)')
61
+ ->where('link.area = :area')
62
+ ->where('link.package = :package')
63
+ ->where('link.theme = :theme')
64
+ ->where('layout_update.handle = :layout_update_handle')
65
+ ->order('layout_update.sort_order ' . Varien_Db_Select::SQL_ASC);
66
+ }
67
+
 
 
 
 
 
 
68
 
69
  $result = join('', $readAdapter->fetchCol($select, $bind));
70
  }
71
 
72
  return $result;
73
+ }
74
+
75
  }
app/code/community/Redstage/Mobilenow/Model/Themesubsettings.php CHANGED
@@ -2,17 +2,301 @@
2
 
3
  class Redstage_Mobilenow_Model_Themesubsettings extends Mage_Core_Model_Abstract
4
  {
5
- protected function _construct(){
 
 
 
 
 
6
  parent::_construct();
7
- $this->_init("mobilenow/themesubsettings");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  }
10
 
11
- public function loadByAttributes($attributes)
12
- {
13
- $this->setData($this->getResource()->loadByAttributes($attributes));
14
- return $this;
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
 
2
 
3
  class Redstage_Mobilenow_Model_Themesubsettings extends Mage_Core_Model_Abstract
4
  {
5
+ const XML_DATA_URL_PATH = 'system/mobilenowthemesubsettings/data_url';
6
+
7
+ protected $_dataUrl;
8
+
9
+ protected function _construct()
10
+ {
11
  parent::_construct();
12
+ $this->_init("mobilenow/themesubsettings");
13
+ }
14
+
15
+ public function loadByAttributes($attributes){
16
+ $this->setData($this->getResource()->loadByAttributes($attributes));
17
+ return $this;
18
+ }
19
+
20
+ /**
21
+ * Retrieve feed url
22
+ *
23
+ * @return string
24
+ */
25
+ public function getDataUrl()
26
+ {
27
+ if (is_null($this->_dataUrl)) {
28
+ $this->_dataUrl = Mage::getStoreConfig(self::XML_DATA_URL_PATH);
29
+ }
30
+ return $this->_dataUrl;
31
+ }
32
+
33
+ public function fetchThemeSubsetData()
34
+ {
35
+ $feedData = array();
36
 
37
+ $feedXml = $this->getFeedData();
38
+ if ($feedXml) {
39
+ foreach ($feedXml as $item) {
40
+ $feedData[] = array(
41
+ 'themesubsettings_id' => (int) $item->id,
42
+ 'defaultsubsetting' =>(int) $item->defaultsubsetting,
43
+ 'subsetname' => (string)$item->subsetname,
44
+ 'primary' =>(int) $item->primary,
45
+ 'logo' => (string)$item->logo,
46
+ 'logo_image_url' => (string)$item->logo_image_url,
47
+ 'bgcolor' => (string)$item->bgcolor,
48
+ 'links' => json_encode( array('header_link_home'=>(string)$item->links->header_link_home, 'header_link_home_name'=>(string)$item->links->header_link_home_name,
49
+ 'footer_link_home'=>(string)$item->links->footer_link_home, 'footer_link_home_name'=>(string)$item->links->footer_link_home_name,
50
+ 'header_link_login'=>(string)$item->links->header_link_login, 'header_link_login_name'=>(string)$item->links->header_link_login_name,
51
+ 'footer_link_login'=>(string)$item->links->footer_link_login, 'footer_link_login_name'=>(string)$item->links->footer_link_login_name,
52
+ 'header_link_myaccount'=>(string)$item->links->header_link_myaccount, 'header_link_myaccount_name'=>(string)$item->links->header_link_myaccount_name,
53
+ 'footer_link_myaccount'=>(string)$item->links->footer_link_myaccount, 'footer_link_myaccount_name'=>(string)$item->links->footer_link_myaccount_name,
54
+ 'header_link_wishlist'=>(string)$item->links->header_link_wishlist, 'header_link_wishlist_name'=>(string)$item->links->header_link_wishlist_name,
55
+ 'footer_link_wishlist'=>(string)$item->links->footer_link_wishlist, 'footer_link_wishlist_name'=>(string)$item->links->footer_link_wishlist_name,
56
+ 'links_color'=>(string)$item->links->links_color)),
57
+ 'textcolor' => (string)$item->textcolor,
58
+ 'searchcart' => json_encode(array('show_search_cart_area'=>(string)$item->searchcart->show_search_cart_area,
59
+ 'search_cart_bg_color'=>(string)$item->searchcart->search_cart_bg_color,
60
+ 'cart_link_color'=>(string)$item->searchcart->cart_link_color)),
61
+ 'homepagebanner' => json_encode(array('show_home_page_banner'=>(string)$item->homepagebanner->show_home_page_banner,
62
+ 'homepage_banner'=>(string)$item->homepagebanner->homepage_banner,
63
+ 'homepage_banner_url'=>(string)$item->homepagebanner->homepage_banner_url,
64
+ 'homepage_banner_image_url'=>(string)$item->homepagebanner->homepage_banner_image_url
65
+ )),
66
+ 'subheadersection' =>(string) $item->subheadersection,
67
+ 'categories' => json_encode(array('categories'=>(string)$item->categories->categories,
68
+ 'categories_background_color'=>(string)$item->categories->categories_background_color)),
69
+ 'newsletter' => json_encode(array('show_newsletter'=>(string)$item->newsletter->show_newsletter,
70
+ 'newsletter_area_backgorund'=>(string)$item->newsletter->newsletter_area_backgorund)),
71
+ 'homepagecustomcode' =>(string) $item->homepagecustomcode,
72
+ 'prefootersection' => '',
73
+ 'footersection' =>(string) $item->footersection,
74
+ 'buttoncolor' => json_encode(array('button_background_color'=>(string)$item->button_background_color,
75
+ 'button_text_color'=>(string)$item->button_text_color,
76
+ 'button_border_color'=>(string)$item->button_border_color)),
77
+ 'breadcrumb' => json_encode(array('show_breadcrumbs'=>(string)$item->breadcrumb->show_breadcrumbs,
78
+ 'breadcrumbs_bg_color'=>(string)$item->breadcrumb->breadcrumbs_bg_color,
79
+ 'breadcrumbs_font_color'=>(string)$item->breadcrumb->breadcrumbs_font_color)),
80
+ 'catalogview' => '',
81
+ 'numberofproductsperpage' =>(string) $item->numberofproductsperpage,
82
+ 'numberofproductschoice' =>(string) $item->numberofproductschoice,
83
+ 'catalogsortby' => json_encode( array('show_sortby_dropdown'=>(string)$item->catalogsortby->show_sortby_dropdown,
84
+ 'sort_options'=>(string)$item->catalogsortby->sort_options)),
85
+ 'toolbarcolor' => json_encode(array('toolbar_bg_color'=>(string)$item->toolbarcolor->toolbar_bg_color,
86
+ 'toolbar_text_color'=>(string)$item->toolbarcolor->toolbar_text_color)),
87
+ 'pagination' => '{"show_pagination":"'.$item->pagination->show_pagination.'",
88
+ "pagination_bg_color":"'.$item->pagination->pagination_bg_color.'",
89
+ "pagination_button_bg_color":"'.$item->pagination->pagination_button_bg_color.'",
90
+ "pagination_button_text_color":"'.$item->pagination->pagination_button_text_color.'"}',
91
+ 'catalogimagedetails' => '{"show_image_border":"'.$item->catalogimagedetails->show_image_border.'",
92
+ "image_border_color":"'.$item->catalogimagedetails->image_border_color.'",
93
+ "catalog_image_width":""}',
94
+ 'catalogproductcolor' => '{"product_title_color":"'.$item->catalogproductcolor->product_title_color.'",
95
+ "product_price_color":"'.$item->catalogproductcolor->product_price_color.'",
96
+ "product_special_price_color":"'.$item->catalogproductcolor->product_special_price_color.'"}',
97
+ 'catalogreviews' => '{"show_review_stars":"'.$item->catalogreviews->show_review_stars.'",
98
+ "review_star_color":"'.$item->catalogreviews->review_star_color.'"}',
99
+ 'cataloglearnmore' =>(int) $item->cataloglearnmore,
100
+ 'catalogaddtocart' => '{"show_add_to_cart":"'.$item->catalogaddtocart->show_add_to_cart.'",
101
+ "add_to_cart_button_bg_color":"'.$item->catalogaddtocart->show_add_to_cart.'",
102
+ "add_to_cart_button_font_color":"'.$item->catalogaddtocart->add_to_cart_button_font_color.'",
103
+ "add_to_cart_button_border_color":"'.$item->catalogaddtocart->add_to_cart_button_border_color.'"}',
104
+ 'cataloggridlines' => '{"show_gridlines":"'.$item->cataloggridlines->show_gridlines.'",
105
+ "gridlines_color":"'.$item->cataloggridlines->gridlines_color.'"}',
106
+ 'producttitlecolor' =>(string) $item->producttitlecolor,
107
+ 'productimagedetails' => '{"show_product_image_border":"'.$item->productimagedetails->show_product_image_border.'",
108
+ "product_image_border_color":"'.$item->productimagedetails->product_image_border_color.'",
109
+ "product_image_width":"'.$item->productimagedetails->product_image_width.'"}',
110
+ 'showproductdetails' => '{"show_product_availability":"'.$item->showproductdetails->show_product_image_border.'",
111
+ "show_product_wishlist_link":"'.$item->showproductdetails->show_product_wishlist_link.'",
112
+ "show_product_reviews_summary":"'.$item->showproductdetails->show_product_reviews_summary.'",
113
+ "show_product_description":"'.$item->showproductdetails->show_product_description.'",
114
+ "product_description_color":"'.$item->showproductdetails->product_description_color.'",
115
+ "show_product_additional_information":"'.$item->showproductdetails->show_product_additional_information.'",
116
+ "additional_information_bg_color":"'.$item->showproductdetails->additional_information_bg_color.'",
117
+ "additional_information_font_color":"'.$item->showproductdetails->additional_information_font_color.'",
118
+ "show_full_reviews_on_product_page":"'.$item->showproductdetails->show_full_reviews_on_product_page.'",
119
+ "full_reviews_bg_color":"'.$item->showproductdetails->full_reviews_bg_color.'",
120
+ "full_reviews_font_color":"'.$item->showproductdetails->full_reviews_font_color.'",
121
+ "show_related_products":"'.$item->showproductdetails->show_related_products.'"}',
122
+ 'homepagelayoutmain' => '{"h_layout_search_cart":"'.$item->homepagelayoutmain->h_layout_search_cart.'",
123
+ "h_layout_sub_header":"'.$item->homepagelayoutmain->h_layout_sub_header.'",
124
+ "h_layout_banner":"'.$item->homepagelayoutmain->h_layout_banner.'",
125
+ "h_layout_feature":"'.$item->homepagelayoutmain->h_layout_feature.'",
126
+ "h_layout_categories":"'.$item->homepagelayoutmain->h_layout_categories.'",
127
+ "h_layout_news_signup":"'.$item->homepagelayoutmain->h_layout_news_signup.'"}',
128
+ 'cataloglayoutmain' => '{"c_layout_breadcrumbs":"'.$item->cataloglayoutmain->c_layout_breadcrumbs.'",
129
+ "c_layout_toolbar":"'.$item->cataloglayoutmain->c_layout_toolbar.'",
130
+ "c_layout_pag_top":"'.$item->cataloglayoutmain->c_layout_pag_top.'"}',
131
+ 'cataloglayoutgrid' => '',
132
+ 'cataloglayoutlist' => '{"c_list_layout_product_image":null,
133
+ "c_list_layout_product_title":null,
134
+ "c_list_layout_product_price":"'.$item->cataloglayoutlist->c_list_layout_product_price.'",
135
+ "c_list_layout_product_review":"'.$item->cataloglayoutlist->c_list_layout_product_review.'",
136
+ "c_list_layout_product_learn":"'.$item->cataloglayoutlist->c_list_layout_product_learn.'",
137
+ "c_list_layout_product_addtocart":"'.$item->cataloglayoutlist->c_list_layout_product_addtocart.'"}',
138
+ 'productlayoutmain' => '{"ptop_layout_settings":{
139
+ "p_layout_availability":"'.$item->productlayoutmain->p_layout_availability.'",
140
+ "p_layout_pricing":"'.$item->productlayoutmain->p_layout_pricing.'",
141
+ "p_layout_addtocart":"'.$item->productlayoutmain->p_layout_addtocart.'",
142
+ "p_layout_wishlist":"'.$item->productlayoutmain->p_layout_wishlist.'",
143
+ "p_layout_review":"'.$item->productlayoutmain->p_layout_review.'"},
144
+ "pbottom_layout_settings":{
145
+ "p_layout_desc":"'.$item->productlayoutmain->p_layout_desc.'",
146
+ "p_layout_additionalinfo":"'.$item->productlayoutmain->p_layout_additionalinfo.'",
147
+ "p_layout_fullreview":"'.$item->productlayoutmain->p_layout_fullreview.'",
148
+ "p_layout_relatedproduct":"'.$item->productlayoutmain->p_layout_relatedproduct.'"}
149
+ }',
150
+ 'parent' => (int) $item->parent,
151
+ 'themeid' => (int)$item->themeid,
152
+ 'preview' => (int)$item->preview,
153
+ 'css_filename' => (string)$item->css_filename,
154
+ 'dateinserted' => $this->getDate((string)$item->dateinserted),
155
+ );
156
+ }
157
+ $this->addThemeSubsetData( $feedData);
158
+ }
159
+ }
160
+
161
+ public function addThemeSubsetData( $themeSubsetData)
162
+ {
163
+ $model = Mage::getModel('mobilenow/themesubsettings');
164
+ foreach($themeSubsetData as $key=>$themeSubset){
165
+
166
+ foreach($themeSubset as $keySubsetData=> $subsetData){
167
+ $model->setData( $keySubsetData, $subsetData);
168
+ }
169
+
170
+ $themeSubsetting = $model->getCollection()
171
+ ->addFieldToFilter('themesubsettings_id',(int) $themeSubsetData[$key]['themesubsettings_id'])
172
+ //->addFieldToFilter('themeid',(int) $themeSubsetData[$key]['themeid'])
173
+ ->addFieldToFilter('preview',0);
174
+
175
+ if ($themeSubsetting->getFirstItem()->getId()) {
176
+ $model->setId($themeSubsetting->getFirstItem()->getId());
177
+ }
178
+ $model->save();
179
+ $this->addCssSubsetData( $themeSubsetData[$key]['css_filename']);
180
+ }
181
  }
182
 
183
+ public function addCssSubsetData( $cssFileName)
184
+ {
185
+ $css_var_arr = $this->__setCssVariables($item);
186
+ $csspath = Mage::getBaseDir('media') . DS . 'mobilenow_theme_css' . DS;
187
+ $css_file_name = Mage::getBaseDir('media') . DS . 'mobilenow_theme_css' . DS . $cssFileName . '.css';
188
+ mkdir($csspath);
189
+ $css_string = Mage::helper('mobilenow/theme')->generateThemeCssFile($css_var_arr);
190
+ if (file_exists($css_file_name)) {
191
+ @unlink($css_file_name);
192
+ }
193
+
194
+ file_put_contents($css_file_name, $css_string);
195
+ }
196
+
197
+ protected function __setCssVariables($item)
198
+ {
199
+ $css_var_arr = array();
200
+
201
+ $css_var_arr['background_color'] = $item->bgcolor;
202
+ $css_var_arr['search_cart_area_bg_color'] = $item->searchcart->search_cart_bg_color;
203
+ $css_var_arr['cart_link_color'] = $item->searchcart->cart_link_color;
204
+ $css_var_arr['links_color'] = $item->links->links_color;
205
+ $css_var_arr['text_color'] = $item->text_color;
206
+ $css_var_arr['categories_bg_color'] = $item->categories->categories_background_color;
207
+ $css_var_arr['categories_bg_borderwidth'] = ($item->categories->categories_background_color != '') ? '1' : '0';
208
+ $css_var_arr['button_bg_color'] = $item->buttoncolor->button_background_color;
209
+ $css_var_arr['button_border_color'] = $item->buttoncolor->button_border_color;
210
+ $css_var_arr['button_text_color'] = $item->buttoncolor->button_text_color;
211
 
212
+ $css_var_arr['breadcrumb_bg_color'] = $item->breadcrumb->breadcrumbs_bg_color;
213
+ $css_var_arr['breadcrumb_font_color'] = $item->breadcrumb->breadcrumbs_font_color;
214
+
215
+ $css_var_arr['toolbar_bg_color'] = $item->toolbarcolor->toolbar_bg_color;
216
+ $css_var_arr['toolbar_text_color'] = $item->toolbarcolor->toolbar_text_color;
217
+ $css_var_arr['pagination_panel_bg_color'] = $item->pagination->pagination_bg_color;
218
+ $css_var_arr['pagination_button_bg_color'] = $item->pagination->pagination_button_bg_color;
219
+ $css_var_arr['pagination_button_text_color'] = $item->pagination->pagination_button_text_color;
220
+
221
+ $css_var_arr['image_border_color'] = $item->catalogimagedetails->image_border_color;
222
+ $css_var_arr['image_border_width'] = ($item->catalogimagedetails->show_image_border != '') ?
223
+ (($item->catalogimagedetails->catalog_image_width != '') ? $item->catalogimagedetails->catalog_image_width : '1') : '0';
224
+ $css_var_arr['product_title_color'] = $item->catalogproductcolor->product_title_color;
225
+ $css_var_arr['product_price_color'] = $item->catalogproductcolor->product_price_color;
226
+ $css_var_arr['product_special_price_color'] = $item->catalogproductcolor->product_special_price_color;
227
+ $css_var_arr['review_star_color'] = $item->catalogreviews->review_star_color;
228
+
229
+ $css_var_arr['add_to_cart_bg_color'] = $item->catalogaddtocart->add_to_cart_button_bg_color;
230
+ $css_var_arr['add_to_cart_button_text_color'] = $item->catalogaddtocart->add_to_cart_button_font_color;
231
+ $css_var_arr['add_to_cart_border_color'] = $item->catalogaddtocart->add_to_cart_button_border_color;
232
+ $css_var_arr['gridlines_color'] = $item->cataloggridlines->gridlines_color;
233
+ $css_var_arr['gridlines_color_width'] = ($item->cataloggridlines->gridlines_color != '') ? '1' : '0';
234
+ $css_var_arr['newsletter_bg_color'] = $item->newsletter->newsletter_area_backgorund;
235
+
236
+ //$css_var_arr['productpage_title_color'] = $item->productpage_title_color;
237
+ $css_var_arr['product_image_border_color'] = $item->productimagedetails->product_image_border_color;
238
+ $css_var_arr['product_image_border_width'] = ($item->productimagedetails->product_image_border_color != '') ? '1' : '0';
239
+ $css_var_arr['product_description_color'] = $item->showproductdetails->product_description_color;
240
+ $css_var_arr['additional_information_bg_color'] = $item->showproductdetails->additional_information_bg_color;
241
+ $css_var_arr['additional_information_font_color'] = $item->showproductdetails->additional_information_font_color;
242
+ $css_var_arr['full_reviews_bg_color'] = $item->showproductdetails->full_reviews_bg_color;
243
+ $css_var_arr['full_reviews_font_color'] = $item->showproductdetails->full_reviews_font_color;
244
+
245
+ return $css_var_arr;
246
+ }
247
+
248
+ /**
249
+ * Retrieve feed data as XML element
250
+ *
251
+ * @return SimpleXMLElement
252
+ */
253
+ public function getFeedData()
254
+ {
255
+ $curl = new Varien_Http_Adapter_Curl();
256
+ $curl->setConfig(array(
257
+ 'timeout' => 2
258
+ ));
259
+ $curl->write(Zend_Http_Client::GET, $this->getDataUrl(), '1.0');
260
+ $data = $curl->read();
261
+ if ($data === false) {
262
+ return false;
263
+ }
264
+ $data = preg_split('/^\r?$/m', $data, 2);
265
+ $data = trim($data[1]);
266
+ $curl->close();
267
+
268
+ try {
269
+ $xml = new SimpleXMLElement($data);
270
+ }
271
+ catch (Exception $e) {
272
+ return false;
273
+ }
274
+
275
+ return $xml;
276
+ }
277
+
278
+ public function getFeedXml()
279
+ {
280
+ try {
281
+ $data = $this->getFeedData();
282
+ $xml = new SimpleXMLElement($data);
283
+ }
284
+ catch (Exception $e) {
285
+ $xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8" ?>');
286
+ }
287
+
288
+ return $xml;
289
+ }
290
+
291
+ /**
292
+ * Retrieve DB date from RSS date
293
+ *
294
+ * @param string $rssDate
295
+ * @return string YYYY-MM-DD YY:HH:SS
296
+ */
297
+ public function getDate($rssDate)
298
+ {
299
+ return gmdate('Y-m-d H:i:s', strtotime($rssDate));
300
+ }
301
  }
302
 
app/code/community/Redstage/Mobilenow/controllers/Adminhtml/MobilenowController.php CHANGED
@@ -1,597 +1,517 @@
1
  <?php
2
- class Redstage_Mobilenow_Adminhtml_MobilenowController extends Mage_Adminhtml_Controller_Action
3
- {
4
- protected function _initAction()
5
- {
6
- $this->loadLayout()->_setActiveMenu("mobilenow/mobilenow")->_addBreadcrumb(Mage::helper("adminhtml")->__("Mobilenow Manager"),Mage::helper("adminhtml")->__("Mobilenow Manager"));
 
7
  return $this;
8
  }
9
- public function indexAction()
10
- {
11
  $this->_title($this->__("Mobilenow"));
12
  $this->_title($this->__("MobileNow: Manage Mobile Themes"));
13
  Mage::helper("mobilenow")->_disableModule('Redstage_Mobilenow');
14
  $this->_initAction();
15
  $this->renderLayout();
16
  }
17
- public function editAction()
18
- {
19
  $this->_title($this->__("Mobilenow"));
20
  $this->_title($this->__("Mobilenow"));
21
  $this->_title($this->__("Edit Item"));
22
  Mage::helper("mobilenow")->_disableModule('Redstage_Mobilenow');
23
  $id = $this->getRequest()->getParam("id");
24
- $tab_data= $this->getRequest()->getParam("tab");
25
- $loadId=$this->getRequest()->getParam('load_id');
26
- $loadReset=$this->getRequest()->getParam('reset_delete');
27
  $model = Mage::getModel("mobilenow/mobilenow")->load($id);
28
- if ($model->getId())
29
- {
30
- Mage::register("mobilenow_data", $model);
31
- $this->_loadSubsettings($loadId,$loadReset);
32
  $this->loadLayout();
33
  $this->_setActiveMenu("mobilenow/mobilenow");
34
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Mobilenow Manager"), Mage::helper("adminhtml")->__("Mobilenow Manager"));
35
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Mobilenow Description"), Mage::helper("adminhtml")->__("Mobilenow Description"));
 
 
36
  $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
37
- $this->_addContent($this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit"))->_addLeft($this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tabs"));
38
- $this->renderLayout();
39
- }
40
- else
41
- {
42
- //Mage::getSingleton("adminhtml/session")->addError(Mage::helper("mobilenow")->__("Item does not exist."));
43
- $this->_redirect("*/*/new",array('active_tab'=>$this->getRequest()->getParam('active_tab'),
44
- 'design_subtab'=>$this->getRequest()->getParam('design_subtab'),
45
- 'layout_subtab'=>$this->getRequest()->getParam('layout_subtab'),
46
- 'load_id' => $this->getRequest()->getParam('load_id')
47
  ));
48
  }
49
  }
50
- public function newAction()
51
- {
52
- //$this->_title($this->__("Mobilenow"));
53
  $this->_title($this->__("MobileNow: Create New Mobile Theme"));
54
  Mage::helper("mobilenow")->_disableModule('Redstage_Mobilenow');
55
- $id = $this->getRequest()->getParam("id");
56
- $model = Mage::getModel("mobilenow/mobilenow")->load($id);
57
- $loadReset=$this->getRequest()->getParam('reset_delete');
58
- $loadId=$this->getRequest()->getParam('load_id');
59
- $this->_loadSubsettings($loadId,$loadReset);
60
  $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
61
  if (!empty($data)) {
62
- $model->setData($data);
63
  }
64
- Mage::register("mobilenow_data", $model);
65
  $this->loadLayout();
66
  $this->_setActiveMenu("mobilenow/mobilenow");
67
  $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
68
  $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Mobilenow Manager"), Mage::helper("adminhtml")->__("Mobilenow Manager"));
69
  $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Mobilenow Description"), Mage::helper("adminhtml")->__("Mobilenow Description"));
70
- $this->_addContent($this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit"))->_addLeft($this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tabs"));
 
71
  $this->renderLayout();
72
  }
73
- public function saveAction()
74
- {
75
- $post_data=$this->getRequest()->getPost();
76
  $button_type = $this->getRequest()->getParam('buttontype');
77
- //echo '<pre>'; print_r($post_data); echo '</pre>';exit;
78
- if (!empty($post_data))
79
- {
80
- if($post_data['show_learn_more']!=1)$post_data['show_learn_more']=0;
81
- try
82
- {
83
  $themeSubSettingsModel = Mage::getModel('mobilenow/themesubsettings');
84
  $arg_array = array();
85
- if($this->getRequest()->getParam("active_tab")){
 
86
  $arg_array['active_tab'] = $this->getRequest()->getParam("active_tab");
87
  }
88
- if($this->getRequest()->getParam("design_subtab")){
89
  $arg_array['design_subtab'] = $this->getRequest()->getParam("design_subtab");
90
  }
91
- if($this->getRequest()->getParam("layout_subtab")){
92
  $arg_array['layout_subtab'] = $this->getRequest()->getParam("layout_subtab");
93
  }
94
- if($this->getRequest()->getParam("load_id")){
95
  $arg_array['load_id'] = $this->getRequest()->getParam("load_id");
96
  }
97
- if(!$post_data['hidden_action_val'])
98
  $arg_array['loadPreivew'] = 1;
99
  //This Condition saves the Theme and the respective Sub Settings
100
- if (!$this->getRequest()->getParam("savesubsettings"))
101
- {
102
- if( !$post_data['stores']) $this->_redirect("*/*/");
103
- $createnewThemeFlag='';
104
- $saveAsTop=$this->getRequest()->getParam("savenew");
105
- $post_data['user_agent_regex_values']=implode(',',$post_data['user_agent_regex_values']);
106
- //Save Theme
107
  // saving advanced settings
108
- $post_data['css_override'] = $post_data['custom_css'];
109
- $post_data['social_links'] = json_encode(array('show_social_links'=>$post_data['show_social_links'],
110
- 'facebook_link'=>$post_data['facebook_link'],
111
- 'twitter_link'=>$post_data['twitter_link'],
112
- 'pinterest_link'=>$post_data['pinterest_link'],
113
- 'google_link'=>$post_data['google_link']
114
- ));
115
- $post_data['cart_inputs'] = json_encode(array('show_cart_discount'=>$post_data['show_cart_discount'],
116
- 'show_cart_shipping_quote'=>$post_data['show_cart_shipping_quote']));
117
-
118
-
119
  $model = Mage::getModel("mobilenow/mobilenow");
120
- if(!$saveAsTop)
121
- {
122
- $model->addData($post_data)->setId($this->getRequest()->getParam("id"))->save();
123
- }
124
- else
125
- {
126
- $createnewThemeFlag=1;
127
- $post_data['theme_name']=$post_data['hidden_theme_sub_setting_name'];
128
- $model->addData($post_data)->save();
129
  }
 
130
  //Save Preset Subsettings with respect to Theme
131
- $saveProcessedData=Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data,'',$model->getId(),$createnewThemeFlag);
132
- //Check for values whether to save / Update in themesubsettings table
133
- $selectAttributes = array('themeid'=> $model->getId(), 'preview'=> 0);
134
- $selectCurrentRecord=$themeSubSettingsModel->loadByAttributes($selectAttributes);
135
- //$selectCurrentRecord=$themeSubSettingsModel->load($model->getId(),'themeid');
136
 
 
 
 
 
137
  // preset_sub_settings and preset_layout_sub_settings will have the same value
138
- if(!$saveAsTop)
139
- $saveProcessedData['parent']=$post_data['preset_sub_settings'];
140
- else
141
- $saveProcessedData['parent']=0;
 
 
142
  //If Condition will updated the record in themesubsettings table and else will insert a new record
143
- if($selectCurrentRecord->getId())
144
- {
145
- $ThemesubsetId=$selectCurrentRecord->getId();
146
  $themeSubSettingsModel->setData($saveProcessedData)->setId($ThemesubsetId)->save();
147
- }
148
- else
149
- {
150
- /* if($saveAsTop)
151
- {
152
- //Create new subsetting
153
- $themeSubSettingsModel->setData($saveProcessedData)->save();
154
- $saveProcessedData['parent']=$themeSubSettingsModel->getId();
155
- $saveProcessedData['themeid']=$model->getId();
156
- $saveProcessedData['subsetname']='';
157
- }*/
158
  //Insert the same record and assign it to a theme
159
- if($post_data['hidden_action_val'])
160
- $themeSubSettingsModel->setData($saveProcessedData)->save();
161
- }
162
-
163
- //Check for values whether to save / Update in themesubsettings table
164
- $themeSubSettingsModelDel = Mage::getModel('mobilenow/themesubsettings');
165
- $attributesDel = array('themeid'=> $model->getId(), 'preview'=> 1);
166
- $selectCurrentRecordDel=$themeSubSettingsModelDel->loadByAttributes($attributesDel);
167
- if($selectCurrentRecordDel->getId()){
168
- $selectCurrentRecordDel->delete();
169
  }
170
-
171
  $css_var_arr = $this->__setCssVariables($post_data);
172
- $csspath = Mage::getBaseDir('media').DS.'mobilenow_theme_css'.DS;
173
- $css_file_name = Mage::getBaseDir('media').DS.'mobilenow_theme_css'.DS.md5($model->getId()).'.css';
174
- mkdir($csspath);
175
  $css_string = Mage::helper('mobilenow/theme')->generateThemeCssFile($css_var_arr);
176
- if (file_exists($css_file_name) ){
177
  @unlink($css_file_name);
178
  }
179
- if($post_data['custom_css'] != ''){
180
  $css_string .= $post_data['custom_css'];
181
  }
182
-
183
  file_put_contents($css_file_name, $css_string);
184
- // generating homepage layout xml
185
-
186
-
187
- // echo $css_string;die;
188
- // echo $css_string;die;
189
-
190
-
191
- // generating homepage layout xml
192
  $home_xml_string = Mage::helper('mobilenow/homepage')->generateHomePageLayoutXML($post_data);
193
-
194
- if($home_xml_string != ''){
195
- $this->__saveHomePageLayoutXML($model->getId(),$home_xml_string,'cms_index_index',$post_data['stores']);
196
- }
197
-
198
-
199
  // generating default layout xml
200
- $default_xml_string = Mage::helper('mobilenow/homepage')->generateDefaultPageLayoutXML($post_data,md5($model->getId()));
201
- if($default_xml_string != ''){
202
- $this->__saveHomePageLayoutXML($model->getId(),$default_xml_string,'default',$post_data['stores']);
203
- }
204
-
205
  // generating catalog layout xml
206
  $catalog_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
207
- //echo $catalog_xml_string;die;
208
- if($catalog_xml_string != ''){
209
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_xml_string,'catalog_category_layered',$post_data['stores']);
210
- }
 
211
  // generating catalog layout xml
212
  $catalog_default_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
213
- //echo $catalog_xml_string;die;
214
- if($catalog_default_xml_string != ''){
215
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_default_xml_string,'catalog_category_default',$post_data['stores']);
216
  }
217
  // generating catalog search page layout xml
218
  $catalog_search_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogSearchPageLayoutXML($post_data);
219
- //echo $catalog_search_xml_string;die;
220
- if($catalog_search_xml_string != ''){
221
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_search_xml_string,'catalogsearch_result_index',$post_data['stores']);
222
- }
223
- if($this->getRequest()->getParam("id")){
224
- $cache = Mage::app()->getCache();
225
- $cache->remove("Mobilethemefront".$this->getRequest()->getParam("id"));
226
- $cache = Mage::app()->getCache();
227
- $cache->remove("Mobilethemepreview".$this->getRequest()->getParam("id"));
228
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Theme was updated successfully"));
229
  } else {
230
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Theme was successfully saved"));
231
  }
232
- Mage::getSingleton("adminhtml/session")->setMobilenowData(false);
233
- if ($this->getRequest()->getParam("back"))
234
- {
235
  $arg_array["id"] = $model->getId();
236
  $this->_redirect("*/*/edit", $arg_array);
237
  return;
238
  }
239
- $this->_redirect("*/*/",$arg_array);
240
  return;
241
  }
242
- /****************************************Save Theme Sub setting only starts here************************************/
243
- else
244
- {
245
  //Condition updates the value in each records (Edit subsettings)
246
- if($post_data['hidden_selected_val']!='')
247
- {
248
-
249
  $themeSubSettingsModel->load($post_data['hidden_selected_val']);
250
  //Condition to teset primary / Default subsetting
251
- if($themeSubSettingsModel->getPrimary()==1 || $themeSubSettingsModel->getDefaultsubsetting()==1)
252
- {
253
  //If Primary / Default throughs errior messgae
254
- Mage::getSingleton("adminhtml/session")->addError('Default / Pre-defined Preset Sub Settings Cannot be edited. Please create a new theme.');
255
- //$themeSubSettingsModel->setData($saveProcessedData)->setId($post_data['hidden_selected_val']);
256
  // Condition to check whether we are from new/edit action
257
- if ($this->getRequest()->getParam("back"))
258
- {
259
  //Set the parameter and redirect
260
- $arg_array["id"] = $this->getRequest()->getParam("id");
261
  $this->_redirect("*/*/edit", $arg_array);
262
  return;
263
  }
264
- $this->_redirect("*/*/",$arg_array);
265
  return;
266
- }
267
- else
268
- {
269
- $saveProcessedData=Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data,'',$this->getRequest()->getParam("id"));
270
  //Set The Data to update
271
- $getsubsetIdToSet=$themeSubSettingsModel->getcollection()->addFieldToFilter('themeid',$this->getRequest()->getParam("id"))->addFieldToFilter('preview','0')->getFirstItem();
272
- $saveProcessedData['parent']=$post_data['preset_sub_settings'];
273
- $currentSubsetId= $getsubsetIdToSet->getId();
274
  $themeSubSettingsModel->setData($saveProcessedData)->setId($currentSubsetId);
275
  $arg_array["load_id"] = $post_data['hidden_selected_val'];
276
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was sucessfully Updated"));
277
  }
278
- }
279
- else
280
- {
281
- $saveProcessedData=Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data,$button_type,$this->getRequest()->getParam("id"));
282
  //Set the Data to Insert
283
  $themeSubSettingsModel->setData($saveProcessedData);
284
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was successfully saved"));
285
- }
286
  //save Data
287
  $themeSubSettingsModel->save();
288
- if ($this->getRequest()->getParam("back"))
289
- {
290
  $arg_array["id"] = $this->getRequest()->getParam("id");
291
- if(!$arg_array["load_id"])
292
- $arg_array["load_id"] = $themeSubSettingsModel->getId();
293
  $this->_redirect("*/*/edit", $arg_array);
294
  return;
295
  }
296
- $this->_redirect("*/*/",$arg_array);
297
  return;
298
- }
299
- }
300
- catch (Exception $e) {
301
  Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
302
  Mage::getSingleton("adminhtml/session")->setMobilenowData($this->getRequest()->getPost());
303
  $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
304
- return;
305
  }
306
-
307
  }
308
  $this->_redirect('*/*/');
309
  }
310
- public function deleteAction()
311
- {
312
- if( $this->getRequest()->getParam("id") > 0 ) {
313
- try {
314
- $model = Mage::getModel("mobilenow/mobilenow");
315
- $model->setId($this->getRequest()->getParam("id"))->delete();
316
- $subsetModel= Mage::getModel("mobilenow/themesubsettings")->load($this->getRequest()->getParam("id"),'themeid');
317
- $subsetDeleteId=$subsetModel->getId();
318
- $subsetModel->setId($subsetDeleteId)->delete();
319
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Theme was successfully deleted"));
320
- $this->_redirect("*/*/");
321
- }
322
- catch (Exception $e) {
323
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
324
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
325
- }
326
- }
327
- $this->_redirect("*/*/");
328
- }
329
- public function massRemoveAction()
330
- {
331
  try {
332
- $ids = $this->getRequest()->getPost('theme_ids', array());
333
- foreach ($ids as $id) {
334
- $model = Mage::getModel("mobilenow/mobilenow");
335
- $model->setId($id)->delete();
336
- }
337
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
 
 
 
 
338
  }
339
- catch (Exception $e) {
340
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
 
 
 
 
 
 
 
 
341
  }
342
- $this->_redirect('*/*/');
 
 
 
 
343
  }
 
344
  /**
345
  * Export order grid to CSV format
346
  */
347
- public function exportCsvAction()
348
- {
349
- $fileName = 'mobilenow.csv';
350
- $grid = $this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_grid');
351
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
352
- }
353
  /**
354
  * Export order grid to Excel XML format
355
  */
356
- public function exportExcelAction()
357
- {
358
- $fileName = 'mobilenow.xml';
359
- $grid = $this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_grid');
360
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
361
- }
362
  /**
363
  * Redirected To Mobilenowapp
364
  */
365
- public function helpAction()
366
- {
367
  $this->_redirectUrl('https://mobilenowapp.com/am/login/index');
368
  }
369
- public function statusAction()
370
- {
371
- $id=$this->getRequest()->getParam('theme_id');
372
- $status=$this->getRequest()->getParam('status_id');
373
- try
374
- {
375
- if ($status==0)
376
- {
377
- $data=array('status'=>1);
378
- $correspondingMsg='Theme has been activated successfully';
379
- }
380
- else
381
- {
382
- $data=array('status'=>0);
383
- $correspondingMsg='Theme has been deactivated successfully';
384
  }
385
  $model = Mage::getModel('mobilenow/mobilenow')->load($id)->addData($data);
386
- if($model->setId($id)->save())
387
- {
388
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__($correspondingMsg));
389
  }
390
- }
391
- catch (Exception $e)
392
- {
393
  Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
394
  }
395
  $this->_redirect('*/*/');
396
  }
397
- public function _loadSubsettings($loadId,$loadReset)
398
- {
399
- $getSubsettings=Mage::getModel("mobilenow/themesubsettings");
400
- $id=$this->getRequest()->getParam("id");
401
- $subsetParentId='';
402
- if($loadId!='')
403
- {
404
- $checkLoadIdInParent=$getSubsettings->getcollection()->addFieldToFilter('parent',$loadId)->addFieldToFilter('themeid',$id)->getFirstItem();
405
- if($checkLoadIdInParent->getParent())
406
- {
407
- $getSubsetDefaultId=$checkLoadIdInParent->getId();
408
- $subsetParentId=$checkLoadIdInParent->getParent();
409
- }
410
- else
411
- {
412
- $getSubsetDefaultId=$loadId;
413
- }
414
- }
415
- else
416
- {
417
- //Check whether we are in edit/new action
418
- if($this->getRequest()->getParam("id"))
419
- {
420
- $checkThemeidInSubset=$getSubsettings->load($this->getRequest()->getParam("id"),'themeid');
421
- $subsetParentId=$checkThemeidInSubset->getParent();
422
  }
423
- if($subsetParentId!='')
424
- {
425
- $getSubsetDefaultId=$checkThemeidInSubset->getId();
 
 
426
  }
427
- else
428
- {
429
- if($loadReset)
430
- {
431
- $getSubsetDefaultId=$loadReset;
432
- }
433
- else
434
- {
435
- $getDefaultIds=$getSubsettings->load(1,'defaultsubsetting');
436
- $getSubsetDefaultId=$getDefaultIds->getId();
437
  }
438
- }
439
  }
440
- $subsettingsModel=$getSubsettings->load($getSubsetDefaultId);
441
- $setBothFormData=Mage::helper("mobilenow")->setDesignAndLayoutFormData($subsettingsModel,$getSubsetDefaultId,$subsetParentId);
442
- return Mage::register("subsettings_data", $setBothFormData);
443
  }
444
- public function deleteSettingsAction()
445
- {
446
- if($this->getRequest()->getParam('delete_id') > 0)
447
- {
448
- try
449
- {
450
  $model = Mage::getModel("mobilenow/themesubsettings");
451
- $getModelData=$model->load($this->getRequest()->getParam("delete_id"));
452
- if($getModelData->getPrimary()!=1 && $getModelData->getDefaultsubsetting()!=1)
453
- {
454
- $restrictDelete=$model->load($this->getRequest()->getParam("delete_id"),'parent');
455
- if($restrictDelete->getParent())
456
- {
457
  Mage::getSingleton("adminhtml/session")->addError(Mage::helper("adminhtml")->__("Sub settings is used by Theme, cannot be Deleted"));
458
- }
459
- else
460
- {
461
  $model->setId($this->getRequest()->getParam("delete_id"))->delete();
462
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was successfully deleted"));
463
  }
464
  $this->_mobilenowRedirect();
465
- }
466
- else
467
- {
468
  $this->_loadSubsettings($this->getRequest()->getParam("delete_id"));
469
  Mage::getSingleton("adminhtml/session")->addError(Mage::helper("adminhtml")->__("Default / Pre-defined Preset Sub Settings Cannot be deleted"));
470
  $this->_mobilenowRedirect();
471
  }
472
- }
473
- catch (Exception $e)
474
- {
475
  Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
476
  $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
477
  }
478
  }
479
- // $this->_redirect("*/*/");
480
  }
481
- public function _mobilenowRedirect($resetDeleteId)
482
- {
483
- //$arg_array = array();
484
- if($this->getRequest()->getParam("active_tab"))
485
  $arg_array['active_tab'] = $this->getRequest()->getParam("active_tab");
486
- if($this->getRequest()->getParam("design_subtab"))
487
- $arg_array['design_subtab'] = $this->getRequest()->getParam("design_subtab");
488
- if($this->getRequest()->getParam("layout_subtab"))
489
  $arg_array['layout_subtab'] = $this->getRequest()->getParam("layout_subtab");
490
- if($resetDeleteId)
491
  $arg_array['reset_delete'] = $resetDeleteId;
492
-
493
- if($this->getRequest()->getParam("id")!='')
494
- {$arg_array['id'] = $this->getRequest()->getParam("id");
495
  $this->_redirect("*/*/edit", $arg_array);
496
- }
497
- else
498
- {
499
- $this->_redirect("*/*/new",$arg_array);
500
  }
501
  }
502
- public function checkUniqueNameSaveAction()
503
- {
504
- $checkUniqueName=$this->getRequest()->getParam('subsetname');
505
- $collectionCheck=Mage::getModel('mobilenow/themesubsettings')->load($checkUniqueName,'subsetname');
506
  echo $collectionCheck->getId();
507
- }
508
- public function resetSubsettingsAction()
509
- {
510
- $getSubsettings=Mage::getModel("mobilenow/themesubsettings");
511
- if($this->getRequest()->getParam("reset_id"))
512
- {
513
- $resetDeleteId=$this->getRequest()->getParam("reset_delete");
514
- $resetCheck=$getSubsettings->getcollection()->addFieldToFilter('parent',$resetDeleteId)->addFieldToFilter('themeid',$this->getRequest()->getParam("id"))->getFirstItem();
515
- if($resetCheck->getParent())
516
- {
517
- $resetProceedDelete=$resetCheck->getId();
518
  $getSubsettings->setId($resetProceedDelete)->delete();
519
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was successfully Reset to Default."));
520
- }
521
- else
522
- {
523
- Mage::getSingleton("adminhtml/session")->addError(Mage::helper("adminhtml")->__("Preset Sub Settings cannot reset further."));
524
  }
525
  $this->_mobilenowRedirect($this->getRequest()->getParam("reset_delete"));
526
  }
527
  }
528
-
529
  // function for saving homepage layout xml
530
- public function __saveHomePageLayoutXML($theme_id,$home_xml_string,$handle,$stores = array(),$preview = 0){
531
- //selecting layout update id
532
  $themeLayoutSettingsCollection = Mage::getModel('mobilenow/themelayoutsettings')->getCollection();
533
- $themeLayoutSettingsCollection->addFieldToFilter('main_table.theme_id',$theme_id);
534
- if($preview == 1){
535
- $themeLayoutSettingsCollection->addFieldToFilter('main_table.preview',$preview);
536
  }
537
- $themeLayoutSettingsCollection->addFieldToFilter('layoutupdate.handle',$handle);
538
- $themeLayoutSettingsCollection->getSelect()->group('main_table.layout_update_id')->join( array('layoutupdate'=>'core_layout_update'), 'main_table.layout_update_id = layoutupdate.layout_update_id',array('layoutupdate.handle'));
539
  $currentThemeSetings = $themeLayoutSettingsCollection->getData();
540
 
541
- //$collection->getSelect()->join( array('table_alias'=>$this->getTable('module/table_name')), 'main_table.foreign_id = table_alias.primary_key', array('table_alias.*'), 'schema_name_if_different');
542
-
543
-
544
- // echo $themeLayoutSettingsCollection->printLogQuery(true);die;
545
- //echo '<pre>';print_r($currentThemeSetings);echo '</pre>';
546
- // var_dump($currentThemeSetings[0]['layout_update_id']);die;
547
-
548
-
549
- if($preview == 0){
550
  $themeLayoutSettingsCollectionDel = Mage::getModel('mobilenow/themelayoutsettings')->getCollection();
551
- $themeLayoutSettingsCollectionDel->addFieldToFilter('main_table.theme_id',$theme_id);
552
- $themeLayoutSettingsCollectionDel->addFieldToFilter('main_table.preview',1);
553
- $themeLayoutSettingsCollectionDel->addFieldToFilter('layoutupdate.handle',$handle);
554
- $themeLayoutSettingsCollectionDel->getSelect()->group('main_table.layout_update_id')->join( array('layoutupdate'=>'core_layout_update'), 'main_table.layout_update_id = layoutupdate.layout_update_id',array('layoutupdate.handle'));
555
  $currentThemeSetingsDel = $themeLayoutSettingsCollectionDel->getData();
556
- if(is_array($currentThemeSetingsDel) && count($currentThemeSetingsDel) > 0) {
557
- $coreLayoutUpdateModelDel = Mage::getModel('mobilenow/corelayoutupdate');
558
-
559
- foreach($currentThemeSetingsDel as $delThem){ //print_r($delThem['layout_update_id']);die;
560
- //$coreLayoutUpdateCollection->addFieldToFilter('layout_update_id',$delThem['layout_update_id']);
561
  $coreLayoutUpdateModelDel->load($delThem['layout_update_id'])->delete();
562
  }
563
  }
564
  }
565
-
566
  $coreLayoutUpdateModel = Mage::getModel('mobilenow/corelayoutupdate');
567
  //for updating the existing record
568
- if(is_array($currentThemeSetings) && count($currentThemeSetings) > 0) {
569
- if($currentThemeSetings[0]['layout_update_id']){
570
- $coreLayoutUpdateModel->setLayoutUpdateId($currentThemeSetings[0]['layout_update_id']);
571
  }
572
- }
573
  $coreLayoutUpdateModel->setHandle($handle);
574
  $coreLayoutUpdateModel->setXml($home_xml_string);
575
  $coreLayoutUpdateModel->setSortOrder(0);
576
  $coreLayoutUpdateModel->save();
577
  //for deleting related records from core_layout_link and themelayoutsettings
578
- if(is_array($currentThemeSetings) && count($currentThemeSetings) > 0) {
579
-
580
- $coreLayoutLinkCollection = Mage::getModel('mobilenow/corelayoutlink')->getCollection();
581
  $ids = array();
582
- foreach($currentThemeSetings as $currentTh) {
583
  $ids[] = $currentTh['layout_update_id'];
584
  }
585
- // $coreLayoutLinkCollection->addFieldToFilter('layout_update_id', $currentThemeSetings[0]['layout_update_id']);
586
  $coreLayoutLinkCollection->addFieldToFilter('layout_update_id', array('in' => $ids));
587
- foreach($coreLayoutLinkCollection as $corelayout){
588
  $corelayout->delete();
589
  }
590
-
591
  }
592
 
593
- foreach($stores as $store_id){
594
- $coreLayoutLinkModel = Mage::getModel('mobilenow/corelayoutlink');
595
  $coreLayoutLinkModel->setStoreId($store_id);
596
  $coreLayoutLinkModel->setArea('frontend');
597
  $coreLayoutLinkModel->setPackage('redstage-mobilenow');
@@ -606,106 +526,108 @@ class Redstage_Mobilenow_Adminhtml_MobilenowController extends Mage_Adminhtml_Co
606
  $themeLayoutSettingsModel->save();
607
  }
608
  }
609
- public function mobileConnectAction()
610
- {
611
- $email=$this->getRequest()->getParam('email');
612
- $username=$this->getRequest()->getParam('username');
613
- $password=$this->getRequest()->getParam('password');
614
- $this->_thirdPartyAuthenticate($url,$email,$username,$password,'connect');
615
  }
616
- public function disconnectMobilenowAction()
617
- {
618
- $subscriptionstatus = json_decode(Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/subscription'));
619
- if($subscriptionstatus->subscritionStatus=='active')
620
- {
621
- $subscriptionstatus->subscritionStatus='inactive';
622
- }
623
- $subscriptionstatus=json_encode($subscriptionstatus);
624
- $mobilenowConfigSave = new Mage_Core_Model_Config();
625
- $mobilenowConfigSave ->saveConfig('mobilenowsettings/mobilenowaccount/subscription', $subscriptionstatus, 'default', 0);
626
- $deactivateAllThemes=Mage::getModel('mobilenow/mobilenow');
627
- $collectionthemes=$deactivateAllThemes->getCollection()->addFieldToFilter('status',1);
628
- foreach($collectionthemes as $deactivateAllTheme)
629
- {
630
- $changeStatus['status']=0;
631
- $currThemeId=$deactivateAllTheme->getThemeId();
632
- $deactivateAllThemes->load($currThemeId)->addData($changeStatus)->setId($currThemeId)->save();
633
- }
634
  Mage::app()->cleanCache();
635
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Your MobileNow account settings has been disconnected."));
636
- $this->_redirect("adminhtml/system_config/edit/section/mobilenowsettings/");
637
  }
638
- public function refreshMobilenowACtion()
639
- {
640
- $email=$this->getRequest()->getParam('email');
641
- $username=Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/username');
642
- $password=Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/password');
643
- $this->_thirdPartyAuthenticate($url,$email,$username,$password,'refresh');
644
  }
645
- public function _thirdPartyAuthenticate($url,$email,$username,$password,$status)
646
- {
647
- // $certUrl=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'adminhtml/default/default/www.mobilenowapp.com';
648
- $key='mrrzwfNuE0ACLCDZyOMR';
649
- $url = 'https://mobilenowapp.com/am/api/check-access/by-login-pass?_key='.$key.'&login='.$email.'&pass='.$password;
650
  //open connection
651
  $ch = curl_init();
652
  //set the url, number of POST vars, POST data
653
- curl_setopt($ch, CURLOPT_URL,$url);
654
  curl_setopt($ch, CURLOPT_HEADER, 0);
655
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
656
  // curl_setopt($ch, CURLOPT_USERPWD, 'secure:6f2TGHt4_');
657
  // curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
658
- curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
659
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
660
  //execute post
661
  $result = curl_exec($ch);
662
- $resultDecode=json_decode($result);
663
- $memberDetails=array();
664
- $memberDetails['ok']=$resultDecode->ok;
665
- if($resultDecode->name) $memberDetails['name']=$resultDecode->name;
666
- if($resultDecode->subscriptions)
667
- {
668
- $memberSubscriptions=$resultDecode->subscriptions;
669
- foreach($memberSubscriptions as $key=>$memberSubscription)
670
- {
671
- $subscribe['productId']=$key;
672
- $subscribe['subscrptionDate']=$memberSubscription;
673
- /*if($key==2)
674
- {*/
675
- $dateExpire=$memberSubscription;
676
- $today = date("Y-m-d");
677
  $days = (strtotime($dateExpire) - strtotime($today)) / (60 * 60 * 24);
678
- $subscribe['daysRemaining']=$days;
679
- $resultDecode->daysRemaining=$days;
680
- //}
681
- $subscribe['subscritionStatus']='active';
682
- }
683
- $memberDetails['subscriptions']=json_encode($subscribe);
684
- }
685
- if($resultDecode->msg) $memberDetails['msg']=$resultDecode->msg;
686
- if($memberDetails['ok'])
687
- {
688
- $mobilenowConfigSave = new Mage_Core_Model_Config();
689
  $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/subscription', $memberDetails['subscriptions'], 'default', 0);
 
690
  $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/email', $email, 'default', 0);
691
  $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/username', $username, 'default', 0);
692
- $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/password', $password, 'default', 0);
 
693
  }
694
- Mage::app()->cleanCache();
695
- /* if(curl_exec($ch) === false)
696
- {
697
- echo 'Curl error: ' . curl_error($ch);
698
- }
699
- else
700
- {
701
- echo 'Operation completed without any errors';
702
- }*/
703
  print_r(json_encode($resultDecode));
704
  //close connection
705
- curl_close($ch);
 
 
 
 
 
 
 
 
 
 
 
706
  }
707
-
708
- public function __setCssVariables($post_data){
709
  $css_var_arr = array();
710
  $css_var_arr['background_color'] = $post_data['background_color'];
711
  $css_var_arr['search_cart_area_bg_color'] = $post_data['search_cart_bg_color'];
@@ -713,7 +635,7 @@ class Redstage_Mobilenow_Adminhtml_MobilenowController extends Mage_Adminhtml_Co
713
  $css_var_arr['links_color'] = $post_data['links_color'];
714
  $css_var_arr['text_color'] = $post_data['text_color'];
715
  $css_var_arr['categories_bg_color'] = $post_data['categories_background_color'];
716
- $css_var_arr['categories_bg_borderwidth'] = ($post_data['categories_background_color'] != '')?'1':'0';
717
  $css_var_arr['button_bg_color'] = $post_data['button_background_color'];
718
  $css_var_arr['button_border_color'] = $post_data['button_border_color'];
719
  $css_var_arr['button_text_color'] = $post_data['button_text_color'];
@@ -728,7 +650,7 @@ class Redstage_Mobilenow_Adminhtml_MobilenowController extends Mage_Adminhtml_Co
728
  $css_var_arr['pagination_button_text_color'] = $post_data['pagination_button_text_color'];
729
 
730
  $css_var_arr['image_border_color'] = $post_data['image_border_color'];
731
- $css_var_arr['image_border_width'] = ($post_data['show_image_border'] != '')?(($post_data['catalog_image_width'] != '')?$post_data['catalog_image_width']:'1'):'0';
732
  $css_var_arr['product_title_color'] = $post_data['product_title_color'];
733
  $css_var_arr['product_price_color'] = $post_data['product_price_color'];
734
  $css_var_arr['product_special_price_color'] = $post_data['product_special_price_color'];
@@ -737,177 +659,177 @@ class Redstage_Mobilenow_Adminhtml_MobilenowController extends Mage_Adminhtml_Co
737
  $css_var_arr['add_to_cart_bg_color'] = $post_data['add_to_cart_button_bg_color'];
738
  $css_var_arr['add_to_cart_button_text_color'] = $post_data['add_to_cart_button_font_color'];
739
  $css_var_arr['add_to_cart_border_color'] = $post_data['add_to_cart_button_border_color'];
740
- $css_var_arr['gridlines_color'] = $post_data['gridlines_color'];
741
- $css_var_arr['gridlines_color_width'] = ($post_data['gridlines_color'] != '')?'1':'0';
742
  $css_var_arr['newsletter_bg_color'] = $post_data['newsletter_area_backgorund'];
743
 
744
  $css_var_arr['productpage_title_color'] = $post_data['productpage_title_color'];
745
  $css_var_arr['product_image_border_color'] = $post_data['product_image_border_color'];
746
- $css_var_arr['product_image_border_width'] = ($post_data['product_image_border_color'] != '')?'1':'0';
747
  $css_var_arr['product_description_color'] = $post_data['product_description_color'];
748
- $css_var_arr['additional_information_bg_color'] = $post_data['additional_information_bg_color'];
749
- $css_var_arr['additional_information_font_color'] = $post_data['additional_information_font_color'];
750
- $css_var_arr['full_reviews_bg_color'] = $post_data['full_reviews_bg_color'];
751
- $css_var_arr['full_reviews_font_color'] = $post_data['full_reviews_font_color'];
752
- return $css_var_arr;
753
  }
754
- public function updatePreviewAction()
755
- {
756
- if(!Mage::getSingleton('admin/session')->isLoggedIn())
757
  $this->_redirectUrl(Mage::helper("adminhtml")->getUrl("admin/index/index/"));
758
- $post_data=$this->getRequest()->getPost();
759
- if($post_data['show_learn_more']!=1)$post_data['show_learn_more']=0;
760
- if(!isset($post_data['stores']) || count($post_data['stores']) == 0){
 
761
  $post_data['stores'] = array(0);
762
  }
763
- if ($post_data & $post_data['stores'])
764
- {
765
- try
766
- {
767
  $themeSubSettingsModel = Mage::getModel('mobilenow/themesubsettings');
768
- if ($this->getRequest()->getParam("theme_id")){
 
 
769
  $theme_id = $this->getRequest()->getParam("theme_id");
770
- $model = Mage::getModel("mobilenow/mobilenow")->load($theme_id,'theme_id');
771
-
772
- $createnewThemeFlag='';
773
  //Save Preset Subsettings with respect to Theme
774
- $saveProcessedData=Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data,'',$model->getId(),$createnewThemeFlag,'1');
775
-
776
  //Check for values whether to save / Update in themesubsettings table
777
- $attributes = array('themeid'=> $model->getId(), 'preview'=> 1);
778
- $selectCurrentRecord=$themeSubSettingsModel->loadByAttributes($attributes);
779
  // preset_sub_settings and preset_layout_sub_settings will have the same value
780
- $saveProcessedData['parent']=$post_data['preset_sub_settings'];
781
  //If Condition will updated the record in themesubsettings table and else will insert a new record
782
- if($selectCurrentRecord->getId())
783
- {
784
- $ThemesubsetId=$selectCurrentRecord->getId();
785
  $themeSubSettingsModel->setData($saveProcessedData)->setId($ThemesubsetId)->save();
786
- }
787
- else
788
- {
789
  $saveProcessedData['preview'] = 1;
790
  //Insert the same record and assign it to a theme
791
- $themeSubSettingsModel->setData($saveProcessedData)->save();
792
- }
793
- $css_var_arr = $this->__setCssVariables($post_data);
794
- $csspath = Mage::getBaseDir('media').DS.'mobilenow_theme_css'.DS;
795
- $css_file_name = Mage::getBaseDir('media').DS.'mobilenow_theme_css'.DS.md5($model->getId().'_preview').'.css';
796
- mkdir($csspath);
797
  $css_string = Mage::helper('mobilenow/theme')->generateThemeCssFile($css_var_arr);
798
- if (file_exists($css_file_name) ){
799
  @unlink($css_file_name);
800
  }
801
- if($post_data['custom_css'] != ''){
802
  $css_string .= $post_data['custom_css'];
803
  }
804
-
805
  file_put_contents($css_file_name, $css_string);
806
- // generating homepage layout xml
807
-
808
-
809
- // echo $css_string;die;
810
- // echo $css_string;die;
811
-
812
-
813
  // generating homepage layout xml
814
  $home_xml_string = Mage::helper('mobilenow/homepage')->generateHomePageLayoutXML($post_data);
815
-
816
- if($home_xml_string != ''){
817
- $this->__saveHomePageLayoutXML($model->getId(),$home_xml_string,'cms_index_index',$post_data['stores'],1);
818
- }
819
-
820
-
821
  // generating default layout xml
822
- $default_xml_string = Mage::helper('mobilenow/homepage')->generateDefaultPageLayoutXML($post_data,md5($model->getId().'_preview'));
823
- if($default_xml_string != ''){
824
- $this->__saveHomePageLayoutXML($model->getId(),$default_xml_string,'default',$post_data['stores'],1);
825
- }
826
-
827
  // generating catalog layout xml
828
  $catalog_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
829
- //echo $catalog_xml_string;die;
830
- if($catalog_xml_string != ''){
831
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_xml_string,'catalog_category_layered',$post_data['stores'],1);
832
- }
833
  // generating catalog layout xml
834
  $catalog_default_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
835
- //echo $catalog_xml_string;die;
836
- if($catalog_default_xml_string != ''){
837
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_default_xml_string,'catalog_category_default',$post_data['stores'],1);
838
  }
839
  // generating catalog search page layout xml
840
  $catalog_search_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogSearchPageLayoutXML($post_data);
841
- //echo $catalog_search_xml_string;die;
842
- if($catalog_search_xml_string != ''){
843
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_search_xml_string,'catalogsearch_result_index',$post_data['stores'],1);
844
- }
845
-
846
- $cache = Mage::app()->getCache();
847
- $cache->remove("Mobilethemepreview".$theme_id);
848
-
849
- echo 'success';die;
850
-
851
- }else{
852
- echo 'failed';
853
 
 
 
 
 
 
 
 
 
 
 
854
  }
855
- die;
856
- }
857
- catch (Exception $e) {
858
  echo $e->getMessage();
859
-
860
- die;
861
  }
862
-
863
  }
864
  }
865
-
866
- public function uploadDesignImageAction(){
867
  $theme_id = $this->getRequest()->getParam("theme_id");
868
- $data = array();
869
  $data['mesasage'] = 'success';
870
  $data['preview_name'] = '';
871
- if ($this->getRequest()->getParam("upload_type") == 'logo'){
872
- if($_FILES['logo']['name']!=''){ $logo = time().str_replace(' ', '_',$_FILES['logo']['name']);}//else{$themeSubSettings['logo']='';}
873
- if(trim($logo)!='')
874
- {
875
- try{
876
- $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'logo'.DS.'preview'.DS.$theme_id;
 
877
  $uploader = new Varien_File_Uploader('logo');
878
- $uploader->setAllowedExtensions(array('jpg','jpeg','png','gif'));
879
  $uploader->setAllowCreateFolders(true);
880
  $uploader->setAllowRenameFiles(false);
881
  $uploader->setFilesDispersion(false);
882
- $uploader->save($path,$logo);
883
- $data['preview_name'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images'.DS.'logo'.DS.'preview'.DS.$theme_id.DS.$logo;
884
  } catch (Exception $e) {
885
  $data['mesasage'] = $e->getMessage();
886
- }
887
  }
888
  $data['logo_image_name'] = $logo;
889
  echo json_encode($data);
890
  exit;
891
- } else if($this->getRequest()->getParam("upload_type") == 'banner'){
892
- if($_FILES['homepage_banner']['name']!=''){ $logo = time().str_replace(' ', '_',$_FILES['homepage_banner']['name']);}//else{$themeSubSettings['logo']='';}
893
- if(trim($logo)!='')
894
- {
895
- try{
896
- $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'banner'.DS.'preview'.DS.$theme_id;
 
897
  $uploader = new Varien_File_Uploader('homepage_banner');
898
- $uploader->setAllowedExtensions(array('jpg','jpeg','png','gif'));
899
  $uploader->setAllowCreateFolders(true);
900
  $uploader->setAllowRenameFiles(false);
901
  $uploader->setFilesDispersion(false);
902
- $uploader->save($path,$logo);
903
- $data['preview_name'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images'.DS.'banner'.DS.'preview'.DS.$theme_id.DS.$logo;
904
- } catch (Exception $e) {
905
  $data['mesasage'] = $e->getMessage();
906
- }
907
  }
908
  $data['banner_image_name'] = $logo;
909
  echo json_encode($data);
910
  exit;
911
  }
912
  }
 
 
 
 
 
 
 
 
 
 
 
 
913
  }
1
  <?php
2
+
3
+ class Redstage_Mobilenow_Adminhtml_MobilenowController extends Mage_Adminhtml_Controller_Action {
4
+
5
+ protected function _initAction() {
6
+ $this->loadLayout()->_setActiveMenu("mobilenow/mobilenow")
7
+ ->_addBreadcrumb(Mage::helper("adminhtml")->__("Mobilenow Manager"), Mage::helper("adminhtml")->__("Mobilenow Manager"));
8
  return $this;
9
  }
10
+
11
+ public function indexAction() {
12
  $this->_title($this->__("Mobilenow"));
13
  $this->_title($this->__("MobileNow: Manage Mobile Themes"));
14
  Mage::helper("mobilenow")->_disableModule('Redstage_Mobilenow');
15
  $this->_initAction();
16
  $this->renderLayout();
17
  }
18
+
19
+ public function editAction() {
20
  $this->_title($this->__("Mobilenow"));
21
  $this->_title($this->__("Mobilenow"));
22
  $this->_title($this->__("Edit Item"));
23
  Mage::helper("mobilenow")->_disableModule('Redstage_Mobilenow');
24
  $id = $this->getRequest()->getParam("id");
25
+ $tab_data = $this->getRequest()->getParam("tab");
26
+ $loadId = $this->getRequest()->getParam('load_id');
27
+ $loadReset = $this->getRequest()->getParam('reset_delete');
28
  $model = Mage::getModel("mobilenow/mobilenow")->load($id);
29
+ if ($model->getId()) {
30
+ Mage::register("mobilenow_data", $model);
31
+ $this->_loadSubsettings($loadId, $loadReset);
 
32
  $this->loadLayout();
33
  $this->_setActiveMenu("mobilenow/mobilenow");
34
+ $this->_addBreadcrumb(Mage::helper("adminhtml")
35
+ ->__("Mobilenow Manager"), Mage::helper("adminhtml")->__("Mobilenow Manager"));
36
+ $this->_addBreadcrumb(Mage::helper("adminhtml")
37
+ ->__("Mobilenow Description"), Mage::helper("adminhtml")->__("Mobilenow Description"));
38
  $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
39
+ $this->_addContent($this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit"))
40
+ ->_addLeft($this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tabs"));
41
+ $this->renderLayout();
42
+ } else {
43
+ $this->_redirect("*/*/new", array('active_tab' => $this->getRequest()->getParam('active_tab'),
44
+ 'design_subtab' => $this->getRequest()->getParam('design_subtab'),
45
+ 'layout_subtab' => $this->getRequest()->getParam('layout_subtab'),
46
+ 'load_id' => $this->getRequest()->getParam('load_id')
 
 
47
  ));
48
  }
49
  }
50
+
51
+ public function newAction() {
52
+
53
  $this->_title($this->__("MobileNow: Create New Mobile Theme"));
54
  Mage::helper("mobilenow")->_disableModule('Redstage_Mobilenow');
55
+ $id = $this->getRequest()->getParam("id");
56
+ $model = Mage::getModel("mobilenow/mobilenow")->load($id);
57
+ $loadReset = $this->getRequest()->getParam('reset_delete');
58
+ $loadId = $this->getRequest()->getParam('load_id');
59
+ $this->_loadSubsettings($loadId, $loadReset);
60
  $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
61
  if (!empty($data)) {
62
+ $model->setData($data);
63
  }
64
+ Mage::register("mobilenow_data", $model);
65
  $this->loadLayout();
66
  $this->_setActiveMenu("mobilenow/mobilenow");
67
  $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
68
  $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Mobilenow Manager"), Mage::helper("adminhtml")->__("Mobilenow Manager"));
69
  $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Mobilenow Description"), Mage::helper("adminhtml")->__("Mobilenow Description"));
70
+ $this->_addContent($this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit"))
71
+ ->_addLeft($this->getLayout()->createBlock("mobilenow/adminhtml_mobilenow_edit_tabs"));
72
  $this->renderLayout();
73
  }
74
+
75
+ public function saveAction() {
76
+ $post_data = $this->getRequest()->getPost();
77
  $button_type = $this->getRequest()->getParam('buttontype');
78
+ if (!empty($post_data)) {
79
+ if ($post_data['show_learn_more'] != 1)
80
+ $post_data['show_learn_more'] = 0;
81
+ try {
 
 
82
  $themeSubSettingsModel = Mage::getModel('mobilenow/themesubsettings');
83
  $arg_array = array();
84
+ $arg_array['active_tab'] = 'design';
85
+ if ($this->getRequest()->getParam("active_tab")) {
86
  $arg_array['active_tab'] = $this->getRequest()->getParam("active_tab");
87
  }
88
+ if ($this->getRequest()->getParam("design_subtab")) {
89
  $arg_array['design_subtab'] = $this->getRequest()->getParam("design_subtab");
90
  }
91
+ if ($this->getRequest()->getParam("layout_subtab")) {
92
  $arg_array['layout_subtab'] = $this->getRequest()->getParam("layout_subtab");
93
  }
94
+ if ($this->getRequest()->getParam("load_id")) {
95
  $arg_array['load_id'] = $this->getRequest()->getParam("load_id");
96
  }
97
+ if (!$post_data['hidden_action_val'])
98
  $arg_array['loadPreivew'] = 1;
99
  //This Condition saves the Theme and the respective Sub Settings
100
+ if (!$this->getRequest()->getParam("savesubsettings")) {
101
+ if (!$post_data['stores'])
102
+ $this->_redirect("*/*/");
103
+ $createnewThemeFlag = '';
104
+ $saveAsTop = $this->getRequest()->getParam("savenew");
105
+ $post_data['user_agent_regex_values'] = implode(',', $post_data['user_agent_regex_values']);
106
+
107
  // saving advanced settings
108
+ $post_data['css_override'] = $post_data['custom_css'];
109
+ $post_data['social_links'] = json_encode(array('show_social_links' => $post_data['show_social_links'],
110
+ 'facebook_link' => $post_data['facebook_link'],
111
+ 'twitter_link' => $post_data['twitter_link'],
112
+ 'pinterest_link' => $post_data['pinterest_link'],
113
+ 'google_link' => $post_data['google_link']
114
+ ));
115
+ $post_data['cart_inputs'] = json_encode(array('show_cart_discount' => $post_data['show_cart_discount'],
116
+ 'show_cart_shipping_quote' => $post_data['show_cart_shipping_quote']));
117
+
118
+
119
  $model = Mage::getModel("mobilenow/mobilenow");
120
+ if (!$saveAsTop) {
121
+ $model->addData($post_data)->setId($this->getRequest()->getParam("id"))->save();
122
+ } else {
123
+ $createnewThemeFlag = 1;
124
+ $post_data['theme_name'] = $post_data['hidden_theme_sub_setting_name'];
125
+ $model->addData($post_data)->save();
 
 
 
126
  }
127
+
128
  //Save Preset Subsettings with respect to Theme
129
+ $saveProcessedData = Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data, '', $model->getId(), $createnewThemeFlag);
 
 
 
 
130
 
131
+ //Check for values whether to save / Update in themesubsettings table
132
+ $selectAttributes = array('themeid' => $model->getId(), 'preview' => 0);
133
+ $selectCurrentRecord = $themeSubSettingsModel->loadByAttributes($selectAttributes);
134
+
135
  // preset_sub_settings and preset_layout_sub_settings will have the same value
136
+ if (!$saveAsTop)
137
+ $saveProcessedData['parent'] = $post_data['preset_sub_settings'];
138
+ else
139
+ $saveProcessedData['parent'] = 0;
140
+
141
+ $saveProcessedData['source'] = 'CUSTOM';
142
  //If Condition will updated the record in themesubsettings table and else will insert a new record
143
+ if ($selectCurrentRecord->getId()) {
144
+ $ThemesubsetId = $selectCurrentRecord->getId();
 
145
  $themeSubSettingsModel->setData($saveProcessedData)->setId($ThemesubsetId)->save();
146
+ } else {
147
+
 
 
 
 
 
 
 
 
 
148
  //Insert the same record and assign it to a theme
149
+ //if ($post_data['hidden_action_val'])
150
+ $themeSubSettingsModel->setData($saveProcessedData)->save();
151
+ if(isset($arg_array['load_id']))
152
+ $model->setTemplatePresetId($arg_array['load_id'])->save();
 
 
 
 
 
 
153
  }
154
+
155
  $css_var_arr = $this->__setCssVariables($post_data);
156
+ $csspath = Mage::getBaseDir('media') . DS . 'mobilenow_theme_css' . DS;
157
+ $css_file_name = Mage::getBaseDir('media') . DS . 'mobilenow_theme_css' . DS . md5($model->getId()) . '.css';
158
+ mkdir($csspath);
159
  $css_string = Mage::helper('mobilenow/theme')->generateThemeCssFile($css_var_arr);
160
+ if (file_exists($css_file_name)) {
161
  @unlink($css_file_name);
162
  }
163
+ if ($post_data['custom_css'] != '') {
164
  $css_string .= $post_data['custom_css'];
165
  }
166
+
167
  file_put_contents($css_file_name, $css_string);
168
+
169
+ // generating homepage layout xml
 
 
 
 
 
 
170
  $home_xml_string = Mage::helper('mobilenow/homepage')->generateHomePageLayoutXML($post_data);
171
+
172
+ if ($home_xml_string != '') {
173
+ $this->__saveHomePageLayoutXML($model->getId(), $home_xml_string, 'cms_index_index', $post_data['stores']);
174
+ }
175
+
 
176
  // generating default layout xml
177
+ $default_xml_string = Mage::helper('mobilenow/homepage')->generateDefaultPageLayoutXML($post_data, md5($model->getId()));
178
+ if ($default_xml_string != '') {
179
+ $this->__saveHomePageLayoutXML($model->getId(), $default_xml_string, 'default', $post_data['stores']);
180
+ }
181
+
182
  // generating catalog layout xml
183
  $catalog_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
184
+
185
+ if ($catalog_xml_string != '') {
186
+ $this->__saveHomePageLayoutXML($model->getId(), $catalog_xml_string, 'catalog_category_layered', $post_data['stores']);
187
+ }
188
+
189
  // generating catalog layout xml
190
  $catalog_default_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
191
+
192
+ if ($catalog_default_xml_string != '') {
193
+ $this->__saveHomePageLayoutXML($model->getId(), $catalog_default_xml_string, 'catalog_category_default', $post_data['stores']);
194
  }
195
  // generating catalog search page layout xml
196
  $catalog_search_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogSearchPageLayoutXML($post_data);
197
+
198
+ if ($catalog_search_xml_string != '') {
199
+ $this->__saveHomePageLayoutXML($model->getId(), $catalog_search_xml_string, 'catalogsearch_result_index', $post_data['stores']);
200
+ }
201
+ if ($this->getRequest()->getParam("id")) {
202
+ $cache = Mage::app()->getCache();
203
+ $cache->remove("Mobilethemefront" . $this->getRequest()->getParam("id"));
204
+ $cache = Mage::app()->getCache();
205
+ $cache->remove("Mobilethemepreview" . $this->getRequest()->getParam("id"));
206
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Theme was updated successfully"));
207
  } else {
208
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Theme was successfully saved"));
209
  }
210
+ Mage::getSingleton("adminhtml/session")->setMobilenowData(false);
211
+ if ($this->getRequest()->getParam("back")) {
 
212
  $arg_array["id"] = $model->getId();
213
  $this->_redirect("*/*/edit", $arg_array);
214
  return;
215
  }
216
+ $this->_redirect("*/*/", $arg_array);
217
  return;
218
  }
219
+ /****************************************Save Theme Sub setting only starts here*********************************** */
220
+ else {
 
221
  //Condition updates the value in each records (Edit subsettings)
222
+ if ($post_data['hidden_selected_val'] != '') {
 
 
223
  $themeSubSettingsModel->load($post_data['hidden_selected_val']);
224
  //Condition to teset primary / Default subsetting
225
+ if ($themeSubSettingsModel->getPrimary() == 1 || $themeSubSettingsModel->getDefaultsubsetting() == 1) {
 
226
  //If Primary / Default throughs errior messgae
227
+ Mage::getSingleton("adminhtml/session")->addError('Default / Pre-defined Preset Sub Settings Cannot be edited. Please create a new theme.');
228
+
229
  // Condition to check whether we are from new/edit action
230
+ if ($this->getRequest()->getParam("back")) {
 
231
  //Set the parameter and redirect
232
+ $arg_array["id"] = $this->getRequest()->getParam("id");
233
  $this->_redirect("*/*/edit", $arg_array);
234
  return;
235
  }
236
+ $this->_redirect("*/*/", $arg_array);
237
  return;
238
+ } else {
239
+ $saveProcessedData = Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data, '', $this->getRequest()->getParam("id"));
 
 
240
  //Set The Data to update
241
+ $getsubsetIdToSet = $themeSubSettingsModel->getcollection()->addFieldToFilter('themeid', $this->getRequest()->getParam("id"))->addFieldToFilter('preview', '0')->getFirstItem();
242
+ $saveProcessedData['parent'] = $post_data['preset_sub_settings'];
243
+ $currentSubsetId = $getsubsetIdToSet->getId();
244
  $themeSubSettingsModel->setData($saveProcessedData)->setId($currentSubsetId);
245
  $arg_array["load_id"] = $post_data['hidden_selected_val'];
246
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was sucessfully Updated"));
247
  }
248
+ } else {
249
+ $saveProcessedData = Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data, $button_type, $this->getRequest()->getParam("id"));
 
 
250
  //Set the Data to Insert
251
  $themeSubSettingsModel->setData($saveProcessedData);
252
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was successfully saved"));
253
+ }
254
  //save Data
255
  $themeSubSettingsModel->save();
256
+ if ($this->getRequest()->getParam("back")) {
 
257
  $arg_array["id"] = $this->getRequest()->getParam("id");
258
+ if (!$arg_array["load_id"])
259
+ $arg_array["load_id"] = $themeSubSettingsModel->getId();
260
  $this->_redirect("*/*/edit", $arg_array);
261
  return;
262
  }
263
+ $this->_redirect("*/*/", $arg_array);
264
  return;
265
+ }
266
+ } catch (Exception $e) {
 
267
  Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
268
  Mage::getSingleton("adminhtml/session")->setMobilenowData($this->getRequest()->getPost());
269
  $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
270
+ return;
271
  }
 
272
  }
273
  $this->_redirect('*/*/');
274
  }
275
+
276
+ public function deleteAction() {
277
+ if ($this->getRequest()->getParam("id") > 0) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  try {
279
+ $model = Mage::getModel("mobilenow/mobilenow");
280
+ $model->setId($this->getRequest()->getParam("id"))->delete();
281
+ $subsetModel = Mage::getModel("mobilenow/themesubsettings")->load($this->getRequest()->getParam("id"), 'themeid');
282
+ $subsetDeleteId = $subsetModel->getId();
283
+ $subsetModel->setId($subsetDeleteId)->delete();
284
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Theme was successfully deleted"));
285
+ $this->_redirect("*/*/");
286
+ } catch (Exception $e) {
287
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
288
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
289
  }
290
+ }
291
+ $this->_redirect("*/*/");
292
+ }
293
+
294
+ public function massRemoveAction() {
295
+ try {
296
+ $ids = $this->getRequest()->getPost('theme_ids', array());
297
+ foreach ($ids as $id) {
298
+ $model = Mage::getModel("mobilenow/mobilenow");
299
+ $model->setId($id)->delete();
300
  }
301
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
302
+ } catch (Exception $e) {
303
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
304
+ }
305
+ $this->_redirect('*/*/');
306
  }
307
+
308
  /**
309
  * Export order grid to CSV format
310
  */
311
+ public function exportCsvAction() {
312
+ $fileName = 'mobilenow.csv';
313
+ $grid = $this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_grid');
314
+ $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
315
+ }
316
+
317
  /**
318
  * Export order grid to Excel XML format
319
  */
320
+ public function exportExcelAction() {
321
+ $fileName = 'mobilenow.xml';
322
+ $grid = $this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_grid');
323
+ $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
324
+ }
325
+
326
  /**
327
  * Redirected To Mobilenowapp
328
  */
329
+ public function helpAction() {
 
330
  $this->_redirectUrl('https://mobilenowapp.com/am/login/index');
331
  }
332
+
333
+ public function statusAction() {
334
+ $id = $this->getRequest()->getParam('theme_id');
335
+ $status = $this->getRequest()->getParam('status_id');
336
+ try {
337
+ if ($status == 0) {
338
+ $data = array('status' => 1);
339
+ $correspondingMsg = 'Theme has been activated successfully';
340
+ } else {
341
+ $data = array('status' => 0);
342
+ $correspondingMsg = 'Theme has been deactivated successfully';
 
 
 
 
343
  }
344
  $model = Mage::getModel('mobilenow/mobilenow')->load($id)->addData($data);
345
+ if ($model->setId($id)->save()) {
346
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__($correspondingMsg));
 
347
  }
348
+ } catch (Exception $e) {
 
 
349
  Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
350
  }
351
  $this->_redirect('*/*/');
352
  }
353
+
354
+ public function _loadSubsettings($loadId, $loadReset) {
355
+ $getSubsettings = Mage::getModel("mobilenow/themesubsettings");
356
+ $id = $this->getRequest()->getParam("id");
357
+ $subsetParentId = '';
358
+
359
+ if ($loadId != '') {
360
+ $checkLoadIdInParent = $getSubsettings->getcollection()->addFieldToFilter('parent', $loadId)->addFieldToFilter('themeid', $id)->getFirstItem();
361
+ if ($checkLoadIdInParent->getParent()) {
362
+ $getSubsetDefaultId = $checkLoadIdInParent->getId();
363
+ $subsetParentId = $checkLoadIdInParent->getParent();
364
+ } else {
365
+ $getSubsetDefaultId = $loadId;
 
 
 
 
 
 
 
 
 
 
 
 
366
  }
367
+ } else {
368
+ //Check whether we are in edit/new action
369
+ if ($this->getRequest()->getParam("id")) {
370
+ $checkThemeidInSubset = $getSubsettings->load($this->getRequest()->getParam("id"), 'themeid');
371
+ $subsetParentId = $checkThemeidInSubset->getParent();
372
  }
373
+
374
+ if ($subsetParentId != '') {
375
+ $getSubsetDefaultId = $checkThemeidInSubset->getId();
376
+ } else {
377
+ if ($loadReset) {
378
+ $getSubsetDefaultId = $loadReset;
379
+ } else {
380
+ $getDefaultIds = $getSubsettings->load(1, 'defaultsubsetting');
381
+ $getSubsetDefaultId = $getDefaultIds->getId();
 
382
  }
383
+ }
384
  }
385
+ $subsettingsModel = $getSubsettings->load($getSubsetDefaultId);
386
+ $setBothFormData = Mage::helper("mobilenow")->setDesignAndLayoutFormData($subsettingsModel, $getSubsetDefaultId, $subsetParentId);
387
+ return Mage::register("subsettings_data", $setBothFormData);
388
  }
389
+
390
+ public function deleteSettingsAction() {
391
+ if ($this->getRequest()->getParam('delete_id') > 0) {
392
+ try {
 
 
393
  $model = Mage::getModel("mobilenow/themesubsettings");
394
+ $getModelData = $model->load($this->getRequest()->getParam("delete_id"));
395
+ if ($getModelData->getPrimary() != 1 && $getModelData->getDefaultsubsetting() != 1) {
396
+ $restrictDelete = $model->load($this->getRequest()->getParam("delete_id"), 'parent');
397
+ if ($restrictDelete->getParent()) {
 
 
398
  Mage::getSingleton("adminhtml/session")->addError(Mage::helper("adminhtml")->__("Sub settings is used by Theme, cannot be Deleted"));
399
+ } else {
 
 
400
  $model->setId($this->getRequest()->getParam("delete_id"))->delete();
401
  Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was successfully deleted"));
402
  }
403
  $this->_mobilenowRedirect();
404
+ } else {
 
 
405
  $this->_loadSubsettings($this->getRequest()->getParam("delete_id"));
406
  Mage::getSingleton("adminhtml/session")->addError(Mage::helper("adminhtml")->__("Default / Pre-defined Preset Sub Settings Cannot be deleted"));
407
  $this->_mobilenowRedirect();
408
  }
409
+ } catch (Exception $e) {
 
 
410
  Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
411
  $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
412
  }
413
  }
 
414
  }
415
+
416
+ public function _mobilenowRedirect($resetDeleteId) {
417
+ $arg_array = array();
418
+ if ($this->getRequest()->getParam("active_tab"))
419
  $arg_array['active_tab'] = $this->getRequest()->getParam("active_tab");
420
+ if ($this->getRequest()->getParam("design_subtab"))
421
+ $arg_array['design_subtab'] = $this->getRequest()->getParam("design_subtab");
422
+ if ($this->getRequest()->getParam("layout_subtab"))
423
  $arg_array['layout_subtab'] = $this->getRequest()->getParam("layout_subtab");
424
+ if ($resetDeleteId)
425
  $arg_array['reset_delete'] = $resetDeleteId;
426
+
427
+ if ($this->getRequest()->getParam("id") != '') {
428
+ $arg_array['id'] = $this->getRequest()->getParam("id");
429
  $this->_redirect("*/*/edit", $arg_array);
430
+ } else {
431
+ $this->_redirect("*/*/new", $arg_array);
 
 
432
  }
433
  }
434
+
435
+ public function checkUniqueNameSaveAction() {
436
+ $checkUniqueName = $this->getRequest()->getParam('subsetname');
437
+ $collectionCheck = Mage::getModel('mobilenow/themesubsettings')->load($checkUniqueName, 'subsetname');
438
  echo $collectionCheck->getId();
439
+ }
440
+
441
+ public function resetSubsettingsAction() {
442
+ $getSubsettings = Mage::getModel("mobilenow/themesubsettings");
443
+ if ($this->getRequest()->getParam("reset_id")) {
444
+ $resetDeleteId = $this->getRequest()->getParam("reset_delete");
445
+ $resetCheck = $getSubsettings->getcollection()->addFieldToFilter('parent', $resetDeleteId)
446
+ ->addFieldToFilter('themeid', $this->getRequest()->getParam("id"))->getFirstItem();
447
+ if ($resetCheck->getParent()) {
448
+ $resetProceedDelete = $resetCheck->getId();
 
449
  $getSubsettings->setId($resetProceedDelete)->delete();
450
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was successfully Reset to Default."));
451
+ } else {
452
+ Mage::getSingleton("adminhtml/session")->addError(Mage::helper("adminhtml")->__("Preset Sub Settings cannot reset further."));
 
 
453
  }
454
  $this->_mobilenowRedirect($this->getRequest()->getParam("reset_delete"));
455
  }
456
  }
457
+
458
  // function for saving homepage layout xml
459
+ public function __saveHomePageLayoutXML($theme_id, $home_xml_string, $handle, $stores = array(), $preview = 0) {
460
+ //selecting layout update id
461
  $themeLayoutSettingsCollection = Mage::getModel('mobilenow/themelayoutsettings')->getCollection();
462
+ $themeLayoutSettingsCollection->addFieldToFilter('main_table.theme_id', $theme_id);
463
+ if ($preview == 1) {
464
+ $themeLayoutSettingsCollection->addFieldToFilter('main_table.preview', $preview);
465
  }
466
+ $themeLayoutSettingsCollection->addFieldToFilter('layoutupdate.handle', $handle);
467
+ $themeLayoutSettingsCollection->getSelect()->group('main_table.layout_update_id')->join(array('layoutupdate' => 'core_layout_update'), 'main_table.layout_update_id = layoutupdate.layout_update_id', array('layoutupdate.handle'));
468
  $currentThemeSetings = $themeLayoutSettingsCollection->getData();
469
 
470
+ if ($preview == 0) {
 
 
 
 
 
 
 
 
471
  $themeLayoutSettingsCollectionDel = Mage::getModel('mobilenow/themelayoutsettings')->getCollection();
472
+ $themeLayoutSettingsCollectionDel->addFieldToFilter('main_table.theme_id', $theme_id);
473
+ $themeLayoutSettingsCollectionDel->addFieldToFilter('main_table.preview', 1);
474
+ $themeLayoutSettingsCollectionDel->addFieldToFilter('layoutupdate.handle', $handle);
475
+ $themeLayoutSettingsCollectionDel->getSelect()->group('main_table.layout_update_id')->join(array('layoutupdate' => 'core_layout_update'), 'main_table.layout_update_id = layoutupdate.layout_update_id', array('layoutupdate.handle'));
476
  $currentThemeSetingsDel = $themeLayoutSettingsCollectionDel->getData();
477
+ if (is_array($currentThemeSetingsDel) && count($currentThemeSetingsDel) > 0) {
478
+ $coreLayoutUpdateModelDel = Mage::getModel('mobilenow/corelayoutupdate');
479
+
480
+ foreach ($currentThemeSetingsDel as $delThem) {
481
+
482
  $coreLayoutUpdateModelDel->load($delThem['layout_update_id'])->delete();
483
  }
484
  }
485
  }
486
+
487
  $coreLayoutUpdateModel = Mage::getModel('mobilenow/corelayoutupdate');
488
  //for updating the existing record
489
+ if (is_array($currentThemeSetings) && count($currentThemeSetings) > 0) {
490
+ if ($currentThemeSetings[0]['layout_update_id']) {
491
+ $coreLayoutUpdateModel->setLayoutUpdateId($currentThemeSetings[0]['layout_update_id']);
492
  }
493
+ }
494
  $coreLayoutUpdateModel->setHandle($handle);
495
  $coreLayoutUpdateModel->setXml($home_xml_string);
496
  $coreLayoutUpdateModel->setSortOrder(0);
497
  $coreLayoutUpdateModel->save();
498
  //for deleting related records from core_layout_link and themelayoutsettings
499
+ if (is_array($currentThemeSetings) && count($currentThemeSetings) > 0) {
500
+
501
+ $coreLayoutLinkCollection = Mage::getModel('mobilenow/corelayoutlink')->getCollection();
502
  $ids = array();
503
+ foreach ($currentThemeSetings as $currentTh) {
504
  $ids[] = $currentTh['layout_update_id'];
505
  }
506
+
507
  $coreLayoutLinkCollection->addFieldToFilter('layout_update_id', array('in' => $ids));
508
+ foreach ($coreLayoutLinkCollection as $corelayout) {
509
  $corelayout->delete();
510
  }
 
511
  }
512
 
513
+ foreach ($stores as $store_id) {
514
+ $coreLayoutLinkModel = Mage::getModel('mobilenow/corelayoutlink');
515
  $coreLayoutLinkModel->setStoreId($store_id);
516
  $coreLayoutLinkModel->setArea('frontend');
517
  $coreLayoutLinkModel->setPackage('redstage-mobilenow');
526
  $themeLayoutSettingsModel->save();
527
  }
528
  }
529
+
530
+ public function mobileConnectAction() {
531
+ $email = $this->getRequest()->getParam('email');
532
+ $username = $this->getRequest()->getParam('username');
533
+ $password = $this->getRequest()->getParam('password');
534
+ $this->_thirdPartyAuthenticate($url, $email, $username, $password, 'connect');
535
  }
536
+
537
+ public function disconnectMobilenowAction() {
538
+ $subscriptionstatus = json_decode(Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/subscription'));
539
+ if ($subscriptionstatus->subscritionStatus == 'active') {
540
+ $subscriptionstatus->subscritionStatus = 'inactive';
541
+ }
542
+ $subscriptionstatus = json_encode($subscriptionstatus); print_r($subscriptionstatus);
543
+ $mobilenowConfigSave = new Mage_Core_Model_Config();
544
+ $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/subscription', $subscriptionstatus, 'default', 0);
545
+ $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/acountstatus', 0, 'default', 0);
546
+ $deactivateAllThemes = Mage::getModel('mobilenow/mobilenow');
547
+ $collectionthemes = $deactivateAllThemes->getCollection()->addFieldToFilter('status', 1);
548
+ foreach ($collectionthemes as $deactivateAllTheme) {
549
+ $changeStatus['status'] = 0;
550
+ $currThemeId = $deactivateAllTheme->getThemeId();
551
+ $deactivateAllThemes->load($currThemeId)->addData($changeStatus)->setId($currThemeId)->save();
552
+ }
 
553
  Mage::app()->cleanCache();
554
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Your MobileNow account settings has been disconnected."));
555
+ $this->_redirect("adminhtml/system_config/edit/section/mobilenowsettings/");
556
  }
557
+
558
+ public function refreshMobilenowACtion() {
559
+ $email = $this->getRequest()->getParam('email');
560
+ $username = Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/username');
561
+ $password = Mage::getStoreConfig('mobilenowsettings/mobilenowaccount/password');
562
+ $this->_thirdPartyAuthenticate($url, $email, $username, $password, 'refresh');
563
  }
564
+
565
+ public function _thirdPartyAuthenticate($url, $email, $username, $password, $status)
566
+ {
567
+ $key = 'mrrzwfNuE0ACLCDZyOMR';
568
+ $url = 'https://mobilenowapp.com/am/api/check-access/by-login-pass?_key=' . $key . '&login=' . $email . '&pass=' . $password;
569
  //open connection
570
  $ch = curl_init();
571
  //set the url, number of POST vars, POST data
572
+ curl_setopt($ch, CURLOPT_URL, $url);
573
  curl_setopt($ch, CURLOPT_HEADER, 0);
574
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
575
  // curl_setopt($ch, CURLOPT_USERPWD, 'secure:6f2TGHt4_');
576
  // curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
577
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
578
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
579
  //execute post
580
  $result = curl_exec($ch);
581
+ $resultDecode = json_decode($result);
582
+ $memberDetails = array();
583
+ $memberDetails['ok'] = $resultDecode->ok;
584
+ if ($resultDecode->name)
585
+ $memberDetails['name'] = $resultDecode->name;
586
+ if ($resultDecode->subscriptions) {
587
+ $memberSubscriptions = $resultDecode->subscriptions;
588
+ foreach ($memberSubscriptions as $key => $memberSubscription) {
589
+ $subscribe['productId'] = $key;
590
+ $subscribe['subscrptionDate'] = $memberSubscription;
591
+ $dateExpire = $memberSubscription;
592
+ $today = date("Y-m-d");
 
 
 
593
  $days = (strtotime($dateExpire) - strtotime($today)) / (60 * 60 * 24);
594
+ $subscribe['daysRemaining'] = $days;
595
+ $resultDecode->daysRemaining = $days;
596
+ $subscribe['subscritionStatus'] = 'active';
597
+ }
598
+ $memberDetails['subscriptions'] = json_encode($subscribe);
599
+ $memberDetails['subscriptions_status'] = $subscribe['subscritionStatus'];
600
+ }
601
+ if ($resultDecode->msg)
602
+ $memberDetails['msg'] = $resultDecode->msg;
603
+ if ($memberDetails['ok']) {
604
+ $mobilenowConfigSave = new Mage_Core_Model_Config();
605
  $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/subscription', $memberDetails['subscriptions'], 'default', 0);
606
+ $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/acountstatus', ($memberDetails['subscriptions_status'] == 'active' ? true : false), 'default', 0);
607
  $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/email', $email, 'default', 0);
608
  $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/username', $username, 'default', 0);
609
+ $mobilenowConfigSave->saveConfig('mobilenowsettings/mobilenowaccount/password', $password, 'default', 0);
610
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("You are connected with your mobileNow account."));
611
  }
612
+ Mage::app()->cleanCache();
613
+
 
 
 
 
 
 
 
614
  print_r(json_encode($resultDecode));
615
  //close connection
616
+ curl_close($ch);
617
+
618
+ if($resultDecode->daysRemaining <=0){
619
+ $deactivateAllThemes = Mage::getModel('mobilenow/mobilenow');
620
+ $collectionthemes = $deactivateAllThemes->getCollection()->addFieldToFilter('status', 1);
621
+ foreach ($collectionthemes as $deactivateAllTheme) {
622
+ $changeStatus['status'] = 0;
623
+ $currThemeId = $deactivateAllTheme->getThemeId();
624
+ $deactivateAllThemes->load($currThemeId)->addData($changeStatus)->setId($currThemeId)->save();
625
+ }
626
+ Mage::app()->cleanCache();
627
+ }
628
  }
629
+
630
+ public function __setCssVariables($post_data) {
631
  $css_var_arr = array();
632
  $css_var_arr['background_color'] = $post_data['background_color'];
633
  $css_var_arr['search_cart_area_bg_color'] = $post_data['search_cart_bg_color'];
635
  $css_var_arr['links_color'] = $post_data['links_color'];
636
  $css_var_arr['text_color'] = $post_data['text_color'];
637
  $css_var_arr['categories_bg_color'] = $post_data['categories_background_color'];
638
+ $css_var_arr['categories_bg_borderwidth'] = ($post_data['categories_background_color'] != '') ? '1' : '0';
639
  $css_var_arr['button_bg_color'] = $post_data['button_background_color'];
640
  $css_var_arr['button_border_color'] = $post_data['button_border_color'];
641
  $css_var_arr['button_text_color'] = $post_data['button_text_color'];
650
  $css_var_arr['pagination_button_text_color'] = $post_data['pagination_button_text_color'];
651
 
652
  $css_var_arr['image_border_color'] = $post_data['image_border_color'];
653
+ $css_var_arr['image_border_width'] = ($post_data['show_image_border'] != '') ? (($post_data['catalog_image_width'] != '') ? $post_data['catalog_image_width'] : '1') : '0';
654
  $css_var_arr['product_title_color'] = $post_data['product_title_color'];
655
  $css_var_arr['product_price_color'] = $post_data['product_price_color'];
656
  $css_var_arr['product_special_price_color'] = $post_data['product_special_price_color'];
659
  $css_var_arr['add_to_cart_bg_color'] = $post_data['add_to_cart_button_bg_color'];
660
  $css_var_arr['add_to_cart_button_text_color'] = $post_data['add_to_cart_button_font_color'];
661
  $css_var_arr['add_to_cart_border_color'] = $post_data['add_to_cart_button_border_color'];
662
+ $css_var_arr['gridlines_color'] = $post_data['gridlines_color'];
663
+ $css_var_arr['gridlines_color_width'] = ($post_data['gridlines_color'] != '') ? '1' : '0';
664
  $css_var_arr['newsletter_bg_color'] = $post_data['newsletter_area_backgorund'];
665
 
666
  $css_var_arr['productpage_title_color'] = $post_data['productpage_title_color'];
667
  $css_var_arr['product_image_border_color'] = $post_data['product_image_border_color'];
668
+ $css_var_arr['product_image_border_width'] = ($post_data['product_image_border_color'] != '') ? '1' : '0';
669
  $css_var_arr['product_description_color'] = $post_data['product_description_color'];
670
+ $css_var_arr['additional_information_bg_color'] = $post_data['additional_information_bg_color'];
671
+ $css_var_arr['additional_information_font_color'] = $post_data['additional_information_font_color'];
672
+ $css_var_arr['full_reviews_bg_color'] = $post_data['full_reviews_bg_color'];
673
+ $css_var_arr['full_reviews_font_color'] = $post_data['full_reviews_font_color'];
674
+ return $css_var_arr;
675
  }
676
+
677
+ public function updatePreviewAction() {
678
+ if (!Mage::getSingleton('admin/session')->isLoggedIn())
679
  $this->_redirectUrl(Mage::helper("adminhtml")->getUrl("admin/index/index/"));
680
+ $post_data = $this->getRequest()->getPost();
681
+ if ($post_data['show_learn_more'] != 1)
682
+ $post_data['show_learn_more'] = 0;
683
+ if (!isset($post_data['stores']) || count($post_data['stores']) == 0) {
684
  $post_data['stores'] = array(0);
685
  }
686
+ if ($post_data & $post_data['stores']) {
687
+ try {
 
 
688
  $themeSubSettingsModel = Mage::getModel('mobilenow/themesubsettings');
689
+ if ($this->getRequest()->getParam("theme_id")) {
690
+ Mage::app()->cleanCache();
691
+
692
  $theme_id = $this->getRequest()->getParam("theme_id");
693
+ $model = Mage::getModel("mobilenow/mobilenow")->load($theme_id, 'theme_id');
694
+
695
+ $createnewThemeFlag = '';
696
  //Save Preset Subsettings with respect to Theme
697
+ $saveProcessedData = Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data, '', $model->getId(), $createnewThemeFlag, '1');
698
+
699
  //Check for values whether to save / Update in themesubsettings table
700
+ $attributes = array('themeid' => $model->getId(), 'preview' => 1);
701
+ $selectCurrentRecord = $themeSubSettingsModel->loadByAttributes($attributes);
702
  // preset_sub_settings and preset_layout_sub_settings will have the same value
703
+ $saveProcessedData['parent'] = $post_data['preset_sub_settings'];
704
  //If Condition will updated the record in themesubsettings table and else will insert a new record
705
+ if ($selectCurrentRecord->getId()) {
706
+ $ThemesubsetId = $selectCurrentRecord->getId();
 
707
  $themeSubSettingsModel->setData($saveProcessedData)->setId($ThemesubsetId)->save();
708
+ } else {
 
 
709
  $saveProcessedData['preview'] = 1;
710
  //Insert the same record and assign it to a theme
711
+ $themeSubSettingsModel->setData($saveProcessedData)->save();
712
+ }
713
+ $css_var_arr = $this->__setCssVariables($post_data);
714
+ $csspath = Mage::getBaseDir('media') . DS . 'mobilenow_theme_css' . DS;
715
+ $css_file_name = Mage::getBaseDir('media') . DS . 'mobilenow_theme_css' . DS . md5($model->getId() . '_preview') . '.css';
716
+ mkdir($csspath);
717
  $css_string = Mage::helper('mobilenow/theme')->generateThemeCssFile($css_var_arr);
718
+ if (file_exists($css_file_name)) {
719
  @unlink($css_file_name);
720
  }
721
+ if ($post_data['custom_css'] != '') {
722
  $css_string .= $post_data['custom_css'];
723
  }
724
+
725
  file_put_contents($css_file_name, $css_string);
726
+
 
 
 
 
 
 
727
  // generating homepage layout xml
728
  $home_xml_string = Mage::helper('mobilenow/homepage')->generateHomePageLayoutXML($post_data);
729
+
730
+ if ($home_xml_string != '') {
731
+ $this->__saveHomePageLayoutXML($model->getId(), $home_xml_string, 'cms_index_index', $post_data['stores'], 1);
732
+ }
733
+
 
734
  // generating default layout xml
735
+ $default_xml_string = Mage::helper('mobilenow/homepage')->generateDefaultPageLayoutXML($post_data, md5($model->getId() . '_preview'));
736
+ if ($default_xml_string != '') {
737
+ $this->__saveHomePageLayoutXML($model->getId(), $default_xml_string, 'default', $post_data['stores'], 1);
738
+ }
739
+
740
  // generating catalog layout xml
741
  $catalog_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
742
+
743
+ if ($catalog_xml_string != '') {
744
+ $this->__saveHomePageLayoutXML($model->getId(), $catalog_xml_string, 'catalog_category_layered', $post_data['stores'], 1);
745
+ }
746
  // generating catalog layout xml
747
  $catalog_default_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
748
+
749
+ if ($catalog_default_xml_string != '') {
750
+ $this->__saveHomePageLayoutXML($model->getId(), $catalog_default_xml_string, 'catalog_category_default', $post_data['stores'], 1);
751
  }
752
  // generating catalog search page layout xml
753
  $catalog_search_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogSearchPageLayoutXML($post_data);
 
 
 
 
 
 
 
 
 
 
 
 
754
 
755
+ if ($catalog_search_xml_string != '') {
756
+ $this->__saveHomePageLayoutXML($model->getId(), $catalog_search_xml_string, 'catalogsearch_result_index', $post_data['stores'], 1);
757
+ }
758
+
759
+ $cache = Mage::app()->getCache();
760
+ $cache->remove("Mobilethemepreview" . $theme_id);
761
+ echo 'success';
762
+ die;
763
+ } else {
764
+ echo 'failed';
765
  }
766
+ die;
767
+ } catch (Exception $e) {
 
768
  echo $e->getMessage();
769
+ die;
 
770
  }
 
771
  }
772
  }
773
+
774
+ public function uploadDesignImageAction() {
775
  $theme_id = $this->getRequest()->getParam("theme_id");
776
+ $data = array();
777
  $data['mesasage'] = 'success';
778
  $data['preview_name'] = '';
779
+ if ($this->getRequest()->getParam("upload_type") == 'logo') {
780
+ if ($_FILES['logo']['name'] != '') {
781
+ $logo = time() . str_replace(' ', '_', $_FILES['logo']['name']);
782
+ }
783
+ if (trim($logo) != '') {
784
+ try {
785
+ $path = Mage::getBaseDir('media') . DS . 'mobilenow_theme_images' . DS . 'logo' . DS . 'preview' . DS . $theme_id;
786
  $uploader = new Varien_File_Uploader('logo');
787
+ $uploader->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif'));
788
  $uploader->setAllowCreateFolders(true);
789
  $uploader->setAllowRenameFiles(false);
790
  $uploader->setFilesDispersion(false);
791
+ $uploader->save($path, $logo);
792
+ $data['preview_name'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'mobilenow_theme_images' . DS . 'logo' . DS . 'preview' . DS . $theme_id . DS . $logo;
793
  } catch (Exception $e) {
794
  $data['mesasage'] = $e->getMessage();
795
+ }
796
  }
797
  $data['logo_image_name'] = $logo;
798
  echo json_encode($data);
799
  exit;
800
+ } else if ($this->getRequest()->getParam("upload_type") == 'banner') {
801
+ if ($_FILES['homepage_banner']['name'] != '') {
802
+ $logo = time() . str_replace(' ', '_', $_FILES['homepage_banner']['name']);
803
+ }
804
+ if (trim($logo) != '') {
805
+ try {
806
+ $path = Mage::getBaseDir('media') . DS . 'mobilenow_theme_images' . DS . 'banner' . DS . 'preview' . DS . $theme_id;
807
  $uploader = new Varien_File_Uploader('homepage_banner');
808
+ $uploader->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif'));
809
  $uploader->setAllowCreateFolders(true);
810
  $uploader->setAllowRenameFiles(false);
811
  $uploader->setFilesDispersion(false);
812
+ $uploader->save($path, $logo);
813
+ $data['preview_name'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'mobilenow_theme_images' . DS . 'banner' . DS . 'preview' . DS . $theme_id . DS . $logo;
814
+ } catch (Exception $e) {
815
  $data['mesasage'] = $e->getMessage();
816
+ }
817
  }
818
  $data['banner_image_name'] = $logo;
819
  echo json_encode($data);
820
  exit;
821
  }
822
  }
823
+
824
+ public function iframeLoadAction(){
825
+ $theme_id = $this->getRequest()->getParam("theme_id");
826
+ $stores = $this->getRequest()->getParam("stores");
827
+ $tab = $this->getRequest()->getParam("tab");
828
+ $iframe = "iframe-preview";
829
+ if($tab!=''){ $iframe = $iframe."-".$tab; }
830
+ $html = '<iframe id="'.$iframe.'" width="272px" src="'.Mage::getBaseUrl().'?theme_id='.$theme_id.'&isadmin=1&store_id='.$stores.'&preview=1" onload="setIframeHeight(this.id)" style="border:none"></iframe>
831
+ <div id="'.$iframe.'_div" style="width:272px; height: 442px; opacity:0.0; position: absolute; top:372px; background-color: #000000;"></div>';
832
+ echo $html;
833
+ }
834
+
835
  }
app/code/community/Redstage/Mobilenow/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Redstage_Mobilenow>
5
- <version>0.1.4</version>
6
  </Redstage_Mobilenow>
7
  </modules>
8
  <frontend>
@@ -127,16 +127,25 @@
127
  <title>Add New Mobile Theme</title>
128
  <sort_order>1</sort_order>
129
  <action>mobilenow/adminhtml_mobilenow/new</action>
 
 
 
130
  </createtheme>
131
  <managetheme module="mobilenow">
132
  <title>Manage Mobile Themes</title>
133
  <sort_order>2</sort_order>
134
  <action>mobilenow/adminhtml_mobilenow/index</action>
 
 
 
135
  </managetheme>
136
  <manageaccount module="mobilenow">
137
  <title>Manage / Upgrade MyAccount</title>
138
  <sort_order>3</sort_order>
139
  <action>adminhtml/system_config/edit/section/mobilenowsettings</action>
 
 
 
140
  </manageaccount>
141
  <configopt module="mobilenow">
142
  <title>Configuration Options</title>
@@ -147,6 +156,9 @@
147
  <title>Help &amp; Documentation</title>
148
  <sort_order>5</sort_order>
149
  <action>mobilenow/adminhtml_mobilenow/help</action>
 
 
 
150
  </help>
151
  </children>
152
  </mobilenow>
@@ -198,6 +210,22 @@
198
  </mobilenow>
199
  </updates>
200
  </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  </adminhtml>
202
  <stores>
203
  <admin>
@@ -208,5 +236,18 @@
208
  </debug>
209
  </dev>
210
  </admin>
211
- </stores>
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  </config>
2
  <config>
3
  <modules>
4
  <Redstage_Mobilenow>
5
+ <version>0.1.8</version>
6
  </Redstage_Mobilenow>
7
  </modules>
8
  <frontend>
127
  <title>Add New Mobile Theme</title>
128
  <sort_order>1</sort_order>
129
  <action>mobilenow/adminhtml_mobilenow/new</action>
130
+ <depends>
131
+ <config>mobilenowsettings/mobilenowaccount/acountstatus</config>
132
+ </depends>
133
  </createtheme>
134
  <managetheme module="mobilenow">
135
  <title>Manage Mobile Themes</title>
136
  <sort_order>2</sort_order>
137
  <action>mobilenow/adminhtml_mobilenow/index</action>
138
+ <depends>
139
+ <config>mobilenowsettings/mobilenowaccount/acountstatus</config>
140
+ </depends>
141
  </managetheme>
142
  <manageaccount module="mobilenow">
143
  <title>Manage / Upgrade MyAccount</title>
144
  <sort_order>3</sort_order>
145
  <action>adminhtml/system_config/edit/section/mobilenowsettings</action>
146
+ <depends>
147
+ <config>mobilenowsettings/mobilenowaccount/acountstatus</config>
148
+ </depends>
149
  </manageaccount>
150
  <configopt module="mobilenow">
151
  <title>Configuration Options</title>
156
  <title>Help &amp; Documentation</title>
157
  <sort_order>5</sort_order>
158
  <action>mobilenow/adminhtml_mobilenow/help</action>
159
+ <depends>
160
+ <config>mobilenowsettings/mobilenowaccount/acountstatus</config>
161
+ </depends>
162
  </help>
163
  </children>
164
  </mobilenow>
210
  </mobilenow>
211
  </updates>
212
  </layout>
213
+ <events>
214
+ <controller_action_predispatch>
215
+ <observers>
216
+ <mobilenow>
217
+ <type>singleton</type>
218
+ <class>mobilenow/feed</class>
219
+ <method>observe</method>
220
+ </mobilenow>
221
+ <mobilenow_themesubsettings>
222
+ <type>singleton</type>
223
+ <class>mobilenow/themesubsettings</class>
224
+ <method>fetchThemeSubsetData</method>
225
+ </mobilenow_themesubsettings>
226
+ </observers>
227
+ </controller_action_predispatch>
228
+ </events>
229
  </adminhtml>
230
  <stores>
231
  <admin>
236
  </debug>
237
  </dev>
238
  </admin>
239
+ </stores>
240
+ <default>
241
+ <system>
242
+ <mobilenownotification>
243
+ <feed_url>www.mobilenowapp.com/notifications/feed.rss</feed_url>
244
+ <use_https>0</use_https>
245
+ <frequency>1</frequency>
246
+ <last_update>0</last_update>
247
+ </mobilenownotification>
248
+ <mobilenowthemesubsettings>
249
+ <data_url>http://www.mobilenowapp.com/subsets/feed.xml</data_url>
250
+ </mobilenowthemesubsettings>
251
+ </system>
252
+ </default>
253
  </config>
app/code/community/Redstage/Mobilenow/etc/system.xml CHANGED
@@ -72,6 +72,12 @@
72
  <show_in_store>1</show_in_store>
73
  <comment>Please enter password</comment>
74
  </subscription>
 
 
 
 
 
 
75
  <link translate="label">
76
  <label>Manage Account URL</label>
77
  <frontend_type>link</frontend_type>
@@ -90,32 +96,30 @@
90
  <show_in_default>1</show_in_default>
91
  <show_in_website>1</show_in_website>
92
  <show_in_store>1</show_in_store>
93
- </button>
94
- </fields>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  </mobilenowaccount>
96
- <mobilenowgeneral translate="label">
97
- <label>General Settings</label>
98
- <frontend_type>text</frontend_type>
99
- <sort_order>1</sort_order>
100
- <show_in_default>1</show_in_default>
101
- <show_in_website>1</show_in_website>
102
- <show_in_store>1</show_in_store>
103
- <comment><![CDATA[
104
- <i>MobileNow v1.0.1 - <a href="https://mobilenowapp.com/pricing" style="color:#EA7601">Click Here To Check For Updates</a></i>
105
- ]]></comment>
106
- <fields>
107
- <status translate="label">
108
- <label>Enabled</label>
109
- <frontend_type>select</frontend_type>
110
- <source_model>adminhtml/system_config_source_yesno</source_model>
111
- <sort_order>1</sort_order>
112
- <show_in_default>1</show_in_default>
113
- <show_in_website>1</show_in_website>
114
- <show_in_store>1</show_in_store>
115
- <comment>Please select the status</comment>
116
- </status>
117
- </fields>
118
- </mobilenowgeneral>
119
  </groups>
120
  </mobilenowsettings>
121
  </sections>
72
  <show_in_store>1</show_in_store>
73
  <comment>Please enter password</comment>
74
  </subscription>
75
+ <acountstatus translate="label">
76
+ <sort_order>6</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>1</show_in_store>
80
+ </acountstatus>
81
  <link translate="label">
82
  <label>Manage Account URL</label>
83
  <frontend_type>link</frontend_type>
96
  <show_in_default>1</show_in_default>
97
  <show_in_website>1</show_in_website>
98
  <show_in_store>1</show_in_store>
99
+ </button>
100
+ <mobilenowgeneral translate="label">
101
+ <label>MobileNow v1.0.1.14 -</label>
102
+ <frontend_type>label</frontend_type>
103
+ <sort_order>6</sort_order>
104
+ <show_in_default>1</show_in_default>
105
+ <show_in_website>1</show_in_website>
106
+ <show_in_store>1</show_in_store>
107
+ <comment><![CDATA[
108
+ <i><a href="https://mobilenowapp.com/pricing" style="color:#EA7601">Click Here To Check For Updates</a></i>
109
+ ]]></comment>
110
+ </mobilenowgeneral>
111
+ <status translate="label">
112
+ <label>Enabled</label>
113
+ <frontend_type>select</frontend_type>
114
+ <source_model>adminhtml/system_config_source_yesno</source_model>
115
+ <sort_order>7</sort_order>
116
+ <show_in_default>1</show_in_default>
117
+ <show_in_website>1</show_in_website>
118
+ <show_in_store>1</show_in_store>
119
+ <comment>Please select the status</comment>
120
+ </status>
121
+ </fields>
122
  </mobilenowaccount>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  </groups>
124
  </mobilenowsettings>
125
  </sections>
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.0-0.1.1.php CHANGED
@@ -11,7 +11,7 @@ foreach ($themesettings as $settings) {
11
  array('id' => '2','defaultsubsetting' => '0','subsetname' => 'green forest','primary' => '1','logo' => '','bgcolor' => '#1aeb24','links' => '{"header_link_home":"1","header_link_home_name":"1","footer_link_home":"1","footer_link_home_name":"1","header_link_login":"1","header_link_login_name":"2","footer_link_login":"1","footer_link_login_name":"2","header_link_myaccount":"1","header_link_myaccount_name":"3","footer_link_myaccount":"1","footer_link_myaccount_name":"3","header_link_wishlist":"1","header_link_wishlist_name":"4","footer_link_wishlist":"1","footer_link_wishlist_name":"4","links_color":"#80db44"}','textcolor' => '#0df763','searchcart' => '{"show_search_cart_area":"1","search_cart_bg_color":"#1be05d","cart_link_color":"#1be05d"}','homepagebanner' => '{"show_home_page_banner":"1","homepage_banner":"","homepage_banner_url":"Green forest"}','subheadersection' => 'Green forest','categories' => '{"categories":"2","categories_background_color":"#7bf70f"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#14fa68"}','homepagecustomcode' => 'Green forest','prefootersection' => 'Green forest','footersection' => 'Green forest','buttoncolor' => '{"button_background_color":"#14fa32","button_text_color":"#26eb30","button_border_color":"#25f59b"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#1ce65f","breadcrumbs_font_color":"#18f523"}','catalogview' => '{"default_catalog_view":"2","show_grid_list_choice":"1"}','numberofproductsperpage' => '5','numberofproductschoice' => '5,10,15,20','catalogsortby' => '{"show_sortby_dropdown":"1","sort_options":"1,2,3,4,5"}','toolbarcolor' => '{"toolbar_bg_color":"#14fa14","toolbar_text_color":"#0ceb39"}','pagination' => '{"show_pagination":"2","pagination_bg_color":"#0afc63","pagination_button_bg_color":"#96ed2b","pagination_button_text_color":"#65f518"}','catalogimagedetails' => '{"show_image_border":"1","image_border_color":"#0fff23","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#15ed0e","product_price_color":"#0eebbf","product_special_price_color":"#b1f011"}','catalogreviews' => '{"show_review_stars":"1","review_star_color":"#12fa38"}','cataloglearnmore' => '1','catalogaddtocart' => '{"show_add_to_cart":"1","add_to_cart_button_bg_color":"#17fa6a","add_to_cart_button_font_color":"#a4fa0f","add_to_cart_button_border_color":"#0ef599"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#00ff40"}','producttitlecolor' => '#71deab','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#519e64","product_image_width":""}','showproductdeails' => '{"show_product_availability":"1","show_product_wishlist_link":"1","show_product_reviews_summary":"1","show_product_description":"1","show_product_additional_information":"1","show_full_reviews_on_product_page":"1","show_related_products":"1"}','homepagelayoutmain' => '{"h_layout_search_cart":"1","h_layout_sub_header":"2","h_layout_banner":"3","h_layout_feature":"4","h_layout_categories":"5","h_layout_news_signup":"6"}','cataloglayoutmain' => '{"c_layout_breadcrumbs":"1","c_layout_toolbar":"2","c_layout_pag_top":"3"}','cataloglayoutgrid' => '{"c_grid_layout_product_image":"1","c_grid_layout_product_title":"2","c_grid_layout_product_price":"3","c_grid_layout_product_review":"4","c_grid_layout_product_learn":"5","c_grid_layout_product_addtocart":"6"}','cataloglayoutlist' => '{"c_list_layout_product_image":"1","c_list_layout_product_title":"2","c_list_layout_product_price":"3","c_list_layout_product_review":"4","c_list_layout_product_learn":"5","c_list_layout_product_addtocart":"6"}','productlayoutmain' => '{"ptop_layout_settings":{"p_layout_availability":"1","p_layout_pricing":"2","p_layout_addtocart":"3","p_layout_wishlist":"4","p_layout_review":"5"},"pbottom_layout_settings":{"p_layout_desc":"1","p_layout_additionalinfo":"2","p_layout_fullreview":"3","p_layout_relatedproduct":"4"}}','parent' => '0','themeid' => '0','dateinserted' => '2013-08-26 18:12:10')
12
  );*/
13
  $data = array(
14
- array('id' => '1','defaultsubsetting' => '1','subsetname' => 'Mobilenow default','primary' => '1','logo' => '1381160198linkedinsucks.GIF','bgcolor' => '#ffffff','links' => '{"header_link_home":"1","header_link_home_name":"1","footer_link_home":"1","footer_link_home_name":"1","header_link_login":"1","header_link_login_name":"2","footer_link_login":"1","footer_link_login_name":"2","header_link_myaccount":"1","header_link_myaccount_name":"3","footer_link_myaccount":"1","footer_link_myaccount_name":"3","header_link_wishlist":"1","header_link_wishlist_name":"4","footer_link_wishlist":"1","footer_link_wishlist_name":"4","links_color":"#0a0909"}','textcolor' => '#ffffff','searchcart' => '{"show_search_cart_area":"1","search_cart_bg_color":"#1f72c8","cart_link_color":"#ffffff"}','homepagebanner' => '{"show_home_page_banner":"1","homepage_banner":"1380280298Banner.png","homepage_banner_url":"black fashion"}','subheadersection' => '<div style="padding:5px;color:#1f72c8;font-weight:bold;">Free Shipping on orders over $50!</div>','categories' => '{"categories":"1","categories_background_color":"#1f72c8"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#1f72c8"}','homepagecustomcode' => '<br />','prefootersection' => '','footersection' => '<div style="color:black;">Copyright 2013 MobileNowApp.com </div>','buttoncolor' => '{"button_background_color":"#e08d37","button_text_color":"#f5f2f2","button_border_color":"#ffffff"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#1f72c8","breadcrumbs_font_color":"#ffffff"}','catalogview' => '','numberofproductsperpage' => '10','numberofproductschoice' => '5,10,15,20','catalogsortby' => '{"show_sortby_dropdown":"1","sort_options":"1,2,3,4,5"}','toolbarcolor' => '{"toolbar_bg_color":"#1f72c8","toolbar_text_color":"#ffffff"}','pagination' => '{"show_pagination":"2","pagination_bg_color":"#bfb5b5","pagination_button_bg_color":"#9e9393","pagination_button_text_color":"#9e8b8b"}','catalogimagedetails' => '{"show_image_border":"1","image_border_color":"#ffffff","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#1f72c8","product_price_color":"#e08d37","product_special_price_color":"#8c8181"}','catalogreviews' => '{"show_review_stars":"1","review_star_color":"#c2b8b8"}','cataloglearnmore' => '1','catalogaddtocart' => '{"show_add_to_cart":"1","add_to_cart_button_bg_color":"#e08d37","add_to_cart_button_font_color":"#ffffff","add_to_cart_button_border_color":"#e08d37"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#9a9e98"}','producttitlecolor' => '#1f72c8','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#ffffff","product_image_width":""}','showproductdeails' => '{"show_product_availability":"1","show_product_wishlist_link":"1","show_product_reviews_summary":"1","show_product_description":"1","product_description_color":"#000000","show_product_additional_information":"1","additional_information_bg_color":"#ffffff","additional_information_font_color":"#000000","show_full_reviews_on_product_page":"1","full_reviews_bg_color":"#ffffff","full_reviews_font_color":"#000000","show_related_products":"1"}','homepagelayoutmain' => '{"h_layout_search_cart":"1","h_layout_sub_header":"2","h_layout_banner":"3","h_layout_feature":"4","h_layout_categories":"5","h_layout_news_signup":"6"}','cataloglayoutmain' => '{"c_layout_breadcrumbs":"1","c_layout_toolbar":"2","c_layout_pag_top":"3"}','cataloglayoutgrid' => '','cataloglayoutlist' => '{"c_list_layout_product_image":null,"c_list_layout_product_title":null,"c_list_layout_product_price":"3","c_list_layout_product_review":"4","c_list_layout_product_learn":"5","c_list_layout_product_addtocart":"6"}','productlayoutmain' => '{"ptop_layout_settings":{"p_layout_availability":"1","p_layout_pricing":"2","p_layout_addtocart":"3","p_layout_wishlist":"4","p_layout_review":"5"},"pbottom_layout_settings":{"p_layout_desc":"1","p_layout_additionalinfo":"2","p_layout_fullreview":"3","p_layout_relatedproduct":"4"}}','parent' => '0','themeid' => '0','preview' => '0','css_filename' => 'c81e728d9d4c2f636f067f89cc14862c.css','dateinserted' => '2013-10-18 10:48:19')
15
  );
16
 
17
  foreach ($data as $bind) {
11
  array('id' => '2','defaultsubsetting' => '0','subsetname' => 'green forest','primary' => '1','logo' => '','bgcolor' => '#1aeb24','links' => '{"header_link_home":"1","header_link_home_name":"1","footer_link_home":"1","footer_link_home_name":"1","header_link_login":"1","header_link_login_name":"2","footer_link_login":"1","footer_link_login_name":"2","header_link_myaccount":"1","header_link_myaccount_name":"3","footer_link_myaccount":"1","footer_link_myaccount_name":"3","header_link_wishlist":"1","header_link_wishlist_name":"4","footer_link_wishlist":"1","footer_link_wishlist_name":"4","links_color":"#80db44"}','textcolor' => '#0df763','searchcart' => '{"show_search_cart_area":"1","search_cart_bg_color":"#1be05d","cart_link_color":"#1be05d"}','homepagebanner' => '{"show_home_page_banner":"1","homepage_banner":"","homepage_banner_url":"Green forest"}','subheadersection' => 'Green forest','categories' => '{"categories":"2","categories_background_color":"#7bf70f"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#14fa68"}','homepagecustomcode' => 'Green forest','prefootersection' => 'Green forest','footersection' => 'Green forest','buttoncolor' => '{"button_background_color":"#14fa32","button_text_color":"#26eb30","button_border_color":"#25f59b"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#1ce65f","breadcrumbs_font_color":"#18f523"}','catalogview' => '{"default_catalog_view":"2","show_grid_list_choice":"1"}','numberofproductsperpage' => '5','numberofproductschoice' => '5,10,15,20','catalogsortby' => '{"show_sortby_dropdown":"1","sort_options":"1,2,3,4,5"}','toolbarcolor' => '{"toolbar_bg_color":"#14fa14","toolbar_text_color":"#0ceb39"}','pagination' => '{"show_pagination":"2","pagination_bg_color":"#0afc63","pagination_button_bg_color":"#96ed2b","pagination_button_text_color":"#65f518"}','catalogimagedetails' => '{"show_image_border":"1","image_border_color":"#0fff23","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#15ed0e","product_price_color":"#0eebbf","product_special_price_color":"#b1f011"}','catalogreviews' => '{"show_review_stars":"1","review_star_color":"#12fa38"}','cataloglearnmore' => '1','catalogaddtocart' => '{"show_add_to_cart":"1","add_to_cart_button_bg_color":"#17fa6a","add_to_cart_button_font_color":"#a4fa0f","add_to_cart_button_border_color":"#0ef599"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#00ff40"}','producttitlecolor' => '#71deab','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#519e64","product_image_width":""}','showproductdeails' => '{"show_product_availability":"1","show_product_wishlist_link":"1","show_product_reviews_summary":"1","show_product_description":"1","show_product_additional_information":"1","show_full_reviews_on_product_page":"1","show_related_products":"1"}','homepagelayoutmain' => '{"h_layout_search_cart":"1","h_layout_sub_header":"2","h_layout_banner":"3","h_layout_feature":"4","h_layout_categories":"5","h_layout_news_signup":"6"}','cataloglayoutmain' => '{"c_layout_breadcrumbs":"1","c_layout_toolbar":"2","c_layout_pag_top":"3"}','cataloglayoutgrid' => '{"c_grid_layout_product_image":"1","c_grid_layout_product_title":"2","c_grid_layout_product_price":"3","c_grid_layout_product_review":"4","c_grid_layout_product_learn":"5","c_grid_layout_product_addtocart":"6"}','cataloglayoutlist' => '{"c_list_layout_product_image":"1","c_list_layout_product_title":"2","c_list_layout_product_price":"3","c_list_layout_product_review":"4","c_list_layout_product_learn":"5","c_list_layout_product_addtocart":"6"}','productlayoutmain' => '{"ptop_layout_settings":{"p_layout_availability":"1","p_layout_pricing":"2","p_layout_addtocart":"3","p_layout_wishlist":"4","p_layout_review":"5"},"pbottom_layout_settings":{"p_layout_desc":"1","p_layout_additionalinfo":"2","p_layout_fullreview":"3","p_layout_relatedproduct":"4"}}','parent' => '0','themeid' => '0','dateinserted' => '2013-08-26 18:12:10')
12
  );*/
13
  $data = array(
14
+ array('id' => '1','defaultsubsetting' => '1','subsetname' => 'Mobilenow default','primary' => '1','logo' => '1381160198linkedinsucks.GIF','bgcolor' => '#ffffff','links' => '{"header_link_home":"1","header_link_home_name":"1","footer_link_home":"1","footer_link_home_name":"1","header_link_login":"1","header_link_login_name":"2","footer_link_login":"1","footer_link_login_name":"2","header_link_myaccount":"1","header_link_myaccount_name":"3","footer_link_myaccount":"1","footer_link_myaccount_name":"3","header_link_wishlist":"1","header_link_wishlist_name":"4","footer_link_wishlist":"1","footer_link_wishlist_name":"4","links_color":"#0a0909"}','textcolor' => '#ffffff','searchcart' => '{"show_search_cart_area":"1","search_cart_bg_color":"#1f72c8","cart_link_color":"#ffffff"}','homepagebanner' => '{"show_home_page_banner":"1","homepage_banner":"1380280298Banner.png","homepage_banner_url":""}','subheadersection' => '<div style="padding:5px;color:#1f72c8;font-weight:bold;">Free Shipping on orders over $50!</div>','categories' => '{"categories":"1","categories_background_color":"#1f72c8"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#1f72c8"}','homepagecustomcode' => '<br />','prefootersection' => '','footersection' => '<div style="color:black;">Copyright 2013 MobileNowApp.com </div>','buttoncolor' => '{"button_background_color":"#e08d37","button_text_color":"#f5f2f2","button_border_color":"#ffffff"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#1f72c8","breadcrumbs_font_color":"#ffffff"}','catalogview' => '','numberofproductsperpage' => '10','numberofproductschoice' => '5,10,15,20','catalogsortby' => '{"show_sortby_dropdown":"1","sort_options":"1,2,3,4,5"}','toolbarcolor' => '{"toolbar_bg_color":"#1f72c8","toolbar_text_color":"#ffffff"}','pagination' => '{"show_pagination":"2","pagination_bg_color":"#bfb5b5","pagination_button_bg_color":"#9e9393","pagination_button_text_color":"#9e8b8b"}','catalogimagedetails' => '{"show_image_border":"1","image_border_color":"#ffffff","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#1f72c8","product_price_color":"#e08d37","product_special_price_color":"#8c8181"}','catalogreviews' => '{"show_review_stars":"1","review_star_color":"#c2b8b8"}','cataloglearnmore' => '1','catalogaddtocart' => '{"show_add_to_cart":"1","add_to_cart_button_bg_color":"#e08d37","add_to_cart_button_font_color":"#ffffff","add_to_cart_button_border_color":"#e08d37"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#9a9e98"}','producttitlecolor' => '#1f72c8','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#ffffff","product_image_width":""}','showproductdeails' => '{"show_product_availability":"1","show_product_wishlist_link":"1","show_product_reviews_summary":"1","show_product_description":"1","product_description_color":"#000000","show_product_additional_information":"1","additional_information_bg_color":"#ffffff","additional_information_font_color":"#000000","show_full_reviews_on_product_page":"1","full_reviews_bg_color":"#ffffff","full_reviews_font_color":"#000000","show_related_products":"1"}','homepagelayoutmain' => '{"h_layout_search_cart":"1","h_layout_sub_header":"2","h_layout_banner":"3","h_layout_feature":"4","h_layout_categories":"5","h_layout_news_signup":"6"}','cataloglayoutmain' => '{"c_layout_breadcrumbs":"1","c_layout_toolbar":"2","c_layout_pag_top":"3"}','cataloglayoutgrid' => '','cataloglayoutlist' => '{"c_list_layout_product_image":null,"c_list_layout_product_title":null,"c_list_layout_product_price":"3","c_list_layout_product_review":"4","c_list_layout_product_learn":"5","c_list_layout_product_addtocart":"6"}','productlayoutmain' => '{"ptop_layout_settings":{"p_layout_availability":"1","p_layout_pricing":"2","p_layout_addtocart":"3","p_layout_wishlist":"4","p_layout_review":"5"},"pbottom_layout_settings":{"p_layout_desc":"1","p_layout_additionalinfo":"2","p_layout_fullreview":"3","p_layout_relatedproduct":"4"}}','parent' => '0','themeid' => '0','preview' => '0','css_filename' => 'c81e728d9d4c2f636f067f89cc14862c.css','dateinserted' => '2013-10-18 10:48:19')
15
  );
16
 
17
  foreach ($data as $bind) {
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.1-0.1.2.php CHANGED
@@ -3,12 +3,11 @@
3
  $installer = $this;
4
 
5
  $installer->startSetup();
6
- $tableThemeSetting = $installer->getTable('themelayoutsettings');
7
 
8
  $installer->run("
9
- ALTER TABLE `{$tableThemeSetting}` ADD `layout_update_id` INT( 10 ) UNSIGNED NOT NULL ,
10
  ADD INDEX ( `layout_update_id` );
11
- ALTER TABLE `{$tableThemeSetting}` ADD FOREIGN KEY ( `layout_update_id` ) REFERENCES `{$this->getTable('core_layout_update')}` (
12
  `layout_update_id`
13
  ) ON DELETE CASCADE ON UPDATE CASCADE ;
14
  ");
3
  $installer = $this;
4
 
5
  $installer->startSetup();
 
6
 
7
  $installer->run("
8
+ ALTER TABLE {$this->getTable('themelayoutsettings')} ADD `layout_update_id` INT( 10 ) UNSIGNED NOT NULL ,
9
  ADD INDEX ( `layout_update_id` );
10
+ ALTER TABLE {$this->getTable('themelayoutsettings')} ADD FOREIGN KEY ( `layout_update_id` ) REFERENCES {$this->getTable('core_layout_update')} (
11
  `layout_update_id`
12
  ) ON DELETE CASCADE ON UPDATE CASCADE ;
13
  ");
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.2-0.1.3.php CHANGED
@@ -3,9 +3,8 @@
3
  $installer = $this;
4
 
5
  $installer->startSetup();
6
- $tableCoreConfig = $installer->getTable('core_config_data');
7
 
8
  $installer->run("
9
- INSERT INTO `{$tableCoreConfig}` (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES (NULL, 'default', '0', 'mobilenowsettings/mobilenowaccount/subscription', '0');");
10
  $installer->endSetup();
11
  ?>
3
  $installer = $this;
4
 
5
  $installer->startSetup();
 
6
 
7
  $installer->run("
8
+ INSERT INTO {$this->getTable('core_config_data')} (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES (NULL, 'default', '0', 'mobilenowsettings/mobilenowaccount/subscription', '0');");
9
  $installer->endSetup();
10
  ?>
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.4-0.1.5.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("ALTER TABLE {$this->getTable('themesubsettings')} ADD `use_store_logo` INT(1) NOT NULL DEFAULT 0 AFTER `logo`;");
8
+ $installer->run("ALTER TABLE {$this->getTable('themesubsettings')} ADD `themesubsettings_id` INT(10) NOT NULL DEFAULT 0 AFTER `id`;");
9
+
10
+ $installer->endSetup();
11
+ ?>
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.5-0.1.6.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("ALTER TABLE {$this->getTable('themesubsettings')} ADD `source` enum('FEED', 'CUSTOM') NOT NULL default 'FEED' AFTER `preview`;");
8
+
9
+ $installer->endSetup();
10
+ ?>
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.6-0.1.7.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("ALTER TABLE {$this->getTable('themesubsettings')} ADD `logo_image_url` VARCHAR( 255 ) NULL AFTER `logo`;");
8
+
9
+ $installer->endSetup();
10
+ ?>
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.7-0.1.8.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("ALTER TABLE {$this->getTable('themesettings')} ADD `template_preset_id` INT(11) DEFAULT 0 AFTER `status`;");
8
+
9
+ $installer->endSetup();
10
+ ?>
app/design/adminhtml/default/default/template/mobilenow/widget/advsettings.phtml CHANGED
@@ -28,3 +28,10 @@
28
  <?php echo $this->getFormHtml();?>
29
  </div>
30
  <?php echo $this->getChildHtml('form_after');?>
 
 
 
 
 
 
 
28
  <?php echo $this->getFormHtml();?>
29
  </div>
30
  <?php echo $this->getChildHtml('form_after');?>
31
+ <?php if(Mage::app()->getRequest()->getActionName()=='new'): ?>
32
+ <script>
33
+ $j(document).ready( function() {
34
+ $j("#mobilenow_tabs_design,#mobilenow_tabs_theme_layouts,#mobilenow_tabs_advanced_settings").parent().attr('style','display:none');
35
+ });
36
+ </script>
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/mobilenow/widget/design.phtml CHANGED
@@ -14,9 +14,7 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
14
  </div>
15
  <div class="fieldset ">
16
  <script>
17
- var home_url = '<?php echo Mage::getBaseUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
18
- var catalog_url ='<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewCategoryUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
19
- var product_url ='<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewProductUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
20
  $j(function() {
21
  $j( "#tabs" ).tabs();
22
  var sel_tab = 0;
@@ -43,12 +41,16 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
43
  $j('#layout_save_error').html('');
44
  }
45
  });
46
- // $j(".inline_save_as_top").colorbox({inline:true, width:"50%",href:"#inline_save_as_top",opacity: 0.6,
47
- // onClosed: function () {
48
- // $j('#sub_setting_theme_name_text').val('');
49
- // $j('#save_error_text').html('');
50
- // }
51
- // });
 
 
 
 
52
  $j(".save_settings_link").colorbox({inline:true, width:"50%",opacity: 0.6});
53
  $j(".reset_settings_link").colorbox({inline:true, width:"50%",opacity: 0.6});
54
 
@@ -66,8 +68,7 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
66
  if(loadPreview)
67
  updatePreview('<?php echo $theme_id;?>','iframe-preview')
68
  });
69
-
70
- new AjaxUpload('logo', {
71
  action: uploadImageUrl+'upload_type/logo/theme_id/<?php echo $theme_id;?>/?isAjax=true',
72
  name: 'logo',
73
  dataType: "json",
@@ -81,7 +82,6 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
81
  },
82
  onComplete: function(file, response) {
83
  Element.hide('loading-mask');
84
- //var jsonObj = response.evalJSON();
85
  var jsonObj = eval("(" + response + ")");
86
  if(jsonObj.mesasage != 'success'){
87
  alert(jsonObj.mesasage);
@@ -89,9 +89,6 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
89
  $j('#logo_preview_filename').val(jsonObj.logo_image_name);
90
  $j('#logo_preview').attr('src',jsonObj.preview_name);
91
  }
92
- // var decodedUri = decodeURIComponent(jsonObj.profilebanner);
93
- // jQuery('#profileBanner').val(jsonObj.profilebanner_file);
94
-
95
  }
96
  });
97
 
@@ -109,7 +106,6 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
109
  },
110
  onComplete: function(file, response) {
111
  Element.hide('loading-mask');
112
- //var jsonObj = response.evalJSON();
113
  var jsonObj = eval("(" + response + ")");
114
  if(jsonObj.mesasage != 'success'){
115
  alert(jsonObj.mesasage);
@@ -117,12 +113,23 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
117
  $j('#banner_preview_filename').val(jsonObj.banner_image_name);
118
  $j('#banner_preview').attr('src',jsonObj.preview_name);
119
  }
120
- // var decodedUri = decodeURIComponent(jsonObj.profilebanner);
121
- // jQuery('#profileBanner').val(jsonObj.profilebanner_file);
122
-
123
  }
124
  });
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
 
127
  varienLoaderHandler.handler.onCreate({options: {loaderArea: true}});
128
  Element.hide('loading-mask');
@@ -143,9 +150,7 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
143
  var ifrm_div = document.getElementById(id+'_div');
144
  var doc = ifrm.contentDocument? ifrm.contentDocument:
145
  ifrm.contentWindow.document;
146
- // ifrm.style.visibility = 'hidden';
147
- console.log('etDocHeight( doc )');
148
- console.log(getDocHeight( doc ));
149
  ifrm.style.height = "10px"; // reset to minimal height ...
150
  // IE opt. for bing/msn needs a bit added or scrollbar appears
151
  ifrm.style.height = getDocHeight( doc ) + 2 + "px";
@@ -154,12 +159,7 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
154
  }
155
  </script>
156
  <div class="tab-preview">
157
- <div id="tabs" class="common_tab_cnt">
158
- <ul>
159
- <li><a href="#general_homepage" onclick="homeFrame('iframe-preview',home_url)" id="design-general-homepage">General / Homepage</a></li>
160
- <li><a href="#catalog_page" onclick="categoryFrame('iframe-preview',catalog_url)" id="design-catalog-page">Catalog Page</a></li>
161
- <li><a href="#produt_page" onclick="productFrame('iframe-preview',product_url)" id="design-product-page">Product Page</a></li>
162
- </ul>
163
  <?php echo $this->getFormHtml();?>
164
  </div>
165
  <div id='live_preview'>
@@ -173,9 +173,7 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
173
  </button>
174
  </div>
175
  <div class="preview-head"></div>
176
- <div class="render_preview">
177
- <iframe id="iframe-preview" width="272px" src="<?php echo Mage::getBaseUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>" onload="setIframeHeight(this.id)" style="border:none"></iframe>
178
- <div id="iframe-preview_div"style="width:272px; height: 442px; opacity:0.0; position: absolute; top:372px; background-color: #000000;"></div>
179
  </div>
180
  <div class="preview-footer"></div>
181
  <div class="update-preview-button">
@@ -274,6 +272,12 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
274
  var values = $('number_of_products_choice_steps').value.split(',');
275
  return values.indexOf(v) != -1;
276
  });
277
-
 
 
 
 
 
 
278
  //]]>
279
  </script>
14
  </div>
15
  <div class="fieldset ">
16
  <script>
17
+
 
 
18
  $j(function() {
19
  $j( "#tabs" ).tabs();
20
  var sel_tab = 0;
41
  $j('#layout_save_error').html('');
42
  }
43
  });
44
+
45
+ $j.get(
46
+ '<?php echo $this->getUrl('mobilenow/adminhtml_mobilenow/iframeLoad') ?>',
47
+ {theme_id: <?php echo $theme_id; ?>, stores: <?php echo $stores; ?>, tab:''},
48
+ function(responseText){
49
+ $j("#render_preview").html(responseText);
50
+ },
51
+ "html"
52
+ );
53
+
54
  $j(".save_settings_link").colorbox({inline:true, width:"50%",opacity: 0.6});
55
  $j(".reset_settings_link").colorbox({inline:true, width:"50%",opacity: 0.6});
56
 
68
  if(loadPreview)
69
  updatePreview('<?php echo $theme_id;?>','iframe-preview')
70
  });
71
+ new AjaxUpload('logo', {
 
72
  action: uploadImageUrl+'upload_type/logo/theme_id/<?php echo $theme_id;?>/?isAjax=true',
73
  name: 'logo',
74
  dataType: "json",
82
  },
83
  onComplete: function(file, response) {
84
  Element.hide('loading-mask');
 
85
  var jsonObj = eval("(" + response + ")");
86
  if(jsonObj.mesasage != 'success'){
87
  alert(jsonObj.mesasage);
89
  $j('#logo_preview_filename').val(jsonObj.logo_image_name);
90
  $j('#logo_preview').attr('src',jsonObj.preview_name);
91
  }
 
 
 
92
  }
93
  });
94
 
106
  },
107
  onComplete: function(file, response) {
108
  Element.hide('loading-mask');
 
109
  var jsonObj = eval("(" + response + ")");
110
  if(jsonObj.mesasage != 'success'){
111
  alert(jsonObj.mesasage);
113
  $j('#banner_preview_filename').val(jsonObj.banner_image_name);
114
  $j('#banner_preview').attr('src',jsonObj.preview_name);
115
  }
 
 
 
116
  }
117
  });
118
 
119
+ $j("#design-general-homepage" ).click(function() {
120
+ homeFrame('iframe-preview',home_url);
121
+ updatePreview('<?php echo $theme_id;?>','iframe-preview');
122
+ });
123
+
124
+ $j("#design-catalog-page" ).click(function() {
125
+ categoryFrame('iframe-preview',catalog_url);
126
+ updatePreview('<?php echo $theme_id;?>','iframe-preview');
127
+ });
128
+
129
+ $j("#design-product-page" ).click(function() {
130
+ productFrame('iframe-preview',product_url);
131
+ updatePreview('<?php echo $theme_id;?>','iframe-preview');
132
+ });
133
 
134
  varienLoaderHandler.handler.onCreate({options: {loaderArea: true}});
135
  Element.hide('loading-mask');
150
  var ifrm_div = document.getElementById(id+'_div');
151
  var doc = ifrm.contentDocument? ifrm.contentDocument:
152
  ifrm.contentWindow.document;
153
+
 
 
154
  ifrm.style.height = "10px"; // reset to minimal height ...
155
  // IE opt. for bing/msn needs a bit added or scrollbar appears
156
  ifrm.style.height = getDocHeight( doc ) + 2 + "px";
159
  }
160
  </script>
161
  <div class="tab-preview">
162
+ <div id="tabs" class="common_tab_cnt">
 
 
 
 
 
163
  <?php echo $this->getFormHtml();?>
164
  </div>
165
  <div id='live_preview'>
173
  </button>
174
  </div>
175
  <div class="preview-head"></div>
176
+ <div class="render_preview" id="render_preview">
 
 
177
  </div>
178
  <div class="preview-footer"></div>
179
  <div class="update-preview-button">
272
  var values = $('number_of_products_choice_steps').value.split(',');
273
  return values.indexOf(v) != -1;
274
  });
275
+
276
+ $j(document).ready( function() {
277
+ $j('.advanced_settings').parent().parent("tr").css("display","none");
278
+ $j(".advanced-edit-head").click(function(){
279
+ $j('.advanced_settings').parent().parent("tr").toggle();
280
+ });
281
+ });
282
  //]]>
283
  </script>
app/design/adminhtml/default/default/template/mobilenow/widget/design/link.phtml CHANGED
@@ -1 +0,0 @@
1
- teststest
 
app/design/adminhtml/default/default/template/mobilenow/widget/form.phtml CHANGED
@@ -37,8 +37,20 @@
37
  .link_button_rst{ pointer;padding: 2px 4px ;}
38
  </style>
39
  <![endif]-->
 
 
 
 
 
 
 
 
 
40
  <script>
41
- var uniqueUrl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/checkUniqueNameSave');?>';
 
 
 
42
  function showSaveAsPopup(elem){
43
  $j(elem).colorbox({inline:true, width:"50%",href:"#inline_save_as_top",opacity: 0.6,
44
  onClosed: function () {
@@ -46,11 +58,83 @@ var uniqueUrl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/checkUniqueNam
46
  $j('#save_error_text').html('');
47
  }
48
  });
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  </script>
51
- <div class="entry-edit">
52
- <?php echo $this->getFormHtml();?>
53
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  <?php echo $this->getChildHtml('form_after');?>
55
  <!------------------------------- Save As Top Button------------------------------------>
56
  <div style='display:none'>
37
  .link_button_rst{ pointer;padding: 2px 4px ;}
38
  </style>
39
  <![endif]-->
40
+ <?php
41
+ $form_d = Mage::registry("mobilenow_data")->getData();
42
+ if(isset($form_d['store_id']))
43
+ $stores = implode(',',$form_d['store_id']);
44
+ else
45
+ $stores=0;
46
+
47
+ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getRequest()->getParam("id"):1;
48
+ ?>
49
  <script>
50
+ var uniqueUrl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/checkUniqueNameSave');?>';
51
+ var home_url = '<?php echo Mage::getBaseUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>&preview=1';
52
+ var catalog_url ='<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewCategoryUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>&preview=1';
53
+ var product_url ='<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewProductUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>&preview=1';
54
  function showSaveAsPopup(elem){
55
  $j(elem).colorbox({inline:true, width:"50%",href:"#inline_save_as_top",opacity: 0.6,
56
  onClosed: function () {
58
  $j('#save_error_text').html('');
59
  }
60
  });
61
+ }
62
+ $j(document).ready( function() {
63
+
64
+ $j.get(
65
+ '<?php echo $this->getUrl('mobilenow/adminhtml_mobilenow/iframeLoad') ?>',
66
+ {theme_id: <?php echo $theme_id; ?>, stores: <?php echo $stores; ?>, tab:"theme"},
67
+ function(responseText){
68
+ $j("#render_preview_theme").html(responseText);
69
+ homeFrame('iframe-preview-theme',
70
+ '<?php echo Mage::getBaseUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>&preview=1');
71
+ updatePreview('<?php echo $theme_id;?>','iframe-preview-theme');
72
+ },
73
+ "html"
74
+ );
75
+
76
+ $j("#mobilenow_form_advanced").prev().attr('style','cursor:pointer');
77
+ $j($j("#mobilenow_form_advanced").prev()).click(function(){ $j('#mobilenow_form_advanced').toggle();});
78
+
79
+ $j(".advanced-edit-head").click(function(){
80
+
81
+ if($j(".click-expand").is(':contains("Click to expand")')){
82
+
83
+ $j('.click-expand').text('Click to hide')
84
+ } else {
85
+ $j('.click-expand').text("Click to expand");
86
+ }
87
+ });
88
+
89
+ $j("#theme-general-homepage,#mobilenow_tabs_form_section" ).click(function() {
90
+ homeFrame('iframe-preview-theme',
91
+ '<?php echo Mage::getBaseUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>&preview=1');
92
+ updatePreview('<?php echo $theme_id;?>','iframe-preview-theme');
93
+ });
94
+
95
+ $j("#theme-catalog-page" ).click(function() {
96
+ categoryFrame('iframe-preview-theme',
97
+ '<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewCategoryUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>&preview=1');
98
+ updatePreview('<?php echo $theme_id;?>','iframe-preview-theme');
99
+ });
100
+
101
+ $j("#theme-product-page" ).click(function() {
102
+ productFrame('iframe-preview-theme',
103
+ '<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewProductUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>&preview=1');
104
+ updatePreview('<?php echo $theme_id;?>','iframe-preview-theme');
105
+ });
106
+ });
107
+
108
  </script>
109
+
110
+ <div class="tab-preview">
111
+ <div id="tabs_form" class="common_tab_cnt">
112
+ <?php echo $this->getFormHtml();?>
113
+ </div>
114
+ <div id='live_preview'>
115
+ <div class="update-preview-button">
116
+ <button style="" onclick="updatePreview('<?php echo $theme_id;?>','iframe-preview-theme')" class="scalable save" type="button" title="Click Here to Update Preview" id="btn_update_preview_top">
117
+ <span>
118
+ <span>
119
+ <span>Click Here to Update Preview</span>
120
+ </span>
121
+ </span>
122
+ </button>
123
+ </div>
124
+ <div class="preview-head"></div>
125
+ <div class="render_preview" id="render_preview_theme"></div>
126
+ <div class="preview-footer"></div>
127
+ <div class="update-preview-button">
128
+ <button style="" onclick="updatePreview('<?php echo $theme_id;?>','iframe-preview-theme')" class="scalable save" type="button" title="Click Here to Update Preview" id="btn_update_preview">
129
+ <span>
130
+ <span>
131
+ <span>Click Here to Update Preview</span>
132
+ </span>
133
+ </span>
134
+ </button>
135
+ </div>
136
+ </div>
137
+ </div>
138
  <?php echo $this->getChildHtml('form_after');?>
139
  <!------------------------------- Save As Top Button------------------------------------>
140
  <div style='display:none'>
app/design/adminhtml/default/default/template/mobilenow/widget/layout.phtml CHANGED
@@ -28,26 +28,47 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
28
  $j('#layout_tabs').tabs( "option", "active", l_sel_tab );
29
  });
30
  $j(document).ready( function() {
31
- // $j(".inline_save_as").colorbox({inline:true, width:"50%",opacity: 0.6});
32
- // $j(".inline_delete").colorbox({inline:true, width:"50%",opacity: 0.6});
33
 
 
 
 
 
 
 
 
 
 
34
  $j('.layout-fields table.form-list').removeClass('form-list').addClass('layout-settings-table');
35
  $j('.layout-grid-listheading table').each(function(){
36
  $j(this).find('tr:first td:first').remove();
37
  $j(this).find('tr:first td:first').attr('colspan','2');
38
  });
39
- $j("#mobilenow_tabs_theme_layouts").click(function(){
40
-
41
- activeSubTabs = $j("#layout_tabs").tabs('option', 'active');
42
- if(activeSubTabs == 0){
43
- homeFrame('iframe-preview-layout', home_url);
44
- } else if(activeSubTabs == 1){
45
- categoryFrame('iframe-preview-layout',catalog_url);
46
- } else{
47
- productFrame('iframe-preview-layout',product_url);
48
- }
 
49
 
50
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  });
52
  function getDocHeight(doc)
53
  {
@@ -66,8 +87,6 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
66
  //ifrm.style.visibility = 'hidden';
67
  ifrm.style.height = "10px"; // reset to minimal height ...
68
  // IE opt. for bing/msn needs a bit added or scrollbar appears
69
- console.log('etDocHeight( doc )');
70
- console.log(getDocHeight( doc ));
71
  ifrm.style.height = getDocHeight( doc ) + 2 + "px";
72
  ifrm_div.style.height = getDocHeight( doc ) + 2 + "px";
73
  ifrm.style.visibility = 'visible';
@@ -76,16 +95,11 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
76
  </script>
77
  <div class="tab-preview">
78
  <div id="layout_tabs" class="common_tab_cnt">
79
- <ul>
80
- <li><a href="#general_layout_homepage" onclick="homeFrame('iframe-preview-layout',home_url)" id="layout-general-homepage">General / Homepage</a></li>
81
- <li><a href="#catalog_layout_page" onclick="categoryFrame('iframe-preview-layout',catalog_url)" id="layout-catalog-page">Catalog Page</a></li>
82
- <li><a href="#produt_layout_page" onclick="productFrame('iframe-preview-layout',product_url)" id="layout-product-page">Product Page</a></li>
83
- </ul>
84
  <?php echo $this->getFormHtml();?>
85
  </div>
86
  <div id='live_preview_layout'>
87
  <div class="update-preview-button">
88
- <button style="" onclick="updatePreview('<?php echo $theme_id;?>','iframe-preview')" class="scalable save" type="button" title="Click Here to Update Preview" id="btn_update_preview_layout_top">
89
  <span>
90
  <span>
91
  <span>Click Here to Update Preview</span>
@@ -94,10 +108,7 @@ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getReques
94
  </button>
95
  </div>
96
  <div class="preview-head"></div>
97
- <div class="render_preview">
98
- <iframe id="iframe-preview-layout" width="272px" src="<?php echo Mage::getBaseUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>" onload="setIframeHeight(this.id)" style="border:none"></iframe>
99
- <div id="iframe-preview-layout_div"style="width:272px; height: 442px; opacity:0.0; position: absolute; top:372px; background-color: #000000;"></div>
100
- </div>
101
  <div class="preview-footer"></div>
102
  <div class="update-preview-button">
103
  <button style="" onclick="updatePreview('<?php echo $theme_id;?>','iframe-preview-layout')" class="scalable save" type="button" title="Click Here to Update Preview" id="btn_update_preview_layout">
28
  $j('#layout_tabs').tabs( "option", "active", l_sel_tab );
29
  });
30
  $j(document).ready( function() {
 
 
31
 
32
+ $j.get(
33
+ '<?php echo $this->getUrl('mobilenow/adminhtml_mobilenow/iframeLoad') ?>',
34
+ {theme_id: <?php echo $theme_id; ?>, stores: <?php echo $stores; ?>, tab:'layout'},
35
+ function(responseText){
36
+ $j("#render_preview_layout").html(responseText);
37
+ },
38
+ "html"
39
+ );
40
+
41
  $j('.layout-fields table.form-list').removeClass('form-list').addClass('layout-settings-table');
42
  $j('.layout-grid-listheading table').each(function(){
43
  $j(this).find('tr:first td:first').remove();
44
  $j(this).find('tr:first td:first').attr('colspan','2');
45
  });
46
+
47
+ $j("#mobilenow_tabs_theme_layouts").click(function(){
48
+
49
+ activeSubTabs = $j("#layout_tabs").tabs('option', 'active');
50
+ if(activeSubTabs == 0){
51
+ homeFrame('iframe-preview-layout', home_url);
52
+ } else if(activeSubTabs == 1){
53
+ categoryFrame('iframe-preview-layout',catalog_url);
54
+ } else{
55
+ productFrame('iframe-preview-layout',product_url);
56
+ }
57
 
58
+ });
59
+
60
+ $j("#layout-general-homepage" ).click(function() {
61
+ homeFrame('iframe-preview-layout',home_url);
62
+ });
63
+
64
+ $j("#layout-catalog-page" ).click(function() {
65
+ categoryFrame('iframe-preview-layout',catalog_url)
66
+ });
67
+
68
+ $j("#layout-product-page" ).click(function() {
69
+ productFrame('iframe-preview-layout',product_url)
70
+ });
71
+
72
  });
73
  function getDocHeight(doc)
74
  {
87
  //ifrm.style.visibility = 'hidden';
88
  ifrm.style.height = "10px"; // reset to minimal height ...
89
  // IE opt. for bing/msn needs a bit added or scrollbar appears
 
 
90
  ifrm.style.height = getDocHeight( doc ) + 2 + "px";
91
  ifrm_div.style.height = getDocHeight( doc ) + 2 + "px";
92
  ifrm.style.visibility = 'visible';
95
  </script>
96
  <div class="tab-preview">
97
  <div id="layout_tabs" class="common_tab_cnt">
 
 
 
 
 
98
  <?php echo $this->getFormHtml();?>
99
  </div>
100
  <div id='live_preview_layout'>
101
  <div class="update-preview-button">
102
+ <button style="" onclick="updatePreview('<?php echo $theme_id;?>','iframe-preview-layout')" class="scalable save" type="button" title="Click Here to Update Preview" id="btn_update_preview_layout_top">
103
  <span>
104
  <span>
105
  <span>Click Here to Update Preview</span>
108
  </button>
109
  </div>
110
  <div class="preview-head"></div>
111
+ <div class="render_preview" id="render_preview_layout"></div>
 
 
 
112
  <div class="preview-footer"></div>
113
  <div class="update-preview-button">
114
  <button style="" onclick="updatePreview('<?php echo $theme_id;?>','iframe-preview-layout')" class="scalable save" type="button" title="Click Here to Update Preview" id="btn_update_preview_layout">
app/design/frontend/redstage-mobilenow/default/template/catalog/product/view/options/type/default.phtm ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption() ?>
28
+ <dt>
29
+ <label><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
30
+ </dt>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/view/options/type/select.phtm ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php /* @var $this Mage_Catalog_Block_Product_View_Options_Type_Select */ ?>
29
+ <?php $_option = $this->getOption() ?>
30
+ <dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label></dt>
31
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
32
+ <div class="input-box">
33
+ <?php echo $this->getValuesHtml() ?>
34
+ <?php if ($_option->getIsRequire()): ?>
35
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?>
36
+ <span id="options-<?php echo $_option->getId() ?>-container"></span>
37
+ <?php endif; ?>
38
+ <?php endif;?>
39
+ </div>
40
+ </dd>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/view/options/wrapper/bottom.phtm ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="product-options-bottom">
28
+ <?php echo $this->getChildHtml('', true, true);?>
29
+ </div>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/view/type/options/configurable.phtm ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ $_product = $this->getProduct();
30
+ $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
31
+ ?>
32
+ <?php if ($_product->isSaleable() && count($_attributes)):?>
33
+ <dl>
34
+ <?php foreach($_attributes as $_attribute): ?>
35
+ <dt><label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt>
36
+ <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
37
+ <div class="input-box">
38
+ <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
39
+ <option><?php echo $this->__('Choose an Option...') ?></option>
40
+ </select>
41
+ </div>
42
+ </dd>
43
+ <?php endforeach; ?>
44
+ </dl>
45
+ <script type="text/javascript">
46
+ var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
47
+ </script>
48
+ <?php endif;?>
app/design/frontend/redstage-mobilenow/default/template/mobilenow/banner.phtml CHANGED
@@ -1,10 +1,13 @@
1
  <?php $homepagebanner = $this->helper('mobilenow/theme')->getThemeData('homepagebanner');
2
  $banner = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images/banner/'.$homepagebanner->homepage_banner;
3
  $dir_bannerpath = Mage::getBaseDir('media').DS.'mobilenow_theme_images/banner/'.$homepagebanner->homepage_banner;
4
- if($homepagebanner->homepage_banner != '' && @file_exists($dir_bannerpath)):
5
  ?>
6
-
7
  <div class="row home-banner text-center">
8
- <a href="<?php echo $homepagebanner->homepage_banner_url ?>"><img src="<?php echo $banner ?>"></a>
 
 
 
 
9
  </div>
10
- <?php endif ;?>
1
  <?php $homepagebanner = $this->helper('mobilenow/theme')->getThemeData('homepagebanner');
2
  $banner = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images/banner/'.$homepagebanner->homepage_banner;
3
  $dir_bannerpath = Mage::getBaseDir('media').DS.'mobilenow_theme_images/banner/'.$homepagebanner->homepage_banner;
 
4
  ?>
5
+ <?php if($homepagebanner->homepage_banner_image_url != ''): ?>
6
  <div class="row home-banner text-center">
7
+ <a href="<?php echo $homepagebanner->homepage_banner_url ?>"><img src="<?php echo $homepagebanner->homepage_banner_image_url ?>" /></a>
8
+ </div>
9
+ <?php elseif($homepagebanner->homepage_banner != '' && @file_exists($dir_bannerpath)): ?>
10
+ <div class="row home-banner text-center">
11
+ <a href="<?php echo $homepagebanner->homepage_banner_url ?>"><img src="<?php echo $banner ?>" /></a>
12
  </div>
13
+ <?php endif; ?>
app/design/frontend/redstage-mobilenow/default/template/page/html/header.phtml CHANGED
@@ -29,36 +29,53 @@
29
  ?>
30
  <div class="header-container">
31
  <header>
32
- <!-- Logo and menu -- start here -->
33
- <div class="row slogo">
34
- <div class="small-6 medium-6 large-6 columns">
35
- <?php $m_logo = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images/logo/'.$this->helper('mobilenow/theme')->getThemeData('logo');
36
- $dir_path = Mage::getBaseDir('media').DS.'mobilenow_theme_images/logo/'.$this->helper('mobilenow/theme')->getThemeData('logo');
37
- ?>
38
- <?php if(@file_exists($dir_path) && $this->helper('mobilenow/theme')->getThemeData('logo') != ''){?>
39
- <h1 class="logo">
40
- <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>">
41
-
42
- <img src="<?php echo ($m_logo)? $m_logo :$this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" />
43
-
44
- </a>
45
- </h1>
46
- <?php }?>
47
- </div>
48
- <div class="small-6 medium-6 large-6 columns">
49
- <div class="right">
50
- <?php echo $this->getChildHtml('mobilelinks') ?>
51
- </div>
52
- </div>
53
- </div>
54
- <?php echo $this->getChildHtml('homepage') ?>
55
-
56
-
57
-
58
-
59
-
60
 
61
-
62
 
63
- </header>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  </div>
29
  ?>
30
  <div class="header-container">
31
  <header>
32
+ <!-- Logo and menu -- start here -->
33
+ <div class="row slogo">
34
+ <div class="small-6 medium-6 large-6 columns">
35
+ <?php
36
+ $m_logo = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'mobilenow_theme_images/logo/' . $this->helper('mobilenow/theme')->getThemeData('logo');
37
+ $dir_path = Mage::getBaseDir('media') . DS . 'mobilenow_theme_images/logo/' . $this->helper('mobilenow/theme')->getThemeData('logo');
38
+ ?>
39
+ <?php if($this->helper('mobilenow/theme')->getThemeData('logo_image_url') != ''): ?>
40
+ <h1 class="logo">
41
+ <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
+ <img src="<?php echo ($this->helper('mobilenow/theme')->getThemeData('logo_image_url')) ? $this->helper('mobilenow/theme')->getThemeData('logo_image_url') : $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" />
44
 
45
+ </a>
46
+ </h1>
47
+ <?php elseif($this->helper('mobilenow/theme')->getThemeData('use_store_logo')): ?>
48
+ <h1 class="logo">
49
+ <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>">
50
+
51
+ <img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" />
52
+
53
+ </a>
54
+ </h1>
55
+ <?php elseif (@file_exists($dir_path) && $this->helper('mobilenow/theme')->getThemeData('logo') != ''): ?>
56
+ <h1 class="logo">
57
+ <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>">
58
+
59
+ <img src="<?php echo ($m_logo) ? $m_logo : $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" />
60
+
61
+ </a>
62
+ </h1>
63
+ <?php endif; ?>
64
+ </div>
65
+ <div class="small-6 medium-6 large-6 columns">
66
+ <div class="right">
67
+ <?php echo $this->getChildHtml('mobilelinks') ?>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ <?php echo $this->getChildHtml('homepage') ?>
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ </header>
81
  </div>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mobilenow</name>
4
- <version>1.0.1.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://mobilenowapp.com/mobilenow-license">Custom License</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>MobileNow is a mobile theming platform for Magento allowing for full customization of base themes and deployment of a custom mobile site with no programming experience. For a nominal fee, any Magento store owner can deploy a smartphone friendly mobile theme in less than 30 min! A MobileNow membership also comes with a bunch of perks; mobile marketing tutorials, a mobile e-commerce eBook, news, and constant updates to the system. &lt;a href=&#x201D;http://mobilenowapp.com&#x201D;&gt;Click Here for More Info!&lt;/a&gt;. </description>
11
  <notes>Highly tested release. More themes and options to follow.</notes>
12
  <authors><author><name>Redstage, LLC / MobileNowApp.com</name><user>mobilenow</user><email>info@mobilenowapp.com</email></author></authors>
13
- <date>2013-11-18</date>
14
- <time>08:28:00</time>
15
- <contents><target name="magecommunity"><dir name="Redstage"><dir name="Mobilenow"><dir name="Block"><dir name="Adminhtml"><dir name="Mobilenow"><dir name="Edit"><file name="Form.php" hash="fb8d86aa37dfb208b70a74921fdadccb"/><dir name="Renderer"><file name="Bannerimagedisplay.php" hash="0831b39c90cf94d529f48e9b33e95e48"/><file name="Clayoutmessage.php" hash="bfee491a5fc8419756bd9548bcb97ec6"/><file name="Custombuttons.php" hash="290d317a210cf230a5907e9b29c94745"/><file name="Customcatalog.php" hash="0e3f4d3e9879bcc17df1ac1b21eee880"/><file name="Customlayoutbuttons.php" hash="3d898bc3e9d80648fa397a5926e25d15"/><file name="Customlink.php" hash="c144ba0a9dbab5cbcf2c152d4891abd1"/><file name="Customtext.php" hash="096ba90206de7117753e7ab8315421d5"/><file name="Generalthemesavebutton.php" hash="4f49a2cbe2831b1b4fd80820e14689e8"/><file name="Hlayoutmessage.php" hash="f57e8183e980bb9ffb21606e31999efd"/><file name="Logoimagedisplay.php" hash="15398f5931b657f1fc3340547e9f2b42"/><file name="Playoutmessage.php" hash="5a3349dfa7ed2412eff4557b3646f663"/></dir><dir name="Tab"><file name="Advsettings.php" hash="594bc372655df8d7d0bf623b36470bd3"/><file name="Design.php" hash="c00939acab1aed63be487013407feb31"/><file name="Form.php" hash="4b220fc7ac400d3cf1886785696bc8f2"/><file name="Layout.php" hash="c914190304eff144e51c1543bcb717d9"/></dir><file name="Tabs.php" hash="5bf5f3d0be6aa967c254b35bbf0c157c"/></dir><file name="Edit.php" hash="3ee419b043f7ef37bb4d79dc2beb8cc8"/><file name="Grid.php" hash="7c1b5993bd032dc9bb4cc3e865e1b2ac"/></dir><file name="Mobilenow.php" hash="9fdac5a88bf30dac2d48c54a0a8f7cb3"/><file name="Mobilenowbackend.php" hash="dcae4b27451d459741c921acaac06145"/><dir name="Renderer"><file name="Merge.php" hash="2196cfc1134a643d42a3939d51a33660"/><file name="Status.php" hash="111e9f49ba9b39841d107f82ad4c146c"/><file name="Themename.php" hash="3f2b837b38361616151f26cffa996bc2"/></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="9d1f675c0f469957409df2288527d62a"/><file name="Link.php" hash="1f35c15d20f3d4cbc048a52134f5f1fd"/></dir></dir></dir></dir><file name="Home.php" hash="f971115d0e29e6eca26315b39665a11f"/><file name="Left.php" hash="5e7f26edc0e806a1c48194a8cf334b58"/><file name="Toolbar.php" hash="d6793f12275690c513022de9cc830163"/></dir><dir name="Helper"><file name="Catalogpage.php" hash="0c8b880979ddce3177a6bc0e776e5760"/><dir name="Cms"><file name="Page.php" hash="09e3ed3d86b4994e969ad93e086faed8"/></dir><file name="Data.php" hash="6b560e7ae001d958811d543d2cff69ab"/><file name="Homepage.php" hash="e45dec769a593f997ca79cd977e3c36c"/><file name="Theme.php" hash="fdaeedeb880bd9330ab6e27803da521f"/></dir><dir name="Model"><file name="Corelayoutlink.php" hash="be586a25a6709bf1dbd6529f238ac9c3"/><file name="Corelayoutupdate.php" hash="19d82e67ab058d36f8309bd6becc78b9"/><dir name="Design"><file name="Package.php" hash="9ab622d548451109df4b9beb797db163"/></dir><dir name="Layout"><file name="Update.php" hash="0765773aae0839ef220a382076a99013"/></dir><file name="Mobilenow.php" hash="2f2eb1a10e8fddd4dc817c12e6a9af68"/><dir name="Mysql4"><dir name="Corelayoutlink"><file name="Collection.php" hash="005e4741ba79c050b3417c4b76f57f22"/></dir><file name="Corelayoutlink.php" hash="6540e39c2e24c739be9d0acd09a82855"/><dir name="Corelayoutupdate"><file name="Collection.php" hash="9088de3ac93b18c0b7c1dd7df122cf34"/></dir><file name="Corelayoutupdate.php" hash="32824fba77c63e14f041188719d77733"/><dir name="Mobilenow"><file name="Collection.php" hash="c1fb6e66ccec2bff86c717d5a2d183fa"/></dir><file name="Mobilenow.php" hash="65eca38d9c19849a8bab7a8c6fc5bde9"/><dir name="Themelayoutsettings"><file name="Collection.php" hash="65b5d7cba09fc21004b5cff2979776dd"/></dir><file name="Themelayoutsettings.php" hash="64f6e7a5b08cd94998ae947777035b72"/><dir name="Themestore"><file name="Collection.php" hash="4437e247d6b4f9fcbb04a393e1977e22"/></dir><file name="Themestore.php" hash="4f00d76dad9f3582b4191c7a3500ea4d"/><dir name="Themesubsettings"><file name="Collection.php" hash="4a0e7deece1c3c5c5a25e3d9489d8f2e"/></dir><file name="Themesubsettings.php" hash="5ad581e569892a55fd88d1c279817984"/></dir><dir name="Resource"><file name="Layout.php" hash="6785bd9797b4311befa624a87052da9f"/></dir><file name="Themelayoutsettings.php" hash="6a4642b78eb3d81710520d5519c70d7c"/><file name="Themestore.php" hash="46624c7541a16a950ee54e421cce31de"/><file name="Themesubsettings.php" hash="6daca362da3590722b2dc0b12d735750"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="364781327821dd343c26cf5cd108eae2"/><file name="MobilenowController.php" hash="907a81a99a377e982b7b316b9dae336e"/><file name="MobilenowbackendController.php" hash="fd0b71baabbb2a20c38bbc6b88eddc80"/></dir><file name="IndexController.php" hash="12b30a60423827d70a060db018494211"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7fb397189c90f41c8d485788ec1284dc"/><file name="config.xml" hash="34c06d772c2704720605749c1455e388"/><file name="system.xml" hash="c07c06ae762c09d3d936a8e584bac398"/></dir><dir name="sql"><dir name="mobilenow_setup"><file name="mysql4-install-0.1.0.php" hash="abe88cb70940c60b7dcc0b94f49d4089"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="0563bda4ff14a67f433fa9e499697a4c"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="952e461c759ab0f07aaf823fc5810d54"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="8cbb7b4e64ea46a7e93fedcf43a1a26a"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="94a00b3cb3fc6240fe1ea40c42ce2329"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mobilenow.xml" hash="90e9c6db9de63e507a8442ae95757ba7"/></dir><dir name="template"><dir name="mobilenow"><file name="mobilenowbackend.phtml" hash="3a1767c713b9e5a99aba79fc108cdf2f"/><dir name="system"><dir name="config"><file name="button.phtml" hash="b952f34531612882466b1d59ba22c6f7"/><file name="link.phtml" hash="1363f85868556a5ec4cb7474eeeaf75b"/></dir></dir><dir name="widget"><file name="advsettings.phtml" hash="c7e2e7085c21cf12be835b56ac05d005"/><dir name="design"><file name="link.phtml" hash="5a3d8e77aac3cdbc0758a03f769cc9c0"/></dir><file name="design.phtml" hash="45fb0b9ea7ece8c4cf56b42ac54cffe8"/><file name="form.phtml" hash="00460a830d22ee344207ed0e58378af4"/><file name="layout.phtml" hash="2c8e433c7e4495fa7c2259c5abf122ee"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="redstage-mobilenow"><dir name="default"><dir name="layout"><file name="catalog.xml" hash="201c10292f16dea1171757f4bbdbd955"/><file name="catalogsearch.xml" hash="09e3073d213f0f388361f9ec11565e20"/><file name="checkout.xml" hash="b4a37661ace2c65f2febf4019d1f27b0"/><file name="cms.xml" hash="fe47a24f1af4b5f9225ad94fac61c020"/><file name="customer.xml" hash="f0149b3fdecbf0d97be0ed62b978071f"/><file name="local.xml" hash="0e38738f51594b8cb0554212456a41e9"/><file name="mobilenow.xml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="newsletter.xml" hash="2ab782768a49ada4e05cc6c7542fc00d"/><file name="page.xml" hash="0313ac0a1144bd863fad5ae213ce3ab0"/><file name="wishlist.xml" hash="60bb825afdbe916096608f291ddbf94a"/></dir><dir name="template"><dir name="callouts"><file name="left_col.phtml" hash="a8b0fcfe3bfb4c11b087fbd6fe370e91"/><file name="right_col.phtml" hash="a8b0fcfe3bfb4c11b087fbd6fe370e91"/></dir><dir name="catalog"><dir name="category"><file name="view.phtml" hash="dcd1520a6d4ebb26aa9d786619c294d0"/></dir><dir name="navigation"><file name="left.phtml" hash="3a0fc226d894c847d0289fec23c0a693"/><file name="mobile-menu.phtml" hash="6b49f7e18ebd8ad455624f17ad351344"/><file name="top.phtml" hash="77d2c7d92d41e32288ba82964970abd2"/></dir><dir name="product"><dir name="compare"><dir name="layer"><file name="view.phtml" hash="a63fcceb4a4979085e63ea0d984c36b7"/></dir><file name="sidebar.phtml" hash="e47f9509b991cb3e38a6d1c384d571ae"/></dir><dir name="list"><file name="customtoolbar.phtml" hash="b686cfca3a9162b05c722170dd7cdbbc"/><file name="related.phtml" hash="cb0382c780c689c46626a658588cd3cc"/><file name="toolbar.phtml" hash="686fe0941cedc8acfb04211411b04f7d"/><file name="upsell.phtml" hash="5cfa088d88b416c5a583316ab037fe37"/></dir><file name="list.phtml" hash="1a68db0acb342ce83169d993f039768b"/><file name="mobilelist.phtml" hash="615e5221bcb57bbb9824e53ef9600d3d"/><file name="new.phtml" hash="2736170efe05a3915e99e0fc55b06c32"/><file name="price.phtml" hash="a6cca01b0a72f6f65d46df7eefcbe5e0"/><dir name="view"><file name="additional.phtml" hash="7bab9dbcc43d46b0aa057dd92547e49e"/><file name="addto.phtml" hash="deb08145b6b50b7159981829090a5c67"/><file name="addtocart.phtml" hash="8cd9a81f304705c95d6b3f03c5a84da7"/><file name="attributes.phtml" hash="586ef5fe4c1fd5e1a57f64a4daf6ac2a"/><file name="description.phtml" hash="8ae65416dab854fe4bbf874866d01d96"/><file name="media.phtml" hash="7301eadad386dc9b095db4bf24df5077"/><dir name="options"><file name="js.phtml" hash="9d5c5c4786c5b9fb7125f6f3cc8c7309"/><dir name="type"><file name="date.phtml" hash="5bdfd7dc4817a500095e076a21a2c467"/><file name="default.phtml" hash="f1acbd98563c6640c4a0b6cf5abc994f"/><file name="file.phtml" hash="b72f9363f049dd486ff0a3c8b667cbc9"/><file name="select.phtml" hash="5dbbe91d0581ccb291737992c5188121"/><file name="text.phtml" hash="1aaef71a9e81521aab601aa281fa0b8e"/></dir><dir name="wrapper"><file name="bottom.phtml" hash="6a612992021e3e65ca7b5f6e897821d5"/></dir><file name="wrapper.phtml" hash="472e04ad6c1a35dfeaa54b3012884ed6"/></dir><file name="options.phtml" hash="c1227dcadb83af6708d78a032ffd8d6c"/><file name="price.phtml" hash="f2ae6daff42b8ee7074d27c8bf5f1e6c"/><file name="price_clone.phtml" hash="732daf46245f4ee7068d5ae26defc750"/><file name="tierprices.phtml" hash="0b7f122253b505c45772eff069203a5d"/><dir name="type"><file name="configurable.phtml" hash="1a0a77285960b4227f000855e8194ed7"/><file name="default.phtml" hash="a4c2f4f4b518eb90282269b3ad01595c"/><file name="grouped.phtml" hash="6bf64c1e98ef1c328bfd5fa8c417d06f"/><dir name="options"><file name="configurable.phtml" hash="c37919561a3cde0d9b92fd34d44c69c1"/></dir><file name="simple.phtml" hash="1a0a77285960b4227f000855e8194ed7"/><file name="virtual.phtml" hash="1a0a77285960b4227f000855e8194ed7"/></dir></dir><file name="view.phtml" hash="061482fb94fb80645d7cd1b7cacdeb85"/></dir></dir><dir name="catalogsearch"><file name="form.mini.phtml" hash="3e54229834ef9041a1d1e06e4983edbd"/><file name="result.phtml" hash="c2bdfc4b0599094a83456dd6f17d4c77"/></dir><dir name="checkout"><dir name="cart"><file name="coupon.phtml" hash="ab3b4ac9db09b718b7cd479fa49b042e"/><file name="crosssell.phtml" hash="8a0996f16961fdcddf70a974ceb1a190"/><dir name="item"><file name="default.phtml" hash="4267e3cbc2557a6d7e87462d57bd6035"/></dir><file name="noItems.phtml" hash="85dd62d3046bf22ec8eb3e45989c6f0b"/><file name="shipping.phtml" hash="fc4ab03f1cf961e47f6954b37d66f80d"/><dir name="sidebar"><file name="default.phtml" hash="d7fcf720e93a818d2b745b6be57cb71f"/></dir><file name="sidebar.phtml" hash="dc88ff8a0e2c7e92fc3fb4b929ecf1f8"/><file name="totals.phtml" hash="c942cacb712272bccd142bc1217d479a"/></dir><file name="cart.phtml" hash="26ab258b5ea320b1f5757c2949a61b90"/><dir name="multishipping"><file name="addresses.phtml" hash="2eea5802fba4b2bdec6ca807491093ba"/><file name="agreements.phtml" hash="26fd8740318e401add70128eaef68713"/><file name="billing.phtml" hash="ea3bb60b5483aa696bc9886987f09ea3"/><file name="overview.phtml" hash="c997306c9d7731a2ae98e3c85171733e"/><file name="shipping.phtml" hash="4723a1d29c3ee22349dfdae255caf643"/><file name="success.phtml" hash="8b63316e6e9b19787dda5eb831d6eb7f"/></dir><dir name="onepage"><file name="link.phtml" hash="fea2ee8b193aa74b050ac3b102765147"/><file name="payment.phtml" hash="c21c1db899cb9353b54c289ad6ab97b3"/><file name="progress.phtml" hash="3e91545cb76aa5756b248eb8e965e619"/><dir name="review"><file name="button.phtml" hash="641349880361b4f9399983e2321cdd23"/></dir><file name="shipping.phtml" hash="147f906890006a9f7f2ecf09b0c6c12a"/><file name="shipping_method.phtml" hash="142bb343ab0cd0ed3126b47bcb2c1893"/></dir><file name="onepage.phtml" hash="c0e28ed98962a5688b78f106c60ac19b"/><file name="success.phtml" hash="7b38b72f11da8e0e5a3001289b2552f8"/><dir name="total"><file name="default.phtml" hash="f1010ec3fd3dcb503d81f7e8d3ebb206"/></dir></dir><dir name="cms"><dir name="default"><file name="home.phtml" hash="18d93ac152e47351b0039d8b3a67d59d"/></dir></dir><dir name="content"><file name="electronics.phtml" hash="1c2ccf4174ba49391330f327c401cdf0"/><file name="homepage-content.phtml" hash="023704fb47244b26515fcbf8ca3faea2"/></dir><dir name="customer"><dir name="account"><dir name="dashboard"><file name="address.phtml" hash="869f0cab9034785c19cc21dd03bcd881"/><file name="hello.phtml" hash="cbba873a754af5f89253d2fcbada6d3b"/><file name="info.phtml" hash="53befe4d8e4e91818777d2153970409b"/><file name="newsletter.phtml" hash="ec6fbed4b2919fa72034e0863bb905fa"/></dir><file name="dashboard.phtml" hash="7231f8b03cdfe4eb1304bf1dc2a0949f"/><dir name="link"><file name="back.phtml" hash="b5c39deaa70abb1f959b066e2458783e"/></dir><file name="navigation.phtml" hash="5f15d046f54faab17715544dd293fced"/></dir><dir name="address"><file name="book.phtml" hash="cea7ee5f49ac4efb1a94f0fb85f32dbd"/><file name="edit.phtml" hash="966a147d86b5b2810c67c4c9d5d133c0"/></dir><file name="address.phtml" hash="31eb5c90fbccded3d58b34a6ed85ae30"/><file name="balance.phtml" hash="7a7bed35437abcddd6430e399e8e1705"/><dir name="form"><file name="address.phtml" hash="78e8282888da9b88fb25d9ffa5ab3956"/><file name="changepassword.phtml" hash="3ec7b49af553f11b5a3201288c5ec7bc"/><file name="confirmation.phtml" hash="b5ec3af447a4fcb5890849f455b89c2f"/><file name="edit.phtml" hash="4922e83819a7e485c68b746545da230e"/><file name="forgotpassword.phtml" hash="0da2e1d65e83f19f26733a5a641974ab"/><file name="login.phtml" hash="b6af069d396d5b1a246a843fc5bdfd8a"/><file name="mini.login.phtml" hash="dc717862b4e3e7e4568366b52da2cd1d"/><file name="newsletter.phtml" hash="53c91920987fd622c1b700e0645dfcb5"/><file name="register.phtml" hash="3abe019298e4cab9f2a10c554cb06132"/><file name="resetforgottenpassword.phtml" hash="1e1068393aa5f0a12853a86f6186eba0"/></dir><file name="logout.phtml" hash="0c5855ea603f53b9da95b196644d4567"/><file name="orders.phtml" hash="c7613667dc51203a2d3d0432d4ddc756"/><dir name="widget"><file name="dob.phtml" hash="8bb0c2cc4f7d203d3a48bdaa90ec4c7d"/><file name="gender.phtml" hash="4beeda46d0a8c7f37a260d569c4e74dc"/><file name="name.phtml" hash="04ade7281f3022979437ebbab9a99023"/><file name="taxvat.phtml" hash="d7f79cf8816c36e599db793b5bcea9c5"/></dir><file name="wishlist.phtml" hash="60da933d81f4951a7c4017f70bd6fb7c"/></dir><dir name="directory"><file name="currency.phtml" hash="2db6a858e5a92a4a553c68813caad350"/></dir><dir name="mobilenow"><file name="banner.phtml" hash="65ef80b2037681dcb07c23348a50a0a9"/><file name="customhome.phtml" hash="d592d38abd8cb66c14e4e46477b3ecd7"/><file name="footercontent.phtml" hash="6982b28b6528ba6018d0ad946d7dfff2"/><file name="footerlinks.phtml" hash="0c3840156bfc6ec8caad5ee53be79f4f"/><file name="home.phtml" hash="7e3d914bfaccf6f81091ff475be15bb6"/><file name="nav.phtml" hash="3319a9968bc2ea258310c6ab3b9964b4"/><file name="prefootercontent.phtml" hash="60551dfc897a48d75bd8d378dc86cbae"/><file name="search-panel.phtml" hash="09d15cbb2f6440a3d4308e40e67059ca"/><file name="subheader.phtml" hash="931979aa4705d8d2063b36c0d7027080"/><file name="toplinks.phtml" hash="f704b6267b11fbdd187927552d1efc4c"/></dir><dir name="newsletter"><file name="subscribe.phtml" hash="b99ca408f5c6b3fcc850aef77169002c"/></dir><dir name="page"><file name="1column.phtml" hash="0cac040fdc9fc56aa4983d53d66857bb"/><file name="2columns-left.phtml" hash="8c247fc29b8bc2827c43c951b374274a"/><file name="2columns-right.phtml" hash="82aaac519a50af702061b02d3d0fd1ae"/><file name="3columns.phtml" hash="8b598043e06d220175aa0ce1940a02f2"/><dir name="html"><file name="breadcrumbs.phtml" hash="20b1157f9a6bb679e230142e69f0204b"/><file name="footer.phtml" hash="251818e69e5706a8415118d9b20374ae"/><file name="head.phtml" hash="19ec26d96b1b5f1b4f31d9225482af08"/><file name="header.phtml" hash="01c8c72cc27c5a68f62df16fb895507c"/><file name="notices-foundation.phtml" hash="72d894d2814497a68bc70ff98186dcc4"/><file name="notices.phtml" hash="a0817b922010fe86a2c11d2b2af248e9"/><file name="pager.phtml" hash="fdab57d09fdcf3aea6c4e42196223279"/><file name="topmenu.phtml" hash="1d4663ab5f29ec2362a9aa2cf99201ac"/></dir><file name="mobilenow-home.phtml" hash="b0c26bb531826d5a9d99e61ea91c2e42"/><file name="print.phtml" hash="3bfa1d81a65bf8125956013e0d1a8244"/><dir name="switch"><file name="languages.phtml" hash="ff80f2f38f290926f78c6dd940137911"/><file name="stores.phtml" hash="17cc715b034711f18982fd15c7a49285"/></dir><dir name="template"><file name="links.phtml" hash="e9cab64dff800c1e8bb3655a9db3a923"/><file name="linksblock.phtml" hash="520f63a447dfe9d94ae00191fa5e6a2d"/></dir></dir><dir name="paypal"><dir name="partner"><file name="logo.phtml" hash="5687936f943087fcde91060596394097"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="4c78485ce7f916edbd3c90c3b9dff42d"/><file name="login.phtml" hash="99865a9efa62053554b313a8493d3c19"/></dir></dir><dir name="customer"><dir name="form"><file name="login.phtml" hash="88f9ecfc1cc35785108a446d50da2c9f"/><file name="register.phtml" hash="8c53b0aa232497ed680808be17b0c1da"/></dir></dir><file name="remember_me.phtml" hash="49971d7037f260ea813dda47c602d816"/><file name="remember_me_tooltip.phtml" hash="7f1904fa70e1cb1f7f41a70887e913dc"/></dir><dir name="poll"><file name="active.phtml" hash="be478edf7225097cbf92540fc3a08684"/><file name="result.phtml" hash="9f7ddf4ecfb4de4c62d17a031a6178e3"/></dir><dir name="reports"><file name="home_product_viewed.phtml" hash="539160dbd855cf9d75e1a8ab0687d0fa"/><file name="product_viewed.phtml" hash="f484a1603d4060851d1acea47394608f"/></dir><dir name="review"><dir name="customer"><file name="list.phtml" hash="12edc5524f4dc153c91b5df4ac4d879e"/><file name="view.phtml" hash="ab86b713c3f32878431ebafb76fd2e62"/></dir><file name="form.phtml" hash="25fb8d6c37fe523c5bd4e2f62a0f26ae"/><dir name="helper"><file name="summary.phtml" hash="698afedca9188fc0ca95cdacbcf6cbfe"/><file name="summary_short.phtml" hash="f21d9b71c755206c059885adb1f907fb"/></dir><dir name="product"><dir name="view"><file name="count.phtml" hash="073f247a61af63122c0313e102212c5d"/><file name="list.phtml" hash="cef9a9a9ba2616ffed9c7fc238f447c5"/><file name="other.phtml" hash="b5891324f64bb56d2539a2f25afda646"/></dir></dir></dir><dir name="sales"><dir name="order"><file name="history.phtml" hash="28affbdaa2815c472c9b230ae92f8467"/><dir name="info"><file name="buttons.phtml" hash="d4c05e7813c6013b180f3735b7c6d6fc"/></dir><file name="info.phtml" hash="2a9f46c911c991675c3645f0508f305f"/><dir name="items"><dir name="renderer"><file name="default.phtml" hash="5ec4f885fe61920552eb73ae15c0425d"/></dir></dir><file name="items.phtml" hash="e0f13cda187275e39086d64b9e92f0a1"/><file name="print.phtml" hash="aaaad347b6d8926a058811c7dacd4b7f"/><file name="recent.phtml" hash="dbb0dd4c87d88f9b23aee49e5be12eae"/></dir><dir name="reorder"><file name="sidebar.phtml" hash="93477ad8b4e949f8f597552ecae42f38"/></dir></dir><dir name="sendfriend"><file name="send.phtml" hash="47aac2a92090899c4eecb944294ded7c"/></dir><dir name="tag"><dir name="customer"><file name="view.phtml" hash="605d21a7d028ba8c92847e8db411b974"/></dir><file name="list.phtml" hash="5e98728a3115e1741d81cfb3313a2c93"/><file name="popular.phtml" hash="265a601c0b78b9db4de9eaeb33f1dfb9"/></dir><dir name="wishlist"><dir name="button"><file name="share.phtml" hash="bb04a78bef083b270bd0835ed9a656dd"/><file name="tocart.phtml" hash="7ab67b12b219f1c7288c055b5b7938c5"/><file name="update.phtml" hash="8bc084521545fe1c5604ea6c40b87a9b"/></dir><dir name="email"><file name="items.phtml" hash="dfd15c562df1ad10a03c7d9f445b8ec2"/><file name="rss.phtml" hash="0093593ffc7f73507afe9dce8a94d04b"/></dir><dir name="item"><dir name="column"><file name="cart.phtml" hash="c84fa58c9c4fda78de1c064b9e073a27"/><file name="image.phtml" hash="c19644c206bc3a94b7913bffe458dfa0"/><file name="info.phtml" hash="601c06d57c55a3693dedf1db00cb71ae"/><file name="remove.phtml" hash="898dd33ceb80990c425c7357d7551633"/></dir><dir name="configure"><file name="addto.phtml" hash="9897e62a637904f305ca2fb1803bbf2c"/></dir><file name="list.phtml" hash="bbb2cab7073d546aa5e2fa5e3f1a403c"/></dir><file name="options_list.phtml" hash="e7444188a84136672d79b8130e533971"/><dir name="render"><dir name="item"><file name="price.phtml" hash="b42da15a8aa285317900d0c5cbc78e97"/><file name="price_msrp_item.phtml" hash="2b6303fd121b88763e2bb52ae19e9de4"/><file name="price_msrp_rss.phtml" hash="1e19860fbaf7a0e228ba41b5e7997312"/></dir></dir><file name="shared.phtml" hash="6b1a42c6a5a4fb06a6d1d58600abe135"/><file name="sharing.phtml" hash="afe05d80f0bcde8587ba8949f4f3054c"/><file name="sidebar.phtml" hash="d07fe0c9c689c1505bad38dd59f7d55d"/><file name="view.phtml" hash="9ed37127a4573cd6381dae43d3dc3067"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Redstage_Mobilenow.xml" hash="261ebb471ce5dfdbfb7b28b56070de88"/></dir></target><target name="magemedia"><dir name="mobilenow_theme_images"><dir name="banner"><file name="1380280298Banner.png" hash="96979abcecbcbbd3240e919ba63775b3"/><file name="1380513075Banner.jpg" hash="0971b44517979998a50aad7fdcd0b8db"/></dir><dir name="logo"><file name="1380512898Logo.png" hash="5f4ac03689c6de73efed1341f5c33205"/><file name="1381160198linkedinsucks.GIF" hash="4384521314aa8e3b06f041f4b7286d43"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="colorbox.css" hash="ddc74840b3cc2c0f125e75629065148e"/><file name="jquery.minicolors.css" hash="a3821db4b961be731b247693454bef61"/><file name="mobilenow.css" hash="e8e1cad6cca828714e9290ba75d72e95"/><dir name="ui-lightness"><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="a35688ab5bede84c00489b47585e117d"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="33eaf759961555bef11f3d900981fff3"/><file name="ui-bg_flat_10_000000_40x100.png" hash="02e49d05999f58c792d3a33d8a0d6244"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="12850c5d5830759defc36ae95d0e5629"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="45ef58a9c6a09766fcf99eee81aba3f0"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e8603b1d79987a87f0b3c782fae84aa5"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="95a5bd9cb71fb12308a57693e2c810c8"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="0e921a9cc19db22e30bef8b3f2653301"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="65dbba54e21b060adeef6a9131326e1a"/><file name="ui-icons_222222_256x240.png" hash="a1b3887a86cf1791f23c0b53b4d3585f"/><file name="ui-icons_228ef1_256x240.png" hash="73044fed6bab2c5ed02eed93b7d3adaa"/><file name="ui-icons_ef8c08_256x240.png" hash="1eec256e4f7b8324e619aae36ecfbfbd"/><file name="ui-icons_ffd27a_256x240.png" hash="c1a79bd65be08aa2be391cba2321f448"/><file name="ui-icons_ffffff_256x240.png" hash="e3f4748b19b87aadaa924d85f0882432"/></dir><file name="jquery-ui-1.10.3.custom.css" hash="392a9e6a3d99de8d05cd43801f227cc7"/><file name="jquery-ui-1.10.3.custom.min.css" hash="d74333a611b0ae92b8978e2f7d051be1"/></dir></dir><dir name="js"><file name="ajaxupload.js" hash="666014b57c265cc76e9c436df8002e7b"/><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="jquery-ui-1.10.3.custom.js" hash="e3a616c5218ad6d081265b6a21557ab0"/><file name="jquery.colorbox.js" hash="fe41e1c7af0b9ba48070d381364ed55d"/><file name="jquery.minicolors.js" hash="5208b0391967595272f987cb1c1072cf"/><file name="mobilenow.js" hash="4be13ae777366309e470cd81c4b78549"/></dir><dir name="mobilenow_images"><dir name="colorbox"><file name="border.png" hash="7ca8a1d2eb0763b35c266cd54bee2fa5"/><file name="controls.png" hash="b68b9ecaae424de4862ba0d055b7a560"/><file name="loading.gif" hash="e6611f867d63754b7a2a974fb0a0e7dc"/><file name="loading_background.png" hash="acf427e932fb9413700a4b8b58b41eec"/><file name="overlay.png" hash="790376e15a036959e358a19d4a7ea437"/></dir><file name="edit1.png" hash="b1d05a23e856efbbd8320fbca0f2221f"/><file name="iphone-bottom.png" hash="0fa1f29bc9026690fede6496ca9d8ee4"/><file name="iphone-repeat.png" hash="38ebe675403c712569e736f66acc84d1"/><file name="iphone-top.png" hash="23fd425c00febceedb98de962a28d5ff"/><file name="jquery.minicolors.png" hash="d36c75e3d8880ebfece375fd7cd46787"/><file name="mob-bottom.png" hash="f48294731ebd5ebcb3b152fec46d19f5"/><file name="mob-repeat.png" hash="4d73fa33c9a92800e3e929023a40214b"/><file name="mob-top.png" hash="ff80c1299590f809e22997ce5b79651b"/></dir></dir></dir></dir><dir name="frontend"><dir name="redstage-mobilenow"><dir name="default"><file name="apple-touch-icon-114x114-precomposed.png" hash="083790f44256d2d6ca86c3527e43e15f"/><file name="apple-touch-icon-144x144-precomposed.png" hash="dbd829aa83b4acf4bd1f098e233b96f2"/><file name="apple-touch-icon-72x72-precomposed.png" hash="7a41d02cad54d708cb6c432bd8590403"/><file name="apple-touch-icon-precomposed.png" hash="908e66a61c647e7e4a588a2bcde931f6"/><dir name="css"><file name="foundation-icons.css" hash="21c9ff1060ba7a125593c90713ebb4ec"/><file name="foundation.css" hash="67f48027469e724fd1b394199931257d"/><file name="foundation.min.css" hash="8d8c81f4feaf1ab5225d82a4741fa9ad"/><file name="mobile-menu.css" hash="f0ab8e6c5e3c984e759e3762e34f5329"/><file name="normalize.css" hash="169cc7528b867412fb95e9b2ce24fcad"/><file name="onepage.css" hash="90be2a62d2f1463accf717293b86e31f"/><file name="styles.css" hash="377b5370463e3ad5a5fa48e60000e2ea"/><file name="theme_typo.css" hash="d775cdbdef3b7005621c572f4bf6f696"/></dir><file name="favicon.ico" hash="60eb606bd4be156f4abd07fb72bc7fca"/><dir name="fonts"><dir name="foundicons"><file name="general_foundicons.eot" hash="30cbc11e1758409c649f6f60d151ffc5"/><file name="general_foundicons.svg" hash="ed793904f862c8540f283701fbcb48f5"/><file name="general_foundicons.ttf" hash="9d3ad610c24f0147996f34a9a166990c"/><file name="general_foundicons.woff" hash="460c4e8a696b6bd52092ddc1dd6f0cbb"/></dir><dir name="open-sans"><file name="Apache License Version 2.txt" hash="985c4f1ae60c5b6aa1199efaaac7866c"/><file name="OpenSans-Bold-webfont.eot" hash="8bb31d277e63b3d03253dd5060c74e93"/><file name="OpenSans-Bold-webfont.svg" hash="60dd36ad104cd1bc313649e160bac2d0"/><file name="OpenSans-Bold-webfont.ttf" hash="bf0b1c035c98563b62c8e427d1ec0926"/><file name="OpenSans-Bold-webfont.woff" hash="6a13b444647bac755a03da311b0633e2"/><file name="OpenSans-BoldItalic-webfont.eot" hash="b1e7a7fe558b4779de564315542fb77b"/><file name="OpenSans-BoldItalic-webfont.svg" hash="8126c8d49eb56d40827e8582eaf9c9c0"/><file name="OpenSans-BoldItalic-webfont.ttf" hash="66fdd3525c4c27423adfd6ac8d714df6"/><file name="OpenSans-BoldItalic-webfont.woff" hash="a4c81bc2a28f919c7e4d2f1bc158248f"/><file name="OpenSans-ExtraBold-webfont.eot" hash="5e6700afd202d11e9eeca390c36343d5"/><file name="OpenSans-ExtraBold-webfont.svg" hash="f2a71cae291e34916f08d8de390816f4"/><file name="OpenSans-ExtraBold-webfont.ttf" hash="af9fa762d424c54361961aa2b0c9a737"/><file name="OpenSans-ExtraBold-webfont.woff" hash="7aed1514212261a5132bfd2d2252f7d1"/><file name="OpenSans-ExtraBoldItalic-webfont.eot" hash="a09466fb61abf3618c652729de80086c"/><file name="OpenSans-ExtraBoldItalic-webfont.svg" hash="7becb6477dca98605faafdd58a862b6b"/><file name="OpenSans-ExtraBoldItalic-webfont.ttf" hash="74e0935e2e283ca9058e9f4ad2300b1b"/><file name="OpenSans-ExtraBoldItalic-webfont.woff" hash="f4f8432cf209fc986dca5cab0c8f66c4"/><file name="OpenSans-Italic-webfont.eot" hash="9487423dc35bf8a541354926e95e7598"/><file name="OpenSans-Italic-webfont.svg" hash="06443f4a9a2058aa97bacb89d3782949"/><file name="OpenSans-Italic-webfont.ttf" hash="346b43cf85bdc059069d1a83d308a034"/><file name="OpenSans-Italic-webfont.woff" hash="c0de58fc662222308ea9a1e43031c415"/><file name="OpenSans-Light-webfont.eot" hash="d8c8f250a3f80e108527810bac6e90b9"/><file name="OpenSans-Light-webfont.svg" hash="e11350590f6e6a88adb921c1beac102c"/><file name="OpenSans-Light-webfont.ttf" hash="d5f64f5341b899c7afc3db4a69ab3ad7"/><file name="OpenSans-Light-webfont.woff" hash="f041706894c4d5aef91828c00d7856d8"/><file name="OpenSans-LightItalic-webfont.eot" hash="275022abeba8785ed7515073e10f727d"/><file name="OpenSans-LightItalic-webfont.svg" hash="0f1a8a60fa5a42384fcc8cbeb1493f08"/><file name="OpenSans-LightItalic-webfont.ttf" hash="32ff136e3334ad94e419ca5f8a32207e"/><file name="OpenSans-LightItalic-webfont.woff" hash="284d59505a4a338cee47ddb43a9ab804"/><file name="OpenSans-Regular-webfont.eot" hash="33ec9bca49d30244ff5e1bae261afd36"/><file name="OpenSans-Regular-webfont.svg" hash="0f44342686ffb7af7769ac4be3aadf9e"/><file name="OpenSans-Regular-webfont.ttf" hash="cb95bc691478b7f108a1127710c1aa4a"/><file name="OpenSans-Regular-webfont.woff" hash="467063b18b4823e9fc4f645b6a0b19ee"/><file name="OpenSans-Semibold-webfont.eot" hash="d543421f6d099c83a80f2920c6718645"/><file name="OpenSans-Semibold-webfont.svg" hash="7fd345f1a73f91f9852a4ded5ce8ea60"/><file name="OpenSans-Semibold-webfont.ttf" hash="80744a049a00b14a200ab18d3ca0c8d6"/><file name="OpenSans-Semibold-webfont.woff" hash="8e80acc061be9580f1c03bed43855e27"/><file name="OpenSans-SemiboldItalic-webfont.eot" hash="0c11aa7743c800d477f3915d5fe876fd"/><file name="OpenSans-SemiboldItalic-webfont.svg" hash="4fef645c53707d797d950c8196b78db5"/><file name="OpenSans-SemiboldItalic-webfont.ttf" hash="b588434fea16ace9e482c8759d19c417"/><file name="OpenSans-SemiboldItalic-webfont.woff" hash="17ef4a7b749a2896f32fb7842f2dff0d"/><file name="demo.html" hash="7d97b8b616d64512f1bfda74fe684a20"/><file name="stylesheet.css" hash="ccd5010fcfeb738c633e36a03e8fa187"/></dir></dir><file name="homepage-content.html" hash="b79649d10f9f6e6c8385b0c53fc3f76a"/><dir name="images"><file name="Remove-icon.png" hash="9e13126ed7963951bad6104395597208"/><file name="best_selling_tr_even_bg.gif" hash="5022d648379090e306f00cd64738b146"/><file name="best_selling_tr_odd_bg.gif" hash="926622704f53796801bb5d097e116c8e"/><file name="bkg_block-layered-dd.gif" hash="6ae6f8184e87de496fb74eeec65737c9"/><file name="bkg_block-layered-li.gif" hash="753ebb76a4fc2b5b6915c536fcf4d487"/><file name="bkg_pipe1.gif" hash="7852290f6a443000ead96b8cec5cd7c7"/><file name="bkg_pipe2.gif" hash="7da64eefaf4da3855ab6ee76dbced0c2"/><file name="bkg_pipe3.gif" hash="11bfac1e590f0c77fb12f37d7f05cd3c"/><file name="bkg_rating.gif" hash="0a8777c815350ddf1e316a537ad0c335"/><file name="fb.png" hash="e96d2c8fdddf58186e2c03deaeb4a3f1"/><file name="google.png" hash="036c0e405c1174f155f53e7dceaa7a88"/><file name="i_availability_only.gif" hash="bca1f00a50864171ad98317b778e869c"/><file name="i_availability_only_arrow.gif" hash="0cf32b72fefc94b89b74e4f3f02c2e93"/><file name="i_block-currency.gif" hash="643024bcae5ece554fdbbc041aeb297c"/><file name="i_block-list.gif" hash="fe8424127ecbe4b0d893bcf6f253dc1a"/><file name="i_block-related.gif" hash="4e277173b6372b1a90b0f19e0388ad54"/><file name="i_block-subscribe.gif" hash="9e5fee06a543742045118a95f2debcb8"/><file name="i_block-viewed.gif" hash="67d1255c2c3e9ed1a5c845f8d4e4a3ba"/><file name="i_discount.gif" hash="908d44da90de5e54185764d093bbdb77"/><file name="i_ma-reviews.gif" hash="859c97695ec396c0b284a0c3c7c416ad"/><file name="i_notice.gif" hash="ebd56dc80b8346e10e93628bc0e6c372"/><file name="i_page1.gif" hash="704f7d4eccbdf9cabbad7770f18856ff"/><file name="i_page2.gif" hash="57a04ca584e05e28dc94c7e68f0af62e"/><file name="i_pager-next.gif" hash="ed4d6640624c2b6edeab4c212314bd6d"/><file name="i_pager-prev.gif" hash="75973b020105dccbaf34e49d7852552d"/><file name="i_search_criteria.gif" hash="cf67b9cc5c311ae3f99e68cd29ae17be"/><file name="i_shipping.gif" hash="91a0d2cc2eb2391f90ec8a75c04b3183"/><file name="i_tier.gif" hash="c5189e25afeb7c1a8c4902a42832593e"/><file name="i_type_grid.gif" hash="a1e5d8ac36fb2891ea16e729b95c552c"/><file name="i_type_list.gif" hash="61333d383ec142b8d270abe77324aa5d"/><file name="logo.gif" hash="0a463ac461c50fcb77cab4af34e50dbf"/><file name="logo.png" hash="aa5376107e1ac23a9ad03ef066158dd3"/><file name="logo_email.gif" hash="40677892108da4c1645a91f7467e5670"/><file name="logo_print.gif" hash="40677892108da4c1645a91f7467e5670"/><file name="logo_white.gif" hash="c6ddab800dc4a7a7d6c7aa9625c3148b"/><file name="magnifier_handle.gif" hash="238fbdd7959f517db11c6f57ee4daaf4"/><file name="opc-ajax-loader.gif" hash="3eb92a9317c81f5a7d67e8534f1d6ff9"/><file name="pager_arrow_left.gif" hash="f6b249c9a25eb71255817f79cd0af2db"/><file name="pager_arrow_right.gif" hash="8551cb2b4a775a8cfb27f84b5b244e97"/><file name="printrest.png" hash="baaafa1b2d9994fec51483565aeaef52"/><file name="slider_bg.gif" hash="1b778e75d48b555de1b9d0654a0d43c2"/><file name="slider_btn_zoom_in.gif" hash="ef0fc67f77f30827ee67f4e744b60781"/><file name="slider_btn_zoom_out.gif" hash="68b3d1c28dc5aec4f6b64d70a6996b6f"/><file name="tw.png" hash="b9c514075cd17c8123120ce114f1008c"/><file name="white-arrows.png" hash="34f2b2668a7f47b3830a7442d4f498eb"/></dir><dir name="js"><dir name="foundation"><file name="foundation.abide.js" hash="cf09f796796fa20d8dbe3819620ae303"/><file name="foundation.alerts.js" hash="4c44a00aa15fcff3b5b98f478d61a574"/><file name="foundation.clearing.js" hash="ced83c658ee3bee6467f03ea0f18f1bc"/><file name="foundation.cookie.js" hash="1b2cfc4c1a03f70cd4e4a8e0b1588454"/><file name="foundation.dropdown.js" hash="03564f4b10e8abc379b1849ba4fba07c"/><file name="foundation.forms.js" hash="90452fe2e3a9b6d42af33c74d06fa946"/><file name="foundation.interchange.js" hash="13890831749664a64e32e0ea871dd8a1"/><file name="foundation.joyride.js" hash="b5fdae491e0247f2757060942eb6c33e"/><file name="foundation.js" hash="bb040a76f83d9e832ecdf3c6a1adee3b"/><file name="foundation.magellan.js" hash="47c3ad8e74ec460df95b8a0a67fc3021"/><file name="foundation.orbit.js" hash="357b1ebf0f110e6055b026c8a15c0b87"/><file name="foundation.placeholder.js" hash="7a207cba3b5ce05cf21cb77833baa302"/><file name="foundation.reveal.js" hash="f1b451c369adb5cb0ae848df245f8c34"/><file name="foundation.section.js" hash="9873045d51b37dcb08d220d0ea768f60"/><file name="foundation.tooltips.js" hash="25ac421513f9ca787f275fa18e166b94"/><file name="foundation.topbar.js" hash="0ac7dbd87ec7afb5af335c614b6bbdb6"/><file name="index.js" hash="ac827ebf2a2dc60b48be923551dcf003"/><file name="jquery-1.8.1.min.js" hash="c4b0df15af5b1cd4d765d16dda0f5075"/></dir><file name="foundation.min.js" hash="1356fc9e00cc7e10261d0d2222f6e7e8"/><file name="mobile-menu.js" hash="5778ee5bd5708a4156724fb877cfdb46"/><dir name="vendor"><file name="custom.modernizr.js" hash="9f855c3ee731604cad22f5ee7047033f"/><file name="jquery.js" hash="90949fe3c2c71060590bbc8f1df1c390"/><file name="zepto.js" hash="b4fd5d944a831a4b5cacd68b1346734e"/></dir></dir><dir name="scss"><dir name="foundation"><file name="_variables.scss" hash="a74e49c253d16a8fdf185a343a2da6f1"/><dir name="components"><file name="_alert-boxes.scss" hash="f5e44d0d7d3b0c4684303373ed942dda"/><file name="_block-grid.scss" hash="32c084d41fbed99e03acf74d80a6470d"/><file name="_breadcrumbs.scss" hash="20311e104ce1e837fd8c78646875cb48"/><file name="_button-groups.scss" hash="d763df8be14d751529ad8c73225be20c"/><file name="_buttons.scss" hash="ce42dd89b74a7b8c231d788de374b31d"/><file name="_clearing.scss" hash="f5c292573252db3587d5744350fc95a2"/><file name="_custom-forms.scss" hash="9b4aa0d05ec481c3cc6bd9d6e38d94ae"/><file name="_dropdown-buttons.scss" hash="b1ebd261c287612d96fe14722e83b754"/><file name="_dropdown.scss" hash="8fff5d76b8978281cb233e029796ce06"/><file name="_flex-video.scss" hash="11d275efd68ec7982461d74742905908"/><file name="_forms.scss" hash="1cd925310c97e3d4d94b12eaacb14ec1"/><file name="_global.scss" hash="95aaaa2f9f9f0563dcdd51287fedf23f"/><file name="_grid-5.scss" hash="5156f5487221e32979fc7997e9acab16"/><file name="_grid.scss" hash="2618c655e424243e713df35eb31dcca5"/><file name="_inline-lists.scss" hash="c1a5e2ded2ea1bceb79e818c85759b4c"/><file name="_joyride.scss" hash="ae97d83b1bec4f976ee4c6bd33bb3460"/><file name="_keystrokes.scss" hash="acca1d2cba45c480967472297ff14441"/><file name="_labels.scss" hash="1179d6f3b5b7b2e26f48d9aa8946ce14"/><file name="_magellan.scss" hash="8a3783ece5e5c76b37ecaef3f8518508"/><file name="_orbit.scss" hash="e8b9eee10ecaba1293358c5c46df54a8"/><file name="_pagination.scss" hash="34d4a1ea5cd3e13611a82d5c53cb325d"/><file name="_panels.scss" hash="2d9eb6653e951222d4d79ede6f74054a"/><file name="_pricing-tables.scss" hash="f3bd5579cda0b08bef78db437c7fa4d6"/><file name="_progress-bars.scss" hash="39198b2f41b1aafd93389ee51d880572"/><file name="_reveal.scss" hash="a57d6060ba6b1d2e91e397ee9f979978"/><file name="_section.scss" hash="4bb55097de1d8259d9d6ca7664c018b2"/><file name="_side-nav.scss" hash="f74de78e2f8dee5defebc8da51a9e7bf"/><file name="_split-buttons.scss" hash="2d2b6222b95be888950f32c6d36b3688"/><file name="_sub-nav.scss" hash="e7863aab38dc327185cd02d8da91f1b9"/><file name="_switch.scss" hash="ee6ab621cfcaa846a7b79cc5c9b2e9aa"/><file name="_tables.scss" hash="2b2ab54ad41d181f647c7128b92101c9"/><file name="_thumbs.scss" hash="edb4e8b71c7e64805d039c9e4d978396"/><file name="_tooltips.scss" hash="4f4e1e404bcbe322a8e228db0d7657d6"/><file name="_top-bar.scss" hash="d79732b90d422551cfc8c682a7628560"/><file name="_type.scss" hash="df099820ee16262cbad2ac489aa67aaf"/><file name="_visibility.scss" hash="66ce0c32dbf99f21bee4c702eddc6678"/></dir></dir><file name="foundation.scss" hash="1cbf68cc733c7b6be30b589661ff623b"/><file name="mobile-menu.scss" hash="b87c6bfa27209d6b4786931f991a4054"/><file name="normalize.scss" hash="441feb5cc4d45e49f6fd4016f511baa1"/><file name="styles.scss" hash="1b104bc3fdcf5db09bbddc44e52ad8ea"/><file name="theme_typo.scss" hash="56472cd3d631e02c5e415a59e41a96ab"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.2.13</min><max>5.5.0</max></php><package><name>Mage_Core_Modules</name><channel>Community</channel><min>1.6.0.0</min><max>1.8</max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mobilenow</name>
4
+ <version>1.0.1.14</version>
5
  <stability>stable</stability>
6
  <license uri="http://mobilenowapp.com/mobilenow-license">Custom License</license>
7
  <channel>community</channel>
10
  <description>MobileNow is a mobile theming platform for Magento allowing for full customization of base themes and deployment of a custom mobile site with no programming experience. For a nominal fee, any Magento store owner can deploy a smartphone friendly mobile theme in less than 30 min! A MobileNow membership also comes with a bunch of perks; mobile marketing tutorials, a mobile e-commerce eBook, news, and constant updates to the system. &lt;a href=&#x201D;http://mobilenowapp.com&#x201D;&gt;Click Here for More Info!&lt;/a&gt;. </description>
11
  <notes>Highly tested release. More themes and options to follow.</notes>
12
  <authors><author><name>Redstage, LLC / MobileNowApp.com</name><user>mobilenow</user><email>info@mobilenowapp.com</email></author></authors>
13
+ <date>2014-04-08</date>
14
+ <time>11:23:48</time>
15
+ <contents><target name="magecommunity"><dir name="Redstage"><dir name="Mobilenow"><dir name="Block"><dir name="Adminhtml"><dir name="Mobilenow"><dir name="Edit"><file name="Form.php" hash="fb8d86aa37dfb208b70a74921fdadccb"/><dir name="Renderer"><file name="Bannerimagedisplay.php" hash="0831b39c90cf94d529f48e9b33e95e48"/><file name="Clayoutmessage.php" hash="bfee491a5fc8419756bd9548bcb97ec6"/><file name="Custombuttons.php" hash="c20338b8d5e7ed3a291a3c726e9bcc3f"/><file name="Customcatalog.php" hash="44030e0a9b0bc025538a660063026d7f"/><file name="Customlayoutbuttons.php" hash="65e8bb43ac625fe68adcc964051712e4"/><file name="Customlink.php" hash="db80fa2f21d36e0452fd0e7f78e33dfb"/><dir name="Customtabs"><file name="Design.php" hash="b0f19652bb794487e3f1de5507dc9fec"/><file name="Layout.php" hash="1dc1f46655004cf44f98336e09f74fd6"/><file name="Theme.php" hash="a2bfaeba976b3e6b2d64b13e2d41f3f7"/></dir><file name="Customtext.php" hash="096ba90206de7117753e7ab8315421d5"/><file name="Customthemelabel.php" hash="ae0e44aaaa92dbe9c8e39785ad67208a"/><file name="Customthememessage.php" hash="ed02ce744a7fb747b9e128f3ff5f62a8"/><file name="Generaladvanced.php" hash="8fdc5bc9754eb12f3a6c6c00b158f66b"/><file name="Generalthemesavebutton.ph" hash="4f49a2cbe2831b1b4fd80820e14689e8"/><file name="Generalthemesavebutton.php" hash="4f49a2cbe2831b1b4fd80820e14689e8"/><file name="Hlayoutmessage.php" hash="f57e8183e980bb9ffb21606e31999efd"/><file name="Logoimagedisplay.php" hash="15398f5931b657f1fc3340547e9f2b42"/><file name="Overlay.php" hash="e43ce85eacc657835c58bb81d72659b1"/><file name="Playoutmessage.php" hash="5a3349dfa7ed2412eff4557b3646f663"/></dir><dir name="Tab"><file name="Advsettings.php" hash="2afbb392963b3ca8d371b22bb92cf23e"/><file name="Design.php" hash="88b9d78a24b81c5634925c462a6f413c"/><file name="Form.php" hash="46b22339c68584f93d4d31eed0fd774c"/><file name="Layout.php" hash="ac0348754450d23e9e13b5070a873ef6"/></dir><file name="Tabs.php" hash="7e08f606bdbeb264fcd5b4b9ce6ce82e"/></dir><file name="Edit.php" hash="a47b397ba64fef8c0d5c9f564c65da09"/><file name="Grid.php" hash="7c1b5993bd032dc9bb4cc3e865e1b2ac"/></dir><file name="Mobilenow.php" hash="1f58d8d619a7ba33f120c6f066b9579a"/><file name="Mobilenowbackend.php" hash="dcae4b27451d459741c921acaac06145"/><dir name="Renderer"><file name="Merge.php" hash="2196cfc1134a643d42a3939d51a33660"/><file name="Status.php" hash="111e9f49ba9b39841d107f82ad4c146c"/><file name="Themename.php" hash="3f2b837b38361616151f26cffa996bc2"/></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="9d1f675c0f469957409df2288527d62a"/><file name="Link.php" hash="1f35c15d20f3d4cbc048a52134f5f1fd"/></dir></dir></dir></dir><file name="Home.php" hash="f971115d0e29e6eca26315b39665a11f"/><file name="Left.php" hash="5e7f26edc0e806a1c48194a8cf334b58"/><file name="Toolbar.php" hash="d6793f12275690c513022de9cc830163"/></dir><dir name="Helper"><file name="Catalogpage.php" hash="0c8b880979ddce3177a6bc0e776e5760"/><dir name="Cms"><file name="Page.php" hash="09e3ed3d86b4994e969ad93e086faed8"/></dir><file name="Data.php" hash="954b4a044b687a3e6c72f38e30abf23b"/><file name="Homepage.php" hash="e45dec769a593f997ca79cd977e3c36c"/><file name="Theme.php" hash="fcf4af41f924f9ed820cfefaf2a67d64"/></dir><dir name="Model"><file name="Corelayoutlink.php" hash="be586a25a6709bf1dbd6529f238ac9c3"/><file name="Corelayoutupdate.php" hash="19d82e67ab058d36f8309bd6becc78b9"/><dir name="Design"><file name="Package.php" hash="6ea4e7743b12113c489a6bd9370b3423"/></dir><file name="Feed.php" hash="571ff906aa71f8794dcdaf41d86530a2"/><dir name="Layout"><file name="Update.php" hash="0765773aae0839ef220a382076a99013"/></dir><file name="Mobilenow.php" hash="10aa846d8f91d18e7c450ada0200c25c"/><dir name="Mysql4"><dir name="Corelayoutlink"><file name="Collection.php" hash="005e4741ba79c050b3417c4b76f57f22"/></dir><file name="Corelayoutlink.php" hash="6540e39c2e24c739be9d0acd09a82855"/><dir name="Corelayoutupdate"><file name="Collection.php" hash="9088de3ac93b18c0b7c1dd7df122cf34"/></dir><file name="Corelayoutupdate.php" hash="32824fba77c63e14f041188719d77733"/><dir name="Mobilenow"><file name="Collection.php" hash="c1fb6e66ccec2bff86c717d5a2d183fa"/></dir><file name="Mobilenow.php" hash="509677766e2b479f9bc9db308b403291"/><dir name="Themelayoutsettings"><file name="Collection.php" hash="65b5d7cba09fc21004b5cff2979776dd"/></dir><file name="Themelayoutsettings.php" hash="64f6e7a5b08cd94998ae947777035b72"/><dir name="Themestore"><file name="Collection.php" hash="4437e247d6b4f9fcbb04a393e1977e22"/></dir><file name="Themestore.php" hash="4f00d76dad9f3582b4191c7a3500ea4d"/><dir name="Themesubsettings"><file name="Collection.php" hash="4a0e7deece1c3c5c5a25e3d9489d8f2e"/></dir><file name="Themesubsettings.php" hash="5ad581e569892a55fd88d1c279817984"/></dir><dir name="Resource"><file name="Layout.php" hash="fa6385af043643da7024c453fe4774e0"/></dir><file name="Themelayoutsettings.php" hash="6a4642b78eb3d81710520d5519c70d7c"/><file name="Themestore.php" hash="46624c7541a16a950ee54e421cce31de"/><file name="Themesubsettings.php" hash="3c720f1262ebf7df2ec519d52c39206a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="364781327821dd343c26cf5cd108eae2"/><file name="MobilenowController.php" hash="2b6185d552011b2deb22f6110879212c"/><file name="MobilenowbackendController.php" hash="fd0b71baabbb2a20c38bbc6b88eddc80"/></dir><file name="IndexController.php" hash="12b30a60423827d70a060db018494211"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7fb397189c90f41c8d485788ec1284dc"/><file name="config.xml" hash="81751232c9130fa6e31d2862bad61410"/><file name="system.xml" hash="ffd8285e96650831d9f871540d0aa750"/></dir><dir name="sql"><dir name="mobilenow_setup"><file name="mysql4-install-0.1.0.php" hash="4061077d1996bfbd6e857cef55a6c62f"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="7a30b7ffdd133ad0d70eef047b08aaca"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="8a760028be0e27397e9ac5221bf279d9"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="94044e7efc4eff129e67d161bc5c3b92"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="94a00b3cb3fc6240fe1ea40c42ce2329"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="812f538f833ecd57199923d0b375d85e"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="cf7edfee55ecf9f8df038ab4b3886a26"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="769cd6a9b709f101bfa04d1c00a0257f"/><file name="mysql4-upgrade-0.1.7-0.1.8.php" hash="f0b9002f62b733caac6c6d23e022ee16"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mobilenow.xml" hash="90e9c6db9de63e507a8442ae95757ba7"/></dir><dir name="template"><dir name="mobilenow"><file name="mobilenowbackend.phtml" hash="3a1767c713b9e5a99aba79fc108cdf2f"/><dir name="system"><dir name="config"><file name="button.phtml" hash="b952f34531612882466b1d59ba22c6f7"/><file name="link.phtml" hash="1363f85868556a5ec4cb7474eeeaf75b"/></dir></dir><dir name="widget"><file name="advsettings.phtml" hash="b6a7931554f04a8339733a24867e39c2"/><dir name="design"><file name="link.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><file name="design.phtml" hash="780df8fef0aa340f0e65d5a365596440"/><file name="form.phtml" hash="23939ce177cd7001d713017483382be2"/><file name="layout.phtml" hash="c5c88294f543445668cafef320741292"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="redstage-mobilenow"><dir name="default"><dir name="layout"><file name="catalog.xml" hash="201c10292f16dea1171757f4bbdbd955"/><file name="catalogsearch.xml" hash="09e3073d213f0f388361f9ec11565e20"/><file name="checkout.xml" hash="b4a37661ace2c65f2febf4019d1f27b0"/><file name="cms.xml" hash="fe47a24f1af4b5f9225ad94fac61c020"/><file name="customer.xml" hash="f0149b3fdecbf0d97be0ed62b978071f"/><file name="local.xml" hash="0e38738f51594b8cb0554212456a41e9"/><file name="mobilenow.xml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="newsletter.xml" hash="2ab782768a49ada4e05cc6c7542fc00d"/><file name="page.xml" hash="0313ac0a1144bd863fad5ae213ce3ab0"/><file name="wishlist.xml" hash="60bb825afdbe916096608f291ddbf94a"/></dir><dir name="template"><dir name="callouts"><file name="left_col.phtml" hash="a8b0fcfe3bfb4c11b087fbd6fe370e91"/><file name="right_col.phtml" hash="a8b0fcfe3bfb4c11b087fbd6fe370e91"/></dir><dir name="catalog"><dir name="category"><file name="view.phtml" hash="dcd1520a6d4ebb26aa9d786619c294d0"/></dir><dir name="navigation"><file name="left.phtml" hash="3a0fc226d894c847d0289fec23c0a693"/><file name="mobile-menu.phtml" hash="6b49f7e18ebd8ad455624f17ad351344"/><file name="top.phtml" hash="77d2c7d92d41e32288ba82964970abd2"/></dir><dir name="product"><dir name="compare"><dir name="layer"><file name="view.phtml" hash="a63fcceb4a4979085e63ea0d984c36b7"/></dir><file name="sidebar.phtml" hash="e47f9509b991cb3e38a6d1c384d571ae"/></dir><dir name="list"><file name="customtoolbar.phtml" hash="b686cfca3a9162b05c722170dd7cdbbc"/><file name="related.phtml" hash="cb0382c780c689c46626a658588cd3cc"/><file name="toolbar.phtml" hash="686fe0941cedc8acfb04211411b04f7d"/><file name="upsell.phtml" hash="5cfa088d88b416c5a583316ab037fe37"/></dir><file name="list.phtml" hash="1a68db0acb342ce83169d993f039768b"/><file name="mobilelist.phtml" hash="615e5221bcb57bbb9824e53ef9600d3d"/><file name="new.phtml" hash="2736170efe05a3915e99e0fc55b06c32"/><file name="price.phtml" hash="a6cca01b0a72f6f65d46df7eefcbe5e0"/><dir name="view"><file name="additional.phtml" hash="7bab9dbcc43d46b0aa057dd92547e49e"/><file name="addto.phtml" hash="deb08145b6b50b7159981829090a5c67"/><file name="addtocart.phtml" hash="8cd9a81f304705c95d6b3f03c5a84da7"/><file name="attributes.phtml" hash="586ef5fe4c1fd5e1a57f64a4daf6ac2a"/><file name="description.phtml" hash="8ae65416dab854fe4bbf874866d01d96"/><file name="media.phtml" hash="7301eadad386dc9b095db4bf24df5077"/><dir name="options"><file name="js.phtml" hash="9d5c5c4786c5b9fb7125f6f3cc8c7309"/><dir name="type"><file name="date.phtml" hash="5bdfd7dc4817a500095e076a21a2c467"/><file name="default.phtm" hash="f1acbd98563c6640c4a0b6cf5abc994f"/><file name="default.phtml" hash="f1acbd98563c6640c4a0b6cf5abc994f"/><file name="file.phtml" hash="b72f9363f049dd486ff0a3c8b667cbc9"/><file name="select.phtm" hash="5dbbe91d0581ccb291737992c5188121"/><file name="select.phtml" hash="5dbbe91d0581ccb291737992c5188121"/><file name="text.phtml" hash="1aaef71a9e81521aab601aa281fa0b8e"/></dir><dir name="wrapper"><file name="bottom.phtm" hash="6a612992021e3e65ca7b5f6e897821d5"/><file name="bottom.phtml" hash="6a612992021e3e65ca7b5f6e897821d5"/></dir><file name="wrapper.phtml" hash="472e04ad6c1a35dfeaa54b3012884ed6"/></dir><file name="options.phtml" hash="c1227dcadb83af6708d78a032ffd8d6c"/><file name="price.phtml" hash="f2ae6daff42b8ee7074d27c8bf5f1e6c"/><file name="price_clone.phtml" hash="732daf46245f4ee7068d5ae26defc750"/><file name="tierprices.phtml" hash="0b7f122253b505c45772eff069203a5d"/><dir name="type"><file name="configurable.phtml" hash="1a0a77285960b4227f000855e8194ed7"/><file name="default.phtml" hash="a4c2f4f4b518eb90282269b3ad01595c"/><file name="grouped.phtml" hash="6bf64c1e98ef1c328bfd5fa8c417d06f"/><dir name="options"><file name="configurable.phtm" hash="c37919561a3cde0d9b92fd34d44c69c1"/><file name="configurable.phtml" hash="c37919561a3cde0d9b92fd34d44c69c1"/></dir><file name="simple.phtml" hash="1a0a77285960b4227f000855e8194ed7"/><file name="virtual.phtml" hash="1a0a77285960b4227f000855e8194ed7"/></dir></dir><file name="view.phtml" hash="061482fb94fb80645d7cd1b7cacdeb85"/></dir></dir><dir name="catalogsearch"><file name="form.mini.phtml" hash="3e54229834ef9041a1d1e06e4983edbd"/><file name="result.phtml" hash="c2bdfc4b0599094a83456dd6f17d4c77"/></dir><dir name="checkout"><dir name="cart"><file name="coupon.phtml" hash="ab3b4ac9db09b718b7cd479fa49b042e"/><file name="crosssell.phtml" hash="8a0996f16961fdcddf70a974ceb1a190"/><dir name="item"><file name="default.phtml" hash="4267e3cbc2557a6d7e87462d57bd6035"/></dir><file name="noItems.phtml" hash="85dd62d3046bf22ec8eb3e45989c6f0b"/><file name="shipping.phtml" hash="fc4ab03f1cf961e47f6954b37d66f80d"/><dir name="sidebar"><file name="default.phtml" hash="d7fcf720e93a818d2b745b6be57cb71f"/></dir><file name="sidebar.phtml" hash="dc88ff8a0e2c7e92fc3fb4b929ecf1f8"/><file name="totals.phtml" hash="c942cacb712272bccd142bc1217d479a"/></dir><file name="cart.phtml" hash="26ab258b5ea320b1f5757c2949a61b90"/><dir name="multishipping"><file name="addresses.phtml" hash="2eea5802fba4b2bdec6ca807491093ba"/><file name="agreements.phtml" hash="26fd8740318e401add70128eaef68713"/><file name="billing.phtml" hash="ea3bb60b5483aa696bc9886987f09ea3"/><file name="overview.phtml" hash="c997306c9d7731a2ae98e3c85171733e"/><file name="shipping.phtml" hash="4723a1d29c3ee22349dfdae255caf643"/><file name="success.phtml" hash="8b63316e6e9b19787dda5eb831d6eb7f"/></dir><dir name="onepage"><file name="link.phtml" hash="fea2ee8b193aa74b050ac3b102765147"/><file name="payment.phtml" hash="c21c1db899cb9353b54c289ad6ab97b3"/><file name="progress.phtml" hash="3e91545cb76aa5756b248eb8e965e619"/><dir name="review"><file name="button.phtml" hash="641349880361b4f9399983e2321cdd23"/></dir><file name="shipping.phtml" hash="147f906890006a9f7f2ecf09b0c6c12a"/><file name="shipping_method.phtml" hash="142bb343ab0cd0ed3126b47bcb2c1893"/></dir><file name="onepage.phtml" hash="c0e28ed98962a5688b78f106c60ac19b"/><file name="success.phtml" hash="7b38b72f11da8e0e5a3001289b2552f8"/><dir name="total"><file name="default.phtml" hash="f1010ec3fd3dcb503d81f7e8d3ebb206"/></dir></dir><dir name="cms"><dir name="default"><file name="home.phtml" hash="18d93ac152e47351b0039d8b3a67d59d"/></dir></dir><dir name="content"><file name="electronics.phtml" hash="1c2ccf4174ba49391330f327c401cdf0"/><file name="homepage-content.phtml" hash="023704fb47244b26515fcbf8ca3faea2"/></dir><dir name="customer"><dir name="account"><dir name="dashboard"><file name="address.phtml" hash="869f0cab9034785c19cc21dd03bcd881"/><file name="hello.phtml" hash="cbba873a754af5f89253d2fcbada6d3b"/><file name="info.phtml" hash="53befe4d8e4e91818777d2153970409b"/><file name="newsletter.phtml" hash="ec6fbed4b2919fa72034e0863bb905fa"/></dir><file name="dashboard.phtml" hash="7231f8b03cdfe4eb1304bf1dc2a0949f"/><dir name="link"><file name="back.phtml" hash="b5c39deaa70abb1f959b066e2458783e"/></dir><file name="navigation.phtml" hash="5f15d046f54faab17715544dd293fced"/></dir><dir name="address"><file name="book.phtml" hash="cea7ee5f49ac4efb1a94f0fb85f32dbd"/><file name="edit.phtml" hash="966a147d86b5b2810c67c4c9d5d133c0"/></dir><file name="address.phtml" hash="31eb5c90fbccded3d58b34a6ed85ae30"/><file name="balance.phtml" hash="7a7bed35437abcddd6430e399e8e1705"/><dir name="form"><file name="address.phtml" hash="78e8282888da9b88fb25d9ffa5ab3956"/><file name="changepassword.phtml" hash="3ec7b49af553f11b5a3201288c5ec7bc"/><file name="confirmation.phtml" hash="b5ec3af447a4fcb5890849f455b89c2f"/><file name="edit.phtml" hash="4922e83819a7e485c68b746545da230e"/><file name="forgotpassword.phtml" hash="0da2e1d65e83f19f26733a5a641974ab"/><file name="login.phtml" hash="b6af069d396d5b1a246a843fc5bdfd8a"/><file name="mini.login.phtml" hash="dc717862b4e3e7e4568366b52da2cd1d"/><file name="newsletter.phtml" hash="53c91920987fd622c1b700e0645dfcb5"/><file name="register.phtml" hash="3abe019298e4cab9f2a10c554cb06132"/><file name="resetforgottenpassword.phtml" hash="1e1068393aa5f0a12853a86f6186eba0"/></dir><file name="logout.phtml" hash="0c5855ea603f53b9da95b196644d4567"/><file name="orders.phtml" hash="c7613667dc51203a2d3d0432d4ddc756"/><dir name="widget"><file name="dob.phtml" hash="8bb0c2cc4f7d203d3a48bdaa90ec4c7d"/><file name="gender.phtml" hash="4beeda46d0a8c7f37a260d569c4e74dc"/><file name="name.phtml" hash="04ade7281f3022979437ebbab9a99023"/><file name="taxvat.phtml" hash="d7f79cf8816c36e599db793b5bcea9c5"/></dir><file name="wishlist.phtml" hash="60da933d81f4951a7c4017f70bd6fb7c"/></dir><dir name="directory"><file name="currency.phtml" hash="2db6a858e5a92a4a553c68813caad350"/></dir><dir name="mobilenow"><file name="banner.phtml" hash="81546a16660032427fe8f46ec3a67dca"/><file name="customhome.phtml" hash="d592d38abd8cb66c14e4e46477b3ecd7"/><file name="footercontent.phtml" hash="6982b28b6528ba6018d0ad946d7dfff2"/><file name="footerlinks.phtml" hash="0c3840156bfc6ec8caad5ee53be79f4f"/><file name="home.phtml" hash="7e3d914bfaccf6f81091ff475be15bb6"/><file name="nav.phtml" hash="3319a9968bc2ea258310c6ab3b9964b4"/><file name="prefootercontent.phtml" hash="60551dfc897a48d75bd8d378dc86cbae"/><file name="search-panel.phtml" hash="09d15cbb2f6440a3d4308e40e67059ca"/><file name="subheader.phtml" hash="931979aa4705d8d2063b36c0d7027080"/><file name="toplinks.phtml" hash="f704b6267b11fbdd187927552d1efc4c"/></dir><dir name="newsletter"><file name="subscribe.phtml" hash="b99ca408f5c6b3fcc850aef77169002c"/></dir><dir name="page"><file name="1column.phtml" hash="0cac040fdc9fc56aa4983d53d66857bb"/><file name="2columns-left.phtml" hash="8c247fc29b8bc2827c43c951b374274a"/><file name="2columns-right.phtml" hash="82aaac519a50af702061b02d3d0fd1ae"/><file name="3columns.phtml" hash="8b598043e06d220175aa0ce1940a02f2"/><dir name="html"><file name="breadcrumbs.phtml" hash="20b1157f9a6bb679e230142e69f0204b"/><file name="footer.phtml" hash="251818e69e5706a8415118d9b20374ae"/><file name="head.phtml" hash="19ec26d96b1b5f1b4f31d9225482af08"/><file name="header.phtml" hash="fcd8e8e28d2f0872444946ffca5fa776"/><file name="notices-foundation.phtml" hash="72d894d2814497a68bc70ff98186dcc4"/><file name="notices.phtml" hash="a0817b922010fe86a2c11d2b2af248e9"/><file name="pager.phtml" hash="fdab57d09fdcf3aea6c4e42196223279"/><file name="topmenu.phtml" hash="1d4663ab5f29ec2362a9aa2cf99201ac"/></dir><file name="mobilenow-home.phtml" hash="b0c26bb531826d5a9d99e61ea91c2e42"/><file name="print.phtml" hash="3bfa1d81a65bf8125956013e0d1a8244"/><dir name="switch"><file name="languages.phtml" hash="ff80f2f38f290926f78c6dd940137911"/><file name="stores.phtml" hash="17cc715b034711f18982fd15c7a49285"/></dir><dir name="template"><file name="links.phtml" hash="e9cab64dff800c1e8bb3655a9db3a923"/><file name="linksblock.phtml" hash="520f63a447dfe9d94ae00191fa5e6a2d"/></dir></dir><dir name="paypal"><dir name="partner"><file name="logo.phtml" hash="5687936f943087fcde91060596394097"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="4c78485ce7f916edbd3c90c3b9dff42d"/><file name="login.phtml" hash="99865a9efa62053554b313a8493d3c19"/></dir></dir><dir name="customer"><dir name="form"><file name="login.phtml" hash="88f9ecfc1cc35785108a446d50da2c9f"/><file name="register.phtml" hash="8c53b0aa232497ed680808be17b0c1da"/></dir></dir><file name="remember_me.phtml" hash="49971d7037f260ea813dda47c602d816"/><file name="remember_me_tooltip.phtml" hash="7f1904fa70e1cb1f7f41a70887e913dc"/></dir><dir name="poll"><file name="active.phtml" hash="be478edf7225097cbf92540fc3a08684"/><file name="result.phtml" hash="9f7ddf4ecfb4de4c62d17a031a6178e3"/></dir><dir name="reports"><file name="home_product_viewed.phtml" hash="539160dbd855cf9d75e1a8ab0687d0fa"/><file name="product_viewed.phtml" hash="f484a1603d4060851d1acea47394608f"/></dir><dir name="review"><dir name="customer"><file name="list.phtml" hash="12edc5524f4dc153c91b5df4ac4d879e"/><file name="view.phtml" hash="ab86b713c3f32878431ebafb76fd2e62"/></dir><file name="form.phtml" hash="25fb8d6c37fe523c5bd4e2f62a0f26ae"/><dir name="helper"><file name="summary.phtml" hash="698afedca9188fc0ca95cdacbcf6cbfe"/><file name="summary_short.phtml" hash="f21d9b71c755206c059885adb1f907fb"/></dir><dir name="product"><dir name="view"><file name="count.phtml" hash="073f247a61af63122c0313e102212c5d"/><file name="list.phtml" hash="cef9a9a9ba2616ffed9c7fc238f447c5"/><file name="other.phtml" hash="b5891324f64bb56d2539a2f25afda646"/></dir></dir></dir><dir name="sales"><dir name="order"><file name="history.phtml" hash="28affbdaa2815c472c9b230ae92f8467"/><dir name="info"><file name="buttons.phtml" hash="d4c05e7813c6013b180f3735b7c6d6fc"/></dir><file name="info.phtml" hash="2a9f46c911c991675c3645f0508f305f"/><dir name="items"><dir name="renderer"><file name="default.phtml" hash="5ec4f885fe61920552eb73ae15c0425d"/></dir></dir><file name="items.phtml" hash="e0f13cda187275e39086d64b9e92f0a1"/><file name="print.phtml" hash="aaaad347b6d8926a058811c7dacd4b7f"/><file name="recent.phtml" hash="dbb0dd4c87d88f9b23aee49e5be12eae"/></dir><dir name="reorder"><file name="sidebar.phtml" hash="93477ad8b4e949f8f597552ecae42f38"/></dir></dir><dir name="sendfriend"><file name="send.phtml" hash="47aac2a92090899c4eecb944294ded7c"/></dir><dir name="tag"><dir name="customer"><file name="view.phtml" hash="605d21a7d028ba8c92847e8db411b974"/></dir><file name="list.phtml" hash="5e98728a3115e1741d81cfb3313a2c93"/><file name="popular.phtml" hash="265a601c0b78b9db4de9eaeb33f1dfb9"/></dir><dir name="wishlist"><dir name="button"><file name="share.phtml" hash="bb04a78bef083b270bd0835ed9a656dd"/><file name="tocart.phtml" hash="7ab67b12b219f1c7288c055b5b7938c5"/><file name="update.phtml" hash="8bc084521545fe1c5604ea6c40b87a9b"/></dir><dir name="email"><file name="items.phtml" hash="dfd15c562df1ad10a03c7d9f445b8ec2"/><file name="rss.phtml" hash="0093593ffc7f73507afe9dce8a94d04b"/></dir><dir name="item"><dir name="column"><file name="cart.phtml" hash="c84fa58c9c4fda78de1c064b9e073a27"/><file name="image.phtml" hash="c19644c206bc3a94b7913bffe458dfa0"/><file name="info.phtml" hash="601c06d57c55a3693dedf1db00cb71ae"/><file name="remove.phtml" hash="898dd33ceb80990c425c7357d7551633"/></dir><dir name="configure"><file name="addto.phtml" hash="9897e62a637904f305ca2fb1803bbf2c"/></dir><file name="list.phtml" hash="bbb2cab7073d546aa5e2fa5e3f1a403c"/></dir><file name="options_list.phtml" hash="e7444188a84136672d79b8130e533971"/><dir name="render"><dir name="item"><file name="price.phtml" hash="b42da15a8aa285317900d0c5cbc78e97"/><file name="price_msrp_item.phtml" hash="2b6303fd121b88763e2bb52ae19e9de4"/><file name="price_msrp_rss.phtml" hash="1e19860fbaf7a0e228ba41b5e7997312"/></dir></dir><file name="shared.phtml" hash="6b1a42c6a5a4fb06a6d1d58600abe135"/><file name="sharing.phtml" hash="afe05d80f0bcde8587ba8949f4f3054c"/><file name="sidebar.phtml" hash="d07fe0c9c689c1505bad38dd59f7d55d"/><file name="view.phtml" hash="9ed37127a4573cd6381dae43d3dc3067"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Redstage_Mobilenow.xml" hash="261ebb471ce5dfdbfb7b28b56070de88"/></dir></target><target name="magemedia"><dir name="mobilenow_theme_images"><dir name="banner"><file name="1380280298Banner.png" hash="96979abcecbcbbd3240e919ba63775b3"/><file name="1380513075Banner.jpg" hash="0971b44517979998a50aad7fdcd0b8db"/></dir><dir name="logo"><file name="1380512898Logo.png" hash="5f4ac03689c6de73efed1341f5c33205"/><file name="1381160198linkedinsucks.GIF" hash="4384521314aa8e3b06f041f4b7286d43"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><file name="colorbox.css" hash="ddc74840b3cc2c0f125e75629065148e"/><file name="jquery.minicolors.css" hash="a3821db4b961be731b247693454bef61"/><file name="mobilenow.css" hash="878efeffccc23200db5c104abe1cd7a2"/><dir name="tinybox"><dir name="images"><file name="preload.gif" hash="bf3ec68db23e93ba2ec795ef558e96da"/><file name="rhino.jpg" hash="d00bad1ec05584e10a5601ec103aff72"/></dir><file name="style.css" hash="e3016ee232fbf3c6f780255002703237"/></dir><dir name="ui-lightness"><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="a35688ab5bede84c00489b47585e117d"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="33eaf759961555bef11f3d900981fff3"/><file name="ui-bg_flat_10_000000_40x100.png" hash="02e49d05999f58c792d3a33d8a0d6244"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="12850c5d5830759defc36ae95d0e5629"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="45ef58a9c6a09766fcf99eee81aba3f0"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e8603b1d79987a87f0b3c782fae84aa5"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="95a5bd9cb71fb12308a57693e2c810c8"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="0e921a9cc19db22e30bef8b3f2653301"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="65dbba54e21b060adeef6a9131326e1a"/><file name="ui-icons_222222_256x240.png" hash="a1b3887a86cf1791f23c0b53b4d3585f"/><file name="ui-icons_228ef1_256x240.png" hash="73044fed6bab2c5ed02eed93b7d3adaa"/><file name="ui-icons_ef8c08_256x240.png" hash="1eec256e4f7b8324e619aae36ecfbfbd"/><file name="ui-icons_ffd27a_256x240.png" hash="c1a79bd65be08aa2be391cba2321f448"/><file name="ui-icons_ffffff_256x240.png" hash="e3f4748b19b87aadaa924d85f0882432"/></dir><file name="jquery-ui-1.10.3.custom.css" hash="c9998cc5e061febc45c39e74a7fe0236"/><file name="jquery-ui-1.10.3.custom.min.css" hash="d74333a611b0ae92b8978e2f7d051be1"/></dir></dir><dir name="js"><file name="ajaxupload.js" hash="666014b57c265cc76e9c436df8002e7b"/><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="jquery-ui-1.10.3.custom.js" hash="e3a616c5218ad6d081265b6a21557ab0"/><file name="jquery.colorbox.js" hash="fe41e1c7af0b9ba48070d381364ed55d"/><file name="jquery.minicolors.js" hash="5208b0391967595272f987cb1c1072cf"/><file name="mobilenow.js" hash="bff947ca5c53bfd9e9491c04b2d836d2"/></dir><dir name="mobilenow_images"><dir name="colorbox"><file name="border.png" hash="7ca8a1d2eb0763b35c266cd54bee2fa5"/><file name="controls.png" hash="b68b9ecaae424de4862ba0d055b7a560"/><file name="loading.gif" hash="e6611f867d63754b7a2a974fb0a0e7dc"/><file name="loading_background.png" hash="acf427e932fb9413700a4b8b58b41eec"/><file name="overlay.png" hash="790376e15a036959e358a19d4a7ea437"/></dir><file name="edit1.png" hash="b1d05a23e856efbbd8320fbca0f2221f"/><file name="gif-load.gif" hash="0bcf372439bea0d638d4def641d35493"/><file name="iphone-bottom.png" hash="0fa1f29bc9026690fede6496ca9d8ee4"/><file name="iphone-repeat.png" hash="38ebe675403c712569e736f66acc84d1"/><file name="iphone-top.png" hash="23fd425c00febceedb98de962a28d5ff"/><file name="jquery.minicolors.png" hash="d36c75e3d8880ebfece375fd7cd46787"/><file name="mob-bottom.png" hash="f48294731ebd5ebcb3b152fec46d19f5"/><file name="mob-repeat.png" hash="4d73fa33c9a92800e3e929023a40214b"/><file name="mob-top.png" hash="ff80c1299590f809e22997ce5b79651b"/></dir></dir></dir></dir><dir name="frontend"><dir name="redstage-mobilenow"><dir name="default"><file name="apple-touch-icon-114x114-precomposed.png" hash="083790f44256d2d6ca86c3527e43e15f"/><file name="apple-touch-icon-144x144-precomposed.png" hash="dbd829aa83b4acf4bd1f098e233b96f2"/><file name="apple-touch-icon-72x72-precomposed.png" hash="7a41d02cad54d708cb6c432bd8590403"/><file name="apple-touch-icon-precomposed.png" hash="908e66a61c647e7e4a588a2bcde931f6"/><dir name="css"><file name="foundation-icons.css" hash="21c9ff1060ba7a125593c90713ebb4ec"/><file name="foundation.css" hash="67f48027469e724fd1b394199931257d"/><file name="foundation.min.css" hash="8d8c81f4feaf1ab5225d82a4741fa9ad"/><file name="mobile-menu.css" hash="f0ab8e6c5e3c984e759e3762e34f5329"/><file name="normalize.css" hash="169cc7528b867412fb95e9b2ce24fcad"/><file name="onepage.css" hash="90be2a62d2f1463accf717293b86e31f"/><file name="styles.css" hash="377b5370463e3ad5a5fa48e60000e2ea"/><file name="theme_typo.css" hash="d775cdbdef3b7005621c572f4bf6f696"/></dir><file name="favicon.ico" hash="60eb606bd4be156f4abd07fb72bc7fca"/><dir name="fonts"><dir name="foundicons"><file name="general_foundicons.eot" hash="30cbc11e1758409c649f6f60d151ffc5"/><file name="general_foundicons.svg" hash="ed793904f862c8540f283701fbcb48f5"/><file name="general_foundicons.ttf" hash="9d3ad610c24f0147996f34a9a166990c"/><file name="general_foundicons.woff" hash="460c4e8a696b6bd52092ddc1dd6f0cbb"/></dir><dir name="open-sans"><file name="Apache License Version 2.txt" hash="985c4f1ae60c5b6aa1199efaaac7866c"/><file name="OpenSans-Bold-webfont.eot" hash="8bb31d277e63b3d03253dd5060c74e93"/><file name="OpenSans-Bold-webfont.svg" hash="60dd36ad104cd1bc313649e160bac2d0"/><file name="OpenSans-Bold-webfont.ttf" hash="bf0b1c035c98563b62c8e427d1ec0926"/><file name="OpenSans-Bold-webfont.woff" hash="6a13b444647bac755a03da311b0633e2"/><file name="OpenSans-BoldItalic-webfont.eot" hash="b1e7a7fe558b4779de564315542fb77b"/><file name="OpenSans-BoldItalic-webfont.svg" hash="8126c8d49eb56d40827e8582eaf9c9c0"/><file name="OpenSans-BoldItalic-webfont.ttf" hash="66fdd3525c4c27423adfd6ac8d714df6"/><file name="OpenSans-BoldItalic-webfont.woff" hash="a4c81bc2a28f919c7e4d2f1bc158248f"/><file name="OpenSans-ExtraBold-webfont.eot" hash="5e6700afd202d11e9eeca390c36343d5"/><file name="OpenSans-ExtraBold-webfont.svg" hash="f2a71cae291e34916f08d8de390816f4"/><file name="OpenSans-ExtraBold-webfont.ttf" hash="af9fa762d424c54361961aa2b0c9a737"/><file name="OpenSans-ExtraBold-webfont.woff" hash="7aed1514212261a5132bfd2d2252f7d1"/><file name="OpenSans-ExtraBoldItalic-webfont.eot" hash="a09466fb61abf3618c652729de80086c"/><file name="OpenSans-ExtraBoldItalic-webfont.svg" hash="7becb6477dca98605faafdd58a862b6b"/><file name="OpenSans-ExtraBoldItalic-webfont.ttf" hash="74e0935e2e283ca9058e9f4ad2300b1b"/><file name="OpenSans-ExtraBoldItalic-webfont.woff" hash="f4f8432cf209fc986dca5cab0c8f66c4"/><file name="OpenSans-Italic-webfont.eot" hash="9487423dc35bf8a541354926e95e7598"/><file name="OpenSans-Italic-webfont.svg" hash="06443f4a9a2058aa97bacb89d3782949"/><file name="OpenSans-Italic-webfont.ttf" hash="346b43cf85bdc059069d1a83d308a034"/><file name="OpenSans-Italic-webfont.woff" hash="c0de58fc662222308ea9a1e43031c415"/><file name="OpenSans-Light-webfont.eot" hash="d8c8f250a3f80e108527810bac6e90b9"/><file name="OpenSans-Light-webfont.svg" hash="e11350590f6e6a88adb921c1beac102c"/><file name="OpenSans-Light-webfont.ttf" hash="d5f64f5341b899c7afc3db4a69ab3ad7"/><file name="OpenSans-Light-webfont.woff" hash="f041706894c4d5aef91828c00d7856d8"/><file name="OpenSans-LightItalic-webfont.eot" hash="275022abeba8785ed7515073e10f727d"/><file name="OpenSans-LightItalic-webfont.svg" hash="0f1a8a60fa5a42384fcc8cbeb1493f08"/><file name="OpenSans-LightItalic-webfont.ttf" hash="32ff136e3334ad94e419ca5f8a32207e"/><file name="OpenSans-LightItalic-webfont.woff" hash="284d59505a4a338cee47ddb43a9ab804"/><file name="OpenSans-Regular-webfont.eot" hash="33ec9bca49d30244ff5e1bae261afd36"/><file name="OpenSans-Regular-webfont.svg" hash="0f44342686ffb7af7769ac4be3aadf9e"/><file name="OpenSans-Regular-webfont.ttf" hash="cb95bc691478b7f108a1127710c1aa4a"/><file name="OpenSans-Regular-webfont.woff" hash="467063b18b4823e9fc4f645b6a0b19ee"/><file name="OpenSans-Semibold-webfont.eot" hash="d543421f6d099c83a80f2920c6718645"/><file name="OpenSans-Semibold-webfont.svg" hash="7fd345f1a73f91f9852a4ded5ce8ea60"/><file name="OpenSans-Semibold-webfont.ttf" hash="80744a049a00b14a200ab18d3ca0c8d6"/><file name="OpenSans-Semibold-webfont.woff" hash="8e80acc061be9580f1c03bed43855e27"/><file name="OpenSans-SemiboldItalic-webfont.eot" hash="0c11aa7743c800d477f3915d5fe876fd"/><file name="OpenSans-SemiboldItalic-webfont.svg" hash="4fef645c53707d797d950c8196b78db5"/><file name="OpenSans-SemiboldItalic-webfont.ttf" hash="b588434fea16ace9e482c8759d19c417"/><file name="OpenSans-SemiboldItalic-webfont.woff" hash="17ef4a7b749a2896f32fb7842f2dff0d"/><file name="demo.html" hash="7d97b8b616d64512f1bfda74fe684a20"/><file name="stylesheet.css" hash="ccd5010fcfeb738c633e36a03e8fa187"/></dir></dir><file name="homepage-content.html" hash="b79649d10f9f6e6c8385b0c53fc3f76a"/><dir name="images"><file name="Remove-icon.png" hash="9e13126ed7963951bad6104395597208"/><file name="best_selling_tr_even_bg.gif" hash="5022d648379090e306f00cd64738b146"/><file name="best_selling_tr_odd_bg.gif" hash="926622704f53796801bb5d097e116c8e"/><file name="bkg_block-layered-dd.gif" hash="6ae6f8184e87de496fb74eeec65737c9"/><file name="bkg_block-layered-li.gif" hash="753ebb76a4fc2b5b6915c536fcf4d487"/><file name="bkg_pipe1.gif" hash="7852290f6a443000ead96b8cec5cd7c7"/><file name="bkg_pipe2.gif" hash="7da64eefaf4da3855ab6ee76dbced0c2"/><file name="bkg_pipe3.gif" hash="11bfac1e590f0c77fb12f37d7f05cd3c"/><file name="bkg_rating.gif" hash="0a8777c815350ddf1e316a537ad0c335"/><file name="fb.png" hash="e96d2c8fdddf58186e2c03deaeb4a3f1"/><file name="google.png" hash="036c0e405c1174f155f53e7dceaa7a88"/><file name="i_availability_only.gif" hash="bca1f00a50864171ad98317b778e869c"/><file name="i_availability_only_arrow.gif" hash="0cf32b72fefc94b89b74e4f3f02c2e93"/><file name="i_block-currency.gif" hash="643024bcae5ece554fdbbc041aeb297c"/><file name="i_block-list.gif" hash="fe8424127ecbe4b0d893bcf6f253dc1a"/><file name="i_block-related.gif" hash="4e277173b6372b1a90b0f19e0388ad54"/><file name="i_block-subscribe.gif" hash="9e5fee06a543742045118a95f2debcb8"/><file name="i_block-viewed.gif" hash="67d1255c2c3e9ed1a5c845f8d4e4a3ba"/><file name="i_discount.gif" hash="908d44da90de5e54185764d093bbdb77"/><file name="i_ma-reviews.gif" hash="859c97695ec396c0b284a0c3c7c416ad"/><file name="i_notice.gif" hash="ebd56dc80b8346e10e93628bc0e6c372"/><file name="i_page1.gif" hash="704f7d4eccbdf9cabbad7770f18856ff"/><file name="i_page2.gif" hash="57a04ca584e05e28dc94c7e68f0af62e"/><file name="i_pager-next.gif" hash="ed4d6640624c2b6edeab4c212314bd6d"/><file name="i_pager-prev.gif" hash="75973b020105dccbaf34e49d7852552d"/><file name="i_search_criteria.gif" hash="cf67b9cc5c311ae3f99e68cd29ae17be"/><file name="i_shipping.gif" hash="91a0d2cc2eb2391f90ec8a75c04b3183"/><file name="i_tier.gif" hash="c5189e25afeb7c1a8c4902a42832593e"/><file name="i_type_grid.gif" hash="a1e5d8ac36fb2891ea16e729b95c552c"/><file name="i_type_list.gif" hash="61333d383ec142b8d270abe77324aa5d"/><file name="logo.gif" hash="0a463ac461c50fcb77cab4af34e50dbf"/><file name="logo.png" hash="aa5376107e1ac23a9ad03ef066158dd3"/><file name="logo_email.gif" hash="40677892108da4c1645a91f7467e5670"/><file name="logo_print.gif" hash="40677892108da4c1645a91f7467e5670"/><file name="logo_white.gif" hash="c6ddab800dc4a7a7d6c7aa9625c3148b"/><file name="magnifier_handle.gif" hash="238fbdd7959f517db11c6f57ee4daaf4"/><file name="opc-ajax-loader.gif" hash="3eb92a9317c81f5a7d67e8534f1d6ff9"/><file name="pager_arrow_left.gif" hash="f6b249c9a25eb71255817f79cd0af2db"/><file name="pager_arrow_right.gif" hash="8551cb2b4a775a8cfb27f84b5b244e97"/><file name="printrest.png" hash="baaafa1b2d9994fec51483565aeaef52"/><file name="slider_bg.gif" hash="1b778e75d48b555de1b9d0654a0d43c2"/><file name="slider_btn_zoom_in.gif" hash="ef0fc67f77f30827ee67f4e744b60781"/><file name="slider_btn_zoom_out.gif" hash="68b3d1c28dc5aec4f6b64d70a6996b6f"/><file name="tw.png" hash="b9c514075cd17c8123120ce114f1008c"/><file name="white-arrows.png" hash="34f2b2668a7f47b3830a7442d4f498eb"/></dir><dir name="js"><dir name="foundation"><file name="foundation.abide.js" hash="cf09f796796fa20d8dbe3819620ae303"/><file name="foundation.alerts.js" hash="4c44a00aa15fcff3b5b98f478d61a574"/><file name="foundation.clearing.js" hash="ced83c658ee3bee6467f03ea0f18f1bc"/><file name="foundation.cookie.js" hash="1b2cfc4c1a03f70cd4e4a8e0b1588454"/><file name="foundation.dropdown.js" hash="03564f4b10e8abc379b1849ba4fba07c"/><file name="foundation.forms.js" hash="90452fe2e3a9b6d42af33c74d06fa946"/><file name="foundation.interchange.js" hash="13890831749664a64e32e0ea871dd8a1"/><file name="foundation.joyride.js" hash="b5fdae491e0247f2757060942eb6c33e"/><file name="foundation.js" hash="bb040a76f83d9e832ecdf3c6a1adee3b"/><file name="foundation.magellan.js" hash="47c3ad8e74ec460df95b8a0a67fc3021"/><file name="foundation.orbit.js" hash="357b1ebf0f110e6055b026c8a15c0b87"/><file name="foundation.placeholder.js" hash="7a207cba3b5ce05cf21cb77833baa302"/><file name="foundation.reveal.js" hash="f1b451c369adb5cb0ae848df245f8c34"/><file name="foundation.section.js" hash="9873045d51b37dcb08d220d0ea768f60"/><file name="foundation.tooltips.js" hash="25ac421513f9ca787f275fa18e166b94"/><file name="foundation.topbar.js" hash="0ac7dbd87ec7afb5af335c614b6bbdb6"/><file name="index.js" hash="ac827ebf2a2dc60b48be923551dcf003"/><file name="jquery-1.8.1.min.js" hash="c4b0df15af5b1cd4d765d16dda0f5075"/></dir><file name="foundation.min.js" hash="1356fc9e00cc7e10261d0d2222f6e7e8"/><file name="mobile-menu.js" hash="5778ee5bd5708a4156724fb877cfdb46"/><dir name="vendor"><file name="custom.modernizr.js" hash="9f855c3ee731604cad22f5ee7047033f"/><file name="jquery.js" hash="90949fe3c2c71060590bbc8f1df1c390"/><file name="zepto.js" hash="b4fd5d944a831a4b5cacd68b1346734e"/></dir></dir><dir name="scss"><dir name="foundation"><file name="_variables.scss" hash="a74e49c253d16a8fdf185a343a2da6f1"/><dir name="components"><file name="_alert-boxes.scss" hash="f5e44d0d7d3b0c4684303373ed942dda"/><file name="_block-grid.scss" hash="32c084d41fbed99e03acf74d80a6470d"/><file name="_breadcrumbs.scss" hash="20311e104ce1e837fd8c78646875cb48"/><file name="_button-groups.scss" hash="d763df8be14d751529ad8c73225be20c"/><file name="_buttons.scss" hash="ce42dd89b74a7b8c231d788de374b31d"/><file name="_clearing.scss" hash="f5c292573252db3587d5744350fc95a2"/><file name="_custom-forms.scss" hash="9b4aa0d05ec481c3cc6bd9d6e38d94ae"/><file name="_dropdown-buttons.scss" hash="b1ebd261c287612d96fe14722e83b754"/><file name="_dropdown.scss" hash="8fff5d76b8978281cb233e029796ce06"/><file name="_flex-video.scss" hash="11d275efd68ec7982461d74742905908"/><file name="_forms.scss" hash="1cd925310c97e3d4d94b12eaacb14ec1"/><file name="_global.scss" hash="95aaaa2f9f9f0563dcdd51287fedf23f"/><file name="_grid-5.scss" hash="5156f5487221e32979fc7997e9acab16"/><file name="_grid.scss" hash="2618c655e424243e713df35eb31dcca5"/><file name="_inline-lists.scss" hash="c1a5e2ded2ea1bceb79e818c85759b4c"/><file name="_joyride.scss" hash="ae97d83b1bec4f976ee4c6bd33bb3460"/><file name="_keystrokes.scss" hash="acca1d2cba45c480967472297ff14441"/><file name="_labels.scss" hash="1179d6f3b5b7b2e26f48d9aa8946ce14"/><file name="_magellan.scss" hash="8a3783ece5e5c76b37ecaef3f8518508"/><file name="_orbit.scss" hash="e8b9eee10ecaba1293358c5c46df54a8"/><file name="_pagination.scss" hash="34d4a1ea5cd3e13611a82d5c53cb325d"/><file name="_panels.scss" hash="2d9eb6653e951222d4d79ede6f74054a"/><file name="_pricing-tables.scss" hash="f3bd5579cda0b08bef78db437c7fa4d6"/><file name="_progress-bars.scss" hash="39198b2f41b1aafd93389ee51d880572"/><file name="_reveal.scss" hash="a57d6060ba6b1d2e91e397ee9f979978"/><file name="_section.scss" hash="4bb55097de1d8259d9d6ca7664c018b2"/><file name="_side-nav.scss" hash="f74de78e2f8dee5defebc8da51a9e7bf"/><file name="_split-buttons.scss" hash="2d2b6222b95be888950f32c6d36b3688"/><file name="_sub-nav.scss" hash="e7863aab38dc327185cd02d8da91f1b9"/><file name="_switch.scss" hash="ee6ab621cfcaa846a7b79cc5c9b2e9aa"/><file name="_tables.scss" hash="2b2ab54ad41d181f647c7128b92101c9"/><file name="_thumbs.scss" hash="edb4e8b71c7e64805d039c9e4d978396"/><file name="_tooltips.scss" hash="4f4e1e404bcbe322a8e228db0d7657d6"/><file name="_top-bar.scss" hash="d79732b90d422551cfc8c682a7628560"/><file name="_type.scss" hash="df099820ee16262cbad2ac489aa67aaf"/><file name="_visibility.scss" hash="66ce0c32dbf99f21bee4c702eddc6678"/></dir></dir><file name="foundation.scss" hash="1cbf68cc733c7b6be30b589661ff623b"/><file name="mobile-menu.scss" hash="b87c6bfa27209d6b4786931f991a4054"/><file name="normalize.scss" hash="441feb5cc4d45e49f6fd4016f511baa1"/><file name="styles.scss" hash="1b104bc3fdcf5db09bbddc44e52ad8ea"/><file name="theme_typo.scss" hash="56472cd3d631e02c5e415a59e41a96ab"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.2.13</min><max>5.4.0</max></php><package><name>Mage_Core_Modules</name><channel>Community</channel><min>1.6.0.0</min><max>1.8</max></package></required></dependencies>
18
  </package>
skin/adminhtml/default/default/css/mobilenow.css CHANGED
@@ -3,7 +3,7 @@
3
  .edit_link_grid{margin:0px 0px 0px 15px;}
4
  .grid_edit_link_text{color:#2C3539;}
5
  .grid_link{color: #2C3539}
6
- #tabs,#layout_tabs{float:left; padding: 0 0 0 20px; width: 570px;}
7
  #mobilenow_tabs_design_content .fieldset, .insideborder .fieldset {float: left; width: 99%}
8
  #mobilenow_tabs_design_content .entry-edit .fieldset, #mobilenow_tabs_theme_layouts_content .entry-edit .fieldset{padding:10px 0}
9
  #preset_sub_settings{width: 150px}
@@ -12,6 +12,18 @@
12
  .columns .preset_subsettings .form-list td.value {width: 114px}
13
  .preset_subsettings .form-list tr{float: left}
14
  .preset_subsettings{background-color: #eeeeee}
 
 
 
 
 
 
 
 
 
 
 
 
15
  #mobilenow_tabs_design_content .ui-widget-content {background-color: #ffffff}
16
  #mobilenow_tabs_design_content .hor-scroll{overflow:visible}
17
  #general_homepage .form-list td.label {width: 120px}
@@ -118,4 +130,11 @@ label[for=gridlines_color],#gridlines_color, #note_catalog_image_width,#banner_p
118
  a.link-color{color:#1700FF !important;}
119
  select{visibility: visible !important;}
120
  #mobilenow_tabs_design_content input[type='file'] {width: 90px; overflow:hidden;}
121
-
 
 
 
 
 
 
 
3
  .edit_link_grid{margin:0px 0px 0px 15px;}
4
  .grid_edit_link_text{color:#2C3539;}
5
  .grid_link{color: #2C3539}
6
+ #tabs,#tabs_form,#layout_tabs{float:left; padding: 0 0 0 20px; width: 570px;}
7
  #mobilenow_tabs_design_content .fieldset, .insideborder .fieldset {float: left; width: 99%}
8
  #mobilenow_tabs_design_content .entry-edit .fieldset, #mobilenow_tabs_theme_layouts_content .entry-edit .fieldset{padding:10px 0}
9
  #preset_sub_settings{width: 150px}
12
  .columns .preset_subsettings .form-list td.value {width: 114px}
13
  .preset_subsettings .form-list tr{float: left}
14
  .preset_subsettings{background-color: #eeeeee}
15
+ #mobile_settings{width: 150px}
16
+ .mobile_settings .form-list td.label label {display: block;padding-right: 15px; padding-top: 1px; width: 120px;}
17
+ .mobile_settings .form-list td.label{width: 120px}
18
+ #mobilenow_form_advanced{display:none;}
19
+ .custom_tabs{ background: none repeat scroll 0 0 #FFFFFF!important;
20
+ border: 0px solid #FFFFFF!important;
21
+ }
22
+ #custom_tabs{ margin-bottom:0px!important;padding: 10px 0 0 3px!important;}
23
+ .general_basic{float:right!important;}
24
+ .columns .mobile_settings .form-list td.value {width: 114px}
25
+ .mobile_settings .form-list tr{}
26
+ .mobile_settings{background-color: #eeeeee}
27
  #mobilenow_tabs_design_content .ui-widget-content {background-color: #ffffff}
28
  #mobilenow_tabs_design_content .hor-scroll{overflow:visible}
29
  #general_homepage .form-list td.label {width: 120px}
130
  a.link-color{color:#1700FF !important;}
131
  select{visibility: visible !important;}
132
  #mobilenow_tabs_design_content input[type='file'] {width: 90px; overflow:hidden;}
133
+ .advanced-edit-head{
134
+ background: none repeat scroll 0 0 #EB8F00!important;
135
+ margin: 10px;
136
+ }
137
+ .mobile-theme-tabs{ margin: 10px; }
138
+ .mobile-theme-tab{ padding-left: 20px; }
139
+ .preset_subsettings { position: relative; }
140
+ .overlay { width: 552px; top: 0px; position: absolute; opacity: 0.5; height: 120px; background-color: grey }
skin/adminhtml/default/default/css/tinybox/images/preload.gif ADDED
Binary file
skin/adminhtml/default/default/css/tinybox/images/rhino.jpg ADDED
Binary file
skin/adminhtml/default/default/css/tinybox/style.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ body {height:100%; margin:0px; padding:0}
2
+
3
+ #tinybox {position:absolute; display:none; padding:10px; background:#fff url(images/preload.gif) no-repeat 50% 50%; border:10px solid #e3e3e3; z-index:2000}
4
+ #tinymask {position:absolute; display:none; top:0; left:0; height:100%; width:100%; background:#000; z-index:1500}
5
+ #tinycontent {background:#fff}
6
+
7
+ .button {margin-bottom:10px; padding:8px 10px 9px; border:1px solid #ccc; background:#eee; cursor:pointer}
8
+ .button:hover {border:1px solid #bbb; background:#e3e3e3}
skin/adminhtml/default/default/css/ui-lightness/jquery-ui-1.10.3.custom.css CHANGED
@@ -124,9 +124,10 @@
124
  }
125
  .ui-tabs .ui-tabs-panel {
126
  display: block;
127
- border-width: 0;
128
  padding: 1em 1.4em;
129
  background: none;
 
130
  }
131
 
132
  /* Component containers
124
  }
125
  .ui-tabs .ui-tabs-panel {
126
  display: block;
127
+ border-width: 1;
128
  padding: 1em 1.4em;
129
  background: none;
130
+ border-color: #EB8F00;
131
  }
132
 
133
  /* Component containers
skin/adminhtml/default/default/js/mobilenow.js CHANGED
@@ -49,14 +49,15 @@ $j(document).ready(function()
49
  });
50
  /////////////////////////////////Check for mobilenow account settings///////////////////////////
51
  var currentPageUrl=window.location.pathname;
52
- $j('#row_mobilenowsettings_mobilenowaccount_subscription').hide();
 
53
  var checkForString=currentPageUrl.indexOf("section/mobilenowsettings");
54
  if(checkForString != -1){
55
  if($j('#mobilenowsettings_mobilenowaccount_subscription').val()){
56
  var enodedSubscriptionVal=$j.parseJSON($j('#mobilenowsettings_mobilenowaccount_subscription').val());
57
  if(enodedSubscriptionVal.subscritionStatus=='active')
58
  {
59
- if(enodedSubscriptionVal.productId==2 || enodedSubscriptionVal.productId==5)
60
  {
61
  $j('#current_membership_level #current_membership_level_text_row .value').html('<p><strong>FREE - </strong><a href="https://mobilenowapp.com/am/login/index" title="Click here to upgrade your account">Click here to upgrade your account</a></p>');
62
  }
@@ -376,11 +377,16 @@ function deleteSubsetting(url)
376
  }
377
  function preloadSubsettings(url)
378
  {
379
- var final_url=url+'load_id/'+$j("#preset_sub_settings").val();
 
 
 
 
 
 
380
  final_url = _setCommonArguments(final_url);
381
  window.location.href = final_url;
382
  }
383
-
384
  function resetToDefault(url)
385
  {
386
  var final_url=url+'reset_id/1';
@@ -529,9 +535,10 @@ function connectWithMobilenow(url)
529
  }
530
  else
531
  {
532
- $j('#connect_error').html('<ul class="messages"><li class="success-msg"><ul><li><span>You are connected with your mobileNow account.</span></li></ul></li></ul>');
 
533
  }
534
- if(msg.subscriptions[2] || msg.subscriptions[5])//Free membership for 30 days
535
  {
536
  $j('#current_membership_level #current_membership_level_text_row .value').html('<p><strong>FREE - </strong><a href="https://mobilenowapp.com/am/login/index" title="Click here to upgrade your account">Click here to upgrade your account</a></p>');
537
  }
@@ -540,6 +547,7 @@ function connectWithMobilenow(url)
540
  $j('#current_membership_level #current_membership_level_text_row .value').html('<p><strong>Active | Paid | Level 1 - </strong><a href="https://mobilenowapp.com/am/login/index" title="Click here to upgrade your account">Click here to upgrade your account</a></p>');
541
  }
542
  toUpdatedAccountDetails(email,username);
 
543
  }
544
  else
545
  {
@@ -604,7 +612,7 @@ function refreshMobilenowfn()
604
  {
605
  $j('#connect_error').html('<ul class="messages"><li class="success-msg"><ul><li><span>Your account settings is refreshed.</span></li></ul></li></ul>');
606
  }
607
- if(msg.subscriptions[2] || msg.subscriptions[5])//Free membership for 30 days
608
  {
609
  $j('#current_membership_level #current_membership_level_text_row .value').html('<p><strong>FREE - </strong><a href="http://mobilenowapp.com" title="Click here to upgrade your account">Click here to upgrade your account</a></p>');
610
  }
@@ -626,7 +634,7 @@ function refreshMobilenowfn()
626
  function homeFrame(getID,frameURL)
627
  {
628
  Element.show('loading-mask');
629
- $j("#"+getID).attr("src", home_url);
630
 
631
  $j("#"+getID).load(function() {
632
  Element.hide('loading-mask');
@@ -637,7 +645,7 @@ function homeFrame(getID,frameURL)
637
  function categoryFrame(getID,frameURL)
638
  {
639
  Element.show('loading-mask');
640
- $j("#"+getID).attr("src", catalog_url);
641
  $j("#"+getID).load(function() {
642
  Element.hide('loading-mask');
643
  });
@@ -648,7 +656,7 @@ function categoryFrame(getID,frameURL)
648
  function productFrame(getID,frameURL)
649
  {
650
  Element.show('loading-mask');
651
- $j("#"+getID).attr("src", product_url);
652
  $j("#"+getID).load(function() {
653
  Element.hide('loading-mask');
654
  });
@@ -676,9 +684,8 @@ function updatePreview(theme_id,frame_id){
676
  window.location.reload(true);
677
  }},
678
  success: function(msg)
679
- {
680
  qstring = get_query($j("#"+frame_id).attr("src"));
681
- // console.log(qstring,'qstring',qstring.preview)
682
  if(qstring.preview!=1){
683
  home_url = home_url+'&preview=1';
684
  catalog_url = catalog_url+'&preview=1';
49
  });
50
  /////////////////////////////////Check for mobilenow account settings///////////////////////////
51
  var currentPageUrl=window.location.pathname;
52
+ $j('#row_mobilenowsettings_mobilenowaccount_subscription').hide();
53
+ $j('#row_mobilenowsettings_mobilenowaccount_accountstatus').hide();
54
  var checkForString=currentPageUrl.indexOf("section/mobilenowsettings");
55
  if(checkForString != -1){
56
  if($j('#mobilenowsettings_mobilenowaccount_subscription').val()){
57
  var enodedSubscriptionVal=$j.parseJSON($j('#mobilenowsettings_mobilenowaccount_subscription').val());
58
  if(enodedSubscriptionVal.subscritionStatus=='active')
59
  {
60
+ if(enodedSubscriptionVal.productId==2 || enodedSubscriptionVal.productId==5 || enodedSubscriptionVal.productId==7)
61
  {
62
  $j('#current_membership_level #current_membership_level_text_row .value').html('<p><strong>FREE - </strong><a href="https://mobilenowapp.com/am/login/index" title="Click here to upgrade your account">Click here to upgrade your account</a></p>');
63
  }
377
  }
378
  function preloadSubsettings(url)
379
  {
380
+ var final_url=url+'load_id/'+$j("#preset_sub_settings").val();
381
+ final_url = _setCommonArguments(final_url);
382
+ window.location.href = final_url;
383
+ }
384
+ function preloadThemeSubsettings(url)
385
+ {
386
+ var final_url=url+'load_id/'+$j("#template_preset_id").val();
387
  final_url = _setCommonArguments(final_url);
388
  window.location.href = final_url;
389
  }
 
390
  function resetToDefault(url)
391
  {
392
  var final_url=url+'reset_id/1';
535
  }
536
  else
537
  {
538
+ Element.hide('messages');
539
+ //$j('#connect_error').html('<ul class="messages"><li class="success-msg"><ul><li><span>You are connected with your mobileNow account.</span></li></ul></li></ul>');
540
  }
541
+ if(msg.subscriptions[2] || msg.subscriptions[5] || msg.subscriptions[7])//Free membership for 30 days
542
  {
543
  $j('#current_membership_level #current_membership_level_text_row .value').html('<p><strong>FREE - </strong><a href="https://mobilenowapp.com/am/login/index" title="Click here to upgrade your account">Click here to upgrade your account</a></p>');
544
  }
547
  $j('#current_membership_level #current_membership_level_text_row .value').html('<p><strong>Active | Paid | Level 1 - </strong><a href="https://mobilenowapp.com/am/login/index" title="Click here to upgrade your account">Click here to upgrade your account</a></p>');
548
  }
549
  toUpdatedAccountDetails(email,username);
550
+ location.reload();
551
  }
552
  else
553
  {
612
  {
613
  $j('#connect_error').html('<ul class="messages"><li class="success-msg"><ul><li><span>Your account settings is refreshed.</span></li></ul></li></ul>');
614
  }
615
+ if(msg.subscriptions[2] || msg.subscriptions[5] || msg.subscriptions[7])//Free membership for 30 days
616
  {
617
  $j('#current_membership_level #current_membership_level_text_row .value').html('<p><strong>FREE - </strong><a href="http://mobilenowapp.com" title="Click here to upgrade your account">Click here to upgrade your account</a></p>');
618
  }
634
  function homeFrame(getID,frameURL)
635
  {
636
  Element.show('loading-mask');
637
+ $j("#"+getID).attr("src", frameURL);
638
 
639
  $j("#"+getID).load(function() {
640
  Element.hide('loading-mask');
645
  function categoryFrame(getID,frameURL)
646
  {
647
  Element.show('loading-mask');
648
+ $j("#"+getID).attr("src", frameURL);
649
  $j("#"+getID).load(function() {
650
  Element.hide('loading-mask');
651
  });
656
  function productFrame(getID,frameURL)
657
  {
658
  Element.show('loading-mask');
659
+ $j("#"+getID).attr("src", frameURL);
660
  $j("#"+getID).load(function() {
661
  Element.hide('loading-mask');
662
  });
684
  window.location.reload(true);
685
  }},
686
  success: function(msg)
687
+ {
688
  qstring = get_query($j("#"+frame_id).attr("src"));
 
689
  if(qstring.preview!=1){
690
  home_url = home_url+'&preview=1';
691
  catalog_url = catalog_url+'&preview=1';
skin/adminhtml/default/default/mobilenow_images/gif-load.gif ADDED
Binary file