mobilenow - Version 1.0.1.5

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.5
Comparing to
See all releases


Code changes from version 1.0.1.2 to 1.0.1.5

Files changed (90) hide show
  1. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow.php +15 -15
  2. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit.php +47 -47
  3. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Form.php +17 -17
  4. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Bannerimagedisplay.php +22 -22
  5. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Clayoutmessage.php +22 -22
  6. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Custombuttons.php +53 -53
  7. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customcatalog.php +22 -22
  8. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customlayoutbuttons.php +48 -46
  9. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customlink.php +82 -82
  10. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customtext.php +20 -20
  11. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Generalthemesavebutton.php +21 -21
  12. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Hlayoutmessage.php +20 -20
  13. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Logoimagedisplay.php +22 -22
  14. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Playoutmessage.php +22 -22
  15. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Advsettings.php +126 -126
  16. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Design.php +652 -652
  17. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Form.php +96 -96
  18. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Layout.php +298 -298
  19. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tabs.php +67 -67
  20. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Grid.php +102 -102
  21. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenowbackend.php +11 -11
  22. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Renderer/Merge.php +47 -47
  23. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Renderer/Status.php +16 -16
  24. app/code/community/Redstage/Mobilenow/Block/Adminhtml/Renderer/Themename.php +12 -12
  25. app/code/community/Redstage/Mobilenow/Block/Adminhtml/System/Config/Form/Button.php +40 -40
  26. app/code/community/Redstage/Mobilenow/Block/Adminhtml/System/Config/Form/Link.php +22 -22
  27. app/code/community/Redstage/Mobilenow/Block/Home.php +51 -51
  28. app/code/community/Redstage/Mobilenow/Block/Left.php +7 -7
  29. app/code/community/Redstage/Mobilenow/Block/Toolbar.php +121 -121
  30. app/code/community/Redstage/Mobilenow/Helper/Catalogpage.php +293 -293
  31. app/code/community/Redstage/Mobilenow/Helper/Cms/Page.php +104 -104
  32. app/code/community/Redstage/Mobilenow/Helper/Data.php +602 -603
  33. app/code/community/Redstage/Mobilenow/Helper/Homepage.php +358 -358
  34. app/code/community/Redstage/Mobilenow/Helper/Theme.php +272 -272
  35. app/code/community/Redstage/Mobilenow/Model/Corelayoutlink.php +11 -11
  36. app/code/community/Redstage/Mobilenow/Model/Corelayoutupdate.php +11 -11
  37. app/code/community/Redstage/Mobilenow/Model/Design/Package.php +221 -221
  38. app/code/community/Redstage/Mobilenow/Model/Layout/Update.php +16 -16
  39. app/code/community/Redstage/Mobilenow/Model/Mobilenow.php +10 -10
  40. app/code/community/Redstage/Mobilenow/Model/Mysql4/Corelayoutlink.php +8 -8
  41. app/code/community/Redstage/Mobilenow/Model/Mysql4/Corelayoutlink/Collection.php +9 -9
  42. app/code/community/Redstage/Mobilenow/Model/Mysql4/Corelayoutupdate.php +8 -8
  43. app/code/community/Redstage/Mobilenow/Model/Mysql4/Corelayoutupdate/Collection.php +9 -9
  44. app/code/community/Redstage/Mobilenow/Model/Mysql4/Mobilenow.php +159 -159
  45. app/code/community/Redstage/Mobilenow/Model/Mysql4/Mobilenow/Collection.php +80 -80
  46. app/code/community/Redstage/Mobilenow/Model/Mysql4/Themelayoutsettings.php +8 -8
  47. app/code/community/Redstage/Mobilenow/Model/Mysql4/Themelayoutsettings/Collection.php +8 -8
  48. app/code/community/Redstage/Mobilenow/Model/Mysql4/Themestore.php +8 -8
  49. app/code/community/Redstage/Mobilenow/Model/Mysql4/Themestore/Collection.php +9 -9
  50. app/code/community/Redstage/Mobilenow/Model/Mysql4/Themesubsettings.php +22 -22
  51. app/code/community/Redstage/Mobilenow/Model/Mysql4/Themesubsettings/Collection.php +9 -9
  52. app/code/community/Redstage/Mobilenow/Model/Resource/Layout.php +85 -85
  53. app/code/community/Redstage/Mobilenow/Model/Themelayoutsettings.php +11 -11
  54. app/code/community/Redstage/Mobilenow/Model/Themestore.php +11 -11
  55. app/code/community/Redstage/Mobilenow/Model/Themesubsettings.php +17 -17
  56. app/code/community/Redstage/Mobilenow/controllers/Adminhtml/IndexController.php +32 -32
  57. app/code/community/Redstage/Mobilenow/controllers/Adminhtml/MobilenowController.php +913 -911
  58. app/code/community/Redstage/Mobilenow/controllers/Adminhtml/MobilenowbackendController.php +9 -9
  59. app/code/community/Redstage/Mobilenow/controllers/IndexController.php +20 -20
  60. app/code/community/Redstage/Mobilenow/etc/adminhtml.xml +22 -22
  61. app/code/community/Redstage/Mobilenow/etc/config.xml +212 -212
  62. app/code/community/Redstage/Mobilenow/etc/system.xml +122 -122
  63. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-install-0.1.0.php +95 -98
  64. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.0-0.1.1.php +21 -26
  65. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.1-0.1.2.php +16 -15
  66. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.2-0.1.3.php +11 -10
  67. app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.3-0.1.4.php +15 -15
  68. app/design/adminhtml/default/default/layout/mobilenow.xml +26 -26
  69. app/design/adminhtml/default/default/template/mobilenow/mobilenowbackend.phtml +4 -4
  70. app/design/adminhtml/default/default/template/mobilenow/system/config/button.phtml +1 -1
  71. app/design/adminhtml/default/default/template/mobilenow/widget/advsettings.phtml +30 -30
  72. app/design/adminhtml/default/default/template/mobilenow/widget/design.phtml +278 -278
  73. app/design/adminhtml/default/default/template/mobilenow/widget/form.phtml +66 -66
  74. app/design/adminhtml/default/default/template/mobilenow/widget/layout.phtml +168 -168
  75. app/design/frontend/redstage-mobilenow/default/layout/catalog.xml +354 -354
  76. app/design/frontend/redstage-mobilenow/default/layout/catalogsearch.xml +114 -114
  77. app/design/frontend/redstage-mobilenow/default/layout/checkout.xml +446 -446
  78. app/design/frontend/redstage-mobilenow/default/layout/cms.xml +88 -88
  79. app/design/frontend/redstage-mobilenow/default/layout/customer.xml +293 -293
  80. app/design/frontend/redstage-mobilenow/default/layout/local.xml +40 -40
  81. app/design/frontend/redstage-mobilenow/default/layout/page.xml +203 -203
  82. app/design/frontend/redstage-mobilenow/default/template/catalog/category/view.phtml +76 -76
  83. app/design/frontend/redstage-mobilenow/default/template/catalog/product/compare/sidebar.phtml +64 -64
  84. app/design/frontend/redstage-mobilenow/default/template/catalog/product/list.phtml +198 -198
  85. app/design/frontend/redstage-mobilenow/default/template/catalog/product/list/customtoolbar.phtml +3 -3
  86. app/design/frontend/redstage-mobilenow/default/template/catalog/product/list/toolbar.phtml +150 -150
  87. app/design/frontend/redstage-mobilenow/default/template/catalog/product/list/upsell.phtml +57 -57
  88. app/design/frontend/redstage-mobilenow/default/template/catalog/product/mobilelist.phtml +273 -273
  89. app/design/frontend/redstage-mobilenow/default/template/catalog/product/price.phtml +428 -428
  90. app/design/frontend/redstage-mobilenow/default/template/catalog/product/view.phtml +0 -189
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow.php CHANGED
@@ -1,16 +1,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
- $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
+ $this->_addButtonLabel = Mage::helper("mobilenow")->__("Add New Mobile Theme");
13
+ parent::__construct();
14
+
15
+ }
16
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
3
- {
4
- public function __construct()
5
- {
6
- parent::__construct();
7
- $this->_objectId = "theme_id";
8
- $this->_blockGroup = "mobilenow";
9
- $this->_controller = "adminhtml_mobilenow";
10
- $this->_removeButton("save", "label", Mage::helper("mobilenow")->__("Save Theme"));
11
- $this->_removeButton("reset", "label", Mage::helper("mobilenow")->__("Reset"));
12
- $this->_updateButton("delete", "label", Mage::helper("mobilenow")->__("Delete Theme"));
13
- $this->_addButton("saveas", array(
14
- "label" => Mage::helper("mobilenow")->__("Save As.."),
15
- "onclick" => "javascript:showSaveAsPopup(this);",
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/');
27
- }
28
- function continueToDesign()
29
- {
30
- if(editForm.validate())
31
- {
32
- editForm.submit($('edit_form').action+'back/edit/');
33
- }
34
- }";
35
- }
36
- public function getHeaderText()
37
- {
38
- if( Mage::registry("mobilenow_data") && Mage::registry("mobilenow_data")->getId() )
39
- {
40
- return Mage::helper("mobilenow")->__("MobileNow: Edit Theme '%s'", $this->htmlEscape(Mage::registry("mobilenow_data")->getThemeName()));
41
- }
42
- else
43
- {
44
- return Mage::helper("mobilenow")->__("MobileNow: Create a New Mobile Theme");
45
-
46
- }
47
- }
48
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->_objectId = "theme_id";
8
+ $this->_blockGroup = "mobilenow";
9
+ $this->_controller = "adminhtml_mobilenow";
10
+ $this->_removeButton("save", "label", Mage::helper("mobilenow")->__("Save Theme"));
11
+ $this->_removeButton("reset", "label", Mage::helper("mobilenow")->__("Reset"));
12
+ $this->_updateButton("delete", "label", Mage::helper("mobilenow")->__("Delete Theme"));
13
+ $this->_addButton("saveas", array(
14
+ "label" => Mage::helper("mobilenow")->__("Save As.."),
15
+ "onclick" => "javascript:showSaveAsPopup(this);",
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/');
27
+ }
28
+ function continueToDesign()
29
+ {
30
+ if(editForm.validate())
31
+ {
32
+ editForm.submit($('edit_form').action+'back/edit/');
33
+ }
34
+ }";
35
+ }
36
+ public function getHeaderText()
37
+ {
38
+ if( Mage::registry("mobilenow_data") && Mage::registry("mobilenow_data")->getId() )
39
+ {
40
+ return Mage::helper("mobilenow")->__("MobileNow: Edit Theme '%s'", $this->htmlEscape(Mage::registry("mobilenow_data")->getThemeName()));
41
+ }
42
+ else
43
+ {
44
+ return Mage::helper("mobilenow")->__("MobileNow: Create a New Mobile Theme");
45
+
46
+ }
47
+ }
48
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Form.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- protected function _prepareForm()
5
- {
6
- $form = new Varien_Data_Form(array(
7
- "id" => "edit_form",
8
- "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
9
- "method" => "post",
10
- "enctype" =>"multipart/form-data",
11
- )
12
- );
13
- $form->setUseContainer(true);
14
- $this->setForm($form);
15
- return parent::_prepareForm();
16
- }
17
- }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+ $form = new Varien_Data_Form(array(
7
+ "id" => "edit_form",
8
+ "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
9
+ "method" => "post",
10
+ "enctype" =>"multipart/form-data",
11
+ )
12
+ );
13
+ $form->setUseContainer(true);
14
+ $this->setForm($form);
15
+ return parent::_prepareForm();
16
+ }
17
+ }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Bannerimagedisplay.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Bannerimagedisplay 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
- $logo_name = Mage::registry("subsettings_data")->getBannerFielname();
12
-
13
- $dir_path = Mage::getBaseDir('media').DS.'mobilenow_theme_images/banner/'.$logo_name;
14
- if(@file_exists($dir_path) && $logo_name != ''){
15
- $m_logo = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images/banner/'.$logo_name;
16
- $html = '<tr><td class="label "></td><td class="value "><img src="'.$m_logo.'" id="banner_preview" width="70"/></td></tr>';
17
- } else {
18
- $html = '<tr><td class="label "></td><td class="value "><img src="" id="banner_preview" width="70" /></td></tr>';
19
- }
20
- return $html;
21
- }
22
- }
23
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Bannerimagedisplay 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
+ $logo_name = Mage::registry("subsettings_data")->getBannerFielname();
12
+
13
+ $dir_path = Mage::getBaseDir('media').DS.'mobilenow_theme_images/banner/'.$logo_name;
14
+ if(@file_exists($dir_path) && $logo_name != ''){
15
+ $m_logo = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images/banner/'.$logo_name;
16
+ $html = '<tr><td class="label "></td><td class="value "><img src="'.$m_logo.'" id="banner_preview" width="70"/></td></tr>';
17
+ } else {
18
+ $html = '<tr><td class="label "></td><td class="value "><img src="" id="banner_preview" width="70" /></td></tr>';
19
+ }
20
+ return $html;
21
+ }
22
+ }
23
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Clayoutmessage.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Clayoutmessage 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
-
12
- $html = '
13
- <tr><td class="label "></td><td class="value "></td></tr><tr>
14
- <td class="value " colspan="2">
15
- <span class="message-italic">Organize the order of elements on the Catalog below. Be sure to preview your changes before saving and publishing your theme as certain
16
- changes can make your page confusing. If you want to exclude any elements - go back to the Theme Design Section</span>
17
- </td>
18
- </tr>
19
- <tr>';
20
- return $html;
21
- }
22
- }
23
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Clayoutmessage 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
+
12
+ $html = '
13
+ <tr><td class="label "></td><td class="value "></td></tr><tr>
14
+ <td class="value " colspan="2">
15
+ <span class="message-italic">Organize the order of elements on the Catalog below. Be sure to preview your changes before saving and publishing your theme as certain
16
+ changes can make your page confusing. If you want to exclude any elements - go back to the Theme Design Section</span>
17
+ </td>
18
+ </tr>
19
+ <tr>';
20
+ return $html;
21
+ }
22
+ }
23
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Custombuttons.php CHANGED
@@ -1,54 +1,54 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Custombuttons 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
- $setflag='';
13
- if(Mage::registry("subsettings_data")->getParent()!=0)
14
- {
15
- $checkForParentToReset=Mage::getModel('mobilenow/themesubsettings')->load(Mage::registry("subsettings_data")->getParent());
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
- }
54
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Custombuttons 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
+ $setflag='';
13
+ if(Mage::registry("subsettings_data")->getParent()!=0)
14
+ {
15
+ $checkForParentToReset=Mage::getModel('mobilenow/themesubsettings')->load(Mage::registry("subsettings_data")->getParent());
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
+ }
54
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customcatalog.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customcatalog 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>
13
- <td class="value" colspan="2">
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
- }
22
- }
23
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customcatalog 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>
13
+ <td class="value" colspan="2">
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
+ }
22
+ }
23
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customlayoutbuttons.php CHANGED
@@ -1,47 +1,49 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customlayoutbuttons 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
- $displayResetToDefault='';
13
- if(Mage::registry("subsettings_data")->getParent()!=0)
14
- {
15
- $checkForParentToReset=Mage::getModel('mobilenow/themesubsettings')->load(Mage::registry("subsettings_data")->getParent());
16
- if($checkForParentToReset->getPrimary()==1) $displayResetToDefault=1;
17
- else $displayResetToDefault='';
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
- <tr>
25
- <td class="value" colspan="2">
26
- <a class="save_settings_link link_button_cls scalable save" title="" href="#inline_save_setting_layout""><span class="save">Save Settings..</span></a>
27
- </td>
28
- </tr>';
29
- if($displayResetToDefault || (Mage::registry("subsettings_data")->getParent()==0 && Mage::registry("subsettings_data")->getPrimary()==1)){
30
- $html .='<tr><td class="value" style="width:372px;"></td></tr>
31
- <tr>
32
- <td class="value" colspan="2">
33
- <a class="reset_settings_link link_button_rst scalable" title="" href="#inline_reset_setting_layout"><span>Reset Settings to Default</span></a>
34
- </td>
35
- </tr>';}
36
- if(!$displayResetToDefault && Mage::registry("subsettings_data")->getPrimary()==0){
37
- $html .='<tr><td class="value" style="width:330px;"></td></tr>
38
- <tr>
39
- <td class="value" colspan="2">
40
- <a class="inline_delete link_button_dlt scalable delete" title="" href="#inline_delete_layout"><span class="delete">Delete Custom Sub Settings</span></a>
41
- </td>
42
- </tr>
43
- ';}
44
- return $html;
45
- }
46
- }
 
 
47
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customlayoutbuttons 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
+ $setflag='';
13
+ if(Mage::registry("subsettings_data")->getParent()!=0)
14
+ {
15
+ $checkForParentToReset=Mage::getModel('mobilenow/themesubsettings')->load(Mage::registry("subsettings_data")->getParent());
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">
27
+ <a class="save_settings_link link_button_cls scalable save" title="" href="#inline_save_setting_layout""><span class="save">Save Settings..</span></a>
28
+ </td>
29
+ </tr>';
30
+ }
31
+ if($setflag || (Mage::registry("subsettings_data")->getParent()==0 && Mage::registry("subsettings_data")->getPrimary()==1)){
32
+ $html .='<tr><td class="value" style="width:290px;"></td></tr>
33
+ <tr>
34
+ <td class="value" colspan="2">
35
+ <a class="reset_settings_link link_button_rst scalable" title="" href="#inline_reset_setting_layout"><span>Reset Settings to Default</span></a>
36
+ </td>
37
+ </tr>';}
38
+ if(!$setflag && Mage::registry("subsettings_data")->getPrimary()==0){
39
+ $html .='<tr><td class="value" style="width:330px;"></td></tr>
40
+ <tr>
41
+ <td class="value" colspan="2">
42
+ <a class="inline_delete link_button_dlt scalable delete" title="" href="#inline_delete_layout"><span class="delete">Delete Custom Sub Settings</span></a>
43
+ </td>
44
+ </tr>
45
+ ';}
46
+ return $html;
47
+ }
48
+ }
49
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customlink.php CHANGED
@@ -1,83 +1,83 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customlink 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
- //Retriving the values for all text box
12
- if(Mage::registry("subsettings_data"))
13
- {
14
- if(Mage::registry("subsettings_data")->getHeaderLinkHomeName()!=''){$headerLinkHomeName=Mage::registry("subsettings_data")->getHeaderLinkHomeName();}
15
- if(Mage::registry("subsettings_data")->getFooterLinkHomeName()!='')$footerLinkHomeName=Mage::registry("subsettings_data")->getFooterLinkHomeName();
16
- if(Mage::registry("subsettings_data")->getHeaderLinkLoginName()!='')$headerLinkLoginName=Mage::registry("subsettings_data")->getHeaderLinkLoginName();
17
- if(Mage::registry("subsettings_data")->getFooterLinkLoginName()!='')$footerLinkLoginName=Mage::registry("subsettings_data")->getFooterLinkLoginName();
18
- if(Mage::registry("subsettings_data")->getHeaderLinkMyaccountName()!='')$headerLinkMyaccountName=Mage::registry("subsettings_data")->getHeaderLinkMyaccountName();
19
- if(Mage::registry("subsettings_data")->getFooterLinkMyaccountName()!='')$footerLinkMyaccountName=Mage::registry("subsettings_data")->getFooterLinkMyaccountName();
20
- if(Mage::registry("subsettings_data")->getHeaderLinkWishlistName()!='')$headerLinkWishlistName=Mage::registry("subsettings_data")->getHeaderLinkWishlistName();
21
- if(Mage::registry("subsettings_data")->getFooterLinkWishlistName()!='')$footerLinkWishlistName=Mage::registry("subsettings_data")->getFooterLinkWishlistName();
22
- //Checking for selected checkbox
23
- if(Mage::registry("subsettings_data")->getHeaderLinkHome()==1)$headerLinkHome='checked="checked" value="1"';
24
- if(Mage::registry("subsettings_data")->getFooterLinkHome()==1)$footerLinkHome='checked="checked" value="1"';
25
- if(Mage::registry("subsettings_data")->getHeaderLinkLogin()==1)$headerLinkLogin='checked="checked" value="1"';
26
- if(Mage::registry("subsettings_data")->getFooterLinkLogin()==1)$footerLinkLogin='checked="checked" value="1"';
27
- if(Mage::registry("subsettings_data")->getHeaderLinkMyaccount()==1)$headerLinkMyaccount='checked="checked" value="1"';
28
- if(Mage::registry("subsettings_data")->getFooterLinkMyaccount()==1)$footerLinkMyaccount='checked="checked" value="1"';
29
- if(Mage::registry("subsettings_data")->getHeaderLinkWishlist()==1)$headerLinkWishlist='checked="checked" value="1"';
30
- if(Mage::registry("subsettings_data")->getFooterLinkWishlist()==1)$footerLinkWishlist='checked="checked" value="1"';
31
- }
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%">
39
- <tr height="30px">
40
- <td width="130px">&nbsp;</td>
41
- <td width="100px" align="center">Header</td>
42
- <td width="185px" align="center">Sort Order</td>
43
- <td width="100px" align="center">Footer</td>
44
- <td width="185px" align="center">Sort Order</td>
45
- </tr>
46
- <tr height="30px">
47
- <td>Home</td>
48
- <td align="center"><input type="checkbox" id="header_link_home" name="header_link_home" '.$headerLinkHome.' onclick="this.value = this.checked ? 1 : 0;"/></td>
49
- <td align="center"><input type="textbox" class="design_small validate-number input-text" id="header_link_home_name" name="header_link_home_name" value="'.$headerLinkHomeName.'"/></td>
50
- <td align="center"><input type="checkbox" id="footer_link_home" name="footer_link_home" '.$footerLinkHome.' onclick="this.value = this.checked ? 1 : 0;"/></td>
51
- <td align="center"><input type="textbox" class="design_small validate-number input-text" id="footer_link_home_name" name="footer_link_home_name" value="'.$footerLinkHomeName.'"/></td>
52
- </tr>
53
- <tr height="30px">
54
- <td>Log in</td>
55
- <td align="center"><input type="checkbox" id="header_link_login" name="header_link_login"'.$headerLinkLogin.' onclick="this.value = this.checked ? 1 : 0;"/></td>
56
- <td align="center"><input type="textbox" class="design_small validate-number input-text" id="header_link_login_name" name="header_link_login_name" value="'.$headerLinkLoginName.'"/></td>
57
- <td align="center"><input type="checkbox" id="footer_link_login" name="footer_link_login" '.$footerLinkLogin.' onclick="this.value = this.checked ? 1 : 0;"/></td>
58
- <td align="center"><input type="textbox" class="design_small validate-number input-text" id="footer_link_login_name" name="footer_link_login_name" value="'.$footerLinkLoginName.'"/></td>
59
- </tr>
60
- <tr height="30px">
61
- <td>My Account</td>
62
- <td align="center"><input type="checkbox" id="header_link_myaccount" name="header_link_myaccount" '.$headerLinkMyaccount.' onclick="this.value = this.checked ? 1 : 0;"/></td>
63
- <td align="center"><input type="textbox" class="design_small validate-number input-text" id="header_link_myaccount_name" name="header_link_myaccount_name" value="'.$headerLinkMyaccountName.'"/></td>
64
- <td align="center"><input type="checkbox" id="footer_link_myaccount" name="footer_link_myaccount" '.$footerLinkMyaccount.' onclick="this.value = this.checked ? 1 : 0;"/></td>
65
- <td align="center"><input type="textbox" class="design_small validate-number input-text" id="footer_link_myaccount_name" name="footer_link_myaccount_name" value="'.$footerLinkMyaccountName.'"/></td>
66
- </tr>
67
- <tr height="30px">
68
- <td>Wishlist</td>
69
- <td align="center"><input type="checkbox" id="header_link_wishlist" name="header_link_wishlist" '.$headerLinkWishlist.' onclick="this.value = this.checked ? 1 : 0;"/></td>
70
- <td align="center"><input type="textbox" class="design_small validate-number input-text" id="header_link_wishlist_name" name="header_link_wishlist_name" value="'.$headerLinkWishlistName.'"/></td>
71
- <td align="center"><input type="checkbox" id="footer_link_wishlist" name="footer_link_wishlist" '.$footerLinkWishlist.' onclick="this.value = this.checked ? 1 : 0;"/></td>
72
- <td align="center"><input type="textbox" class="design_small validate-number input-text" id="footer_link_wishlist_name" name="footer_link_wishlist_name" value="'.$footerLinkWishlistName.'"/></td>
73
- </tr>
74
- </table>
75
- </td>
76
- </tr>
77
- </table>
78
- </td>
79
- </tr>';
80
- return $html;
81
- }
82
- }
83
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customlink 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
+ //Retriving the values for all text box
12
+ if(Mage::registry("subsettings_data"))
13
+ {
14
+ if(Mage::registry("subsettings_data")->getHeaderLinkHomeName()!=''){$headerLinkHomeName=Mage::registry("subsettings_data")->getHeaderLinkHomeName();}
15
+ if(Mage::registry("subsettings_data")->getFooterLinkHomeName()!='')$footerLinkHomeName=Mage::registry("subsettings_data")->getFooterLinkHomeName();
16
+ if(Mage::registry("subsettings_data")->getHeaderLinkLoginName()!='')$headerLinkLoginName=Mage::registry("subsettings_data")->getHeaderLinkLoginName();
17
+ if(Mage::registry("subsettings_data")->getFooterLinkLoginName()!='')$footerLinkLoginName=Mage::registry("subsettings_data")->getFooterLinkLoginName();
18
+ if(Mage::registry("subsettings_data")->getHeaderLinkMyaccountName()!='')$headerLinkMyaccountName=Mage::registry("subsettings_data")->getHeaderLinkMyaccountName();
19
+ if(Mage::registry("subsettings_data")->getFooterLinkMyaccountName()!='')$footerLinkMyaccountName=Mage::registry("subsettings_data")->getFooterLinkMyaccountName();
20
+ if(Mage::registry("subsettings_data")->getHeaderLinkWishlistName()!='')$headerLinkWishlistName=Mage::registry("subsettings_data")->getHeaderLinkWishlistName();
21
+ if(Mage::registry("subsettings_data")->getFooterLinkWishlistName()!='')$footerLinkWishlistName=Mage::registry("subsettings_data")->getFooterLinkWishlistName();
22
+ //Checking for selected checkbox
23
+ if(Mage::registry("subsettings_data")->getHeaderLinkHome()==1)$headerLinkHome='checked="checked" value="1"';
24
+ if(Mage::registry("subsettings_data")->getFooterLinkHome()==1)$footerLinkHome='checked="checked" value="1"';
25
+ if(Mage::registry("subsettings_data")->getHeaderLinkLogin()==1)$headerLinkLogin='checked="checked" value="1"';
26
+ if(Mage::registry("subsettings_data")->getFooterLinkLogin()==1)$footerLinkLogin='checked="checked" value="1"';
27
+ if(Mage::registry("subsettings_data")->getHeaderLinkMyaccount()==1)$headerLinkMyaccount='checked="checked" value="1"';
28
+ if(Mage::registry("subsettings_data")->getFooterLinkMyaccount()==1)$footerLinkMyaccount='checked="checked" value="1"';
29
+ if(Mage::registry("subsettings_data")->getHeaderLinkWishlist()==1)$headerLinkWishlist='checked="checked" value="1"';
30
+ if(Mage::registry("subsettings_data")->getFooterLinkWishlist()==1)$footerLinkWishlist='checked="checked" value="1"';
31
+ }
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%">
39
+ <tr height="30px">
40
+ <td width="130px">&nbsp;</td>
41
+ <td width="100px" align="center">Header</td>
42
+ <td width="185px" align="center">Sort Order</td>
43
+ <td width="100px" align="center">Footer</td>
44
+ <td width="185px" align="center">Sort Order</td>
45
+ </tr>
46
+ <tr height="30px">
47
+ <td>Home</td>
48
+ <td align="center"><input type="checkbox" id="header_link_home" name="header_link_home" '.$headerLinkHome.' onclick="this.value = this.checked ? 1 : 0;"/></td>
49
+ <td align="center"><input type="textbox" class="design_small validate-number input-text" id="header_link_home_name" name="header_link_home_name" value="'.$headerLinkHomeName.'"/></td>
50
+ <td align="center"><input type="checkbox" id="footer_link_home" name="footer_link_home" '.$footerLinkHome.' onclick="this.value = this.checked ? 1 : 0;"/></td>
51
+ <td align="center"><input type="textbox" class="design_small validate-number input-text" id="footer_link_home_name" name="footer_link_home_name" value="'.$footerLinkHomeName.'"/></td>
52
+ </tr>
53
+ <tr height="30px">
54
+ <td>Log in</td>
55
+ <td align="center"><input type="checkbox" id="header_link_login" name="header_link_login"'.$headerLinkLogin.' onclick="this.value = this.checked ? 1 : 0;"/></td>
56
+ <td align="center"><input type="textbox" class="design_small validate-number input-text" id="header_link_login_name" name="header_link_login_name" value="'.$headerLinkLoginName.'"/></td>
57
+ <td align="center"><input type="checkbox" id="footer_link_login" name="footer_link_login" '.$footerLinkLogin.' onclick="this.value = this.checked ? 1 : 0;"/></td>
58
+ <td align="center"><input type="textbox" class="design_small validate-number input-text" id="footer_link_login_name" name="footer_link_login_name" value="'.$footerLinkLoginName.'"/></td>
59
+ </tr>
60
+ <tr height="30px">
61
+ <td>My Account</td>
62
+ <td align="center"><input type="checkbox" id="header_link_myaccount" name="header_link_myaccount" '.$headerLinkMyaccount.' onclick="this.value = this.checked ? 1 : 0;"/></td>
63
+ <td align="center"><input type="textbox" class="design_small validate-number input-text" id="header_link_myaccount_name" name="header_link_myaccount_name" value="'.$headerLinkMyaccountName.'"/></td>
64
+ <td align="center"><input type="checkbox" id="footer_link_myaccount" name="footer_link_myaccount" '.$footerLinkMyaccount.' onclick="this.value = this.checked ? 1 : 0;"/></td>
65
+ <td align="center"><input type="textbox" class="design_small validate-number input-text" id="footer_link_myaccount_name" name="footer_link_myaccount_name" value="'.$footerLinkMyaccountName.'"/></td>
66
+ </tr>
67
+ <tr height="30px">
68
+ <td>Wishlist</td>
69
+ <td align="center"><input type="checkbox" id="header_link_wishlist" name="header_link_wishlist" '.$headerLinkWishlist.' onclick="this.value = this.checked ? 1 : 0;"/></td>
70
+ <td align="center"><input type="textbox" class="design_small validate-number input-text" id="header_link_wishlist_name" name="header_link_wishlist_name" value="'.$headerLinkWishlistName.'"/></td>
71
+ <td align="center"><input type="checkbox" id="footer_link_wishlist" name="footer_link_wishlist" '.$footerLinkWishlist.' onclick="this.value = this.checked ? 1 : 0;"/></td>
72
+ <td align="center"><input type="textbox" class="design_small validate-number input-text" id="footer_link_wishlist_name" name="footer_link_wishlist_name" value="'.$footerLinkWishlistName.'"/></td>
73
+ </tr>
74
+ </table>
75
+ </td>
76
+ </tr>
77
+ </table>
78
+ </td>
79
+ </tr>';
80
+ return $html;
81
+ }
82
+ }
83
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Customtext.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customtext 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>
13
- <td class="value" colspan="2">
14
- <strong>Default Buttons Color Settings</strong>
15
- <hr/>
16
- </td>
17
- </tr>';
18
- return $html;
19
- }
20
- }
21
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Customtext 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>
13
+ <td class="value" colspan="2">
14
+ <strong>Default Buttons Color Settings</strong>
15
+ <hr/>
16
+ </td>
17
+ </tr>';
18
+ return $html;
19
+ }
20
+ }
21
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Generalthemesavebutton.php CHANGED
@@ -1,22 +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
  ?>
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/Hlayoutmessage.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Hlayoutmessage 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
- $html = '
12
- <tr><td class="label "></td><td class="value "></td></tr><tr>
13
- <td class="value " colspan="2">
14
- <span class="message-italic">Organize the order of elements on the Header/Footer and Homepage. Be sure to preview your changes before saving and publishing your theme as certain
15
- changes can make your page confusing. If you want to exclude any elements - go back to the Theme Design Section</span>
16
- </td>
17
- </tr>';
18
- return $html;
19
- }
20
- }
21
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Hlayoutmessage 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
+ $html = '
12
+ <tr><td class="label "></td><td class="value "></td></tr><tr>
13
+ <td class="value " colspan="2">
14
+ <span class="message-italic">Organize the order of elements on the Header/Footer and Homepage. Be sure to preview your changes before saving and publishing your theme as certain
15
+ changes can make your page confusing. If you want to exclude any elements - go back to the Theme Design Section</span>
16
+ </td>
17
+ </tr>';
18
+ return $html;
19
+ }
20
+ }
21
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Logoimagedisplay.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Logoimagedisplay 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
- $logo_name = Mage::registry("subsettings_data")->getLogo();
12
-
13
- $dir_path = Mage::getBaseDir('media').DS.'mobilenow_theme_images/logo/'.$logo_name;
14
- if(@file_exists($dir_path) && $logo_name != ''){
15
- $m_logo = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images/logo/'.$logo_name;
16
- $html = '<tr><td class="label "></td><td class="value "><img src="'.$m_logo.'" id="logo_preview" width="70"/></td></tr>';
17
- } else {
18
- $html = '<tr><td class="label "></td><td class="value "><img src="" id="logo_preview" width="70" /></td></tr>';
19
- }
20
- return $html;
21
- }
22
- }
23
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Logoimagedisplay 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
+ $logo_name = Mage::registry("subsettings_data")->getLogo();
12
+
13
+ $dir_path = Mage::getBaseDir('media').DS.'mobilenow_theme_images/logo/'.$logo_name;
14
+ if(@file_exists($dir_path) && $logo_name != ''){
15
+ $m_logo = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images/logo/'.$logo_name;
16
+ $html = '<tr><td class="label "></td><td class="value "><img src="'.$m_logo.'" id="logo_preview" width="70"/></td></tr>';
17
+ } else {
18
+ $html = '<tr><td class="label "></td><td class="value "><img src="" id="logo_preview" width="70" /></td></tr>';
19
+ }
20
+ return $html;
21
+ }
22
+ }
23
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Renderer/Playoutmessage.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Playoutmessage 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
-
12
- $html = '
13
- <tr><td class="label "></td><td class="value "></td></tr><tr>
14
- <td class="value " colspan="2">
15
- <span class="message-italic">Organize the order of elements on the Product Page below. Be sure to preview your changes before saving and publishing your theme as certain
16
- changes can make your page confusing. If you want to exclude any elements - go back to the Theme Design Section</span>
17
- </td>
18
- </tr>
19
- <tr>';
20
- return $html;
21
- }
22
- }
23
  ?>
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Renderer_Playoutmessage 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
+
12
+ $html = '
13
+ <tr><td class="label "></td><td class="value "></td></tr><tr>
14
+ <td class="value " colspan="2">
15
+ <span class="message-italic">Organize the order of elements on the Product Page below. Be sure to preview your changes before saving and publishing your theme as certain
16
+ changes can make your page confusing. If you want to exclude any elements - go back to the Theme Design Section</span>
17
+ </td>
18
+ </tr>
19
+ <tr>';
20
+ return $html;
21
+ }
22
+ }
23
  ?>
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Advsettings.php CHANGED
@@ -1,126 +1,126 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Advsettings extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- /**
5
- * Class constructor
6
- *
7
- */
8
- protected function _construct()
9
- {
10
- parent::_construct();
11
- $this->setTemplate('mobilenow/widget/advsettings.phtml');
12
- }
13
- protected function _prepareForm()
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
- }
24
- $form = new Varien_Data_Form();
25
- $this ->setForm($form);
26
-
27
- $fieldset = $form->addFieldset("preset_advsettings_subsettings", array("legend"=>Mage::helper("mobilenow")->__("Mobile Theme Advanced Settings")));
28
- $fieldset ->addField("ip_override", "text", array(
29
- "label" => Mage::helper("mobilenow")->__("IP override"),
30
- "class" => "",
31
- "required" => false,
32
- "name" => "ip_override",
33
- "note" => "When this setting is enabled (by having an IP in the text box), your activated themes will ONLY show up for this IP address for testing purposes."
34
- ));
35
- $fieldset->addField('custom_css', 'textarea', array(
36
- 'label' => Mage::helper('mobilenow')->__('Custom CSS Override'),
37
- 'name' => 'custom_css',
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',
78
- 'class' => '',
79
- 'required' => false,
80
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
81
- 'checked' => $cart_discount_checked,
82
- ));
83
- $fieldset->addField('show_cart_shipping_quote', 'checkbox', array(
84
- 'label' => Mage::helper('mobilenow')->__('Cart - Show Shipping Quote Input'),
85
- 'name' => 'show_cart_shipping_quote',
86
- 'class' => '',
87
- 'required' => false,
88
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
89
- 'checked' => $cart_shippng_quote_checked,
90
- ));
91
- $fieldset->addField('analytics', 'textarea', array(
92
- 'label' => Mage::helper('mobilenow')->__('Analytics'),
93
- 'name' => 'analytics',
94
- 'class' => '',
95
- 'required' => false
96
- ));
97
- if (Mage::getSingleton("adminhtml/session")->getMobilenowData())
98
- {
99
- $form->setValues(Mage::getSingleton("adminhtml/session")->getMobilenowData());
100
- Mage::getSingleton("adminhtml/session")->setMobilenowData(null);
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();
124
- }
125
-
126
- }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Advsettings extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ /**
5
+ * Class constructor
6
+ *
7
+ */
8
+ protected function _construct()
9
+ {
10
+ parent::_construct();
11
+ $this->setTemplate('mobilenow/widget/advsettings.phtml');
12
+ }
13
+ protected function _prepareForm()
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
+ }
24
+ $form = new Varien_Data_Form();
25
+ $this ->setForm($form);
26
+
27
+ $fieldset = $form->addFieldset("preset_advsettings_subsettings", array("legend"=>Mage::helper("mobilenow")->__("Mobile Theme Advanced Settings")));
28
+ $fieldset ->addField("ip_override", "text", array(
29
+ "label" => Mage::helper("mobilenow")->__("IP override"),
30
+ "class" => "",
31
+ "required" => false,
32
+ "name" => "ip_override",
33
+ "note" => "When this setting is enabled (by having an IP in the text box), your activated themes will ONLY show up for this IP address for testing purposes."
34
+ ));
35
+ $fieldset->addField('custom_css', 'textarea', array(
36
+ 'label' => Mage::helper('mobilenow')->__('Custom CSS Override'),
37
+ 'name' => 'custom_css',
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',
78
+ 'class' => '',
79
+ 'required' => false,
80
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
81
+ 'checked' => $cart_discount_checked,
82
+ ));
83
+ $fieldset->addField('show_cart_shipping_quote', 'checkbox', array(
84
+ 'label' => Mage::helper('mobilenow')->__('Cart - Show Shipping Quote Input'),
85
+ 'name' => 'show_cart_shipping_quote',
86
+ 'class' => '',
87
+ 'required' => false,
88
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
89
+ 'checked' => $cart_shippng_quote_checked,
90
+ ));
91
+ $fieldset->addField('analytics', 'textarea', array(
92
+ 'label' => Mage::helper('mobilenow')->__('Analytics'),
93
+ 'name' => 'analytics',
94
+ 'class' => '',
95
+ 'required' => false
96
+ ));
97
+ if (Mage::getSingleton("adminhtml/session")->getMobilenowData())
98
+ {
99
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getMobilenowData());
100
+ Mage::getSingleton("adminhtml/session")->setMobilenowData(null);
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();
124
+ }
125
+
126
+ }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Design.php CHANGED
@@ -1,652 +1,652 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- /**
5
- * Class constructor
6
- *
7
- */
8
- protected function _construct()
9
- {
10
- parent::_construct();
11
- $this->setTemplate('mobilenow/widget/design.phtml');
12
- }
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;
20
- if(Mage::registry("subsettings_data")->getShowBreadcrumbs()==1)$breadChecked=true;
21
- if(Mage::registry("subsettings_data")->getShowGridListChoice()==1)$gridChecked=true;
22
- if(Mage::registry("subsettings_data")->getShowSortbyDropdown()==1)$sortChecked=true;
23
- if(Mage::registry("subsettings_data")->getShowImageBorder()==1)$ImBorderChecked=true;
24
- if(Mage::registry("subsettings_data")->getShowReviewStars()==1)$reviewsChecked=true;
25
- if(Mage::registry("subsettings_data")->getShowLearnMore()==1)$cataloglearnChecked=true;
26
- if(Mage::registry("subsettings_data")->getShowAddToCart()==1)$addtocartChecked=true;
27
- if(Mage::registry("subsettings_data")->getShowGridlines()==1)$gridlinesChecked=true;
28
- if(Mage::registry("subsettings_data")->getShowProductImageBorder()==1)$prImBorderChecked=true;
29
- if(Mage::registry("subsettings_data")->getShowProductAvailability()==1)$shAvlChecked=true;
30
- if(Mage::registry("subsettings_data")->getShowProductWishlistLink()==1)$shprdwishChecked=true;
31
- if(Mage::registry("subsettings_data")->getShowProductReviewsSummary()==1)$shprdrevChecked=true;
32
- if(Mage::registry("subsettings_data")->getShowProductDescription()==1)$shprddesChecked =true;
33
- if(Mage::registry("subsettings_data")->getShowProductAdditionalInformation()==1)$shadditionalChecked=true;
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',
98
- 'class' => 'minicolors input-color',
99
- 'value' => '#aaaaaa',
100
- 'required' => false
101
- ));
102
- $fieldset->addField('text_color', 'text', array(
103
- 'label' => Mage::helper('mobilenow')->__('Text Color'),
104
- 'name' => 'text_color',
105
- 'class' => 'minicolors input-color',
106
- 'value' => '#aaaaaa',
107
- 'required' => false
108
- ));
109
- $fieldset->addField('show_search_cart_area', 'checkbox', array(
110
- 'label' => Mage::helper('mobilenow')->__('Show Search / Cart Area'),
111
- 'name' => 'show_search_cart_area',
112
- 'class' => '',
113
- 'required' => false,
114
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
115
- 'checked' => $checked,
116
- ));
117
- $fieldset->addField('search_cart_bg_color', 'text', array(
118
- 'label' => Mage::helper('mobilenow')->__('Search / Cart Area Backgorund Color'),
119
- 'name' => 'search_cart_bg_color',
120
- 'class' => 'minicolors input-color',
121
- 'value' => '#aaaaaa',
122
- 'required' => false
123
- ));
124
- $fieldset->addField('cart_link_color', 'text', array(
125
- 'label' => Mage::helper('mobilenow')->__('Cart Link Color'),
126
- 'name' => 'cart_link_color',
127
- 'class' => 'minicolors input-color',
128
- 'value' => '#aaaaaa',
129
- 'required' => false
130
- ));
131
- $fieldset->addField('show_home_page_banner', 'checkbox', array(
132
- 'label' => Mage::helper('mobilenow')->__('Show Homepage Banner'),
133
- 'name' => 'show_home_page_banner',
134
- 'class' => '',
135
- 'required' => false,
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',
146
- ));
147
- $fieldset->addField('banner_preview_filename', 'hidden', array(
148
- 'label' => '',
149
- 'name' => 'banner_preview_filename',
150
- ));
151
- $fieldset->addField('homepage_banner', 'file', array(
152
- 'label' => Mage::helper('mobilenow')->__('Homepage Banner'),
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',
172
- 'value' => '1',
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' =>'',
180
- 'name' => 'categories',
181
- 'value' => '2',
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'),
189
- // 'name' => 'categories',
190
- // 'onclick' => "",
191
- // 'onchange' => "",
192
- // 'value' => '1',
193
- // 'values' => array(
194
- // array('value'=>'1','label'=>'Mobile Menu'),
195
- // array('value'=>'2','label'=>'Show All'),
196
- // )
197
- // ));
198
- $fieldset->addField('categories_background_color', 'text', array(
199
- 'label' => Mage::helper('mobilenow')->__('Categories Background Color'),
200
- 'name' => 'categories_background_color',
201
- 'class' => 'minicolors input-color',
202
- 'value' => '#aaaaaa',
203
- 'required' => false
204
- ));
205
- $fieldset->addField('show_newsletter', 'checkbox', array(
206
- 'label' => Mage::helper('mobilenow')->__('Show Newsletter'),
207
- 'name' => 'show_newsletter',
208
- 'class' => '',
209
- 'required' => false,
210
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
211
- 'checked' => $newsletterChecked,
212
- ));
213
- $fieldset->addField('newsletter_area_backgorund', 'text', array(
214
- 'label' => Mage::helper('mobilenow')->__('Newsletter Area Background'),
215
- 'name' => 'newsletter_area_backgorund',
216
- 'class' => 'minicolors input-color',
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',
251
- 'class' => 'minicolors input-color',
252
- 'value' => '#aaaaaa',
253
- 'required' => false
254
- ));
255
- $fieldset->addField('button_text_color', 'text', array(
256
- 'label' => Mage::helper('mobilenow')->__('Button Text Color'),
257
- 'name' => 'button_text_color',
258
- 'class' => 'minicolors input-color',
259
- 'value' => '#aaaaaa',
260
- 'required' => false
261
- ));
262
- $fieldset->addField('button_border_color', 'text', array(
263
- 'label' => Mage::helper('mobilenow')->__('Button Border Color'),
264
- 'name' => 'button_border_color',
265
- 'class' => 'minicolors input-color',
266
- 'value' => '#aaaaaa',
267
- 'required' => false
268
- ));
269
- /*******************************************Catalog Page**********************************************/
270
- $fieldset = $form->addFieldset('catalog_page',array());
271
- $fieldset->addField('show_breadcrumbs', 'checkbox', array(
272
- 'label' => Mage::helper('mobilenow')->__('Show Breadcrumbs'),
273
- 'name' => 'show_breadcrumbs',
274
- 'class' => '',
275
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
276
- 'required' => false,
277
- 'checked' => $breadChecked
278
- ));
279
- $fieldset->addField('breadcrumbs_bg_color', 'text', array(
280
- 'label' => Mage::helper('mobilenow')->__('Breadcrumbs Background Color'),
281
- 'name' => 'breadcrumbs_bg_color',
282
- 'class' => 'minicolors input-color',
283
- 'value' => '#aaaaaa',
284
- 'required' => false
285
- ));
286
- $fieldset->addField('breadcrumbs_font_color', 'text', array(
287
- 'label' => Mage::helper('mobilenow')->__('Breadcrumbs Font Color'),
288
- 'name' => 'breadcrumbs_font_color',
289
- 'class' => 'minicolors input-color',
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[]',
335
- 'values' => array(
336
- array('value'=>'1','label'=>'Position'),
337
- array('value'=>'2','label'=>'Price High -> Low'),
338
- array('value'=>'3','label'=>'Price Low -> High'),
339
- array('value'=>'4','label'=>'Name A -> Z'),
340
- array('value'=>'5','label'=>'Name Z -> A'),
341
- ),
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',
375
- 'class' => 'minicolors input-color',
376
- 'value' => '#aaaaaa',
377
- 'required' => false
378
- ));
379
- $fieldset->addField('pagination_button_bg_color', 'text', array(
380
- 'label' => Mage::helper('mobilenow')->__('Pagination Buttons Background Color'),
381
- 'name' => 'pagination_button_bg_color',
382
- 'class' => 'minicolors input-color',
383
- 'value' => '#aaaaaa',
384
- 'required' => false
385
- ));
386
- $fieldset->addField('pagination_button_text_color', 'text', array(
387
- 'label' => Mage::helper('mobilenow')->__('Pagination Button Text Color'),
388
- 'name' => 'pagination_button_text_color',
389
- 'class' => 'minicolors input-color',
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',
400
- 'class' => '',
401
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
402
- 'required' => false,
403
- 'checked'=>$ImBorderChecked
404
- ));
405
- $fieldset->addField('image_border_color', 'text', array(
406
- 'label' => Mage::helper('mobilenow')->__('Image Border Color'),
407
- 'name' => 'image_border_color',
408
- 'class' => 'minicolors input-color',
409
- 'value' => '#aaaaaa',
410
- 'required' => false
411
- ));
412
- $fieldset->addField('catalog_image_width', 'text', array(
413
- 'label' => Mage::helper('mobilenow')->__('Image Border Width (px)'),
414
- 'name' => 'catalog_image_width',
415
- 'class' => '',
416
- 'required' => false,
417
- "note" => "Please enter a value less than 5"
418
- ));
419
- $fieldset->addField('product_title_color', 'text', array(
420
- 'label' => Mage::helper('mobilenow')->__('Product Title Color'),
421
- 'name' => 'product_title_color',
422
- 'class' => 'minicolors input-color',
423
- 'value' => '#aaaaaa',
424
- 'required' => false
425
- ));
426
- $fieldset->addField('product_price_color', 'text', array(
427
- 'label' => Mage::helper('mobilenow')->__('Product Price Color'),
428
- 'name' => 'product_price_color',
429
- 'class' => 'minicolors input-color',
430
- 'value' => '#aaaaaa',
431
- 'required' => false
432
- ));
433
- $fieldset->addField('product_special_price_color', 'text', array(
434
- 'label' => Mage::helper('mobilenow')->__('Product Special Price Color'),
435
- 'name' => 'product_special_price_color',
436
- 'class' => 'minicolors input-color',
437
- 'value' => '#aaaaaa',
438
- 'required' => false
439
- ));
440
- $fieldset->addField('show_review_stars', 'checkbox', array(
441
- 'label' => Mage::helper('mobilenow')->__('Show Review stars'),
442
- 'name' => 'show_review_stars',
443
- 'class' => '',
444
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
445
- 'required' => false,
446
- 'checked'=>$reviewsChecked
447
- ));
448
- $fieldset->addField('review_star_color', 'text', array(
449
- 'label' => Mage::helper('mobilenow')->__('Review Stars Color'),
450
- 'name' => 'review_star_color',
451
- 'class' => 'minicolors input-color',
452
- 'value' => '#aaaaaa',
453
- 'required' => false
454
- ));
455
- $fieldset->addField('show_learn_more', 'checkbox', array(
456
- 'label' => Mage::helper('mobilenow')->__('Show "Learn More" Link'),
457
- 'name' => 'show_learn_more',
458
- 'class' => '',
459
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
460
- 'required' => false,
461
- 'checked'=>$cataloglearnChecked
462
- ));
463
- $fieldset->addField('show_add_to_cart', 'checkbox', array(
464
- 'label' => Mage::helper('mobilenow')->__('Show Add To Cart Button'),
465
- 'name' => 'show_add_to_cart',
466
- 'class' => '',
467
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
468
- 'required' => false,
469
- 'checked'=>$addtocartChecked
470
- ));
471
- $fieldset->addField('add_to_cart_button_bg_color', 'text', array(
472
- 'label' => Mage::helper('mobilenow')->__('Add To Cart Button Background Color'),
473
- 'name' => 'add_to_cart_button_bg_color',
474
- 'class' => 'minicolors input-color',
475
- 'value' => '#aaaaaa',
476
- 'required' => false
477
- ));
478
- $fieldset->addField('add_to_cart_button_font_color', 'text', array(
479
- 'label' => Mage::helper('mobilenow')->__('Add To Cart Button Font Color'),
480
- 'name' => 'add_to_cart_button_font_color',
481
- 'class' => 'minicolors input-color',
482
- 'value' => '#aaaaaa',
483
- 'required' => false
484
- ));
485
- $fieldset->addField('add_to_cart_button_border_color', 'text', array(
486
- 'label' => Mage::helper('mobilenow')->__('Add To Cart Button Border Color'),
487
- 'name' => 'add_to_cart_button_border_color',
488
- 'class' => 'minicolors input-color',
489
- 'value' => '#aaaaaa',
490
- 'required' => false
491
- ));
492
- $fieldset->addField('show_gridlines', 'checkbox', array(
493
- 'label' => Mage::helper('mobilenow')->__('Show Gridlines'),
494
- 'name' => 'show_gridlines',
495
- 'class' => '',
496
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
497
- 'required' => false,
498
- 'checked'=>$gridlinesChecked
499
- ));
500
- $fieldset->addField('gridlines_color', 'text', array(
501
- 'label' => Mage::helper('mobilenow')->__('Gridlines Color'),
502
- 'name' => 'gridlines_color',
503
- 'class' => 'minicolors input-color',
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(
510
- 'label' => Mage::helper('mobilenow')->__('Product Title Color'),
511
- 'name' => 'productpage_title_color',
512
- 'class' => 'minicolors input-color',
513
- 'value' => '#aaaaaa',
514
- 'required' => false
515
- ));
516
- $fieldset->addField('show_product_image_border', 'checkbox', array(
517
- 'label' => Mage::helper('mobilenow')->__('Show Image Border'),
518
- 'name' => 'show_product_image_border',
519
- 'class' => '',
520
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
521
- 'required' => false,
522
- 'checked'=>$prImBorderChecked
523
- ));
524
- $fieldset->addField('product_image_border_color', 'text', array(
525
- 'label' => Mage::helper('mobilenow')->__('Image Border Color'),
526
- 'name' => 'product_image_border_color',
527
- 'class' => 'minicolors input-color',
528
- 'value' => '#aaaaaa',
529
- 'required' => false
530
- ));
531
- $fieldset->addField('product_image_width', 'text', array(
532
- 'label' => Mage::helper('mobilenow')->__('Image Width (px)'),
533
- 'name' => 'product_image_width',
534
- 'class' => '',
535
- 'required' => false
536
- ));
537
- $fieldset->addField('show_product_availability', 'checkbox', array(
538
- 'label' => Mage::helper('mobilenow')->__('Show Availability'),
539
- 'name' => 'show_product_availability',
540
- 'class' => '',
541
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
542
- 'required' => false,
543
- 'checked'=>$shAvlChecked
544
- ));
545
- $fieldset->addField('show_product_wishlist_link', 'checkbox', array(
546
- 'label' => Mage::helper('mobilenow')->__('Show Wishlist Link'),
547
- 'name' => 'show_product_wishlist_link',
548
- 'class' => '',
549
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
550
- 'required' => false,
551
- 'checked'=>$shprdwishChecked
552
- ));
553
- $fieldset->addField('show_product_reviews_summary', 'checkbox', array(
554
- 'label' => Mage::helper('mobilenow')->__('Show Reviews Summary'),
555
- 'name' => 'show_product_reviews_summary',
556
- 'class' => '',
557
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
558
- 'required' => false,
559
- 'checked'=>$shprdrevChecked
560
- ));
561
- $fieldset->addField('show_product_description', 'checkbox', array(
562
- 'label' => Mage::helper('mobilenow')->__('Show Description'),
563
- 'name' => 'show_product_description',
564
- 'class' => '',
565
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
566
- 'required' => false,
567
- 'checked'=>$shprddesChecked
568
- ));
569
- $fieldset->addField('product_description_color', 'text', array(
570
- 'label' => Mage::helper('mobilenow')->__('Product description Color'),
571
- 'name' => 'product_description_color',
572
- 'class' => 'minicolors input-color',
573
- 'value' => '#aaaaaa',
574
- 'required' => false
575
- ));
576
- $fieldset->addField('show_product_additional_information', 'checkbox', array(
577
- 'label' => Mage::helper('mobilenow')->__('Show Additional Information'),
578
- 'name' => 'show_product_additional_information',
579
- 'class' => '',
580
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
581
- 'required' => false,
582
- 'checked'=>$shadditionalChecked
583
- ));
584
- $fieldset->addField('additional_information_bg_color', 'text', array(
585
- 'label' => Mage::helper('mobilenow')->__('Additional information background Color'),
586
- 'name' => 'additional_information_bg_color',
587
- 'class' => 'minicolors input-color',
588
- 'value' => '#aaaaaa',
589
- 'required' => false
590
- ));
591
- $fieldset->addField('additional_information_font_color', 'text', array(
592
- 'label' => Mage::helper('mobilenow')->__('Additional information font Color'),
593
- 'name' => 'additional_information_font_color',
594
- 'class' => 'minicolors input-color',
595
- 'value' => '#aaaaaa',
596
- 'required' => false
597
- ));
598
- $fieldset->addField('show_full_reviews_on_product_page', 'checkbox', array(
599
- 'label' => Mage::helper('mobilenow')->__('Show Full Reviews on Product Page'),
600
- 'name' => 'show_full_reviews_on_product_page',
601
- 'class' => '',
602
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
603
- 'required' => false,
604
- 'checked'=>$shflreChecked
605
- ));
606
- $fieldset->addField('full_reviews_bg_color', 'text', array(
607
- 'label' => Mage::helper('mobilenow')->__('Reviews background Color'),
608
- 'name' => 'full_reviews_bg_color',
609
- 'class' => 'minicolors input-color',
610
- 'value' => '#aaaaaa',
611
- 'required' => false
612
- ));
613
- $fieldset->addField('full_reviews_font_color', 'text', array(
614
- 'label' => Mage::helper('mobilenow')->__('Reviews font Color'),
615
- 'name' => 'full_reviews_font_color',
616
- 'class' => 'minicolors input-color',
617
- 'value' => '#aaaaaa',
618
- 'required' => false
619
- ));
620
- $fieldset->addField('show_related_products', 'checkbox', array(
621
- 'label' => Mage::helper('mobilenow')->__('Show Related Products'),
622
- 'name' => 'show_related_products',
623
- 'class' => '',
624
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
625
- 'required' => false,
626
- 'checked'=>$shrlChecked
627
- ));
628
- $fieldset->addField('hidden_selected_val', 'hidden', array(
629
- 'label' => Mage::helper('mobilenow')->__(''),
630
- 'name' => 'hidden_selected_val',
631
- 'class' => '',
632
- 'required' => false
633
- ));
634
- $fieldset->addField('hidden_action_val', 'hidden', array(
635
- 'label' => Mage::helper('mobilenow')->__(''),
636
- 'name' => 'hidden_action_val',
637
- 'class' => '',
638
- 'required' => false
639
- ));
640
- if (Mage::getSingleton("adminhtml/session")->getSubsettingsData())
641
- {
642
- $form->setValues(Mage::getSingleton("adminhtml/session")->getSubsettingsData());
643
- Mage::getSingleton("adminhtml/session")->setSubsettingsData(null);
644
- }
645
- elseif(Mage::registry("subsettings_data"))
646
- {
647
- $form->setValues(Mage::registry("subsettings_data")->getData());
648
- }
649
- return parent::_prepareForm();
650
- }
651
-
652
- }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Design extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ /**
5
+ * Class constructor
6
+ *
7
+ */
8
+ protected function _construct()
9
+ {
10
+ parent::_construct();
11
+ $this->setTemplate('mobilenow/widget/design.phtml');
12
+ }
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;
20
+ if(Mage::registry("subsettings_data")->getShowBreadcrumbs()==1)$breadChecked=true;
21
+ if(Mage::registry("subsettings_data")->getShowGridListChoice()==1)$gridChecked=true;
22
+ if(Mage::registry("subsettings_data")->getShowSortbyDropdown()==1)$sortChecked=true;
23
+ if(Mage::registry("subsettings_data")->getShowImageBorder()==1)$ImBorderChecked=true;
24
+ if(Mage::registry("subsettings_data")->getShowReviewStars()==1)$reviewsChecked=true;
25
+ if(Mage::registry("subsettings_data")->getShowLearnMore()==1)$cataloglearnChecked=true;
26
+ if(Mage::registry("subsettings_data")->getShowAddToCart()==1)$addtocartChecked=true;
27
+ if(Mage::registry("subsettings_data")->getShowGridlines()==1)$gridlinesChecked=true;
28
+ if(Mage::registry("subsettings_data")->getShowProductImageBorder()==1)$prImBorderChecked=true;
29
+ if(Mage::registry("subsettings_data")->getShowProductAvailability()==1)$shAvlChecked=true;
30
+ if(Mage::registry("subsettings_data")->getShowProductWishlistLink()==1)$shprdwishChecked=true;
31
+ if(Mage::registry("subsettings_data")->getShowProductReviewsSummary()==1)$shprdrevChecked=true;
32
+ if(Mage::registry("subsettings_data")->getShowProductDescription()==1)$shprddesChecked =true;
33
+ if(Mage::registry("subsettings_data")->getShowProductAdditionalInformation()==1)$shadditionalChecked=true;
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',
98
+ 'class' => 'minicolors input-color',
99
+ 'value' => '#aaaaaa',
100
+ 'required' => false
101
+ ));
102
+ $fieldset->addField('text_color', 'text', array(
103
+ 'label' => Mage::helper('mobilenow')->__('Text Color'),
104
+ 'name' => 'text_color',
105
+ 'class' => 'minicolors input-color',
106
+ 'value' => '#aaaaaa',
107
+ 'required' => false
108
+ ));
109
+ $fieldset->addField('show_search_cart_area', 'checkbox', array(
110
+ 'label' => Mage::helper('mobilenow')->__('Show Search / Cart Area'),
111
+ 'name' => 'show_search_cart_area',
112
+ 'class' => '',
113
+ 'required' => false,
114
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
115
+ 'checked' => $checked,
116
+ ));
117
+ $fieldset->addField('search_cart_bg_color', 'text', array(
118
+ 'label' => Mage::helper('mobilenow')->__('Search / Cart Area Backgorund Color'),
119
+ 'name' => 'search_cart_bg_color',
120
+ 'class' => 'minicolors input-color',
121
+ 'value' => '#aaaaaa',
122
+ 'required' => false
123
+ ));
124
+ $fieldset->addField('cart_link_color', 'text', array(
125
+ 'label' => Mage::helper('mobilenow')->__('Cart Link Color'),
126
+ 'name' => 'cart_link_color',
127
+ 'class' => 'minicolors input-color',
128
+ 'value' => '#aaaaaa',
129
+ 'required' => false
130
+ ));
131
+ $fieldset->addField('show_home_page_banner', 'checkbox', array(
132
+ 'label' => Mage::helper('mobilenow')->__('Show Homepage Banner'),
133
+ 'name' => 'show_home_page_banner',
134
+ 'class' => '',
135
+ 'required' => false,
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',
146
+ ));
147
+ $fieldset->addField('banner_preview_filename', 'hidden', array(
148
+ 'label' => '',
149
+ 'name' => 'banner_preview_filename',
150
+ ));
151
+ $fieldset->addField('homepage_banner', 'file', array(
152
+ 'label' => Mage::helper('mobilenow')->__('Homepage Banner'),
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',
172
+ 'value' => '1',
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' =>'',
180
+ 'name' => 'categories',
181
+ 'value' => '2',
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'),
189
+ // 'name' => 'categories',
190
+ // 'onclick' => "",
191
+ // 'onchange' => "",
192
+ // 'value' => '1',
193
+ // 'values' => array(
194
+ // array('value'=>'1','label'=>'Mobile Menu'),
195
+ // array('value'=>'2','label'=>'Show All'),
196
+ // )
197
+ // ));
198
+ $fieldset->addField('categories_background_color', 'text', array(
199
+ 'label' => Mage::helper('mobilenow')->__('Categories Background Color'),
200
+ 'name' => 'categories_background_color',
201
+ 'class' => 'minicolors input-color',
202
+ 'value' => '#aaaaaa',
203
+ 'required' => false
204
+ ));
205
+ $fieldset->addField('show_newsletter', 'checkbox', array(
206
+ 'label' => Mage::helper('mobilenow')->__('Show Newsletter'),
207
+ 'name' => 'show_newsletter',
208
+ 'class' => '',
209
+ 'required' => false,
210
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
211
+ 'checked' => $newsletterChecked,
212
+ ));
213
+ $fieldset->addField('newsletter_area_backgorund', 'text', array(
214
+ 'label' => Mage::helper('mobilenow')->__('Newsletter Area Background'),
215
+ 'name' => 'newsletter_area_backgorund',
216
+ 'class' => 'minicolors input-color',
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',
251
+ 'class' => 'minicolors input-color',
252
+ 'value' => '#aaaaaa',
253
+ 'required' => false
254
+ ));
255
+ $fieldset->addField('button_text_color', 'text', array(
256
+ 'label' => Mage::helper('mobilenow')->__('Button Text Color'),
257
+ 'name' => 'button_text_color',
258
+ 'class' => 'minicolors input-color',
259
+ 'value' => '#aaaaaa',
260
+ 'required' => false
261
+ ));
262
+ $fieldset->addField('button_border_color', 'text', array(
263
+ 'label' => Mage::helper('mobilenow')->__('Button Border Color'),
264
+ 'name' => 'button_border_color',
265
+ 'class' => 'minicolors input-color',
266
+ 'value' => '#aaaaaa',
267
+ 'required' => false
268
+ ));
269
+ /*******************************************Catalog Page**********************************************/
270
+ $fieldset = $form->addFieldset('catalog_page',array());
271
+ $fieldset->addField('show_breadcrumbs', 'checkbox', array(
272
+ 'label' => Mage::helper('mobilenow')->__('Show Breadcrumbs'),
273
+ 'name' => 'show_breadcrumbs',
274
+ 'class' => '',
275
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
276
+ 'required' => false,
277
+ 'checked' => $breadChecked
278
+ ));
279
+ $fieldset->addField('breadcrumbs_bg_color', 'text', array(
280
+ 'label' => Mage::helper('mobilenow')->__('Breadcrumbs Background Color'),
281
+ 'name' => 'breadcrumbs_bg_color',
282
+ 'class' => 'minicolors input-color',
283
+ 'value' => '#aaaaaa',
284
+ 'required' => false
285
+ ));
286
+ $fieldset->addField('breadcrumbs_font_color', 'text', array(
287
+ 'label' => Mage::helper('mobilenow')->__('Breadcrumbs Font Color'),
288
+ 'name' => 'breadcrumbs_font_color',
289
+ 'class' => 'minicolors input-color',
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[]',
335
+ 'values' => array(
336
+ array('value'=>'1','label'=>'Position'),
337
+ array('value'=>'2','label'=>'Price High -> Low'),
338
+ array('value'=>'3','label'=>'Price Low -> High'),
339
+ array('value'=>'4','label'=>'Name A -> Z'),
340
+ array('value'=>'5','label'=>'Name Z -> A'),
341
+ ),
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',
375
+ 'class' => 'minicolors input-color',
376
+ 'value' => '#aaaaaa',
377
+ 'required' => false
378
+ ));
379
+ $fieldset->addField('pagination_button_bg_color', 'text', array(
380
+ 'label' => Mage::helper('mobilenow')->__('Pagination Buttons Background Color'),
381
+ 'name' => 'pagination_button_bg_color',
382
+ 'class' => 'minicolors input-color',
383
+ 'value' => '#aaaaaa',
384
+ 'required' => false
385
+ ));
386
+ $fieldset->addField('pagination_button_text_color', 'text', array(
387
+ 'label' => Mage::helper('mobilenow')->__('Pagination Button Text Color'),
388
+ 'name' => 'pagination_button_text_color',
389
+ 'class' => 'minicolors input-color',
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',
400
+ 'class' => '',
401
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
402
+ 'required' => false,
403
+ 'checked'=>$ImBorderChecked
404
+ ));
405
+ $fieldset->addField('image_border_color', 'text', array(
406
+ 'label' => Mage::helper('mobilenow')->__('Image Border Color'),
407
+ 'name' => 'image_border_color',
408
+ 'class' => 'minicolors input-color',
409
+ 'value' => '#aaaaaa',
410
+ 'required' => false
411
+ ));
412
+ $fieldset->addField('catalog_image_width', 'text', array(
413
+ 'label' => Mage::helper('mobilenow')->__('Image Border Width (px)'),
414
+ 'name' => 'catalog_image_width',
415
+ 'class' => '',
416
+ 'required' => false,
417
+ "note" => "Please enter a value less than 5"
418
+ ));
419
+ $fieldset->addField('product_title_color', 'text', array(
420
+ 'label' => Mage::helper('mobilenow')->__('Product Title Color'),
421
+ 'name' => 'product_title_color',
422
+ 'class' => 'minicolors input-color',
423
+ 'value' => '#aaaaaa',
424
+ 'required' => false
425
+ ));
426
+ $fieldset->addField('product_price_color', 'text', array(
427
+ 'label' => Mage::helper('mobilenow')->__('Product Price Color'),
428
+ 'name' => 'product_price_color',
429
+ 'class' => 'minicolors input-color',
430
+ 'value' => '#aaaaaa',
431
+ 'required' => false
432
+ ));
433
+ $fieldset->addField('product_special_price_color', 'text', array(
434
+ 'label' => Mage::helper('mobilenow')->__('Product Special Price Color'),
435
+ 'name' => 'product_special_price_color',
436
+ 'class' => 'minicolors input-color',
437
+ 'value' => '#aaaaaa',
438
+ 'required' => false
439
+ ));
440
+ $fieldset->addField('show_review_stars', 'checkbox', array(
441
+ 'label' => Mage::helper('mobilenow')->__('Show Review stars'),
442
+ 'name' => 'show_review_stars',
443
+ 'class' => '',
444
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
445
+ 'required' => false,
446
+ 'checked'=>$reviewsChecked
447
+ ));
448
+ $fieldset->addField('review_star_color', 'text', array(
449
+ 'label' => Mage::helper('mobilenow')->__('Review Stars Color'),
450
+ 'name' => 'review_star_color',
451
+ 'class' => 'minicolors input-color',
452
+ 'value' => '#aaaaaa',
453
+ 'required' => false
454
+ ));
455
+ $fieldset->addField('show_learn_more', 'checkbox', array(
456
+ 'label' => Mage::helper('mobilenow')->__('Show "Learn More" Link'),
457
+ 'name' => 'show_learn_more',
458
+ 'class' => '',
459
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
460
+ 'required' => false,
461
+ 'checked'=>$cataloglearnChecked
462
+ ));
463
+ $fieldset->addField('show_add_to_cart', 'checkbox', array(
464
+ 'label' => Mage::helper('mobilenow')->__('Show Add To Cart Button'),
465
+ 'name' => 'show_add_to_cart',
466
+ 'class' => '',
467
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
468
+ 'required' => false,
469
+ 'checked'=>$addtocartChecked
470
+ ));
471
+ $fieldset->addField('add_to_cart_button_bg_color', 'text', array(
472
+ 'label' => Mage::helper('mobilenow')->__('Add To Cart Button Background Color'),
473
+ 'name' => 'add_to_cart_button_bg_color',
474
+ 'class' => 'minicolors input-color',
475
+ 'value' => '#aaaaaa',
476
+ 'required' => false
477
+ ));
478
+ $fieldset->addField('add_to_cart_button_font_color', 'text', array(
479
+ 'label' => Mage::helper('mobilenow')->__('Add To Cart Button Font Color'),
480
+ 'name' => 'add_to_cart_button_font_color',
481
+ 'class' => 'minicolors input-color',
482
+ 'value' => '#aaaaaa',
483
+ 'required' => false
484
+ ));
485
+ $fieldset->addField('add_to_cart_button_border_color', 'text', array(
486
+ 'label' => Mage::helper('mobilenow')->__('Add To Cart Button Border Color'),
487
+ 'name' => 'add_to_cart_button_border_color',
488
+ 'class' => 'minicolors input-color',
489
+ 'value' => '#aaaaaa',
490
+ 'required' => false
491
+ ));
492
+ $fieldset->addField('show_gridlines', 'checkbox', array(
493
+ 'label' => Mage::helper('mobilenow')->__('Show Gridlines'),
494
+ 'name' => 'show_gridlines',
495
+ 'class' => '',
496
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
497
+ 'required' => false,
498
+ 'checked'=>$gridlinesChecked
499
+ ));
500
+ $fieldset->addField('gridlines_color', 'text', array(
501
+ 'label' => Mage::helper('mobilenow')->__('Gridlines Color'),
502
+ 'name' => 'gridlines_color',
503
+ 'class' => 'minicolors input-color',
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(
510
+ 'label' => Mage::helper('mobilenow')->__('Product Title Color'),
511
+ 'name' => 'productpage_title_color',
512
+ 'class' => 'minicolors input-color',
513
+ 'value' => '#aaaaaa',
514
+ 'required' => false
515
+ ));
516
+ $fieldset->addField('show_product_image_border', 'checkbox', array(
517
+ 'label' => Mage::helper('mobilenow')->__('Show Image Border'),
518
+ 'name' => 'show_product_image_border',
519
+ 'class' => '',
520
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
521
+ 'required' => false,
522
+ 'checked'=>$prImBorderChecked
523
+ ));
524
+ $fieldset->addField('product_image_border_color', 'text', array(
525
+ 'label' => Mage::helper('mobilenow')->__('Image Border Color'),
526
+ 'name' => 'product_image_border_color',
527
+ 'class' => 'minicolors input-color',
528
+ 'value' => '#aaaaaa',
529
+ 'required' => false
530
+ ));
531
+ $fieldset->addField('product_image_width', 'text', array(
532
+ 'label' => Mage::helper('mobilenow')->__('Image Width (px)'),
533
+ 'name' => 'product_image_width',
534
+ 'class' => '',
535
+ 'required' => false
536
+ ));
537
+ $fieldset->addField('show_product_availability', 'checkbox', array(
538
+ 'label' => Mage::helper('mobilenow')->__('Show Availability'),
539
+ 'name' => 'show_product_availability',
540
+ 'class' => '',
541
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
542
+ 'required' => false,
543
+ 'checked'=>$shAvlChecked
544
+ ));
545
+ $fieldset->addField('show_product_wishlist_link', 'checkbox', array(
546
+ 'label' => Mage::helper('mobilenow')->__('Show Wishlist Link'),
547
+ 'name' => 'show_product_wishlist_link',
548
+ 'class' => '',
549
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
550
+ 'required' => false,
551
+ 'checked'=>$shprdwishChecked
552
+ ));
553
+ $fieldset->addField('show_product_reviews_summary', 'checkbox', array(
554
+ 'label' => Mage::helper('mobilenow')->__('Show Reviews Summary'),
555
+ 'name' => 'show_product_reviews_summary',
556
+ 'class' => '',
557
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
558
+ 'required' => false,
559
+ 'checked'=>$shprdrevChecked
560
+ ));
561
+ $fieldset->addField('show_product_description', 'checkbox', array(
562
+ 'label' => Mage::helper('mobilenow')->__('Show Description'),
563
+ 'name' => 'show_product_description',
564
+ 'class' => '',
565
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
566
+ 'required' => false,
567
+ 'checked'=>$shprddesChecked
568
+ ));
569
+ $fieldset->addField('product_description_color', 'text', array(
570
+ 'label' => Mage::helper('mobilenow')->__('Product description Color'),
571
+ 'name' => 'product_description_color',
572
+ 'class' => 'minicolors input-color',
573
+ 'value' => '#aaaaaa',
574
+ 'required' => false
575
+ ));
576
+ $fieldset->addField('show_product_additional_information', 'checkbox', array(
577
+ 'label' => Mage::helper('mobilenow')->__('Show Additional Information'),
578
+ 'name' => 'show_product_additional_information',
579
+ 'class' => '',
580
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
581
+ 'required' => false,
582
+ 'checked'=>$shadditionalChecked
583
+ ));
584
+ $fieldset->addField('additional_information_bg_color', 'text', array(
585
+ 'label' => Mage::helper('mobilenow')->__('Additional information background Color'),
586
+ 'name' => 'additional_information_bg_color',
587
+ 'class' => 'minicolors input-color',
588
+ 'value' => '#aaaaaa',
589
+ 'required' => false
590
+ ));
591
+ $fieldset->addField('additional_information_font_color', 'text', array(
592
+ 'label' => Mage::helper('mobilenow')->__('Additional information font Color'),
593
+ 'name' => 'additional_information_font_color',
594
+ 'class' => 'minicolors input-color',
595
+ 'value' => '#aaaaaa',
596
+ 'required' => false
597
+ ));
598
+ $fieldset->addField('show_full_reviews_on_product_page', 'checkbox', array(
599
+ 'label' => Mage::helper('mobilenow')->__('Show Full Reviews on Product Page'),
600
+ 'name' => 'show_full_reviews_on_product_page',
601
+ 'class' => '',
602
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
603
+ 'required' => false,
604
+ 'checked'=>$shflreChecked
605
+ ));
606
+ $fieldset->addField('full_reviews_bg_color', 'text', array(
607
+ 'label' => Mage::helper('mobilenow')->__('Reviews background Color'),
608
+ 'name' => 'full_reviews_bg_color',
609
+ 'class' => 'minicolors input-color',
610
+ 'value' => '#aaaaaa',
611
+ 'required' => false
612
+ ));
613
+ $fieldset->addField('full_reviews_font_color', 'text', array(
614
+ 'label' => Mage::helper('mobilenow')->__('Reviews font Color'),
615
+ 'name' => 'full_reviews_font_color',
616
+ 'class' => 'minicolors input-color',
617
+ 'value' => '#aaaaaa',
618
+ 'required' => false
619
+ ));
620
+ $fieldset->addField('show_related_products', 'checkbox', array(
621
+ 'label' => Mage::helper('mobilenow')->__('Show Related Products'),
622
+ 'name' => 'show_related_products',
623
+ 'class' => '',
624
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
625
+ 'required' => false,
626
+ 'checked'=>$shrlChecked
627
+ ));
628
+ $fieldset->addField('hidden_selected_val', 'hidden', array(
629
+ 'label' => Mage::helper('mobilenow')->__(''),
630
+ 'name' => 'hidden_selected_val',
631
+ 'class' => '',
632
+ 'required' => false
633
+ ));
634
+ $fieldset->addField('hidden_action_val', 'hidden', array(
635
+ 'label' => Mage::helper('mobilenow')->__(''),
636
+ 'name' => 'hidden_action_val',
637
+ 'class' => '',
638
+ 'required' => false
639
+ ));
640
+ if (Mage::getSingleton("adminhtml/session")->getSubsettingsData())
641
+ {
642
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getSubsettingsData());
643
+ Mage::getSingleton("adminhtml/session")->setSubsettingsData(null);
644
+ }
645
+ elseif(Mage::registry("subsettings_data"))
646
+ {
647
+ $form->setValues(Mage::registry("subsettings_data")->getData());
648
+ }
649
+ return parent::_prepareForm();
650
+ }
651
+
652
+ }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Form.php CHANGED
@@ -1,96 +1,96 @@
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
- }
96
- }
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
+ }
96
+ }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tab/Layout.php CHANGED
@@ -1,299 +1,299 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Layout extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- /**
5
- * Class constructor
6
- *
7
- */
8
- protected function _construct()
9
- {
10
- parent::_construct();
11
- $this->setTemplate('mobilenow/widget/layout.phtml');
12
- }
13
- protected function _prepareForm()
14
- {
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());
40
-
41
- $fieldset->addField('homepage_layout_head_message', 'text', array(
42
- 'name'=>'homepage_layout_head_message',
43
- ));
44
- $form->getElement('homepage_layout_head_message')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_hlayoutmessage'));
45
-
46
- $fieldsetHLayout = $fieldset->addFieldset('general_layout_h_fields',array('class'=>'layout-fields'));
47
-
48
- $fieldsetHLayout->addField('h_layout_heading', 'note', array(
49
- 'label'=>'Block Name',
50
- 'text' => 'Sort Order',
51
- ));
52
- $fieldsetHLayout->addField('h_layout_search_cart', 'text', array(
53
- 'label' => Mage::helper('mobilenow')->__('Search/Cart'),
54
- 'name' => 'h_layout_search_cart',
55
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
56
- 'required' => false
57
- ));
58
- $fieldsetHLayout->addField('h_layout_sub_header', 'text', array(
59
- 'label' => Mage::helper('mobilenow')->__('Sub Header'),
60
- 'name' => 'h_layout_sub_header',
61
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
62
- 'required' => false
63
- ));
64
- $fieldsetHLayout->addField('h_layout_banner', 'text', array(
65
- 'label' => Mage::helper('mobilenow')->__('Feature Banner'),
66
- 'name' => 'h_layout_banner',
67
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
68
- 'required' => false
69
- ));
70
- $fieldsetHLayout->addField('h_layout_feature', 'text', array(
71
- 'label' => Mage::helper('mobilenow')->__('Homepage Feature'),
72
- 'name' => 'h_layout_feature',
73
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
74
- 'required' => false
75
- ));
76
- $fieldsetHLayout->addField('h_layout_categories', 'text', array(
77
- 'label' => Mage::helper('mobilenow')->__('Categories'),
78
- 'name' => 'h_layout_categories',
79
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
80
- 'required' => false
81
- ));
82
- $fieldsetHLayout->addField('h_layout_news_signup', 'text', array(
83
- 'label' => Mage::helper('mobilenow')->__('Newsletter Signup'),
84
- 'name' => 'h_layout_news_signup',
85
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
86
- 'required' => false
87
- ));
88
-
89
- /*******************************************Catalog Page**********************************************/
90
- $fieldset = $form->addFieldset('catalog_layout_page',array());
91
-
92
- $fieldset->addField('catalog_layout_head_message', 'text', array(
93
- 'name'=>'catalog_layout_head_message',
94
- ));
95
- $form->getElement('catalog_layout_head_message')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_clayoutmessage'));
96
-
97
- $fieldsetCLayout = $fieldset->addFieldset('general_layout_c_fields',array('class'=>'layout-fields'));
98
-
99
- $fieldsetCLayout->addField('c_layout_heading', 'note', array(
100
- 'label'=>'Block Name',
101
- 'text' => 'Sort Order',
102
- ));
103
- $fieldsetCLayout->addField('c_layout_breadcrumbs', 'text', array(
104
- 'label' => Mage::helper('mobilenow')->__('Breadcrumbs'),
105
- 'name' => 'c_layout_breadcrumbs',
106
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
107
- 'required' => false
108
- ));
109
- $fieldsetCLayout->addField('c_layout_toolbar', 'text', array(
110
- 'label' => Mage::helper('mobilenow')->__('Toolbar'),
111
- 'name' => 'c_layout_toolbar',
112
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
113
- 'required' => false
114
- ));
115
- $fieldsetCLayout->addField('c_layout_pag_top', 'text', array(
116
- 'label' => Mage::helper('mobilenow')->__('Pagination (top)'),
117
- 'name' => 'c_layout_pag_top',
118
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
119
- 'required' => false
120
- ));
121
-
122
- //for grid
123
- // $fieldsetCLayout = $fieldset->addFieldset('general_layout_c_fields_grid',array('class'=>'layout-fields layout-grid-listheading'));
124
- //
125
- // $fieldsetCLayout->addField('c_grid_layout_heading', 'note', array(
126
- // 'text'=>'Product Grid View - <a class="headlink" href="">view in preview</a>'
127
- // ));
128
- // $fieldsetCLayout->addField('c_grid_layout_product_image', 'text', array(
129
- // 'label' => Mage::helper('mobilenow')->__('Product - Image'),
130
- // 'name' => 'c_grid_layout_product_image',
131
- // 'class' => 'sort_order validate-digits validate-greater-than-zero',
132
- // 'required' => false
133
- // ));
134
- // $fieldsetCLayout->addField('c_grid_layout_product_title', 'text', array(
135
- // 'label' => Mage::helper('mobilenow')->__('Product - Title'),
136
- // 'name' => 'c_grid_layout_product_title',
137
- // 'class' => 'sort_order validate-digits validate-greater-than-zero',
138
- // 'required' => false
139
- // ));
140
- // $fieldsetCLayout->addField('c_grid_layout_product_price', 'text', array(
141
- // 'label' => Mage::helper('mobilenow')->__('Product - Price'),
142
- // 'name' => 'c_grid_layout_product_price',
143
- // 'class' => 'sort_order validate-digits validate-greater-than-zero',
144
- // 'required' => false
145
- // ));
146
- // $fieldsetCLayout->addField('c_grid_layout_product_review', 'text', array(
147
- // 'label' => Mage::helper('mobilenow')->__('Product - Review Summary'),
148
- // 'name' => 'c_grid_layout_product_review',
149
- // 'class' => 'sort_order validate-digits validate-greater-than-zero',
150
- // 'required' => false
151
- // ));
152
- // $fieldsetCLayout->addField('c_grid_layout_product_learn', 'text', array(
153
- // 'label' => Mage::helper('mobilenow')->__('Product - Learn More'),
154
- // 'name' => 'c_grid_layout_product_learn',
155
- // 'class' => 'sort_order validate-digits validate-greater-than-zero',
156
- // 'required' => false
157
- // ));
158
- // $fieldsetCLayout->addField('c_grid_layout_product_addtocart', 'text', array(
159
- // 'label' => Mage::helper('mobilenow')->__('Product - Add to Cart'),
160
- // 'name' => 'c_grid_layout_product_addtocart',
161
- // 'class' => 'sort_order validate-digits validate-greater-than-zero',
162
- // 'required' => false
163
- // ));
164
-
165
-
166
- //for list
167
- $fieldsetCLayout = $fieldset->addFieldset('general_layout_c_fields_list',array('class'=>'layout-fields layout-grid-listheading'));
168
-
169
- $fieldsetCLayout->addField('c_list_layout_heading', 'note', array(
170
- 'text'=>'Product List View - <a class="headlink" href="">view in preview</a>'
171
- ));
172
- // $fieldsetCLayout->addField('c_list_layout_product_image', 'text', array(
173
- // 'label' => Mage::helper('mobilenow')->__('Product - Image'),
174
- // 'name' => 'c_list_layout_product_image',
175
- // 'class' => 'sort_order validate-digits validate-greater-than-zero',
176
- // 'required' => false
177
- // ));
178
- // $fieldsetCLayout->addField('c_list_layout_product_title', 'text', array(
179
- // 'label' => Mage::helper('mobilenow')->__('Product - Title'),
180
- // 'name' => 'c_list_layout_product_title',
181
- // 'class' => 'sort_order validate-digits validate-greater-than-zero',
182
- // 'required' => false
183
- // ));
184
- $fieldsetCLayout->addField('c_list_layout_product_price', 'text', array(
185
- 'label' => Mage::helper('mobilenow')->__('Product - Price'),
186
- 'name' => 'c_list_layout_product_price',
187
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
188
- 'required' => false
189
- ));
190
- $fieldsetCLayout->addField('c_list_layout_product_review', 'text', array(
191
- 'label' => Mage::helper('mobilenow')->__('Product - Review Summary'),
192
- 'name' => 'c_list_layout_product_review',
193
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
194
- 'required' => false
195
- ));
196
- $fieldsetCLayout->addField('c_list_layout_product_learn', 'text', array(
197
- 'label' => Mage::helper('mobilenow')->__('Product - Learn More'),
198
- 'name' => 'c_list_layout_product_learn',
199
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
200
- 'required' => false
201
- ));
202
- $fieldsetCLayout->addField('c_list_layout_product_addtocart', 'text', array(
203
- 'label' => Mage::helper('mobilenow')->__('Product - Add to Cart'),
204
- 'name' => 'c_list_layout_product_addtocart',
205
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
206
- 'required' => false
207
- ));
208
-
209
-
210
-
211
- /*******************************************Product Page**********************************************/
212
- $fieldset = $form->addFieldset('produt_layout_page',array());
213
-
214
- $fieldset->addField('product_layout_head_message', 'text', array(
215
- 'name'=>'product_layout_head_message',
216
- ));
217
- $form->getElement('product_layout_head_message')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_playoutmessage'));
218
- //Product page Top section
219
- $fieldsetPTLayout = $fieldset->addFieldset('general_layout_pt_fields',array('class'=>'layout-fields'));
220
-
221
- $fieldsetPTLayout->addField('pt_layout_heading', 'note', array(
222
- 'label'=>'Block Name',
223
- 'text' => 'Sort Order',
224
- ));
225
- $fieldsetPTLayout->addField('p_layout_availability', 'text', array(
226
- 'label' => Mage::helper('mobilenow')->__('Availability'),
227
- 'name' => 'p_layout_availability',
228
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
229
- 'required' => false
230
- ));
231
- $fieldsetPTLayout->addField('p_layout_pricing', 'text', array(
232
- 'label' => Mage::helper('mobilenow')->__('Pricing'),
233
- 'name' => 'p_layout_pricing',
234
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
235
- 'required' => false
236
- ));
237
- $fieldsetPTLayout->addField('p_layout_addtocart', 'text', array(
238
- 'label' => Mage::helper('mobilenow')->__('Customize / Add to Cart'),
239
- 'name' => 'p_layout_addtocart',
240
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
241
- 'required' => false
242
- ));
243
- $fieldsetPTLayout->addField('p_layout_wishlist', 'text', array(
244
- 'label' => Mage::helper('mobilenow')->__('Wishlist Link'),
245
- 'name' => 'p_layout_wishlist',
246
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
247
- 'required' => false
248
- ));
249
- $fieldsetPTLayout->addField('p_layout_review', 'text', array(
250
- 'label' => Mage::helper('mobilenow')->__('Review Summary'),
251
- 'name' => 'p_layout_review',
252
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
253
- 'required' => false
254
- ));
255
- // Product page Bottom section
256
- $fieldsetPBLayout = $fieldset->addFieldset('general_layout_pb_fields',array('class'=>'layout-fields'));
257
-
258
- $fieldsetPBLayout->addField('pb_layout_heading', 'note', array(
259
- 'label'=>'Block Name',
260
- 'text' => 'Sort Order',
261
- ));
262
- $fieldsetPBLayout->addField('p_layout_desc', 'text', array(
263
- 'label' => Mage::helper('mobilenow')->__('Description'),
264
- 'name' => 'p_layout_desc',
265
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
266
- 'required' => false
267
- ));
268
- $fieldsetPBLayout->addField('p_layout_additionalinfo', 'text', array(
269
- 'label' => Mage::helper('mobilenow')->__('Additional Information'),
270
- 'name' => 'p_layout_additionalinfo',
271
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
272
- 'required' => false
273
- ));
274
- $fieldsetPBLayout->addField('p_layout_fullreview', 'text', array(
275
- 'label' => Mage::helper('mobilenow')->__('Full Reviews'),
276
- 'name' => 'p_layout_fullreview',
277
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
278
- 'required' => false
279
- ));
280
- $fieldsetPBLayout->addField('p_layout_relatedproduct', 'text', array(
281
- 'label' => Mage::helper('mobilenow')->__('Related Products'),
282
- 'name' => 'p_layout_relatedproduct',
283
- 'class' => 'sort_order validate-digits validate-greater-than-zero',
284
- 'required' => false
285
- ));
286
-
287
-
288
- if (Mage::getSingleton("adminhtml/session")->getSubsettingsData())
289
- {
290
- $form->setValues(Mage::getSingleton("adminhtml/session")->getSubsettingsData());
291
- Mage::getSingleton("adminhtml/session")->setSubsettingsData(null);
292
- }
293
- elseif(Mage::registry("subsettings_data"))
294
- {
295
- $form->setValues(Mage::registry("subsettings_data")->getData());
296
- }
297
- return parent::_prepareForm();
298
- }
299
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tab_Layout extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ /**
5
+ * Class constructor
6
+ *
7
+ */
8
+ protected function _construct()
9
+ {
10
+ parent::_construct();
11
+ $this->setTemplate('mobilenow/widget/layout.phtml');
12
+ }
13
+ protected function _prepareForm()
14
+ {
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());
40
+
41
+ $fieldset->addField('homepage_layout_head_message', 'text', array(
42
+ 'name'=>'homepage_layout_head_message',
43
+ ));
44
+ $form->getElement('homepage_layout_head_message')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_hlayoutmessage'));
45
+
46
+ $fieldsetHLayout = $fieldset->addFieldset('general_layout_h_fields',array('class'=>'layout-fields'));
47
+
48
+ $fieldsetHLayout->addField('h_layout_heading', 'note', array(
49
+ 'label'=>'Block Name',
50
+ 'text' => 'Sort Order',
51
+ ));
52
+ $fieldsetHLayout->addField('h_layout_search_cart', 'text', array(
53
+ 'label' => Mage::helper('mobilenow')->__('Search/Cart'),
54
+ 'name' => 'h_layout_search_cart',
55
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
56
+ 'required' => false
57
+ ));
58
+ $fieldsetHLayout->addField('h_layout_sub_header', 'text', array(
59
+ 'label' => Mage::helper('mobilenow')->__('Sub Header'),
60
+ 'name' => 'h_layout_sub_header',
61
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
62
+ 'required' => false
63
+ ));
64
+ $fieldsetHLayout->addField('h_layout_banner', 'text', array(
65
+ 'label' => Mage::helper('mobilenow')->__('Feature Banner'),
66
+ 'name' => 'h_layout_banner',
67
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
68
+ 'required' => false
69
+ ));
70
+ $fieldsetHLayout->addField('h_layout_feature', 'text', array(
71
+ 'label' => Mage::helper('mobilenow')->__('Homepage Feature'),
72
+ 'name' => 'h_layout_feature',
73
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
74
+ 'required' => false
75
+ ));
76
+ $fieldsetHLayout->addField('h_layout_categories', 'text', array(
77
+ 'label' => Mage::helper('mobilenow')->__('Categories'),
78
+ 'name' => 'h_layout_categories',
79
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
80
+ 'required' => false
81
+ ));
82
+ $fieldsetHLayout->addField('h_layout_news_signup', 'text', array(
83
+ 'label' => Mage::helper('mobilenow')->__('Newsletter Signup'),
84
+ 'name' => 'h_layout_news_signup',
85
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
86
+ 'required' => false
87
+ ));
88
+
89
+ /*******************************************Catalog Page**********************************************/
90
+ $fieldset = $form->addFieldset('catalog_layout_page',array());
91
+
92
+ $fieldset->addField('catalog_layout_head_message', 'text', array(
93
+ 'name'=>'catalog_layout_head_message',
94
+ ));
95
+ $form->getElement('catalog_layout_head_message')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_clayoutmessage'));
96
+
97
+ $fieldsetCLayout = $fieldset->addFieldset('general_layout_c_fields',array('class'=>'layout-fields'));
98
+
99
+ $fieldsetCLayout->addField('c_layout_heading', 'note', array(
100
+ 'label'=>'Block Name',
101
+ 'text' => 'Sort Order',
102
+ ));
103
+ $fieldsetCLayout->addField('c_layout_breadcrumbs', 'text', array(
104
+ 'label' => Mage::helper('mobilenow')->__('Breadcrumbs'),
105
+ 'name' => 'c_layout_breadcrumbs',
106
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
107
+ 'required' => false
108
+ ));
109
+ $fieldsetCLayout->addField('c_layout_toolbar', 'text', array(
110
+ 'label' => Mage::helper('mobilenow')->__('Toolbar'),
111
+ 'name' => 'c_layout_toolbar',
112
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
113
+ 'required' => false
114
+ ));
115
+ $fieldsetCLayout->addField('c_layout_pag_top', 'text', array(
116
+ 'label' => Mage::helper('mobilenow')->__('Pagination (top)'),
117
+ 'name' => 'c_layout_pag_top',
118
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
119
+ 'required' => false
120
+ ));
121
+
122
+ //for grid
123
+ // $fieldsetCLayout = $fieldset->addFieldset('general_layout_c_fields_grid',array('class'=>'layout-fields layout-grid-listheading'));
124
+ //
125
+ // $fieldsetCLayout->addField('c_grid_layout_heading', 'note', array(
126
+ // 'text'=>'Product Grid View - <a class="headlink" href="">view in preview</a>'
127
+ // ));
128
+ // $fieldsetCLayout->addField('c_grid_layout_product_image', 'text', array(
129
+ // 'label' => Mage::helper('mobilenow')->__('Product - Image'),
130
+ // 'name' => 'c_grid_layout_product_image',
131
+ // 'class' => 'sort_order validate-digits validate-greater-than-zero',
132
+ // 'required' => false
133
+ // ));
134
+ // $fieldsetCLayout->addField('c_grid_layout_product_title', 'text', array(
135
+ // 'label' => Mage::helper('mobilenow')->__('Product - Title'),
136
+ // 'name' => 'c_grid_layout_product_title',
137
+ // 'class' => 'sort_order validate-digits validate-greater-than-zero',
138
+ // 'required' => false
139
+ // ));
140
+ // $fieldsetCLayout->addField('c_grid_layout_product_price', 'text', array(
141
+ // 'label' => Mage::helper('mobilenow')->__('Product - Price'),
142
+ // 'name' => 'c_grid_layout_product_price',
143
+ // 'class' => 'sort_order validate-digits validate-greater-than-zero',
144
+ // 'required' => false
145
+ // ));
146
+ // $fieldsetCLayout->addField('c_grid_layout_product_review', 'text', array(
147
+ // 'label' => Mage::helper('mobilenow')->__('Product - Review Summary'),
148
+ // 'name' => 'c_grid_layout_product_review',
149
+ // 'class' => 'sort_order validate-digits validate-greater-than-zero',
150
+ // 'required' => false
151
+ // ));
152
+ // $fieldsetCLayout->addField('c_grid_layout_product_learn', 'text', array(
153
+ // 'label' => Mage::helper('mobilenow')->__('Product - Learn More'),
154
+ // 'name' => 'c_grid_layout_product_learn',
155
+ // 'class' => 'sort_order validate-digits validate-greater-than-zero',
156
+ // 'required' => false
157
+ // ));
158
+ // $fieldsetCLayout->addField('c_grid_layout_product_addtocart', 'text', array(
159
+ // 'label' => Mage::helper('mobilenow')->__('Product - Add to Cart'),
160
+ // 'name' => 'c_grid_layout_product_addtocart',
161
+ // 'class' => 'sort_order validate-digits validate-greater-than-zero',
162
+ // 'required' => false
163
+ // ));
164
+
165
+
166
+ //for list
167
+ $fieldsetCLayout = $fieldset->addFieldset('general_layout_c_fields_list',array('class'=>'layout-fields layout-grid-listheading'));
168
+
169
+ $fieldsetCLayout->addField('c_list_layout_heading', 'note', array(
170
+ 'text'=>'Product List View - <a class="headlink" href="">view in preview</a>'
171
+ ));
172
+ // $fieldsetCLayout->addField('c_list_layout_product_image', 'text', array(
173
+ // 'label' => Mage::helper('mobilenow')->__('Product - Image'),
174
+ // 'name' => 'c_list_layout_product_image',
175
+ // 'class' => 'sort_order validate-digits validate-greater-than-zero',
176
+ // 'required' => false
177
+ // ));
178
+ // $fieldsetCLayout->addField('c_list_layout_product_title', 'text', array(
179
+ // 'label' => Mage::helper('mobilenow')->__('Product - Title'),
180
+ // 'name' => 'c_list_layout_product_title',
181
+ // 'class' => 'sort_order validate-digits validate-greater-than-zero',
182
+ // 'required' => false
183
+ // ));
184
+ $fieldsetCLayout->addField('c_list_layout_product_price', 'text', array(
185
+ 'label' => Mage::helper('mobilenow')->__('Product - Price'),
186
+ 'name' => 'c_list_layout_product_price',
187
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
188
+ 'required' => false
189
+ ));
190
+ $fieldsetCLayout->addField('c_list_layout_product_review', 'text', array(
191
+ 'label' => Mage::helper('mobilenow')->__('Product - Review Summary'),
192
+ 'name' => 'c_list_layout_product_review',
193
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
194
+ 'required' => false
195
+ ));
196
+ $fieldsetCLayout->addField('c_list_layout_product_learn', 'text', array(
197
+ 'label' => Mage::helper('mobilenow')->__('Product - Learn More'),
198
+ 'name' => 'c_list_layout_product_learn',
199
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
200
+ 'required' => false
201
+ ));
202
+ $fieldsetCLayout->addField('c_list_layout_product_addtocart', 'text', array(
203
+ 'label' => Mage::helper('mobilenow')->__('Product - Add to Cart'),
204
+ 'name' => 'c_list_layout_product_addtocart',
205
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
206
+ 'required' => false
207
+ ));
208
+
209
+
210
+
211
+ /*******************************************Product Page**********************************************/
212
+ $fieldset = $form->addFieldset('produt_layout_page',array());
213
+
214
+ $fieldset->addField('product_layout_head_message', 'text', array(
215
+ 'name'=>'product_layout_head_message',
216
+ ));
217
+ $form->getElement('product_layout_head_message')->setRenderer($this->getLayout()->createBlock('mobilenow/adminhtml_mobilenow_edit_renderer_playoutmessage'));
218
+ //Product page Top section
219
+ $fieldsetPTLayout = $fieldset->addFieldset('general_layout_pt_fields',array('class'=>'layout-fields'));
220
+
221
+ $fieldsetPTLayout->addField('pt_layout_heading', 'note', array(
222
+ 'label'=>'Block Name',
223
+ 'text' => 'Sort Order',
224
+ ));
225
+ $fieldsetPTLayout->addField('p_layout_availability', 'text', array(
226
+ 'label' => Mage::helper('mobilenow')->__('Availability'),
227
+ 'name' => 'p_layout_availability',
228
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
229
+ 'required' => false
230
+ ));
231
+ $fieldsetPTLayout->addField('p_layout_pricing', 'text', array(
232
+ 'label' => Mage::helper('mobilenow')->__('Pricing'),
233
+ 'name' => 'p_layout_pricing',
234
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
235
+ 'required' => false
236
+ ));
237
+ $fieldsetPTLayout->addField('p_layout_addtocart', 'text', array(
238
+ 'label' => Mage::helper('mobilenow')->__('Customize / Add to Cart'),
239
+ 'name' => 'p_layout_addtocart',
240
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
241
+ 'required' => false
242
+ ));
243
+ $fieldsetPTLayout->addField('p_layout_wishlist', 'text', array(
244
+ 'label' => Mage::helper('mobilenow')->__('Wishlist Link'),
245
+ 'name' => 'p_layout_wishlist',
246
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
247
+ 'required' => false
248
+ ));
249
+ $fieldsetPTLayout->addField('p_layout_review', 'text', array(
250
+ 'label' => Mage::helper('mobilenow')->__('Review Summary'),
251
+ 'name' => 'p_layout_review',
252
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
253
+ 'required' => false
254
+ ));
255
+ // Product page Bottom section
256
+ $fieldsetPBLayout = $fieldset->addFieldset('general_layout_pb_fields',array('class'=>'layout-fields'));
257
+
258
+ $fieldsetPBLayout->addField('pb_layout_heading', 'note', array(
259
+ 'label'=>'Block Name',
260
+ 'text' => 'Sort Order',
261
+ ));
262
+ $fieldsetPBLayout->addField('p_layout_desc', 'text', array(
263
+ 'label' => Mage::helper('mobilenow')->__('Description'),
264
+ 'name' => 'p_layout_desc',
265
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
266
+ 'required' => false
267
+ ));
268
+ $fieldsetPBLayout->addField('p_layout_additionalinfo', 'text', array(
269
+ 'label' => Mage::helper('mobilenow')->__('Additional Information'),
270
+ 'name' => 'p_layout_additionalinfo',
271
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
272
+ 'required' => false
273
+ ));
274
+ $fieldsetPBLayout->addField('p_layout_fullreview', 'text', array(
275
+ 'label' => Mage::helper('mobilenow')->__('Full Reviews'),
276
+ 'name' => 'p_layout_fullreview',
277
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
278
+ 'required' => false
279
+ ));
280
+ $fieldsetPBLayout->addField('p_layout_relatedproduct', 'text', array(
281
+ 'label' => Mage::helper('mobilenow')->__('Related Products'),
282
+ 'name' => 'p_layout_relatedproduct',
283
+ 'class' => 'sort_order validate-digits validate-greater-than-zero',
284
+ 'required' => false
285
+ ));
286
+
287
+
288
+ if (Mage::getSingleton("adminhtml/session")->getSubsettingsData())
289
+ {
290
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getSubsettingsData());
291
+ Mage::getSingleton("adminhtml/session")->setSubsettingsData(null);
292
+ }
293
+ elseif(Mage::registry("subsettings_data"))
294
+ {
295
+ $form->setValues(Mage::registry("subsettings_data")->getData());
296
+ }
297
+ return parent::_prepareForm();
298
+ }
299
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Edit/Tabs.php CHANGED
@@ -1,67 +1,67 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
- {
4
- public function __construct()
5
- {
6
- parent::__construct();
7
- $this->setId("mobilenow_tabs");
8
- $this->setDestElementId("edit_form");
9
- $this->setTitle(Mage::helper("mobilenow")->__("Add New Mobile Theme"));
10
- }
11
- protected function _beforeToHtml()
12
- {
13
- $this->addTab("form_section", array(
14
- "label" => Mage::helper("mobilenow")->__("General Theme Settings"),
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();
65
- }
66
-
67
- }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->setId("mobilenow_tabs");
8
+ $this->setDestElementId("edit_form");
9
+ $this->setTitle(Mage::helper("mobilenow")->__("Add New Mobile Theme"));
10
+ }
11
+ protected function _beforeToHtml()
12
+ {
13
+ $this->addTab("form_section", array(
14
+ "label" => Mage::helper("mobilenow")->__("General Theme Settings"),
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();
65
+ }
66
+
67
+ }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenow/Grid.php CHANGED
@@ -1,103 +1,103 @@
1
- <?php
2
-
3
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- $this->setId("mobilenowGrid");
10
- $this->setDefaultSort("theme_id");
11
- $this->setDefaultDir("ASC");
12
- $this->setSaveParametersInSession(true);
13
- }
14
-
15
- protected function _prepareCollection()
16
- {
17
- $collection = Mage::getModel("mobilenow/mobilenow")->getCollection();
18
- $this->setCollection($collection);
19
- return parent::_prepareCollection();
20
- }
21
- protected function _prepareColumns()
22
- {
23
- /*$this ->addColumn("theme_id", array(
24
- "header"=> Mage::helper("mobilenow")->__("ID"),
25
- "align" =>"right",
26
- "width" => "50px",
27
- "type" => "number",
28
- "index" => "theme_id",
29
- ));*/
30
- $this ->addColumn('theme_name', array(
31
- "header"=> Mage::helper("mobilenow")->__("Mobile Theme Name"),
32
- "index" => 'theme_name',
33
- 'renderer'=> new Redstage_Mobilenow_Block_Adminhtml_Renderer_Themename,
34
- ));
35
- if (!Mage::app()->isSingleStoreMode()) {
36
- $this->addColumn('store_id', array(
37
- 'header' => Mage::helper('cms')->__('Store View'),
38
- 'index' => 'store_id',
39
- 'type' => 'store',
40
- 'store_all' => true,
41
- 'store_view' => true,
42
- 'sortable' => false,
43
- 'filter_condition_callback'
44
- => array($this, '_filterStoreCondition'),
45
- ));
46
- }
47
- $this->addColumn('mobile_device_design_interface', array(
48
- 'header' => Mage::helper('mobilenow')->__('Mobile Device & User Agents'),
49
- 'index' => 'mobile_device_design_interface',
50
- 'type' => 'options',
51
- 'options'=>Mage::helper("mobilenow")->getGridOptionArrayMobileDevice(),
52
- 'renderer'=> new Redstage_Mobilenow_Block_Adminhtml_Renderer_Merge,
53
- ));
54
- $this->addColumn('status', array(
55
- 'header' => Mage::helper('mobilenow')->__('Status'),
56
- 'index' => 'status',
57
- 'type' => 'options',
58
- 'options'=>Mage::helper("mobilenow")->getOptionArrayStatus(),
59
- ));
60
- $this->addColumn('change_status', array(
61
- 'header' => Mage::helper('mobilenow')->__('Change Status'),
62
- 'index' => 'change_status',
63
- 'filter' => false,
64
- 'sortable' => false,
65
- 'renderer'=> new Redstage_Mobilenow_Block_Adminhtml_Renderer_Status,
66
- ));
67
- //$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
68
- //$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
69
-
70
- return parent::_prepareColumns();
71
- }
72
-
73
- public function getRowUrl($row)
74
- {
75
- return $this->getUrl("*/*/edit", array("id" => $row->getId()));
76
- }
77
- // protected function _prepareMassaction()
78
- // {
79
- // $this->setMassactionIdField('theme_id');
80
- // $this->getMassactionBlock()->setFormFieldName('theme_ids');
81
- // $this->getMassactionBlock()->setUseSelectAll(true);
82
- // $this->getMassactionBlock()->addItem('remove_mobilenow', array(
83
- // 'label'=> Mage::helper('mobilenow')->__('Remove Mobilenow'),
84
- // 'url' => $this->getUrl('*/adminhtml_mobilenow/massRemove'),
85
- // 'confirm' => Mage::helper('mobilenow')->__('Are you sure?')
86
- // ));
87
- // return $this;
88
- // }
89
- protected function _afterLoadCollection()
90
- {
91
- $this->getCollection()->walk('afterLoad');
92
- parent::_afterLoadCollection();
93
- }
94
-
95
- protected function _filterStoreCondition($collection, $column)
96
- {
97
- if (!$value = $column->getFilter()->getValue()) {
98
- return;
99
- }
100
-
101
- $this->getCollection()->addStoreFilter($value);
102
- }
103
  }
1
+ <?php
2
+
3
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenow_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId("mobilenowGrid");
10
+ $this->setDefaultSort("theme_id");
11
+ $this->setDefaultDir("ASC");
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+ $collection = Mage::getModel("mobilenow/mobilenow")->getCollection();
18
+ $this->setCollection($collection);
19
+ return parent::_prepareCollection();
20
+ }
21
+ protected function _prepareColumns()
22
+ {
23
+ /*$this ->addColumn("theme_id", array(
24
+ "header"=> Mage::helper("mobilenow")->__("ID"),
25
+ "align" =>"right",
26
+ "width" => "50px",
27
+ "type" => "number",
28
+ "index" => "theme_id",
29
+ ));*/
30
+ $this ->addColumn('theme_name', array(
31
+ "header"=> Mage::helper("mobilenow")->__("Mobile Theme Name"),
32
+ "index" => 'theme_name',
33
+ 'renderer'=> new Redstage_Mobilenow_Block_Adminhtml_Renderer_Themename,
34
+ ));
35
+ if (!Mage::app()->isSingleStoreMode()) {
36
+ $this->addColumn('store_id', array(
37
+ 'header' => Mage::helper('cms')->__('Store View'),
38
+ 'index' => 'store_id',
39
+ 'type' => 'store',
40
+ 'store_all' => true,
41
+ 'store_view' => true,
42
+ 'sortable' => false,
43
+ 'filter_condition_callback'
44
+ => array($this, '_filterStoreCondition'),
45
+ ));
46
+ }
47
+ $this->addColumn('mobile_device_design_interface', array(
48
+ 'header' => Mage::helper('mobilenow')->__('Mobile Device & User Agents'),
49
+ 'index' => 'mobile_device_design_interface',
50
+ 'type' => 'options',
51
+ 'options'=>Mage::helper("mobilenow")->getGridOptionArrayMobileDevice(),
52
+ 'renderer'=> new Redstage_Mobilenow_Block_Adminhtml_Renderer_Merge,
53
+ ));
54
+ $this->addColumn('status', array(
55
+ 'header' => Mage::helper('mobilenow')->__('Status'),
56
+ 'index' => 'status',
57
+ 'type' => 'options',
58
+ 'options'=>Mage::helper("mobilenow")->getOptionArrayStatus(),
59
+ ));
60
+ $this->addColumn('change_status', array(
61
+ 'header' => Mage::helper('mobilenow')->__('Change Status'),
62
+ 'index' => 'change_status',
63
+ 'filter' => false,
64
+ 'sortable' => false,
65
+ 'renderer'=> new Redstage_Mobilenow_Block_Adminhtml_Renderer_Status,
66
+ ));
67
+ //$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
68
+ //$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
69
+
70
+ return parent::_prepareColumns();
71
+ }
72
+
73
+ public function getRowUrl($row)
74
+ {
75
+ return $this->getUrl("*/*/edit", array("id" => $row->getId()));
76
+ }
77
+ // protected function _prepareMassaction()
78
+ // {
79
+ // $this->setMassactionIdField('theme_id');
80
+ // $this->getMassactionBlock()->setFormFieldName('theme_ids');
81
+ // $this->getMassactionBlock()->setUseSelectAll(true);
82
+ // $this->getMassactionBlock()->addItem('remove_mobilenow', array(
83
+ // 'label'=> Mage::helper('mobilenow')->__('Remove Mobilenow'),
84
+ // 'url' => $this->getUrl('*/adminhtml_mobilenow/massRemove'),
85
+ // 'confirm' => Mage::helper('mobilenow')->__('Are you sure?')
86
+ // ));
87
+ // return $this;
88
+ // }
89
+ protected function _afterLoadCollection()
90
+ {
91
+ $this->getCollection()->walk('afterLoad');
92
+ parent::_afterLoadCollection();
93
+ }
94
+
95
+ protected function _filterStoreCondition($collection, $column)
96
+ {
97
+ if (!$value = $column->getFilter()->getValue()) {
98
+ return;
99
+ }
100
+
101
+ $this->getCollection()->addStoreFilter($value);
102
+ }
103
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Mobilenowbackend.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
-
3
- class Redstage_Mobilenow_Block_Adminhtml_Mobilenowbackend extends Mage_Adminhtml_Block_Template {
4
-
5
- /**
6
- * Initialize block
7
- */
8
- public function __construct()
9
- {
10
- $this->setTemplate('mobilenow/mobilenowbackend.phtml');
11
- }
12
  }
1
+ <?php
2
+
3
+ class Redstage_Mobilenow_Block_Adminhtml_Mobilenowbackend extends Mage_Adminhtml_Block_Template {
4
+
5
+ /**
6
+ * Initialize block
7
+ */
8
+ public function __construct()
9
+ {
10
+ $this->setTemplate('mobilenow/mobilenowbackend.phtml');
11
+ }
12
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Renderer/Merge.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Renderer_Merge extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
- {
4
- public function render(Varien_Object $row)
5
- {
6
- // Get all the array of Mobile Device Design Interface from the grid
7
- $mobileDeviceOptionArray=Mage::helper("mobilenow")->getOptionArrayMobileDevice();
8
- // Get all the array of User Agent RegEx Values from the grid
9
- $userAgentRegxValues=Mage::helper("mobilenow")->getOptionArrayUserAgent();
10
- if ($row->getData('mobile_device_design_interface') != NULL || $row->getData('user_agent_regex_values') != NULL)
11
- {
12
- //Mobile Device Design Interface processed
13
- $mobileDevice = $row->getData('mobile_device_design_interface');
14
- if (array_key_exists($mobileDevice, $mobileDeviceOptionArray))
15
- {
16
- $mobileDeviceValue=$mobileDeviceOptionArray[$mobileDevice];
17
- }
18
- //User Agent RegEx Values processed
19
- $userAgent = $row->getData('user_agent_regex_values');
20
- $explodeUserAgents=explode(',',$userAgent);
21
- if (!empty($explodeUserAgents))
22
- {
23
- foreach ($explodeUserAgents as $explodeUserAgent)
24
- {
25
- if (array_key_exists($explodeUserAgent,$userAgentRegxValues))
26
- {
27
- $userAgentRegxValue[]=$userAgentRegxValues[$explodeUserAgent];
28
- }
29
- }
30
- }
31
- $userAgentRegxValue= implode('|',$userAgentRegxValue);
32
- if ($userAgent != NULL)
33
- {
34
- return $mobileDeviceValue . '<br> ['.$userAgentRegxValue.']';
35
- }
36
- else
37
- {
38
- return $mobileDeviceValue;
39
- }
40
- }
41
- else
42
- {
43
- return Mage::helper('mobilenow')->__('No Mobile Device & User Agents Assigned');
44
- }
45
- }
46
- }?>
47
-
48
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Renderer_Merge extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ // Get all the array of Mobile Device Design Interface from the grid
7
+ $mobileDeviceOptionArray=Mage::helper("mobilenow")->getOptionArrayMobileDevice();
8
+ // Get all the array of User Agent RegEx Values from the grid
9
+ $userAgentRegxValues=Mage::helper("mobilenow")->getOptionArrayUserAgent();
10
+ if ($row->getData('mobile_device_design_interface') != NULL || $row->getData('user_agent_regex_values') != NULL)
11
+ {
12
+ //Mobile Device Design Interface processed
13
+ $mobileDevice = $row->getData('mobile_device_design_interface');
14
+ if (array_key_exists($mobileDevice, $mobileDeviceOptionArray))
15
+ {
16
+ $mobileDeviceValue=$mobileDeviceOptionArray[$mobileDevice];
17
+ }
18
+ //User Agent RegEx Values processed
19
+ $userAgent = $row->getData('user_agent_regex_values');
20
+ $explodeUserAgents=explode(',',$userAgent);
21
+ if (!empty($explodeUserAgents))
22
+ {
23
+ foreach ($explodeUserAgents as $explodeUserAgent)
24
+ {
25
+ if (array_key_exists($explodeUserAgent,$userAgentRegxValues))
26
+ {
27
+ $userAgentRegxValue[]=$userAgentRegxValues[$explodeUserAgent];
28
+ }
29
+ }
30
+ }
31
+ $userAgentRegxValue= implode('|',$userAgentRegxValue);
32
+ if ($userAgent != NULL)
33
+ {
34
+ return $mobileDeviceValue . '<br> ['.$userAgentRegxValue.']';
35
+ }
36
+ else
37
+ {
38
+ return $mobileDeviceValue;
39
+ }
40
+ }
41
+ else
42
+ {
43
+ return Mage::helper('mobilenow')->__('No Mobile Device & User Agents Assigned');
44
+ }
45
+ }
46
+ }?>
47
+
48
 
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Renderer/Status.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Renderer_Status extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
- {
4
- public function render(Varien_Object $row)
5
- {
6
- if ($row->getData('status')==0)
7
- {
8
- return '<a class="grid_link" href="'.Mage::helper("adminhtml")->getUrl("mobilenow/adminhtml_mobilenow/status",array('status_id'=>$row->getData('status'),'theme_id'=>$row->getData('theme_id'))).'" title="Click Here To Activate Theme">Activate Theme</a>';
9
- }
10
- else
11
- {
12
- return '<a class="grid_link" href="'.Mage::helper("adminhtml")->getUrl("mobilenow/adminhtml_mobilenow/status",array('status_id'=>$row->getData('status'),'theme_id'=>$row->getData('theme_id'))).'" title="Click Here To Deactivate Theme">Deactivate Theme</a>';
13
- }
14
- }
15
- }?>
16
-
17
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Renderer_Status extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ if ($row->getData('status')==0)
7
+ {
8
+ return '<a class="grid_link" href="'.Mage::helper("adminhtml")->getUrl("mobilenow/adminhtml_mobilenow/status",array('status_id'=>$row->getData('status'),'theme_id'=>$row->getData('theme_id'))).'" title="Click Here To Activate Theme">Activate Theme</a>';
9
+ }
10
+ else
11
+ {
12
+ return '<a class="grid_link" href="'.Mage::helper("adminhtml")->getUrl("mobilenow/adminhtml_mobilenow/status",array('status_id'=>$row->getData('status'),'theme_id'=>$row->getData('theme_id'))).'" title="Click Here To Deactivate Theme">Deactivate Theme</a>';
13
+ }
14
+ }
15
+ }?>
16
+
17
 
app/code/community/Redstage/Mobilenow/Block/Adminhtml/Renderer/Themename.php CHANGED
@@ -1,13 +1,13 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_Renderer_Themename extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
- {
4
- public function render(Varien_Object $row)
5
- {
6
- if($row->getData('theme_name')!='')
7
- {
8
- return $row->getData('theme_name').'<a class="edit_link_grid" href="'.Mage::helper("adminhtml")->getUrl("mobilenow/adminhtml_mobilenow/edit",array('id'=>$row->getData('theme_id'))).'"><img src="'.$this->getSkinUrl("mobilenow_images/edit1.png").'" width="16" height="16"/><span class="grid_edit_link_text">Edit</a></a>';
9
- }
10
- }
11
- }?>
12
-
13
 
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_Renderer_Themename extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ if($row->getData('theme_name')!='')
7
+ {
8
+ return $row->getData('theme_name').'<a class="edit_link_grid" href="'.Mage::helper("adminhtml")->getUrl("mobilenow/adminhtml_mobilenow/edit",array('id'=>$row->getData('theme_id'))).'"><img src="'.$this->getSkinUrl("mobilenow_images/edit1.png").'" width="16" height="16"/><span class="grid_edit_link_text">Edit</a></a>';
9
+ }
10
+ }
11
+ }?>
12
+
13
 
app/code/community/Redstage/Mobilenow/Block/Adminhtml/System/Config/Form/Button.php CHANGED
@@ -1,41 +1,41 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_System_Config_Form_Button extends Mage_Adminhtml_Block_System_Config_Form_Field{
3
-
4
- /*
5
- * Set template
6
- */
7
- protected function _construct()
8
- {
9
- parent::_construct();
10
- $this->setTemplate('mobilenow/system/config/button.phtml');
11
- }
12
-
13
- /**
14
- * Return element html
15
- *
16
- * @param Varien_Data_Form_Element_Abstract $element
17
- * @return string
18
- */
19
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
20
- {
21
- return $this->_toHtml();
22
- }
23
- /**
24
- * Generate button html
25
- *
26
- * @return string
27
- */
28
- public function getButtonHtml()
29
- {
30
- $connectUrl=Mage::helper('adminhtml')->getUrl('mobilenow/adminhtml_mobilenow/mobileConnect');
31
- $button = $this->getLayout()->createBlock('adminhtml/widget_button')
32
- ->setData(array(
33
- 'id' => 'connect_mobile_now_button',
34
- 'label' => $this->helper('adminhtml')->__('Connect Account to Mobile Now'),
35
- 'onclick' => 'connectWithMobilenow(\''.$connectUrl.'\')'
36
- ));
37
-
38
- return $button->toHtml();
39
- }
40
-
41
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_System_Config_Form_Button extends Mage_Adminhtml_Block_System_Config_Form_Field{
3
+
4
+ /*
5
+ * Set template
6
+ */
7
+ protected function _construct()
8
+ {
9
+ parent::_construct();
10
+ $this->setTemplate('mobilenow/system/config/button.phtml');
11
+ }
12
+
13
+ /**
14
+ * Return element html
15
+ *
16
+ * @param Varien_Data_Form_Element_Abstract $element
17
+ * @return string
18
+ */
19
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
20
+ {
21
+ return $this->_toHtml();
22
+ }
23
+ /**
24
+ * Generate button html
25
+ *
26
+ * @return string
27
+ */
28
+ public function getButtonHtml()
29
+ {
30
+ $connectUrl=Mage::helper('adminhtml')->getUrl('mobilenow/adminhtml_mobilenow/mobileConnect');
31
+ $button = $this->getLayout()->createBlock('adminhtml/widget_button')
32
+ ->setData(array(
33
+ 'id' => 'connect_mobile_now_button',
34
+ 'label' => $this->helper('adminhtml')->__('Connect Account to Mobile Now'),
35
+ 'onclick' => 'connectWithMobilenow(\''.$connectUrl.'\')'
36
+ ));
37
+
38
+ return $button->toHtml();
39
+ }
40
+
41
  }
app/code/community/Redstage/Mobilenow/Block/Adminhtml/System/Config/Form/Link.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Adminhtml_System_Config_Form_Link extends Mage_Adminhtml_Block_System_Config_Form_Field{
3
-
4
- /*
5
- * Set template
6
- */
7
- protected function _construct()
8
- {
9
- parent::_construct();
10
- $this->setTemplate('mobilenow/system/config/link.phtml');
11
- }
12
-
13
- /**
14
- * Return element html
15
- *
16
- * @param Varien_Data_Form_Element_Abstract $element
17
- * @return string
18
- */
19
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
20
- {
21
- return $this->_toHtml();
22
- }
23
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Adminhtml_System_Config_Form_Link extends Mage_Adminhtml_Block_System_Config_Form_Field{
3
+
4
+ /*
5
+ * Set template
6
+ */
7
+ protected function _construct()
8
+ {
9
+ parent::_construct();
10
+ $this->setTemplate('mobilenow/system/config/link.phtml');
11
+ }
12
+
13
+ /**
14
+ * Return element html
15
+ *
16
+ * @param Varien_Data_Form_Element_Abstract $element
17
+ * @return string
18
+ */
19
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
20
+ {
21
+ return $this->_toHtml();
22
+ }
23
  }
app/code/community/Redstage/Mobilenow/Block/Home.php CHANGED
@@ -1,51 +1,51 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Home extends Mage_Core_Block_Template{
3
-
4
- public function __construct()
5
- {
6
- $this->setTemplate('mobilenow/home.phtml');
7
-
8
-
9
- }
10
-
11
- public function mobileLinks()
12
- {
13
- if (!$this->helper('customer')->isLoggedIn() )
14
- {
15
- $loginlabel ='Log In';
16
- $loginurl =$this->getUrl('customer/account/login/',array());
17
- }
18
- else
19
- {
20
- $loginlabel ='Logout';
21
- $loginurl =$this->getUrl('customer/account/logout/',array());
22
- }
23
- $menu['home'] = array('label' => 'Home','url'=>Mage::getBaseUrl() );
24
- $menu['login'] = array('label' => $loginlabel,'url'=>$loginurl );
25
- $menu['account'] = array('label' => 'My Account','url'=>$this->getUrl('customer/account/'));
26
- $menu['wishlist']= array('label' => 'Wishlist','url'=>$this->getUrl('wishlist'));
27
-
28
- if($this->getData('home') != '')
29
- $links['home'] = $this->getData('home');
30
- if($this->getData('login') != '')
31
- $links['login'] = $this->getData('login');
32
- if($this->getData('account') != '')
33
- $links['account'] = $this->getData('account');
34
- if($this->getData('wishlist') != '')
35
- $links['wishlist'] = $this->getData('wishlist');
36
-
37
- //$links = array_flip($links);
38
- asort($links);
39
- foreach($links as $k=>&$link){
40
- $link=$menu[$k];
41
- }
42
- return $links;
43
- }
44
-
45
-
46
-
47
-
48
- }
49
-
50
-
51
-
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Home extends Mage_Core_Block_Template{
3
+
4
+ public function __construct()
5
+ {
6
+ $this->setTemplate('mobilenow/home.phtml');
7
+
8
+
9
+ }
10
+
11
+ public function mobileLinks()
12
+ {
13
+ if (!$this->helper('customer')->isLoggedIn() )
14
+ {
15
+ $loginlabel ='Log In';
16
+ $loginurl =$this->getUrl('customer/account/login/',array());
17
+ }
18
+ else
19
+ {
20
+ $loginlabel ='Logout';
21
+ $loginurl =$this->getUrl('customer/account/logout/',array());
22
+ }
23
+ $menu['home'] = array('label' => 'Home','url'=>Mage::getBaseUrl() );
24
+ $menu['login'] = array('label' => $loginlabel,'url'=>$loginurl );
25
+ $menu['account'] = array('label' => 'My Account','url'=>$this->getUrl('customer/account/'));
26
+ $menu['wishlist']= array('label' => 'Wishlist','url'=>$this->getUrl('wishlist'));
27
+
28
+ if($this->getData('home') != '')
29
+ $links['home'] = $this->getData('home');
30
+ if($this->getData('login') != '')
31
+ $links['login'] = $this->getData('login');
32
+ if($this->getData('account') != '')
33
+ $links['account'] = $this->getData('account');
34
+ if($this->getData('wishlist') != '')
35
+ $links['wishlist'] = $this->getData('wishlist');
36
+
37
+ //$links = array_flip($links);
38
+ asort($links);
39
+ foreach($links as $k=>&$link){
40
+ $link=$menu[$k];
41
+ }
42
+ return $links;
43
+ }
44
+
45
+
46
+
47
+
48
+ }
49
+
50
+
51
+
app/code/community/Redstage/Mobilenow/Block/Left.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
- class Redstage_Mobilenow_Block_Left extends Mage_Core_Block_Template{
3
-
4
-
5
-
6
-
7
-
8
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Block_Left extends Mage_Core_Block_Template{
3
+
4
+
5
+
6
+
7
+
8
  }
app/code/community/Redstage/Mobilenow/Block/Toolbar.php CHANGED
@@ -1,121 +1,121 @@
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_Catalog
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
- * Product list toolbar
30
- *
31
- * @category Mage
32
- * @package Mage_Catalog
33
- * @author Magento Core Team <core@magentocommerce.com>
34
- */
35
- class Redstage_Mobilenow_Block_Toolbar extends Mage_Core_Block_Template
36
- {
37
-
38
- function getCustomToolBarHtml()
39
- {
40
-
41
- $toolBarBlock = Mage::app()->getLayout()->createBlock('catalog/product_list_toolbar');
42
- $toolBarBlock->setData('pager',$this->getData('pager'));
43
- $toolBarBlock->setData('sortbox',$this->getData('sortbox'));
44
- $toolBarBlock->setData('breadcrumb',$this->getData('breadcrumb'));
45
- $toolBarBlock->setData('showbreadcrumb',$this->getData('showbreadcrumb'));
46
-
47
- $toolBarBlock->setData('_current_grid_mode', 'list');
48
- $toolBarBlock->disableParamsMemorizing();
49
-
50
- $pagerlimitlist =explode(',', $this->getData('pagerlimitlist'));
51
- if('all'== strtolower($pagerlimitlist[0])){
52
- $mode= 'list';
53
- $perPageConfigKey = 'catalog/frontend/' . $mode . '_per_page_values';
54
- $perPageValues = (string)Mage::getStoreConfig($perPageConfigKey);
55
- $perPageValues = explode(',', $perPageValues);
56
- $perPageValues = array_combine($perPageValues, $perPageValues);
57
- $pagerlimitlist= $perPageValues + array('all'=>$this->__('All'));
58
-
59
- //$toolBarBlock->addPagerLimit('list', 'All', '');
60
- //$toolBarBlock->setDefaultListPerPage('All');
61
-
62
- }else{
63
-
64
- }
65
-
66
- foreach ($pagerlimitlist as $key => $value) {
67
- $toolBarBlock->addPagerLimit('list', $value, '');
68
- }
69
-
70
- if (in_array($this->getData('defaultlistperpage'), $pagerlimitlist)) {
71
-
72
-
73
- $toolBarBlock->setDefaultListPerPage( ucfirst($this->getData('defaultlistperpage')) );
74
- //$toolBarBlock->setData('_current_limit', '10');
75
- }
76
- //$toolBarBlock->
77
-
78
- $toolBarBlock->disableParamsMemorizing();
79
-
80
-
81
- //echo $toolBarBlock->getDefaultPerPageValue();
82
- //$toolBarBlock->setData('_current_grid_mode', 'list');
83
-
84
- $pagerBlock = Mage::app()->getLayout()->createBlock('page/html_pager');
85
- // $pagerBlock->setDefaultListPerPage('10');
86
-
87
- $toolBarBlock->setChild('product_list_toolbar_pager',$pagerBlock);
88
- $productList = Mage::app()->getLayout()->createBlock('catalog/product_list');
89
-
90
- $toolBarBlock->setCollection($productList->getLoadedProductCollection());
91
- //$toolBarBlock->setDefaultListPerPage('10');
92
- return $toolBarBlock->toHtml();
93
-
94
-
95
- /*$toolbar = Mage::app()->getLayout()->createBlock('catalog/product_list_toolbar');
96
- $pager = Mage::app()->getLayout()->createBlock('page/html_pager');
97
- $toolbar->setChild('product_list_toolbar_pager',$pager);
98
-
99
- // called prepare sortable parameters
100
- $collection = $this->_getProductCollection();
101
-
102
- // use sortable parameters
103
- if ($orders = $this->getAvailableOrders()) {
104
- $toolbar->setAvailableOrders($orders);
105
- }
106
- if ($sort = $this->getSortBy()) {
107
- $toolbar->setDefaultOrder($sort);
108
- }
109
- if ($dir = $this->getDefaultDirection()) {
110
- $toolbar->setDefaultDirection($dir);
111
- }
112
- if ($modes = $this->getModes()) {
113
- $toolbar->setModes($modes);
114
- }
115
- // set collection to toolbar and apply sort
116
- $toolbar->setCollection($collection);
117
- return $toolbar->toHtml();*/
118
-
119
- }
120
-
121
- }
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_Catalog
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
+ * Product list toolbar
30
+ *
31
+ * @category Mage
32
+ * @package Mage_Catalog
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Redstage_Mobilenow_Block_Toolbar extends Mage_Core_Block_Template
36
+ {
37
+
38
+ function getCustomToolBarHtml()
39
+ {
40
+
41
+ $toolBarBlock = Mage::app()->getLayout()->createBlock('catalog/product_list_toolbar');
42
+ $toolBarBlock->setData('pager',$this->getData('pager'));
43
+ $toolBarBlock->setData('sortbox',$this->getData('sortbox'));
44
+ $toolBarBlock->setData('breadcrumb',$this->getData('breadcrumb'));
45
+ $toolBarBlock->setData('showbreadcrumb',$this->getData('showbreadcrumb'));
46
+
47
+ $toolBarBlock->setData('_current_grid_mode', 'list');
48
+ $toolBarBlock->disableParamsMemorizing();
49
+
50
+ $pagerlimitlist =explode(',', $this->getData('pagerlimitlist'));
51
+ if('all'== strtolower($pagerlimitlist[0])){
52
+ $mode= 'list';
53
+ $perPageConfigKey = 'catalog/frontend/' . $mode . '_per_page_values';
54
+ $perPageValues = (string)Mage::getStoreConfig($perPageConfigKey);
55
+ $perPageValues = explode(',', $perPageValues);
56
+ $perPageValues = array_combine($perPageValues, $perPageValues);
57
+ $pagerlimitlist= $perPageValues + array('all'=>$this->__('All'));
58
+
59
+ //$toolBarBlock->addPagerLimit('list', 'All', '');
60
+ //$toolBarBlock->setDefaultListPerPage('All');
61
+
62
+ }else{
63
+
64
+ }
65
+
66
+ foreach ($pagerlimitlist as $key => $value) {
67
+ $toolBarBlock->addPagerLimit('list', $value, '');
68
+ }
69
+
70
+ if (in_array($this->getData('defaultlistperpage'), $pagerlimitlist)) {
71
+
72
+
73
+ $toolBarBlock->setDefaultListPerPage( ucfirst($this->getData('defaultlistperpage')) );
74
+ //$toolBarBlock->setData('_current_limit', '10');
75
+ }
76
+ //$toolBarBlock->
77
+
78
+ $toolBarBlock->disableParamsMemorizing();
79
+
80
+
81
+ //echo $toolBarBlock->getDefaultPerPageValue();
82
+ //$toolBarBlock->setData('_current_grid_mode', 'list');
83
+
84
+ $pagerBlock = Mage::app()->getLayout()->createBlock('page/html_pager');
85
+ // $pagerBlock->setDefaultListPerPage('10');
86
+
87
+ $toolBarBlock->setChild('product_list_toolbar_pager',$pagerBlock);
88
+ $productList = Mage::app()->getLayout()->createBlock('catalog/product_list');
89
+
90
+ $toolBarBlock->setCollection($productList->getLoadedProductCollection());
91
+ //$toolBarBlock->setDefaultListPerPage('10');
92
+ return $toolBarBlock->toHtml();
93
+
94
+
95
+ /*$toolbar = Mage::app()->getLayout()->createBlock('catalog/product_list_toolbar');
96
+ $pager = Mage::app()->getLayout()->createBlock('page/html_pager');
97
+ $toolbar->setChild('product_list_toolbar_pager',$pager);
98
+
99
+ // called prepare sortable parameters
100
+ $collection = $this->_getProductCollection();
101
+
102
+ // use sortable parameters
103
+ if ($orders = $this->getAvailableOrders()) {
104
+ $toolbar->setAvailableOrders($orders);
105
+ }
106
+ if ($sort = $this->getSortBy()) {
107
+ $toolbar->setDefaultOrder($sort);
108
+ }
109
+ if ($dir = $this->getDefaultDirection()) {
110
+ $toolbar->setDefaultDirection($dir);
111
+ }
112
+ if ($modes = $this->getModes()) {
113
+ $toolbar->setModes($modes);
114
+ }
115
+ // set collection to toolbar and apply sort
116
+ $toolbar->setCollection($collection);
117
+ return $toolbar->toHtml();*/
118
+
119
+ }
120
+
121
+ }
app/code/community/Redstage/Mobilenow/Helper/Catalogpage.php CHANGED
@@ -1,294 +1,294 @@
1
- <?php
2
- class Redstage_Mobilenow_Helper_Catalogpage extends Mage_Core_Helper_Abstract
3
- {
4
- // function for generationg catalog layout xml
5
- static public function generateCatalogPageLayoutXML($post_data)
6
- {
7
- $themeSubSettings['c_pagelayoutmain'] = array();
8
- $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'] = 0;
9
- $themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'] = 0;
10
- $themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'] = 0;
11
- if($post_data['c_layout_breadcrumbs'] > 0)
12
- $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'] = $post_data['c_layout_breadcrumbs'];
13
- if($post_data['c_layout_toolbar'] > 0)
14
- $themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'] = $post_data['c_layout_toolbar'];
15
- if($post_data['c_layout_pag_top'] > 0)
16
- $themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'] = $post_data['c_layout_pag_top'];
17
-
18
- if(count($themeSubSettings['c_pagelayoutmain']) > 0){
19
- asort($themeSubSettings['c_pagelayoutmain']);
20
- }
21
- $c_main_sort_xml = array();
22
- if(!$post_data['show_breadcrumbs'] ||$post_data['show_breadcrumbs'] != '1'){
23
- $c_main_sort_xml['c_layout_breadcrumbs'] = '<action method="setData"><name>showbreadcrumb</name><value>0</value></action>';
24
- } else {
25
- $c_main_sort_xml['c_layout_breadcrumbs'] = '<action method="setData"><name>showbreadcrumb</name><value>1</value></action><action method="setData"><name>breadcrumb</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'].'</value></action>';
26
- }
27
- // if(!$post_data['show_sortby_dropdown'] ||$post_data['show_sortby_dropdown'] != '1'){
28
- // $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>showsortbydropdown</name><value>0</value></action>';
29
- // } else {
30
- // $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>showsortbydropdown</name><value>1</value></action>';
31
- // }
32
- $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
33
- if(!$post_data['show_pagination'] ||$post_data['show_pagination'] == '2'){
34
- $c_main_sort_xml['c_layout_pag_top'] = '';
35
- } else {
36
- $c_main_sort_xml['c_layout_pag_top'] = '<action method="setData"><name>pager</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'].'</value></action>';
37
- }
38
-
39
- $themeSubSettings['c_bottom_pagelayoutmain'] = array();
40
- $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'] = 0;
41
- $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'] = 0;
42
- if($post_data['c_layout_toolbar'] > 0)
43
- $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'] = $post_data['c_layout_toolbar'];
44
- if($post_data['c_layout_pag_top'] > 0)
45
- $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'] = $post_data['c_layout_pag_top'];
46
-
47
- if(count($themeSubSettings['c_bottom_pagelayoutmain']) > 0){
48
- asort($themeSubSettings['c_bottom_pagelayoutmain']);
49
- }
50
- $c_bottom_main_sort_xml = array();
51
- // if(!$post_data['show_sortby_dropdown'] ||$post_data['show_sortby_dropdown'] != '1'){
52
- // $c_bottom_main_sort_xml['c_layout_toolbar'] = '';
53
- // } else {
54
- // $c_bottom_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
55
- // }
56
- $c_bottom_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
57
- if(!$post_data['show_pagination'] ||$post_data['show_pagination'] == '1'){
58
- $c_bottom_main_sort_xml['c_layout_pag_top'] = '';
59
- } else {
60
- $c_bottom_main_sort_xml['c_layout_pag_top'] = '<action method="setData"><name>pager</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'].'</value></action>';
61
- }
62
-
63
- $catalog_layout_xml = '';
64
-
65
- $catalog_layout_xml .= '<remove name="newsletter"/><reference name="root">
66
- <action method="unsetChild"><name>breadcrumbs</name></action>
67
- </reference>';
68
- // $catalog_layout_xml .= '<reference name="left">
69
- // <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
70
- // </reference>';
71
- $catalog_layout_xml .='<reference name="content">';
72
-
73
- $catalog_layout_xml .= '
74
- <block type="mobilenow/toolbar" name="custom_toolbar" template="catalog/product/list/customtoolbar.phtml">';
75
- foreach($themeSubSettings['c_pagelayoutmain'] as $cmkey=>$cmvalue){
76
- $catalog_layout_xml .= $c_main_sort_xml[$cmkey];
77
- }
78
-
79
- $catalog_layout_xml .='
80
- <action method="setData"><name>pagerlimitlist</name><value>'.$post_data['number_of_products_choice_steps'].'</value></action>
81
- <action method="setData"><name>defaultlistperpage</name><value>'.$post_data['number_of_products_per_page'].'</value></action>
82
- </block>';
83
-
84
- $themeSubSettings['c_listpagelayoutmain'] = array();
85
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'] = 0;
86
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'] = 0;
87
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'] = 0;
88
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'] = 0;
89
- if($post_data['c_list_layout_product_price'] > 0)
90
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'] = $post_data['c_list_layout_product_price'];
91
- if($post_data['c_list_layout_product_review'] > 0)
92
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'] = $post_data['c_list_layout_product_review'];
93
- if($post_data['c_list_layout_product_learn'] > 0)
94
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'] = $post_data['c_list_layout_product_learn'];
95
- if($post_data['c_list_layout_product_addtocart'] > 0)
96
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'] = $post_data['c_list_layout_product_addtocart'];
97
- //
98
-
99
- $c_list_sort_xml = array();
100
- $c_list_sort_xml['c_list_layout_product_price'] = '<action method="setData"><name>price</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'].'</value></action>';
101
- $c_list_sort_xml['c_list_layout_product_review'] = '<action method="setData"><name>ratings</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'].'</value></action>';
102
- $c_list_sort_xml['c_list_layout_product_learn'] = '<action method="setData"><name>cart</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'].'</value></action>';
103
- $c_list_sort_xml['c_list_layout_product_addtocart'] = ' <action method="setData"><name>more</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'].'</value></action>';
104
-
105
- $catalog_layout_xml .='
106
- <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
107
- <block type="catalog/product_list" name="product_list" template="catalog/product/mobilelist.phtml">';
108
- if($post_data['show_review_stars'] && $post_data['show_review_stars'] == '1'){
109
- $catalog_layout_xml .= '<action method="setData"><name>showstar</name><value>1</value></action>';
110
- }
111
- if($post_data['show_add_to_cart'] && $post_data['show_add_to_cart'] == '1'){
112
- $catalog_layout_xml .= '<action method="setData"><name>showcartbtn</name><value>1</value></action>';
113
- }
114
- if($post_data['show_learn_more'] && $post_data['show_learn_more'] == '1'){
115
- $catalog_layout_xml .= '<action method="setData"><name>showlernmore</name><value>1</value></action>';
116
- }
117
-
118
- foreach($c_list_sort_xml as $c_listkey=>$c_listvalue){
119
- $catalog_layout_xml .= $c_listvalue;
120
- }
121
-
122
- $catalog_layout_xml .= '
123
- <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
124
- <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
125
- <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
126
- <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
127
- <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
128
- <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
129
- </block>
130
- </block>
131
- ';
132
- $catalog_layout_xml .= '<block type="mobilenow/toolbar" name="custom_toolbar_bottom" template="catalog/product/list/customtoolbar.phtml">';
133
- foreach($themeSubSettings['c_bottom_pagelayoutmain'] as $cmbkey=>$cmbvalue){
134
- $catalog_layout_xml .= $c_bottom_main_sort_xml[$cmbkey];
135
- }
136
- $catalog_layout_xml .='
137
- <action method="setData"><name>pagerlimitlist</name><value>'.$post_data['number_of_products_choice_steps'].'</value></action>
138
- <action method="setData"><name>defaultlistperpage</name><value>'.$post_data['number_of_products_per_page'].'</value></action>
139
- </block>';
140
-
141
- $catalog_layout_xml .='</reference>';
142
-
143
- return $catalog_layout_xml;
144
- }
145
-
146
-
147
- // function for generationg catalog search page layout xml
148
- static public function generateCatalogSearchPageLayoutXML($post_data)
149
- {
150
- $themeSubSettings['c_pagelayoutmain'] = array();
151
- $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'] = 0;
152
- $themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'] = 0;
153
- $themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'] = 0;
154
- if($post_data['c_layout_breadcrumbs'] > 0)
155
- $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'] = $post_data['c_layout_breadcrumbs'];
156
- if($post_data['c_layout_toolbar'] > 0)
157
- $themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'] = $post_data['c_layout_toolbar'];
158
- if($post_data['c_layout_pag_top'] > 0)
159
- $themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'] = $post_data['c_layout_pag_top'];
160
-
161
- if(count($themeSubSettings['c_pagelayoutmain']) > 0){
162
- asort($themeSubSettings['c_pagelayoutmain']);
163
- }
164
- $c_main_sort_xml = array();
165
- if(!$post_data['show_breadcrumbs'] ||$post_data['show_breadcrumbs'] != '1'){
166
- $c_main_sort_xml['c_layout_breadcrumbs'] = '<action method="setData"><name>showbreadcrumb</name><value>0</value></action>';
167
- } else {
168
- $c_main_sort_xml['c_layout_breadcrumbs'] = '<action method="setData"><name>showbreadcrumb</name><value>1</value></action><action method="setData"><name>breadcrumb</name><value>'. $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'].'</value></action>';
169
- }
170
- // if(!$post_data['show_sortby_dropdown'] ||$post_data['show_sortby_dropdown'] != '1'){
171
- // $c_main_sort_xml['c_layout_toolbar'] = '';
172
- // } else {
173
- // $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
174
- // }
175
- $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
176
- if(!$post_data['show_pagination'] || $post_data['show_pagination'] == '2'){
177
- $c_main_sort_xml['c_layout_pag_top'] = '';
178
- } else {
179
- $c_main_sort_xml['c_layout_pag_top'] = '<action method="setData"><name>pager</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'].'</value></action>';
180
- }
181
- $themeSubSettings['c_bottom_pagelayoutmain'] = array();
182
- $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'] = 0;
183
- $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'] = 0;
184
- if($post_data['c_layout_toolbar'] > 0)
185
- $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'] = $post_data['c_layout_toolbar'];
186
- if($post_data['c_layout_pag_top'] > 0)
187
- $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'] = $post_data['c_layout_pag_top'];
188
-
189
- if(count($themeSubSettings['c_bottom_pagelayoutmain']) > 0){
190
- asort($themeSubSettings['c_bottom_pagelayoutmain']);
191
- }
192
- $c_bottom_main_sort_xml = array();
193
- // if(!$post_data['show_sortby_dropdown'] ||$post_data['show_sortby_dropdown'] != '1'){
194
- // $c_bottom_main_sort_xml['c_layout_toolbar'] = '';
195
- // } else {
196
- // $c_bottom_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
197
- // }
198
- $c_bottom_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
199
- if(!$post_data['show_pagination'] ||$post_data['show_pagination'] == '1'){
200
- $c_bottom_main_sort_xml['c_layout_pag_top'] = '';
201
- } else {
202
- $c_bottom_main_sort_xml['c_layout_pag_top'] = '<action method="setData"><name>pager</name><value>'. $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'].'</value></action>';
203
- }
204
-
205
- $catalog_layout_xml = '';
206
-
207
- $catalog_layout_xml .= '<remove name="newsletter"/><reference name="root">
208
- <action method="setTemplate"><template>page/1column.phtml</template></action>
209
- <action method="unsetChild"><name>breadcrumbs</name></action>
210
- </reference>';
211
- $catalog_layout_xml .= '<reference name="left">
212
- <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>
213
- </reference>';
214
- $catalog_layout_xml .='<reference name="content">';
215
-
216
- $catalog_layout_xml .= '
217
- <block type="mobilenow/toolbar" name="custom_toolbar" template="catalog/product/list/customtoolbar.phtml">';
218
- foreach($themeSubSettings['c_pagelayoutmain'] as $cmkey=>$cmvalue){
219
- $catalog_layout_xml .= $c_main_sort_xml[$cmkey];
220
- }
221
-
222
- $catalog_layout_xml .='
223
- <action method="setData"><name>pagerlimitlist</name><value>'.$post_data['number_of_products_choice_steps'].'</value></action>
224
- <action method="setData"><name>defaultlistperpage</name><value>'.$post_data['number_of_products_per_page'].'</value></action>
225
- </block>';
226
-
227
- $themeSubSettings['c_listpagelayoutmain'] = array();
228
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'] = 0;
229
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'] = 0;
230
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'] = 0;
231
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'] = 0;
232
- if($post_data['c_list_layout_product_price'] > 0)
233
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'] = $post_data['c_list_layout_product_price'];
234
- if($post_data['c_list_layout_product_review'] > 0)
235
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'] = $post_data['c_list_layout_product_review'];
236
- if($post_data['c_list_layout_product_learn'] > 0)
237
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'] = $post_data['c_list_layout_product_learn'];
238
- if($post_data['c_list_layout_product_addtocart'] > 0)
239
- $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'] = $post_data['c_list_layout_product_addtocart'];
240
- //
241
- $c_list_sort_xml = array();
242
- $c_list_sort_xml['c_list_layout_product_price'] = '<action method="setData"><name>price</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'].'</value></action>';
243
- $c_list_sort_xml['c_list_layout_product_review'] = '<action method="setData"><name>ratings</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'].'</value></action>';
244
- $c_list_sort_xml['c_list_layout_product_learn'] = '<action method="setData"><name>cart</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'].'</value></action>';
245
- $c_list_sort_xml['c_list_layout_product_addtocart'] = ' <action method="setData"><name>more</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'].'</value></action>';
246
-
247
-
248
- $catalog_layout_xml .='
249
- <block type="catalogsearch/result" name="search.result" template="catalogsearch/result.phtml">
250
- <block type="catalog/product_list" name="search_result_list" template="catalog/product/mobilelist.phtml">';
251
- if($post_data['show_review_stars'] && $post_data['show_review_stars'] == '1'){
252
- $catalog_layout_xml .= '<action method="setData"><name>showstar</name><value>1</value></action>';
253
- }
254
- if($post_data['show_add_to_cart'] && $post_data['show_add_to_cart'] == '1'){
255
- $catalog_layout_xml .= '<action method="setData"><name>showcartbtn</name><value>1</value></action>';
256
- }
257
- if($post_data['show_learn_more'] && $post_data['show_learn_more'] == '1'){
258
- $catalog_layout_xml .= '<action method="setData"><name>showlernmore</name><value>1</value></action>';
259
- }
260
-
261
- foreach($c_list_sort_xml as $c_listkey=>$c_listvalue){
262
- $catalog_layout_xml .= $c_listvalue;
263
- }
264
-
265
- $catalog_layout_xml .= '
266
- <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
267
- <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
268
- <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
269
- <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
270
- <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
271
- <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
272
- </block>
273
- <action method="setListOrders"/>
274
- <action method="setListModes"/>
275
- <action method="setListCollection"/>
276
- </block>
277
- ';
278
-
279
- $catalog_layout_xml .= '<block type="mobilenow/toolbar" name="custom_toolbar_bottom" template="catalog/product/list/customtoolbar.phtml">';
280
- foreach($themeSubSettings['c_bottom_pagelayoutmain'] as $cmbkey=>$cmbvalue){
281
- $catalog_layout_xml .= $c_bottom_main_sort_xml[$cmbkey];
282
- }
283
- $catalog_layout_xml .='
284
- <action method="setData"><name>pagerlimitlist</name><value>'.$post_data['number_of_products_choice_steps'].'</value></action>
285
- <action method="setData"><name>defaultlistperpage</name><value>'.$post_data['number_of_products_per_page'].'</value></action>
286
- </block>';
287
-
288
- $catalog_layout_xml .='</reference>';
289
-
290
- return $catalog_layout_xml;
291
- }
292
-
293
- }
294
 
1
+ <?php
2
+ class Redstage_Mobilenow_Helper_Catalogpage extends Mage_Core_Helper_Abstract
3
+ {
4
+ // function for generationg catalog layout xml
5
+ static public function generateCatalogPageLayoutXML($post_data)
6
+ {
7
+ $themeSubSettings['c_pagelayoutmain'] = array();
8
+ $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'] = 0;
9
+ $themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'] = 0;
10
+ $themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'] = 0;
11
+ if($post_data['c_layout_breadcrumbs'] > 0)
12
+ $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'] = $post_data['c_layout_breadcrumbs'];
13
+ if($post_data['c_layout_toolbar'] > 0)
14
+ $themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'] = $post_data['c_layout_toolbar'];
15
+ if($post_data['c_layout_pag_top'] > 0)
16
+ $themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'] = $post_data['c_layout_pag_top'];
17
+
18
+ if(count($themeSubSettings['c_pagelayoutmain']) > 0){
19
+ asort($themeSubSettings['c_pagelayoutmain']);
20
+ }
21
+ $c_main_sort_xml = array();
22
+ if(!$post_data['show_breadcrumbs'] ||$post_data['show_breadcrumbs'] != '1'){
23
+ $c_main_sort_xml['c_layout_breadcrumbs'] = '<action method="setData"><name>showbreadcrumb</name><value>0</value></action>';
24
+ } else {
25
+ $c_main_sort_xml['c_layout_breadcrumbs'] = '<action method="setData"><name>showbreadcrumb</name><value>1</value></action><action method="setData"><name>breadcrumb</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'].'</value></action>';
26
+ }
27
+ // if(!$post_data['show_sortby_dropdown'] ||$post_data['show_sortby_dropdown'] != '1'){
28
+ // $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>showsortbydropdown</name><value>0</value></action>';
29
+ // } else {
30
+ // $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>showsortbydropdown</name><value>1</value></action>';
31
+ // }
32
+ $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
33
+ if(!$post_data['show_pagination'] ||$post_data['show_pagination'] == '2'){
34
+ $c_main_sort_xml['c_layout_pag_top'] = '';
35
+ } else {
36
+ $c_main_sort_xml['c_layout_pag_top'] = '<action method="setData"><name>pager</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'].'</value></action>';
37
+ }
38
+
39
+ $themeSubSettings['c_bottom_pagelayoutmain'] = array();
40
+ $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'] = 0;
41
+ $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'] = 0;
42
+ if($post_data['c_layout_toolbar'] > 0)
43
+ $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'] = $post_data['c_layout_toolbar'];
44
+ if($post_data['c_layout_pag_top'] > 0)
45
+ $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'] = $post_data['c_layout_pag_top'];
46
+
47
+ if(count($themeSubSettings['c_bottom_pagelayoutmain']) > 0){
48
+ asort($themeSubSettings['c_bottom_pagelayoutmain']);
49
+ }
50
+ $c_bottom_main_sort_xml = array();
51
+ // if(!$post_data['show_sortby_dropdown'] ||$post_data['show_sortby_dropdown'] != '1'){
52
+ // $c_bottom_main_sort_xml['c_layout_toolbar'] = '';
53
+ // } else {
54
+ // $c_bottom_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
55
+ // }
56
+ $c_bottom_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
57
+ if(!$post_data['show_pagination'] ||$post_data['show_pagination'] == '1'){
58
+ $c_bottom_main_sort_xml['c_layout_pag_top'] = '';
59
+ } else {
60
+ $c_bottom_main_sort_xml['c_layout_pag_top'] = '<action method="setData"><name>pager</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'].'</value></action>';
61
+ }
62
+
63
+ $catalog_layout_xml = '';
64
+
65
+ $catalog_layout_xml .= '<remove name="newsletter"/><reference name="root">
66
+ <action method="unsetChild"><name>breadcrumbs</name></action>
67
+ </reference>';
68
+ // $catalog_layout_xml .= '<reference name="left">
69
+ // <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
70
+ // </reference>';
71
+ $catalog_layout_xml .='<reference name="content">';
72
+
73
+ $catalog_layout_xml .= '
74
+ <block type="mobilenow/toolbar" name="custom_toolbar" template="catalog/product/list/customtoolbar.phtml">';
75
+ foreach($themeSubSettings['c_pagelayoutmain'] as $cmkey=>$cmvalue){
76
+ $catalog_layout_xml .= $c_main_sort_xml[$cmkey];
77
+ }
78
+
79
+ $catalog_layout_xml .='
80
+ <action method="setData"><name>pagerlimitlist</name><value>'.$post_data['number_of_products_choice_steps'].'</value></action>
81
+ <action method="setData"><name>defaultlistperpage</name><value>'.$post_data['number_of_products_per_page'].'</value></action>
82
+ </block>';
83
+
84
+ $themeSubSettings['c_listpagelayoutmain'] = array();
85
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'] = 0;
86
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'] = 0;
87
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'] = 0;
88
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'] = 0;
89
+ if($post_data['c_list_layout_product_price'] > 0)
90
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'] = $post_data['c_list_layout_product_price'];
91
+ if($post_data['c_list_layout_product_review'] > 0)
92
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'] = $post_data['c_list_layout_product_review'];
93
+ if($post_data['c_list_layout_product_learn'] > 0)
94
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'] = $post_data['c_list_layout_product_learn'];
95
+ if($post_data['c_list_layout_product_addtocart'] > 0)
96
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'] = $post_data['c_list_layout_product_addtocart'];
97
+ //
98
+
99
+ $c_list_sort_xml = array();
100
+ $c_list_sort_xml['c_list_layout_product_price'] = '<action method="setData"><name>price</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'].'</value></action>';
101
+ $c_list_sort_xml['c_list_layout_product_review'] = '<action method="setData"><name>ratings</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'].'</value></action>';
102
+ $c_list_sort_xml['c_list_layout_product_learn'] = '<action method="setData"><name>cart</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'].'</value></action>';
103
+ $c_list_sort_xml['c_list_layout_product_addtocart'] = ' <action method="setData"><name>more</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'].'</value></action>';
104
+
105
+ $catalog_layout_xml .='
106
+ <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
107
+ <block type="catalog/product_list" name="product_list" template="catalog/product/mobilelist.phtml">';
108
+ if($post_data['show_review_stars'] && $post_data['show_review_stars'] == '1'){
109
+ $catalog_layout_xml .= '<action method="setData"><name>showstar</name><value>1</value></action>';
110
+ }
111
+ if($post_data['show_add_to_cart'] && $post_data['show_add_to_cart'] == '1'){
112
+ $catalog_layout_xml .= '<action method="setData"><name>showcartbtn</name><value>1</value></action>';
113
+ }
114
+ if($post_data['show_learn_more'] && $post_data['show_learn_more'] == '1'){
115
+ $catalog_layout_xml .= '<action method="setData"><name>showlernmore</name><value>1</value></action>';
116
+ }
117
+
118
+ foreach($c_list_sort_xml as $c_listkey=>$c_listvalue){
119
+ $catalog_layout_xml .= $c_listvalue;
120
+ }
121
+
122
+ $catalog_layout_xml .= '
123
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
124
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
125
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
126
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
127
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
128
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
129
+ </block>
130
+ </block>
131
+ ';
132
+ $catalog_layout_xml .= '<block type="mobilenow/toolbar" name="custom_toolbar_bottom" template="catalog/product/list/customtoolbar.phtml">';
133
+ foreach($themeSubSettings['c_bottom_pagelayoutmain'] as $cmbkey=>$cmbvalue){
134
+ $catalog_layout_xml .= $c_bottom_main_sort_xml[$cmbkey];
135
+ }
136
+ $catalog_layout_xml .='
137
+ <action method="setData"><name>pagerlimitlist</name><value>'.$post_data['number_of_products_choice_steps'].'</value></action>
138
+ <action method="setData"><name>defaultlistperpage</name><value>'.$post_data['number_of_products_per_page'].'</value></action>
139
+ </block>';
140
+
141
+ $catalog_layout_xml .='</reference>';
142
+
143
+ return $catalog_layout_xml;
144
+ }
145
+
146
+
147
+ // function for generationg catalog search page layout xml
148
+ static public function generateCatalogSearchPageLayoutXML($post_data)
149
+ {
150
+ $themeSubSettings['c_pagelayoutmain'] = array();
151
+ $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'] = 0;
152
+ $themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'] = 0;
153
+ $themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'] = 0;
154
+ if($post_data['c_layout_breadcrumbs'] > 0)
155
+ $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'] = $post_data['c_layout_breadcrumbs'];
156
+ if($post_data['c_layout_toolbar'] > 0)
157
+ $themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'] = $post_data['c_layout_toolbar'];
158
+ if($post_data['c_layout_pag_top'] > 0)
159
+ $themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'] = $post_data['c_layout_pag_top'];
160
+
161
+ if(count($themeSubSettings['c_pagelayoutmain']) > 0){
162
+ asort($themeSubSettings['c_pagelayoutmain']);
163
+ }
164
+ $c_main_sort_xml = array();
165
+ if(!$post_data['show_breadcrumbs'] ||$post_data['show_breadcrumbs'] != '1'){
166
+ $c_main_sort_xml['c_layout_breadcrumbs'] = '<action method="setData"><name>showbreadcrumb</name><value>0</value></action>';
167
+ } else {
168
+ $c_main_sort_xml['c_layout_breadcrumbs'] = '<action method="setData"><name>showbreadcrumb</name><value>1</value></action><action method="setData"><name>breadcrumb</name><value>'. $themeSubSettings['c_pagelayoutmain']['c_layout_breadcrumbs'].'</value></action>';
169
+ }
170
+ // if(!$post_data['show_sortby_dropdown'] ||$post_data['show_sortby_dropdown'] != '1'){
171
+ // $c_main_sort_xml['c_layout_toolbar'] = '';
172
+ // } else {
173
+ // $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
174
+ // }
175
+ $c_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
176
+ if(!$post_data['show_pagination'] || $post_data['show_pagination'] == '2'){
177
+ $c_main_sort_xml['c_layout_pag_top'] = '';
178
+ } else {
179
+ $c_main_sort_xml['c_layout_pag_top'] = '<action method="setData"><name>pager</name><value>'.$themeSubSettings['c_pagelayoutmain']['c_layout_pag_top'].'</value></action>';
180
+ }
181
+ $themeSubSettings['c_bottom_pagelayoutmain'] = array();
182
+ $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'] = 0;
183
+ $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'] = 0;
184
+ if($post_data['c_layout_toolbar'] > 0)
185
+ $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'] = $post_data['c_layout_toolbar'];
186
+ if($post_data['c_layout_pag_top'] > 0)
187
+ $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'] = $post_data['c_layout_pag_top'];
188
+
189
+ if(count($themeSubSettings['c_bottom_pagelayoutmain']) > 0){
190
+ asort($themeSubSettings['c_bottom_pagelayoutmain']);
191
+ }
192
+ $c_bottom_main_sort_xml = array();
193
+ // if(!$post_data['show_sortby_dropdown'] ||$post_data['show_sortby_dropdown'] != '1'){
194
+ // $c_bottom_main_sort_xml['c_layout_toolbar'] = '';
195
+ // } else {
196
+ // $c_bottom_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
197
+ // }
198
+ $c_bottom_main_sort_xml['c_layout_toolbar'] = '<action method="setData"><name>sortbox</name><value>'.$themeSubSettings['c_bottom_pagelayoutmain']['c_layout_toolbar'].'</value></action>';
199
+ if(!$post_data['show_pagination'] ||$post_data['show_pagination'] == '1'){
200
+ $c_bottom_main_sort_xml['c_layout_pag_top'] = '';
201
+ } else {
202
+ $c_bottom_main_sort_xml['c_layout_pag_top'] = '<action method="setData"><name>pager</name><value>'. $themeSubSettings['c_bottom_pagelayoutmain']['c_layout_pag_top'].'</value></action>';
203
+ }
204
+
205
+ $catalog_layout_xml = '';
206
+
207
+ $catalog_layout_xml .= '<remove name="newsletter"/><reference name="root">
208
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
209
+ <action method="unsetChild"><name>breadcrumbs</name></action>
210
+ </reference>';
211
+ $catalog_layout_xml .= '<reference name="left">
212
+ <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>
213
+ </reference>';
214
+ $catalog_layout_xml .='<reference name="content">';
215
+
216
+ $catalog_layout_xml .= '
217
+ <block type="mobilenow/toolbar" name="custom_toolbar" template="catalog/product/list/customtoolbar.phtml">';
218
+ foreach($themeSubSettings['c_pagelayoutmain'] as $cmkey=>$cmvalue){
219
+ $catalog_layout_xml .= $c_main_sort_xml[$cmkey];
220
+ }
221
+
222
+ $catalog_layout_xml .='
223
+ <action method="setData"><name>pagerlimitlist</name><value>'.$post_data['number_of_products_choice_steps'].'</value></action>
224
+ <action method="setData"><name>defaultlistperpage</name><value>'.$post_data['number_of_products_per_page'].'</value></action>
225
+ </block>';
226
+
227
+ $themeSubSettings['c_listpagelayoutmain'] = array();
228
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'] = 0;
229
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'] = 0;
230
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'] = 0;
231
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'] = 0;
232
+ if($post_data['c_list_layout_product_price'] > 0)
233
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'] = $post_data['c_list_layout_product_price'];
234
+ if($post_data['c_list_layout_product_review'] > 0)
235
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'] = $post_data['c_list_layout_product_review'];
236
+ if($post_data['c_list_layout_product_learn'] > 0)
237
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'] = $post_data['c_list_layout_product_learn'];
238
+ if($post_data['c_list_layout_product_addtocart'] > 0)
239
+ $themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'] = $post_data['c_list_layout_product_addtocart'];
240
+ //
241
+ $c_list_sort_xml = array();
242
+ $c_list_sort_xml['c_list_layout_product_price'] = '<action method="setData"><name>price</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_price'].'</value></action>';
243
+ $c_list_sort_xml['c_list_layout_product_review'] = '<action method="setData"><name>ratings</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_review'].'</value></action>';
244
+ $c_list_sort_xml['c_list_layout_product_learn'] = '<action method="setData"><name>cart</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_learn'].'</value></action>';
245
+ $c_list_sort_xml['c_list_layout_product_addtocart'] = ' <action method="setData"><name>more</name><value>'.$themeSubSettings['c_listpagelayoutmain']['c_list_layout_product_addtocart'].'</value></action>';
246
+
247
+
248
+ $catalog_layout_xml .='
249
+ <block type="catalogsearch/result" name="search.result" template="catalogsearch/result.phtml">
250
+ <block type="catalog/product_list" name="search_result_list" template="catalog/product/mobilelist.phtml">';
251
+ if($post_data['show_review_stars'] && $post_data['show_review_stars'] == '1'){
252
+ $catalog_layout_xml .= '<action method="setData"><name>showstar</name><value>1</value></action>';
253
+ }
254
+ if($post_data['show_add_to_cart'] && $post_data['show_add_to_cart'] == '1'){
255
+ $catalog_layout_xml .= '<action method="setData"><name>showcartbtn</name><value>1</value></action>';
256
+ }
257
+ if($post_data['show_learn_more'] && $post_data['show_learn_more'] == '1'){
258
+ $catalog_layout_xml .= '<action method="setData"><name>showlernmore</name><value>1</value></action>';
259
+ }
260
+
261
+ foreach($c_list_sort_xml as $c_listkey=>$c_listvalue){
262
+ $catalog_layout_xml .= $c_listvalue;
263
+ }
264
+
265
+ $catalog_layout_xml .= '
266
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
267
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
268
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
269
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
270
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
271
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
272
+ </block>
273
+ <action method="setListOrders"/>
274
+ <action method="setListModes"/>
275
+ <action method="setListCollection"/>
276
+ </block>
277
+ ';
278
+
279
+ $catalog_layout_xml .= '<block type="mobilenow/toolbar" name="custom_toolbar_bottom" template="catalog/product/list/customtoolbar.phtml">';
280
+ foreach($themeSubSettings['c_bottom_pagelayoutmain'] as $cmbkey=>$cmbvalue){
281
+ $catalog_layout_xml .= $c_bottom_main_sort_xml[$cmbkey];
282
+ }
283
+ $catalog_layout_xml .='
284
+ <action method="setData"><name>pagerlimitlist</name><value>'.$post_data['number_of_products_choice_steps'].'</value></action>
285
+ <action method="setData"><name>defaultlistperpage</name><value>'.$post_data['number_of_products_per_page'].'</value></action>
286
+ </block>';
287
+
288
+ $catalog_layout_xml .='</reference>';
289
+
290
+ return $catalog_layout_xml;
291
+ }
292
+
293
+ }
294
 
app/code/community/Redstage/Mobilenow/Helper/Cms/Page.php CHANGED
@@ -1,104 +1,104 @@
1
- <?php
2
-
3
- class Redstage_Mobilenow_Helper_Cms_Page extends Mage_Cms_Helper_Page
4
- {
5
-
6
- public function renderPage(Mage_Core_Controller_Front_Action $action, $pageId = null)
7
- {
8
- return $this->_renderPage($action, $pageId);
9
- }
10
-
11
- /**
12
- * Renders CMS page
13
- *
14
- * @param Mage_Core_Controller_Front_Action $action
15
- * @param integer $pageId
16
- * @param bool $renderLayout
17
- * @return boolean
18
- */
19
- protected function _renderPage(Mage_Core_Controller_Varien_Action $action, $pageId = null, $renderLayout = true)
20
- {
21
-
22
- $page = Mage::getSingleton('cms/page');
23
- if (!is_null($pageId) && $pageId!==$page->getId()) {
24
- $delimeterPosition = strrpos($pageId, '|');
25
- if ($delimeterPosition) {
26
- $pageId = substr($pageId, 0, $delimeterPosition);
27
- }
28
-
29
- $page->setStoreId(Mage::app()->getStore()->getId());
30
- if (!$page->load($pageId)) {
31
- return false;
32
- }
33
- }
34
-
35
- if (!$page->getId()) {
36
- return false;
37
- }
38
-
39
- $inRange = Mage::app()->getLocale()
40
- ->isStoreDateInInterval(null, $page->getCustomThemeFrom(), $page->getCustomThemeTo());
41
-
42
- if(!Mage::getSingleton('core/session')->getMobileNowId()){
43
- if ($page->getCustomTheme()) {
44
- if ($inRange) {
45
- list($package, $theme) = explode('/', $page->getCustomTheme());
46
- Mage::getSingleton('core/design_package')
47
- ->setPackageName($package)
48
- ->setTheme($theme);
49
- }
50
- }
51
- }
52
-
53
- $action->getLayout()->getUpdate()
54
- ->addHandle('default')
55
- ->addHandle('cms_page');
56
-
57
- $action->addActionLayoutHandles();
58
- $package = Mage::getSingleton('core/design_package')->getPackageName();
59
-
60
- if ($page->getRootTemplate() && $package!='redstage-mobilenow') {
61
- $handle = ($page->getCustomRootTemplate()
62
- && $page->getCustomRootTemplate() != 'empty'
63
- && $inRange) ? $page->getCustomRootTemplate() : $page->getRootTemplate();
64
- $action->getLayout()->helper('page/layout')->applyHandle($handle);
65
- }
66
-
67
- Mage::dispatchEvent('cms_page_render', array('page' => $page, 'controller_action' => $action));
68
-
69
- $action->loadLayoutUpdates();
70
- $layoutUpdate = ($page->getCustomLayoutUpdateXml() && $inRange)
71
- ? $page->getCustomLayoutUpdateXml() : $page->getLayoutUpdateXml();
72
- $action->getLayout()->getUpdate()->addUpdate($layoutUpdate);
73
- $action->generateLayoutXml()->generateLayoutBlocks();
74
-
75
- $contentHeadingBlock = $action->getLayout()->getBlock('page_content_heading');
76
- if ($contentHeadingBlock) {
77
- $contentHeading = $this->escapeHtml($page->getContentHeading());
78
- $contentHeadingBlock->setContentHeading($contentHeading);
79
- }
80
-
81
- if ($page->getRootTemplate() && $package!='redstage-mobilenow') {
82
- $action->getLayout()->helper('page/layout')
83
- ->applyTemplate($page->getRootTemplate());
84
- }
85
-
86
- /* @TODO: Move catalog and checkout storage types to appropriate modules */
87
- $messageBlock = $action->getLayout()->getMessagesBlock();
88
- foreach (array('catalog/session', 'checkout/session', 'customer/session') as $storageType) {
89
- $storage = Mage::getSingleton($storageType);
90
- if ($storage) {
91
- $messageBlock->addStorageType($storageType);
92
- $messageBlock->addMessages($storage->getMessages(true));
93
- }
94
- }
95
-
96
- if ($renderLayout) {
97
- $action->renderLayout();
98
- }
99
-
100
- return true;
101
- }
102
-
103
-
104
- }
1
+ <?php
2
+
3
+ class Redstage_Mobilenow_Helper_Cms_Page extends Mage_Cms_Helper_Page
4
+ {
5
+
6
+ public function renderPage(Mage_Core_Controller_Front_Action $action, $pageId = null)
7
+ {
8
+ return $this->_renderPage($action, $pageId);
9
+ }
10
+
11
+ /**
12
+ * Renders CMS page
13
+ *
14
+ * @param Mage_Core_Controller_Front_Action $action
15
+ * @param integer $pageId
16
+ * @param bool $renderLayout
17
+ * @return boolean
18
+ */
19
+ protected function _renderPage(Mage_Core_Controller_Varien_Action $action, $pageId = null, $renderLayout = true)
20
+ {
21
+
22
+ $page = Mage::getSingleton('cms/page');
23
+ if (!is_null($pageId) && $pageId!==$page->getId()) {
24
+ $delimeterPosition = strrpos($pageId, '|');
25
+ if ($delimeterPosition) {
26
+ $pageId = substr($pageId, 0, $delimeterPosition);
27
+ }
28
+
29
+ $page->setStoreId(Mage::app()->getStore()->getId());
30
+ if (!$page->load($pageId)) {
31
+ return false;
32
+ }
33
+ }
34
+
35
+ if (!$page->getId()) {
36
+ return false;
37
+ }
38
+
39
+ $inRange = Mage::app()->getLocale()
40
+ ->isStoreDateInInterval(null, $page->getCustomThemeFrom(), $page->getCustomThemeTo());
41
+
42
+ if(!Mage::getSingleton('core/session')->getMobileNowId()){
43
+ if ($page->getCustomTheme()) {
44
+ if ($inRange) {
45
+ list($package, $theme) = explode('/', $page->getCustomTheme());
46
+ Mage::getSingleton('core/design_package')
47
+ ->setPackageName($package)
48
+ ->setTheme($theme);
49
+ }
50
+ }
51
+ }
52
+
53
+ $action->getLayout()->getUpdate()
54
+ ->addHandle('default')
55
+ ->addHandle('cms_page');
56
+
57
+ $action->addActionLayoutHandles();
58
+ $package = Mage::getSingleton('core/design_package')->getPackageName();
59
+
60
+ if ($page->getRootTemplate() && $package!='redstage-mobilenow') {
61
+ $handle = ($page->getCustomRootTemplate()
62
+ && $page->getCustomRootTemplate() != 'empty'
63
+ && $inRange) ? $page->getCustomRootTemplate() : $page->getRootTemplate();
64
+ $action->getLayout()->helper('page/layout')->applyHandle($handle);
65
+ }
66
+
67
+ Mage::dispatchEvent('cms_page_render', array('page' => $page, 'controller_action' => $action));
68
+
69
+ $action->loadLayoutUpdates();
70
+ $layoutUpdate = ($page->getCustomLayoutUpdateXml() && $inRange)
71
+ ? $page->getCustomLayoutUpdateXml() : $page->getLayoutUpdateXml();
72
+ $action->getLayout()->getUpdate()->addUpdate($layoutUpdate);
73
+ $action->generateLayoutXml()->generateLayoutBlocks();
74
+
75
+ $contentHeadingBlock = $action->getLayout()->getBlock('page_content_heading');
76
+ if ($contentHeadingBlock) {
77
+ $contentHeading = $this->escapeHtml($page->getContentHeading());
78
+ $contentHeadingBlock->setContentHeading($contentHeading);
79
+ }
80
+
81
+ if ($page->getRootTemplate() && $package!='redstage-mobilenow') {
82
+ $action->getLayout()->helper('page/layout')
83
+ ->applyTemplate($page->getRootTemplate());
84
+ }
85
+
86
+ /* @TODO: Move catalog and checkout storage types to appropriate modules */
87
+ $messageBlock = $action->getLayout()->getMessagesBlock();
88
+ foreach (array('catalog/session', 'checkout/session', 'customer/session') as $storageType) {
89
+ $storage = Mage::getSingleton($storageType);
90
+ if ($storage) {
91
+ $messageBlock->addStorageType($storageType);
92
+ $messageBlock->addMessages($storage->getMessages(true));
93
+ }
94
+ }
95
+
96
+ if ($renderLayout) {
97
+ $action->renderLayout();
98
+ }
99
+
100
+ return true;
101
+ }
102
+
103
+
104
+ }
app/code/community/Redstage/Mobilenow/Helper/Data.php CHANGED
@@ -1,603 +1,602 @@
1
- <?php
2
- class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
3
- {
4
- static public function getOptionArrayMobileDevice()
5
- {
6
- $data_array=array();
7
- $data_array['']='Please select Device Type';
8
- $data_array[1]='iPhone';
9
- return($data_array);
10
- }
11
- static public function getGridOptionArrayMobileDevice()
12
- {
13
- $data_array=array();
14
- $data_array[1]='iPhone';
15
- return($data_array);
16
- }
17
- static public function getValueArrayMobileDevice()
18
- {
19
- $data_array=array();
20
- foreach(Redstage_Mobilenow_Helper_Data::getOptionArrayMobileDevice() as $k=>$v)
21
- {
22
- $data_array[]=array('value'=>$k,'label'=>$v);
23
- }
24
- return($data_array);
25
- }
26
- static public function getOptionArrayUserAgent()
27
- {
28
- $data_array=array();
29
- $data_array[0]='ALL';
30
- $data_array[1]='iPhone';
31
- $data_array[2]='iPod';
32
- $data_array[3]='BlackBerry';
33
- $data_array[4]='Palm';
34
- $data_array[5]='Googlebot-Mobile';
35
- $data_array[6]='mobi';
36
- $data_array[7]='Safari Mobile';
37
- $data_array[8]='Windows Mobile';
38
- $data_array[9]='Android';
39
- $data_array[10]='Mini';
40
- $data_array[11]='mobile';
41
- $data_array[12]='Nokia';
42
- $data_array[13]='SymbianOS';
43
- $data_array[14]='iPad';
44
- $data_array[15]='Silk';
45
- $data_array[16]='Kindle';
46
- $data_array[17]='Xoom';
47
- $data_array[18]='SCH-I800';
48
- $data_array[19]='Tablet';
49
- return($data_array);
50
- }
51
- static public function getValueArrayUserAgent()
52
- {
53
- $data_array=array();
54
- foreach(Redstage_Mobilenow_Helper_Data::getOptionArrayUserAgent() as $k=>$v)
55
- {
56
- $data_array[]=array('value'=>$k,'label'=>$v);
57
- }
58
- return($data_array);
59
- }
60
- static public function getOptionArrayStatus()
61
- {
62
- $data_array=array();
63
- $data_array[1]='Active';
64
- $data_array[0]='Inactive';
65
- return($data_array);
66
- }
67
- static public function getValueArrayStatus()
68
- {
69
- $data_array=array();
70
- foreach(Redstage_Mobilenow_Helper_Data::getOptionArrayStatus() as $k=>$v)
71
- {
72
- $data_array[]=array('value'=>$k,'label'=>$v);
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()!='')
82
- $data_array[$getAllSubSetting->getID()]=$getAllSubSetting->getSubsetname();
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'];
109
- $themeSubSettings['themeid']='';
110
- }
111
- }
112
- else
113
- {
114
- $themeSubSettings['subsetname']=$post_data['hidden_theme_sub_setting_name'];
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
163
- $homeSearchCartArr=array('header_link_home'=>$post_data['header_link_home'], 'header_link_home_name'=>$post_data['header_link_home_name'],
164
- 'footer_link_home'=>$post_data['footer_link_home'], 'footer_link_home_name'=>$post_data['footer_link_home_name'],
165
- 'header_link_login'=>$post_data['header_link_login'], 'header_link_login_name'=>$post_data['header_link_login_name'],
166
- 'footer_link_login'=>$post_data['footer_link_login'], 'footer_link_login_name'=>$post_data['footer_link_login_name'],
167
- 'header_link_myaccount'=>$post_data['header_link_myaccount'], 'header_link_myaccount_name'=>$post_data['header_link_myaccount_name'],
168
- 'footer_link_myaccount'=>$post_data['footer_link_myaccount'], 'footer_link_myaccount_name'=>$post_data['footer_link_myaccount_name'],
169
- 'header_link_wishlist'=>$post_data['header_link_wishlist'], 'header_link_wishlist_name'=>$post_data['header_link_wishlist_name'],
170
- 'footer_link_wishlist'=>$post_data['footer_link_wishlist'], 'footer_link_wishlist_name'=>$post_data['footer_link_wishlist_name'],
171
- 'links_color'=>$post_data['links_color']);
172
- $themeSubSettings['links']= json_encode($homeSearchCartArr);
173
- //Text Color
174
- $themeSubSettings['textcolor']= $post_data['text_color'];
175
- //Search / Cart Area
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'] != ''){
202
- $homePageBannerImage = $post_data['banner_preview_filename'];
203
- if($lastRecordId){
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 {
218
- $homePageBannerImage = $post_data['banner_fielname'];
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'] != ''){
226
- $homePageBannerImage = 'preview'.DS.$lastRecordId.DS.$post_data['banner_preview_filename'];
227
- } else {
228
- $homePageBannerImage = $post_data['banner_fielname'];
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);
236
- //SubHeader Section
237
- $themeSubSettings['subheadersection']=$post_data['subheader_section'];
238
- //Categories
239
- $themeSubSettings['categories']=json_encode(array('categories'=>$post_data['categories'],'categories_background_color'=>$post_data['categories_background_color']));
240
- //Newsletter
241
- $themeSubSettings['newsletter']= json_encode(array('show_newsletter'=>$post_data['show_newsletter'],'newsletter_area_backgorund'=>$post_data['newsletter_area_backgorund']));
242
- //Home page custom code
243
- $themeSubSettings['homepagecustomcode']=$post_data['homepage_custom_code'];
244
- //Pre footer section
245
- $themeSubSettings['prefootersection']=$post_data['pre_footer_section'];
246
- //Footer section
247
- $themeSubSettings['footersection']=$post_data['footer_section'];
248
- //Default Buttons Color Settings
249
- $themeSubSettings['buttoncolor']=json_encode(array('button_background_color'=>$post_data['button_background_color'],'button_text_color'=>$post_data['button_text_color'],'button_border_color'=>$post_data['button_border_color']));
250
- /////////////////////Catalog Page settings
251
- //Breadcrumbs
252
- $themeSubSettings['breadcrumb']= json_encode(array('show_breadcrumbs'=>$post_data['show_breadcrumbs'],'breadcrumbs_bg_color'=>$post_data['breadcrumbs_bg_color'],'breadcrumbs_font_color'=>$post_data['breadcrumbs_font_color']));
253
- //Catalog View
254
- //$themeSubSettings['catalogview']= json_encode(array('default_catalog_view'=>$post_data['default_catalog_view'],'show_grid_list_choice'=>$post_data['show_grid_list_choice']));
255
- //Number of Products Per Page
256
- $themeSubSettings['numberofproductsperpage']=$post_data['number_of_products_per_page'];
257
- //Number of Products Choice Steps
258
- $themeSubSettings['numberofproductschoice']=$post_data['number_of_products_choice_steps'];
259
- //Sort By
260
- $themeSubSettings['catalogsortby']=json_encode(array('show_sortby_dropdown'=>$post_data['show_sortby_dropdown'],'sort_options'=>implode(',',$post_data['sort_options'])));
261
- //Toolbar
262
- $themeSubSettings['toolbarcolor']=json_encode(array('toolbar_bg_color'=>$post_data['toolbar_bg_color'],'toolbar_text_color'=>$post_data['toolbar_text_color']));
263
- //Pagination
264
- $themeSubSettings['pagination']=json_encode(array('show_pagination'=>$post_data['show_pagination'],'pagination_bg_color'=>$post_data['pagination_bg_color'],'pagination_button_bg_color'=>$post_data['pagination_button_bg_color'],'pagination_button_text_color'=>$post_data['pagination_button_text_color']));
265
- //Image Border
266
- $themeSubSettings['catalogimagedetails']=json_encode(array('show_image_border'=>$post_data['show_image_border'],'image_border_color'=>$post_data['image_border_color'],'catalog_image_width'=>$post_data['catalog_image_width']));
267
- //Product color
268
- $themeSubSettings['catalogproductcolor']=json_encode(array('product_title_color'=>$post_data['product_title_color'],'product_price_color'=>$post_data['product_price_color'],'product_special_price_color'=>$post_data['product_special_price_color']));
269
- //Reviews
270
- $themeSubSettings['catalogreviews']=json_encode(array('show_review_stars'=>$post_data['show_review_stars'],'review_star_color'=>$post_data['review_star_color']));
271
- //Learn more link
272
- $themeSubSettings['cataloglearnmore']=$post_data['show_learn_more'];
273
- //Add To Cart Button
274
- $themeSubSettings['catalogaddtocart']=json_encode(array('show_add_to_cart'=>$post_data['show_add_to_cart'],'add_to_cart_button_bg_color'=>$post_data['add_to_cart_button_bg_color'],'add_to_cart_button_font_color'=>$post_data['add_to_cart_button_font_color'],'add_to_cart_button_border_color'=>$post_data['add_to_cart_button_border_color']));
275
- //Show gridlines
276
- $themeSubSettings['cataloggridlines']=json_encode(array('show_gridlines'=>$post_data['show_gridlines'],'gridlines_color'=>$post_data['gridlines_color']));
277
- //////////product Page///////////
278
- //Product title color
279
- $themeSubSettings['producttitlecolor']=$post_data['productpage_title_color'];
280
- //Image border
281
- $themeSubSettings['productimagedetails']=json_encode(array('show_product_image_border'=>$post_data['show_product_image_border'],'product_image_border_color'=>$post_data['product_image_border_color'],'product_image_width'=>$post_data['product_image_width']));
282
- //Show other details
283
- $themeSubSettings['showproductdeails']=json_encode(array('show_product_availability'=>$post_data['show_product_availability'],
284
- 'show_product_wishlist_link'=>$post_data['show_product_wishlist_link'],
285
- 'show_product_reviews_summary'=>$post_data['show_product_reviews_summary'],
286
- 'show_product_description'=>$post_data['show_product_description'],
287
- 'product_description_color'=>$post_data['product_description_color'],
288
- 'show_product_additional_information'=>$post_data['show_product_additional_information'],
289
- 'additional_information_bg_color'=>$post_data['additional_information_bg_color'],
290
- 'additional_information_font_color'=>$post_data['additional_information_font_color'],
291
- 'show_full_reviews_on_product_page'=>$post_data['show_full_reviews_on_product_page'],
292
- 'full_reviews_bg_color'=>$post_data['full_reviews_bg_color'],
293
- 'full_reviews_font_color'=>$post_data['full_reviews_font_color'],
294
- 'show_related_products'=>$post_data['show_related_products'],
295
- ));
296
-
297
- //saving homepage layout settings
298
- $themeSubSettings['homepagelayoutmain']=json_encode(array('h_layout_search_cart'=>$post_data['h_layout_search_cart'],
299
- 'h_layout_sub_header'=>$post_data['h_layout_sub_header'],
300
- 'h_layout_banner'=>$post_data['h_layout_banner'],
301
- 'h_layout_feature'=>$post_data['h_layout_feature'],
302
- 'h_layout_categories'=>$post_data['h_layout_categories'],
303
- 'h_layout_news_signup'=>$post_data['h_layout_news_signup']
304
- ));
305
-
306
- //saving catalog main layout settings
307
- $themeSubSettings['cataloglayoutmain']=json_encode(array('c_layout_breadcrumbs'=>$post_data['c_layout_breadcrumbs'],
308
- 'c_layout_toolbar'=>$post_data['c_layout_toolbar'],
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'],
325
- 'c_list_layout_product_price'=>$post_data['c_list_layout_product_price'],
326
- 'c_list_layout_product_review'=>$post_data['c_list_layout_product_review'],
327
- 'c_list_layout_product_learn'=>$post_data['c_list_layout_product_learn'],
328
- 'c_list_layout_product_addtocart'=>$post_data['c_list_layout_product_addtocart']
329
- ));
330
-
331
- //saving product page layout settings
332
- $themeSubSettings['productlayoutmain']=json_encode(array('ptop_layout_settings'=>array('p_layout_availability'=>$post_data['p_layout_availability'],
333
- 'p_layout_pricing'=>$post_data['p_layout_pricing'],
334
- 'p_layout_addtocart'=>$post_data['p_layout_addtocart'],
335
- 'p_layout_wishlist'=>$post_data['p_layout_wishlist'],
336
- 'p_layout_review'=>$post_data['p_layout_review']),
337
- 'pbottom_layout_settings'=>array('p_layout_desc'=>$post_data['p_layout_desc'],
338
- 'p_layout_additionalinfo'=>$post_data['p_layout_additionalinfo'],
339
- 'p_layout_fullreview'=>$post_data['p_layout_fullreview'],
340
- 'p_layout_relatedproduct'=>$post_data['p_layout_relatedproduct'])
341
- ));
342
-
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());
354
- //Search / Cart
355
- $decodeSearchCartData=json_decode($subsettingsModel->getSearchcart());
356
- //Home Page Banner
357
- $decodeHomeBannerData=json_decode($subsettingsModel->getHomepagebanner());
358
- //SubHeader Section
359
- $subsettingsModel->setData('subheader_section', $subsettingsModel->getSubheadersection());
360
- //Categories
361
- $decodeCategoryData=json_decode($subsettingsModel->getCategories());
362
- //Newsletter
363
- $decodeNewsletterData=json_decode($subsettingsModel->getNewsletter());
364
- //Homepage Custom Code
365
- //Pre-Footer Section
366
- //Footer Section
367
- // Buttons Color
368
- $decodeButtonData=json_decode($subsettingsModel->getButtoncolor());
369
- /////////////////////Catalog Page///////////////////////////
370
- //Breadcrumbs
371
- $decodeBreadcrumbData=json_decode($subsettingsModel->getBreadcrumb());
372
- //Catalog view
373
- $decodeCatalogviewbData=json_decode($subsettingsModel->getCatalogview());
374
- //Number of Products Per Page (default) ALL = Show All
375
- // Sort By
376
- $decodeCatalogsortbybData=json_decode($subsettingsModel->getCatalogsortby());
377
- //Toolbar
378
- $decodeToolbarData=json_decode($subsettingsModel->getToolbarcolor());
379
- //Pagination
380
- $decodePaginationData=json_decode($subsettingsModel->getPagination());
381
- //Image Border
382
- $decodeImageborderData=json_decode($subsettingsModel->getCatalogimagedetails());
383
- //Product Color
384
- $decodeProductColorData=json_decode($subsettingsModel->getCatalogproductcolor());
385
- //Review Stars
386
- $decodeReviewstarsData=json_decode($subsettingsModel->getCatalogreviews());
387
- //Learnmore
388
- //Add to cart
389
- $decodeAddtocartData=json_decode($subsettingsModel->getCatalogaddtocart());
390
- //Gridlines
391
- $decodeGridlinesData=json_decode($subsettingsModel->getCataloggridlines());
392
- /////////////////////Product Page///////////////////////////
393
- //Product Title
394
- //Imageborder
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
402
- $cLayoutData = json_decode($subsettingsModel->getCataloglayoutmain());
403
- //Catalog grid layout
404
- $cLayoutGridData = json_decode($subsettingsModel->getCataloglayoutgrid());
405
- //Catalog grid layout
406
- $cLayoutListData = json_decode($subsettingsModel->getCataloglayoutlist());
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)
417
- ->setData('footer_link_home_name', $decodeLinksData->footer_link_home_name)
418
- ->setData('header_link_login', $decodeLinksData->header_link_login)
419
- ->setData('header_link_login_name', $decodeLinksData->header_link_login_name)
420
- ->setData('footer_link_login', $decodeLinksData->footer_link_login)
421
- ->setData('footer_link_login_name', $decodeLinksData->footer_link_login_name)
422
- ->setData('header_link_myaccount', $decodeLinksData->header_link_myaccount)
423
- ->setData('header_link_myaccount_name', $decodeLinksData->header_link_myaccount_name)
424
- ->setData('footer_link_myaccount', $decodeLinksData->footer_link_myaccount)
425
- ->setData('footer_link_myaccount_name', $decodeLinksData->footer_link_myaccount_name)
426
- ->setData('header_link_wishlist', $decodeLinksData->header_link_wishlist)
427
- ->setData('header_link_wishlist_name', $decodeLinksData->header_link_wishlist_name)
428
- ->setData('footer_link_wishlist', $decodeLinksData->footer_link_wishlist)
429
- ->setData('footer_link_wishlist_name', $decodeLinksData->footer_link_wishlist_name)
430
- ->setData('links_color', $decodeLinksData->links_color)
431
- ->setData('text_color', $subsettingsModel->getTextcolor())
432
- ->setData('show_search_cart_area', $decodeSearchCartData->show_search_cart_area)
433
- ->setData('search_cart_bg_color', $decodeSearchCartData->search_cart_bg_color)
434
- ->setData('cart_link_color', $decodeSearchCartData->cart_link_color)
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)
441
- ->setData('show_newsletter', $decodeNewsletterData->show_newsletter)
442
- ->setData('newsletter_area_backgorund', $decodeNewsletterData->newsletter_area_backgorund)
443
- ->setData('homepage_custom_code', $subsettingsModel->getHomepagecustomcode())
444
- ->setData('pre_footer_section', $subsettingsModel->getPrefootersection())
445
- ->setData('footer_section', $subsettingsModel->getFootersection())
446
- ->setData('button_background_color', $decodeButtonData->button_background_color)
447
- ->setData('button_text_color', $decodeButtonData->button_text_color)
448
- ->setData('button_border_color', $decodeButtonData->button_border_color)
449
- ->setData('show_breadcrumbs', $decodeBreadcrumbData->show_breadcrumbs)
450
- ->setData('breadcrumbs_bg_color', $decodeBreadcrumbData->breadcrumbs_bg_color)
451
- ->setData('breadcrumbs_font_color', $decodeBreadcrumbData->breadcrumbs_font_color)
452
- //->setData('default_catalog_view', $decodeCatalogviewbData->default_catalog_view)
453
- //->setData('show_grid_list_choice', $decodeCatalogviewbData->show_grid_list_choice)
454
- ->setData('number_of_products_per_page', $subsettingsModel->getNumberofproductsperpage())
455
- ->setData('number_of_products_choice_steps', $subsettingsModel->getNumberofproductschoice())
456
- ->setData('show_sortby_dropdown', $decodeCatalogsortbybData->show_sortby_dropdown)
457
- ->setData('sort_options', explode(',',$decodeCatalogsortbybData->sort_options))
458
- ->setData('toolbar_bg_color', $decodeToolbarData->toolbar_bg_color)
459
- ->setData('toolbar_text_color', $decodeToolbarData->toolbar_text_color)
460
- ->setData('show_pagination', $decodePaginationData->show_pagination)
461
- ->setData('pagination_bg_color', $decodePaginationData->pagination_bg_color)
462
- ->setData('pagination_button_bg_color', $decodePaginationData->pagination_button_bg_color)
463
- ->setData('pagination_button_text_color', $decodePaginationData->pagination_button_text_color)
464
- ->setData('show_image_border', $decodeImageborderData->show_image_border)
465
- ->setData('image_border_color', $decodeImageborderData->image_border_color)
466
- ->setData('catalog_image_width', $decodeImageborderData->catalog_image_width)
467
- ->setData('product_title_color', $decodeProductColorData->product_title_color)
468
- ->setData('product_price_color', $decodeProductColorData->product_price_color)
469
- ->setData('product_special_price_color', $decodeProductColorData->product_special_price_color)
470
- ->setData('show_review_stars', $decodeReviewstarsData->show_review_stars)
471
- ->setData('review_star_color', $decodeReviewstarsData->review_star_color)
472
- ->setData('show_learn_more', $subsettingsModel->getCataloglearnmore())
473
- ->setData('show_add_to_cart', $decodeAddtocartData->show_add_to_cart)
474
- ->setData('add_to_cart_button_bg_color', $decodeAddtocartData->add_to_cart_button_bg_color)
475
- ->setData('add_to_cart_button_font_color', $decodeAddtocartData->add_to_cart_button_font_color)
476
- ->setData('add_to_cart_button_border_color', $decodeAddtocartData->add_to_cart_button_border_color)
477
- ->setData('show_gridlines', $decodeGridlinesData->show_gridlines)
478
- ->setData('gridlines_color', $decodeGridlinesData->gridlines_color)
479
- ->setData('productpage_title_color', $subsettingsModel->getProducttitlecolor())
480
- ->setData('show_product_image_border', $decodeProductImageborderData->show_product_image_border)
481
- ->setData('product_image_border_color', $decodeProductImageborderData->product_image_border_color)
482
- ->setData('product_image_width', $decodeProductImageborderData->product_image_width)
483
- ->setData('show_product_availability', $decodeProductShowData->show_product_availability)
484
- ->setData('show_product_wishlist_link', $decodeProductShowData->show_product_wishlist_link)
485
- ->setData('show_product_reviews_summary', $decodeProductShowData->show_product_reviews_summary)
486
- ->setData('show_product_description', $decodeProductShowData->show_product_description)
487
- ->setData('product_description_color', $decodeProductShowData->product_description_color)
488
- ->setData('show_product_additional_information', $decodeProductShowData->show_product_additional_information)
489
- ->setData('additional_information_bg_color', $decodeProductShowData->additional_information_bg_color)
490
- ->setData('additional_information_font_color', $decodeProductShowData->additional_information_font_color)
491
- ->setData('show_full_reviews_on_product_page', $decodeProductShowData->show_full_reviews_on_product_page)
492
- ->setData('full_reviews_bg_color', $decodeProductShowData->full_reviews_bg_color)
493
- ->setData('full_reviews_font_color', $decodeProductShowData->full_reviews_font_color)
494
- ->setData('show_related_products', $decodeProductShowData->show_related_products)
495
- ->setData('preset_layout_sub_settings', $getSubsetDefaultId)
496
- ->setData('h_layout_search_cart', $hLayoutData->h_layout_search_cart)
497
- ->setData('h_layout_sub_header', $hLayoutData->h_layout_sub_header)
498
- ->setData('h_layout_banner', $hLayoutData->h_layout_banner)
499
- ->setData('h_layout_feature', $hLayoutData->h_layout_feature)
500
- ->setData('h_layout_categories', $hLayoutData->h_layout_categories)
501
- ->setData('h_layout_news_signup', $hLayoutData->h_layout_news_signup)
502
- ->setData('c_layout_breadcrumbs', $cLayoutData->c_layout_breadcrumbs)
503
- ->setData('c_layout_toolbar', $cLayoutData->c_layout_toolbar)
504
- ->setData('c_layout_pag_top', $cLayoutData->c_layout_pag_top)
505
- ->setData('c_grid_layout_product_image', $cLayoutGridData->c_grid_layout_product_image)
506
- ->setData('c_grid_layout_product_title', $cLayoutGridData->c_grid_layout_product_title)
507
- ->setData('c_grid_layout_product_price', $cLayoutGridData->c_grid_layout_product_price)
508
- ->setData('c_grid_layout_product_review', $cLayoutGridData->c_grid_layout_product_review)
509
- ->setData('c_grid_layout_product_learn', $cLayoutGridData->c_grid_layout_product_learn)
510
- ->setData('c_grid_layout_product_addtocart', $cLayoutGridData->c_grid_layout_product_addtocart)
511
- ->setData('c_list_layout_product_image', $cLayoutListData->c_list_layout_product_image)
512
- ->setData('c_list_layout_product_title', $cLayoutListData->c_list_layout_product_title)
513
- ->setData('c_list_layout_product_price', $cLayoutListData->c_list_layout_product_price)
514
- ->setData('c_list_layout_product_review', $cLayoutListData->c_list_layout_product_review)
515
- ->setData('c_list_layout_product_learn', $cLayoutListData->c_list_layout_product_learn)
516
- ->setData('c_list_layout_product_addtocart', $cLayoutListData->c_list_layout_product_addtocart)
517
- ->setData('p_layout_availability', $pLayoutData->ptop_layout_settings->p_layout_availability)
518
- ->setData('p_layout_pricing', $pLayoutData->ptop_layout_settings->p_layout_pricing)
519
- ->setData('p_layout_addtocart', $pLayoutData->ptop_layout_settings->p_layout_addtocart)
520
- ->setData('p_layout_wishlist', $pLayoutData->ptop_layout_settings->p_layout_wishlist)
521
- ->setData('p_layout_review', $pLayoutData->ptop_layout_settings->p_layout_review)
522
- ->setData('p_layout_desc', $pLayoutData->pbottom_layout_settings->p_layout_desc)
523
- ->setData('p_layout_additionalinfo', $pLayoutData->pbottom_layout_settings->p_layout_additionalinfo)
524
- ->setData('p_layout_fullreview', $pLayoutData->pbottom_layout_settings->p_layout_fullreview)
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
- {
547
- Mage::getSingleton("adminhtml/session")->addError('Your free trial period has expired. Please visit <a target="_blank" href="http://mobilenowapp.com" >http://mobilenowapp.com</a> and upgrade your account to the Gold Membership.' );
548
- }
549
- Mage::app()->getStore()->setConfig($outputPath, true);
550
- }
551
- }
552
- }
553
- static public function getPreviewCategoryUrl()
554
- {
555
- //////////////////GetCategory Id to load in Iframe///////////////////////
556
- $previewCat=Mage::getModel('catalog/category');
557
- $categoryId = $previewCat->getCollection()->getLastItem();
558
- if($categoryId->getId())
559
- {
560
- $CategoryId=$categoryId->getId();
561
- $previewCat->load($CategoryId);
562
- $categoryURL=$previewCat->getUrlPath();
563
- }
564
- else
565
- {
566
- $categoryURL='';
567
- }
568
- return $categoryURL;
569
- }
570
- static public function getPreviewProductUrl()
571
- {
572
- ///////////////Get product ID to Load in Iframe///////////////////////
573
- $previewProduct=Mage::getModel('catalog/product');
574
- $previewProductId = $previewProduct->getCollection()->getFirstItem();
575
- if($previewProductId->getId())
576
- {
577
- $ProductId=$previewProductId->getId();
578
- $previewProduct->load($ProductId);
579
- $productURL=$previewProduct->getUrlPath();
580
- }
581
- else
582
- {
583
- $productURL='';
584
- }
585
- return $productURL;
586
- }
587
-
588
- public function remove_dir($dir) {
589
- if (is_dir($dir)) {
590
- $objects = scandir($dir);
591
- foreach ($objects as $object) {
592
- if ($object != "." && $object != "..") {
593
- if (filetype($dir."/".$object) == "dir") rmdir($dir."/".$object); else unlink($dir."/".$object);
594
- }
595
- }
596
- reset($objects);
597
- rmdir($dir);
598
- }
599
- }
600
-
601
-
602
- }
603
-
1
+ <?php
2
+ class Redstage_Mobilenow_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ static public function getOptionArrayMobileDevice()
5
+ {
6
+ $data_array=array();
7
+ $data_array['']='Please select Device Type';
8
+ $data_array[1]='iPhone';
9
+ return($data_array);
10
+ }
11
+ static public function getGridOptionArrayMobileDevice()
12
+ {
13
+ $data_array=array();
14
+ $data_array[1]='iPhone';
15
+ return($data_array);
16
+ }
17
+ static public function getValueArrayMobileDevice()
18
+ {
19
+ $data_array=array();
20
+ foreach(Redstage_Mobilenow_Helper_Data::getOptionArrayMobileDevice() as $k=>$v)
21
+ {
22
+ $data_array[]=array('value'=>$k,'label'=>$v);
23
+ }
24
+ return($data_array);
25
+ }
26
+ static public function getOptionArrayUserAgent()
27
+ {
28
+ $data_array=array();
29
+ $data_array[0]='ALL';
30
+ $data_array[1]='iPhone';
31
+ $data_array[2]='iPod';
32
+ $data_array[3]='BlackBerry';
33
+ $data_array[4]='Palm';
34
+ $data_array[5]='Googlebot-Mobile';
35
+ $data_array[6]='mobi';
36
+ $data_array[7]='Safari Mobile';
37
+ $data_array[8]='Windows Mobile';
38
+ $data_array[9]='Android';
39
+ $data_array[10]='Mini';
40
+ $data_array[11]='mobile';
41
+ $data_array[12]='Nokia';
42
+ $data_array[13]='SymbianOS';
43
+ $data_array[14]='iPad';
44
+ $data_array[15]='Silk';
45
+ $data_array[16]='Kindle';
46
+ $data_array[17]='Xoom';
47
+ $data_array[18]='SCH-I800';
48
+ $data_array[19]='Tablet';
49
+ return($data_array);
50
+ }
51
+ static public function getValueArrayUserAgent()
52
+ {
53
+ $data_array=array();
54
+ foreach(Redstage_Mobilenow_Helper_Data::getOptionArrayUserAgent() as $k=>$v)
55
+ {
56
+ $data_array[]=array('value'=>$k,'label'=>$v);
57
+ }
58
+ return($data_array);
59
+ }
60
+ static public function getOptionArrayStatus()
61
+ {
62
+ $data_array=array();
63
+ $data_array[1]='Active';
64
+ $data_array[0]='Inactive';
65
+ return($data_array);
66
+ }
67
+ static public function getValueArrayStatus()
68
+ {
69
+ $data_array=array();
70
+ foreach(Redstage_Mobilenow_Helper_Data::getOptionArrayStatus() as $k=>$v)
71
+ {
72
+ $data_array[]=array('value'=>$k,'label'=>$v);
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()!='')
82
+ $data_array[$getAllSubSetting->getID()]=$getAllSubSetting->getSubsetname();
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'];
109
+ $themeSubSettings['themeid']='';
110
+ }
111
+ }
112
+ else
113
+ {
114
+ $themeSubSettings['subsetname']=$post_data['hidden_theme_sub_setting_name'];
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
163
+ $homeSearchCartArr=array('header_link_home'=>$post_data['header_link_home'], 'header_link_home_name'=>$post_data['header_link_home_name'],
164
+ 'footer_link_home'=>$post_data['footer_link_home'], 'footer_link_home_name'=>$post_data['footer_link_home_name'],
165
+ 'header_link_login'=>$post_data['header_link_login'], 'header_link_login_name'=>$post_data['header_link_login_name'],
166
+ 'footer_link_login'=>$post_data['footer_link_login'], 'footer_link_login_name'=>$post_data['footer_link_login_name'],
167
+ 'header_link_myaccount'=>$post_data['header_link_myaccount'], 'header_link_myaccount_name'=>$post_data['header_link_myaccount_name'],
168
+ 'footer_link_myaccount'=>$post_data['footer_link_myaccount'], 'footer_link_myaccount_name'=>$post_data['footer_link_myaccount_name'],
169
+ 'header_link_wishlist'=>$post_data['header_link_wishlist'], 'header_link_wishlist_name'=>$post_data['header_link_wishlist_name'],
170
+ 'footer_link_wishlist'=>$post_data['footer_link_wishlist'], 'footer_link_wishlist_name'=>$post_data['footer_link_wishlist_name'],
171
+ 'links_color'=>$post_data['links_color']);
172
+ $themeSubSettings['links']= json_encode($homeSearchCartArr);
173
+ //Text Color
174
+ $themeSubSettings['textcolor']= $post_data['text_color'];
175
+ //Search / Cart Area
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'] != ''){
202
+ $homePageBannerImage = $post_data['banner_preview_filename'];
203
+ if($lastRecordId){
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 {
218
+ $homePageBannerImage = $post_data['banner_fielname'];
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'] != ''){
226
+ $homePageBannerImage = 'preview'.DS.$lastRecordId.DS.$post_data['banner_preview_filename'];
227
+ } else {
228
+ $homePageBannerImage = $post_data['banner_fielname'];
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);
236
+ //SubHeader Section
237
+ $themeSubSettings['subheadersection']=$post_data['subheader_section'];
238
+ //Categories
239
+ $themeSubSettings['categories']=json_encode(array('categories'=>$post_data['categories'],'categories_background_color'=>$post_data['categories_background_color']));
240
+ //Newsletter
241
+ $themeSubSettings['newsletter']= json_encode(array('show_newsletter'=>$post_data['show_newsletter'],'newsletter_area_backgorund'=>$post_data['newsletter_area_backgorund']));
242
+ //Home page custom code
243
+ $themeSubSettings['homepagecustomcode']=$post_data['homepage_custom_code'];
244
+ //Pre footer section
245
+ $themeSubSettings['prefootersection']=$post_data['pre_footer_section'];
246
+ //Footer section
247
+ $themeSubSettings['footersection']=$post_data['footer_section'];
248
+ //Default Buttons Color Settings
249
+ $themeSubSettings['buttoncolor']=json_encode(array('button_background_color'=>$post_data['button_background_color'],'button_text_color'=>$post_data['button_text_color'],'button_border_color'=>$post_data['button_border_color']));
250
+ /////////////////////Catalog Page settings
251
+ //Breadcrumbs
252
+ $themeSubSettings['breadcrumb']= json_encode(array('show_breadcrumbs'=>$post_data['show_breadcrumbs'],'breadcrumbs_bg_color'=>$post_data['breadcrumbs_bg_color'],'breadcrumbs_font_color'=>$post_data['breadcrumbs_font_color']));
253
+ //Catalog View
254
+ //$themeSubSettings['catalogview']= json_encode(array('default_catalog_view'=>$post_data['default_catalog_view'],'show_grid_list_choice'=>$post_data['show_grid_list_choice']));
255
+ //Number of Products Per Page
256
+ $themeSubSettings['numberofproductsperpage']=$post_data['number_of_products_per_page'];
257
+ //Number of Products Choice Steps
258
+ $themeSubSettings['numberofproductschoice']=$post_data['number_of_products_choice_steps'];
259
+ //Sort By
260
+ $themeSubSettings['catalogsortby']=json_encode(array('show_sortby_dropdown'=>$post_data['show_sortby_dropdown'],'sort_options'=>implode(',',$post_data['sort_options'])));
261
+ //Toolbar
262
+ $themeSubSettings['toolbarcolor']=json_encode(array('toolbar_bg_color'=>$post_data['toolbar_bg_color'],'toolbar_text_color'=>$post_data['toolbar_text_color']));
263
+ //Pagination
264
+ $themeSubSettings['pagination']=json_encode(array('show_pagination'=>$post_data['show_pagination'],'pagination_bg_color'=>$post_data['pagination_bg_color'],'pagination_button_bg_color'=>$post_data['pagination_button_bg_color'],'pagination_button_text_color'=>$post_data['pagination_button_text_color']));
265
+ //Image Border
266
+ $themeSubSettings['catalogimagedetails']=json_encode(array('show_image_border'=>$post_data['show_image_border'],'image_border_color'=>$post_data['image_border_color'],'catalog_image_width'=>$post_data['catalog_image_width']));
267
+ //Product color
268
+ $themeSubSettings['catalogproductcolor']=json_encode(array('product_title_color'=>$post_data['product_title_color'],'product_price_color'=>$post_data['product_price_color'],'product_special_price_color'=>$post_data['product_special_price_color']));
269
+ //Reviews
270
+ $themeSubSettings['catalogreviews']=json_encode(array('show_review_stars'=>$post_data['show_review_stars'],'review_star_color'=>$post_data['review_star_color']));
271
+ //Learn more link
272
+ $themeSubSettings['cataloglearnmore']=$post_data['show_learn_more'];
273
+ //Add To Cart Button
274
+ $themeSubSettings['catalogaddtocart']=json_encode(array('show_add_to_cart'=>$post_data['show_add_to_cart'],'add_to_cart_button_bg_color'=>$post_data['add_to_cart_button_bg_color'],'add_to_cart_button_font_color'=>$post_data['add_to_cart_button_font_color'],'add_to_cart_button_border_color'=>$post_data['add_to_cart_button_border_color']));
275
+ //Show gridlines
276
+ $themeSubSettings['cataloggridlines']=json_encode(array('show_gridlines'=>$post_data['show_gridlines'],'gridlines_color'=>$post_data['gridlines_color']));
277
+ //////////product Page///////////
278
+ //Product title color
279
+ $themeSubSettings['producttitlecolor']=$post_data['productpage_title_color'];
280
+ //Image border
281
+ $themeSubSettings['productimagedetails']=json_encode(array('show_product_image_border'=>$post_data['show_product_image_border'],'product_image_border_color'=>$post_data['product_image_border_color'],'product_image_width'=>$post_data['product_image_width']));
282
+ //Show other details
283
+ $themeSubSettings['showproductdeails']=json_encode(array('show_product_availability'=>$post_data['show_product_availability'],
284
+ 'show_product_wishlist_link'=>$post_data['show_product_wishlist_link'],
285
+ 'show_product_reviews_summary'=>$post_data['show_product_reviews_summary'],
286
+ 'show_product_description'=>$post_data['show_product_description'],
287
+ 'product_description_color'=>$post_data['product_description_color'],
288
+ 'show_product_additional_information'=>$post_data['show_product_additional_information'],
289
+ 'additional_information_bg_color'=>$post_data['additional_information_bg_color'],
290
+ 'additional_information_font_color'=>$post_data['additional_information_font_color'],
291
+ 'show_full_reviews_on_product_page'=>$post_data['show_full_reviews_on_product_page'],
292
+ 'full_reviews_bg_color'=>$post_data['full_reviews_bg_color'],
293
+ 'full_reviews_font_color'=>$post_data['full_reviews_font_color'],
294
+ 'show_related_products'=>$post_data['show_related_products'],
295
+ ));
296
+
297
+ //saving homepage layout settings
298
+ $themeSubSettings['homepagelayoutmain']=json_encode(array('h_layout_search_cart'=>$post_data['h_layout_search_cart'],
299
+ 'h_layout_sub_header'=>$post_data['h_layout_sub_header'],
300
+ 'h_layout_banner'=>$post_data['h_layout_banner'],
301
+ 'h_layout_feature'=>$post_data['h_layout_feature'],
302
+ 'h_layout_categories'=>$post_data['h_layout_categories'],
303
+ 'h_layout_news_signup'=>$post_data['h_layout_news_signup']
304
+ ));
305
+
306
+ //saving catalog main layout settings
307
+ $themeSubSettings['cataloglayoutmain']=json_encode(array('c_layout_breadcrumbs'=>$post_data['c_layout_breadcrumbs'],
308
+ 'c_layout_toolbar'=>$post_data['c_layout_toolbar'],
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'],
325
+ 'c_list_layout_product_price'=>$post_data['c_list_layout_product_price'],
326
+ 'c_list_layout_product_review'=>$post_data['c_list_layout_product_review'],
327
+ 'c_list_layout_product_learn'=>$post_data['c_list_layout_product_learn'],
328
+ 'c_list_layout_product_addtocart'=>$post_data['c_list_layout_product_addtocart']
329
+ ));
330
+
331
+ //saving product page layout settings
332
+ $themeSubSettings['productlayoutmain']=json_encode(array('ptop_layout_settings'=>array('p_layout_availability'=>$post_data['p_layout_availability'],
333
+ 'p_layout_pricing'=>$post_data['p_layout_pricing'],
334
+ 'p_layout_addtocart'=>$post_data['p_layout_addtocart'],
335
+ 'p_layout_wishlist'=>$post_data['p_layout_wishlist'],
336
+ 'p_layout_review'=>$post_data['p_layout_review']),
337
+ 'pbottom_layout_settings'=>array('p_layout_desc'=>$post_data['p_layout_desc'],
338
+ 'p_layout_additionalinfo'=>$post_data['p_layout_additionalinfo'],
339
+ 'p_layout_fullreview'=>$post_data['p_layout_fullreview'],
340
+ 'p_layout_relatedproduct'=>$post_data['p_layout_relatedproduct'])
341
+ ));
342
+
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());
354
+ //Search / Cart
355
+ $decodeSearchCartData=json_decode($subsettingsModel->getSearchcart());
356
+ //Home Page Banner
357
+ $decodeHomeBannerData=json_decode($subsettingsModel->getHomepagebanner());
358
+ //SubHeader Section
359
+ $subsettingsModel->setData('subheader_section', $subsettingsModel->getSubheadersection());
360
+ //Categories
361
+ $decodeCategoryData=json_decode($subsettingsModel->getCategories());
362
+ //Newsletter
363
+ $decodeNewsletterData=json_decode($subsettingsModel->getNewsletter());
364
+ //Homepage Custom Code
365
+ //Pre-Footer Section
366
+ //Footer Section
367
+ // Buttons Color
368
+ $decodeButtonData=json_decode($subsettingsModel->getButtoncolor());
369
+ /////////////////////Catalog Page///////////////////////////
370
+ //Breadcrumbs
371
+ $decodeBreadcrumbData=json_decode($subsettingsModel->getBreadcrumb());
372
+ //Catalog view
373
+ $decodeCatalogviewbData=json_decode($subsettingsModel->getCatalogview());
374
+ //Number of Products Per Page (default) ALL = Show All
375
+ // Sort By
376
+ $decodeCatalogsortbybData=json_decode($subsettingsModel->getCatalogsortby());
377
+ //Toolbar
378
+ $decodeToolbarData=json_decode($subsettingsModel->getToolbarcolor());
379
+ //Pagination
380
+ $decodePaginationData=json_decode($subsettingsModel->getPagination());
381
+ //Image Border
382
+ $decodeImageborderData=json_decode($subsettingsModel->getCatalogimagedetails());
383
+ //Product Color
384
+ $decodeProductColorData=json_decode($subsettingsModel->getCatalogproductcolor());
385
+ //Review Stars
386
+ $decodeReviewstarsData=json_decode($subsettingsModel->getCatalogreviews());
387
+ //Learnmore
388
+ //Add to cart
389
+ $decodeAddtocartData=json_decode($subsettingsModel->getCatalogaddtocart());
390
+ //Gridlines
391
+ $decodeGridlinesData=json_decode($subsettingsModel->getCataloggridlines());
392
+ /////////////////////Product Page///////////////////////////
393
+ //Product Title
394
+ //Imageborder
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
402
+ $cLayoutData = json_decode($subsettingsModel->getCataloglayoutmain());
403
+ //Catalog grid layout
404
+ $cLayoutGridData = json_decode($subsettingsModel->getCataloglayoutgrid());
405
+ //Catalog grid layout
406
+ $cLayoutListData = json_decode($subsettingsModel->getCataloglayoutlist());
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)
417
+ ->setData('footer_link_home_name', $decodeLinksData->footer_link_home_name)
418
+ ->setData('header_link_login', $decodeLinksData->header_link_login)
419
+ ->setData('header_link_login_name', $decodeLinksData->header_link_login_name)
420
+ ->setData('footer_link_login', $decodeLinksData->footer_link_login)
421
+ ->setData('footer_link_login_name', $decodeLinksData->footer_link_login_name)
422
+ ->setData('header_link_myaccount', $decodeLinksData->header_link_myaccount)
423
+ ->setData('header_link_myaccount_name', $decodeLinksData->header_link_myaccount_name)
424
+ ->setData('footer_link_myaccount', $decodeLinksData->footer_link_myaccount)
425
+ ->setData('footer_link_myaccount_name', $decodeLinksData->footer_link_myaccount_name)
426
+ ->setData('header_link_wishlist', $decodeLinksData->header_link_wishlist)
427
+ ->setData('header_link_wishlist_name', $decodeLinksData->header_link_wishlist_name)
428
+ ->setData('footer_link_wishlist', $decodeLinksData->footer_link_wishlist)
429
+ ->setData('footer_link_wishlist_name', $decodeLinksData->footer_link_wishlist_name)
430
+ ->setData('links_color', $decodeLinksData->links_color)
431
+ ->setData('text_color', $subsettingsModel->getTextcolor())
432
+ ->setData('show_search_cart_area', $decodeSearchCartData->show_search_cart_area)
433
+ ->setData('search_cart_bg_color', $decodeSearchCartData->search_cart_bg_color)
434
+ ->setData('cart_link_color', $decodeSearchCartData->cart_link_color)
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)
441
+ ->setData('show_newsletter', $decodeNewsletterData->show_newsletter)
442
+ ->setData('newsletter_area_backgorund', $decodeNewsletterData->newsletter_area_backgorund)
443
+ ->setData('homepage_custom_code', $subsettingsModel->getHomepagecustomcode())
444
+ ->setData('pre_footer_section', $subsettingsModel->getPrefootersection())
445
+ ->setData('footer_section', $subsettingsModel->getFootersection())
446
+ ->setData('button_background_color', $decodeButtonData->button_background_color)
447
+ ->setData('button_text_color', $decodeButtonData->button_text_color)
448
+ ->setData('button_border_color', $decodeButtonData->button_border_color)
449
+ ->setData('show_breadcrumbs', $decodeBreadcrumbData->show_breadcrumbs)
450
+ ->setData('breadcrumbs_bg_color', $decodeBreadcrumbData->breadcrumbs_bg_color)
451
+ ->setData('breadcrumbs_font_color', $decodeBreadcrumbData->breadcrumbs_font_color)
452
+ //->setData('default_catalog_view', $decodeCatalogviewbData->default_catalog_view)
453
+ //->setData('show_grid_list_choice', $decodeCatalogviewbData->show_grid_list_choice)
454
+ ->setData('number_of_products_per_page', $subsettingsModel->getNumberofproductsperpage())
455
+ ->setData('number_of_products_choice_steps', $subsettingsModel->getNumberofproductschoice())
456
+ ->setData('show_sortby_dropdown', $decodeCatalogsortbybData->show_sortby_dropdown)
457
+ ->setData('sort_options', explode(',',$decodeCatalogsortbybData->sort_options))
458
+ ->setData('toolbar_bg_color', $decodeToolbarData->toolbar_bg_color)
459
+ ->setData('toolbar_text_color', $decodeToolbarData->toolbar_text_color)
460
+ ->setData('show_pagination', $decodePaginationData->show_pagination)
461
+ ->setData('pagination_bg_color', $decodePaginationData->pagination_bg_color)
462
+ ->setData('pagination_button_bg_color', $decodePaginationData->pagination_button_bg_color)
463
+ ->setData('pagination_button_text_color', $decodePaginationData->pagination_button_text_color)
464
+ ->setData('show_image_border', $decodeImageborderData->show_image_border)
465
+ ->setData('image_border_color', $decodeImageborderData->image_border_color)
466
+ ->setData('catalog_image_width', $decodeImageborderData->catalog_image_width)
467
+ ->setData('product_title_color', $decodeProductColorData->product_title_color)
468
+ ->setData('product_price_color', $decodeProductColorData->product_price_color)
469
+ ->setData('product_special_price_color', $decodeProductColorData->product_special_price_color)
470
+ ->setData('show_review_stars', $decodeReviewstarsData->show_review_stars)
471
+ ->setData('review_star_color', $decodeReviewstarsData->review_star_color)
472
+ ->setData('show_learn_more', $subsettingsModel->getCataloglearnmore())
473
+ ->setData('show_add_to_cart', $decodeAddtocartData->show_add_to_cart)
474
+ ->setData('add_to_cart_button_bg_color', $decodeAddtocartData->add_to_cart_button_bg_color)
475
+ ->setData('add_to_cart_button_font_color', $decodeAddtocartData->add_to_cart_button_font_color)
476
+ ->setData('add_to_cart_button_border_color', $decodeAddtocartData->add_to_cart_button_border_color)
477
+ ->setData('show_gridlines', $decodeGridlinesData->show_gridlines)
478
+ ->setData('gridlines_color', $decodeGridlinesData->gridlines_color)
479
+ ->setData('productpage_title_color', $subsettingsModel->getProducttitlecolor())
480
+ ->setData('show_product_image_border', $decodeProductImageborderData->show_product_image_border)
481
+ ->setData('product_image_border_color', $decodeProductImageborderData->product_image_border_color)
482
+ ->setData('product_image_width', $decodeProductImageborderData->product_image_width)
483
+ ->setData('show_product_availability', $decodeProductShowData->show_product_availability)
484
+ ->setData('show_product_wishlist_link', $decodeProductShowData->show_product_wishlist_link)
485
+ ->setData('show_product_reviews_summary', $decodeProductShowData->show_product_reviews_summary)
486
+ ->setData('show_product_description', $decodeProductShowData->show_product_description)
487
+ ->setData('product_description_color', $decodeProductShowData->product_description_color)
488
+ ->setData('show_product_additional_information', $decodeProductShowData->show_product_additional_information)
489
+ ->setData('additional_information_bg_color', $decodeProductShowData->additional_information_bg_color)
490
+ ->setData('additional_information_font_color', $decodeProductShowData->additional_information_font_color)
491
+ ->setData('show_full_reviews_on_product_page', $decodeProductShowData->show_full_reviews_on_product_page)
492
+ ->setData('full_reviews_bg_color', $decodeProductShowData->full_reviews_bg_color)
493
+ ->setData('full_reviews_font_color', $decodeProductShowData->full_reviews_font_color)
494
+ ->setData('show_related_products', $decodeProductShowData->show_related_products)
495
+ ->setData('preset_layout_sub_settings', $getSubsetDefaultId)
496
+ ->setData('h_layout_search_cart', $hLayoutData->h_layout_search_cart)
497
+ ->setData('h_layout_sub_header', $hLayoutData->h_layout_sub_header)
498
+ ->setData('h_layout_banner', $hLayoutData->h_layout_banner)
499
+ ->setData('h_layout_feature', $hLayoutData->h_layout_feature)
500
+ ->setData('h_layout_categories', $hLayoutData->h_layout_categories)
501
+ ->setData('h_layout_news_signup', $hLayoutData->h_layout_news_signup)
502
+ ->setData('c_layout_breadcrumbs', $cLayoutData->c_layout_breadcrumbs)
503
+ ->setData('c_layout_toolbar', $cLayoutData->c_layout_toolbar)
504
+ ->setData('c_layout_pag_top', $cLayoutData->c_layout_pag_top)
505
+ ->setData('c_grid_layout_product_image', $cLayoutGridData->c_grid_layout_product_image)
506
+ ->setData('c_grid_layout_product_title', $cLayoutGridData->c_grid_layout_product_title)
507
+ ->setData('c_grid_layout_product_price', $cLayoutGridData->c_grid_layout_product_price)
508
+ ->setData('c_grid_layout_product_review', $cLayoutGridData->c_grid_layout_product_review)
509
+ ->setData('c_grid_layout_product_learn', $cLayoutGridData->c_grid_layout_product_learn)
510
+ ->setData('c_grid_layout_product_addtocart', $cLayoutGridData->c_grid_layout_product_addtocart)
511
+ ->setData('c_list_layout_product_image', $cLayoutListData->c_list_layout_product_image)
512
+ ->setData('c_list_layout_product_title', $cLayoutListData->c_list_layout_product_title)
513
+ ->setData('c_list_layout_product_price', $cLayoutListData->c_list_layout_product_price)
514
+ ->setData('c_list_layout_product_review', $cLayoutListData->c_list_layout_product_review)
515
+ ->setData('c_list_layout_product_learn', $cLayoutListData->c_list_layout_product_learn)
516
+ ->setData('c_list_layout_product_addtocart', $cLayoutListData->c_list_layout_product_addtocart)
517
+ ->setData('p_layout_availability', $pLayoutData->ptop_layout_settings->p_layout_availability)
518
+ ->setData('p_layout_pricing', $pLayoutData->ptop_layout_settings->p_layout_pricing)
519
+ ->setData('p_layout_addtocart', $pLayoutData->ptop_layout_settings->p_layout_addtocart)
520
+ ->setData('p_layout_wishlist', $pLayoutData->ptop_layout_settings->p_layout_wishlist)
521
+ ->setData('p_layout_review', $pLayoutData->ptop_layout_settings->p_layout_review)
522
+ ->setData('p_layout_desc', $pLayoutData->pbottom_layout_settings->p_layout_desc)
523
+ ->setData('p_layout_additionalinfo', $pLayoutData->pbottom_layout_settings->p_layout_additionalinfo)
524
+ ->setData('p_layout_fullreview', $pLayoutData->pbottom_layout_settings->p_layout_fullreview)
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
+ {
547
+ Mage::getSingleton("adminhtml/session")->addError('Your free trial period has expired. Please visit <a target="_blank" href="http://mobilenowapp.com" >http://mobilenowapp.com</a> and upgrade your account to the Gold Membership.' );
548
+ }
549
+ Mage::app()->getStore()->setConfig($outputPath, true);
550
+ }
551
+ }
552
+ }
553
+ static public function getPreviewCategoryUrl()
554
+ {
555
+ //////////////////GetCategory Id to load in Iframe///////////////////////
556
+ $previewCat=Mage::getModel('catalog/category');
557
+ $categoryId = $previewCat->getCollection()->getLastItem();
558
+ if($categoryId->getId())
559
+ {
560
+ $CategoryId=$categoryId->getId();
561
+ $previewCat->load($CategoryId);
562
+ $categoryURL=$previewCat->getUrlPath();
563
+ }
564
+ else
565
+ {
566
+ $categoryURL='';
567
+ }
568
+ return $categoryURL;
569
+ }
570
+ static public function getPreviewProductUrl()
571
+ {
572
+ ///////////////Get product ID to Load in Iframe///////////////////////
573
+ $previewProduct=Mage::getModel('catalog/product');
574
+ $previewProductId = $previewProduct->getCollection()->getFirstItem();
575
+ if($previewProductId->getId())
576
+ {
577
+ $ProductId=$previewProductId->getId();
578
+ $previewProduct->load($ProductId);
579
+ $productURL=$previewProduct->getUrlPath();
580
+ }
581
+ else
582
+ {
583
+ $productURL='';
584
+ }
585
+ return $productURL;
586
+ }
587
+
588
+ public function remove_dir($dir) {
589
+ if (is_dir($dir)) {
590
+ $objects = scandir($dir);
591
+ foreach ($objects as $object) {
592
+ if ($object != "." && $object != "..") {
593
+ if (filetype($dir."/".$object) == "dir") rmdir($dir."/".$object); else unlink($dir."/".$object);
594
+ }
595
+ }
596
+ reset($objects);
597
+ rmdir($dir);
598
+ }
599
+ }
600
+
601
+ }
602
+
 
app/code/community/Redstage/Mobilenow/Helper/Homepage.php CHANGED
@@ -1,359 +1,359 @@
1
- <?php
2
- class Redstage_Mobilenow_Helper_Homepage extends Mage_Core_Helper_Abstract
3
- {
4
- // function for generationg homepage layout xml
5
- static public function generateHomePageLayoutXML($post_data)
6
- {
7
-
8
- $themeSubSettings['homepagelayoutmain'] = array();
9
- $themeSubSettings['homepagelayoutmain']['h_layout_search_cart'] = 0;
10
- $themeSubSettings['homepagelayoutmain']['h_layout_sub_header'] = 0;
11
- $themeSubSettings['homepagelayoutmain']['h_layout_banner'] = 0;
12
- $themeSubSettings['homepagelayoutmain']['h_layout_feature'] = 0;
13
- $themeSubSettings['homepagelayoutmain']['h_layout_categories'] = 0;
14
- $themeSubSettings['homepagelayoutmain']['h_layout_news_signup'] = 0;
15
- if($post_data['h_layout_search_cart'] > 0)
16
- $themeSubSettings['homepagelayoutmain']['h_layout_search_cart'] = $post_data['h_layout_search_cart'];
17
- if($post_data['h_layout_sub_header'] > 0)
18
- $themeSubSettings['homepagelayoutmain']['h_layout_sub_header'] = $post_data['h_layout_sub_header'];
19
- if($post_data['h_layout_banner'] > 0)
20
- $themeSubSettings['homepagelayoutmain']['h_layout_banner'] = $post_data['h_layout_banner'];
21
- if($post_data['h_layout_feature'] > 0)
22
- $themeSubSettings['homepagelayoutmain']['h_layout_feature'] = $post_data['h_layout_feature'];
23
- if($post_data['h_layout_categories'] > 0)
24
- $themeSubSettings['homepagelayoutmain']['h_layout_categories'] = $post_data['h_layout_categories'];
25
- if($post_data['h_layout_news_signup'] > 0)
26
- $themeSubSettings['homepagelayoutmain']['h_layout_news_signup'] = $post_data['h_layout_news_signup'];
27
-
28
-
29
- $header_nodes = '';
30
- if($post_data['header_link_home'] && $post_data['header_link_home'] == '1'){
31
- if($post_data['header_link_home_name'] > 0) {
32
- $header_nodes .=' <action method="setData"><name>home</name><value>'.$post_data['header_link_home_name'].'</value></action>';
33
- } else {
34
- $header_nodes .=' <action method="setData"><name>home</name><value>0</value></action>';
35
- }
36
- }
37
- if($post_data['header_link_login'] && $post_data['header_link_login'] == '1'){
38
- if($post_data['header_link_login_name'] > 0) {
39
- $header_nodes .=' <action method="setData"><name>login</name><value>'.$post_data['header_link_login_name'].'</value></action>';
40
- } else {
41
- $header_nodes .=' <action method="setData"><name>login</name><value>0</value></action>';
42
- }
43
- }
44
- if($post_data['header_link_myaccount'] && $post_data['header_link_myaccount'] == '1'){
45
- if($post_data['header_link_myaccount_name'] > 0) {
46
- $header_nodes .=' <action method="setData"><name>account</name><value>'.$post_data['header_link_myaccount_name'].'</value></action>';
47
- } else {
48
- $header_nodes .=' <action method="setData"><name>account</name><value>0</value></action>';
49
- }
50
- }
51
- if($post_data['header_link_wishlist'] && $post_data['header_link_wishlist'] == '1'){
52
- if($post_data['header_link_wishlist_name'] > 0) {
53
- $header_nodes .=' <action method="setData"><name>wishlist</name><value>'.$post_data['header_link_wishlist_name'].'</value></action>';
54
- } else {
55
- $header_nodes .=' <action method="setData"><name>wishlist</name><value>0</value></action>';
56
- }
57
- }
58
- $footer_nodes = '';
59
- if($post_data['footer_link_home'] && $post_data['footer_link_home'] == '1'){
60
- if($post_data['footer_link_home_name'] > 0) {
61
- $footer_nodes .=' <action method="setData"><name>home</name><value>'.$post_data['footer_link_home_name'].'</value></action>';
62
- } else {
63
- $footer_nodes .=' <action method="setData"><name>home</name><value>0</value></action>';
64
- }
65
- }
66
- if($post_data['footer_link_login'] && $post_data['footer_link_login'] == '1'){
67
- if($post_data['footer_link_login_name'] > 0) {
68
- $footer_nodes .=' <action method="setData"><name>login</name><value>'.$post_data['footer_link_login_name'].'</value></action>';
69
- } else {
70
- $footer_nodes .=' <action method="setData"><name>login</name><value>0</value></action>';
71
- }
72
- }
73
- if($post_data['footer_link_myaccount'] && $post_data['footer_link_myaccount'] == '1'){
74
- if($post_data['footer_link_myaccount_name'] > 0) {
75
- $footer_nodes .=' <action method="setData"><name>account</name><value>'.$post_data['footer_link_myaccount_name'].'</value></action>';
76
- } else {
77
- $footer_nodes .=' <action method="setData"><name>account</name><value>0</value></action>';
78
- }
79
- }
80
- if($post_data['footer_link_wishlist'] && $post_data['footer_link_wishlist'] == '1'){
81
- if($post_data['footer_link_wishlist_name'] > 0) {
82
- $footer_nodes .=' <action method="setData"><name>wishlist</name><value>'.$post_data['footer_link_wishlist_name'].'</value></action>';
83
- } else {
84
- $footer_nodes .=' <action method="setData"><name>wishlist</name><value>0</value></action>';
85
- }
86
- }
87
- $pre_footer_content = '';
88
- if($post_data['pre_footer_section'] && $post_data['pre_footer_section'] != ''){
89
- $pre_footer_content .= '<block type="mobilenow/home" name="prefootercontent" template="mobilenow/prefootercontent.phtml"/>';
90
- }
91
- $footer_content = '';
92
- if($post_data['footer_section'] && $post_data['footer_section'] != ''){
93
- $footer_content .= '<block type="mobilenow/home" name="footercontent" template="mobilenow/footercontent.phtml"/>';
94
- }
95
-
96
-
97
- //print_r($themeSubSettings['homepagelayoutmain']);
98
- //echo '</pre>';
99
- $h_org_xml = array();
100
- if(!$post_data['show_search_cart_area'] ||$post_data['show_search_cart_area'] != '1'){
101
- $h_org_xml['h_layout_search_cart'] = '';
102
- } else {
103
- $h_org_xml['h_layout_search_cart'] = '
104
- <block type="mobilenow/home" name="catalog.search" template="mobilenow/search-panel.phtml">
105
- <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
106
- </block>';
107
- }
108
- if(!$post_data['subheader_section'] || trim($post_data['subheader_section']) == ''){
109
- $h_org_xml['h_layout_sub_header'] = '';
110
- } else{
111
- $h_org_xml['h_layout_sub_header'] = '<block type="mobilenow/home" name="subheader" template="mobilenow/subheader.phtml"/>';
112
- }
113
- if(!$post_data['show_home_page_banner'] ||$post_data['show_home_page_banner'] != '1'){
114
- $h_org_xml['h_layout_banner'] = '';
115
- } else {
116
- $h_org_xml['h_layout_banner'] = '<block type="mobilenow/home" name="homebanner" template="mobilenow/banner.phtml"/>';
117
- }
118
- //finding out category menu type
119
- $menu_type = '';
120
- if(!$post_data['categories'] ||$post_data['categories'] != ''){
121
- $menu_type = '<action method="setData"><name>menutype</name><value>'.$post_data['categories'].'</value></action>';
122
- }
123
-
124
- $h_org_xml['h_layout_categories'] = '
125
- <block type="mobilenow/home" name="catalog.topnav" template="mobilenow/nav.phtml">'.
126
- $menu_type
127
- .'
128
- <block type="catalog/navigation" name="catalog_footernav" as="catalog_footernav" template="catalog/navigation/mobile-menu.phtml"/>
129
- <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
130
- <label>Navigation Bar</label>
131
- <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
132
- </block>
133
- </block>';
134
- if(!$post_data['homepage_custom_code'] || trim($post_data['homepage_custom_code']) == ''){
135
- $h_org_xml['h_layout_feature'] = '';
136
- } else{
137
- $h_org_xml['h_layout_feature'] = '<block type="mobilenow/home" name="homepagefeature" template="mobilenow/customhome.phtml"/>';
138
- }
139
- if(!$post_data['show_newsletter'] ||$post_data['show_newsletter'] != '1'){
140
- $h_org_xml['h_layout_news_signup'] = '';
141
- } else {
142
- $h_org_xml['h_layout_news_signup'] = '<block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"/>';
143
- }
144
-
145
- // $h_i = 0;
146
- // foreach($themeSubSettings['homepagelayoutmain'] as $hkey=>$hvalue){
147
- // $hvar[$h_i] = $h_org_xml[$hkey];
148
- // $h_i++;
149
- // }
150
-
151
- $h_layout_xml = '
152
- <remove name="breadcrumbs" />
153
- <remove name="right"/>
154
- <remove name="content"/>
155
- <reference name="root">
156
- <action method="setTemplate"><template>page/mobilenow-home.phtml</template></action>
157
- </reference>
158
- <reference name="header">';
159
- if($header_nodes != ''){
160
- $h_layout_xml .='<block type="mobilenow/home" name="mobilelinks" as="mobilelinks" template="mobilenow/toplinks.phtml">'.$header_nodes.'</block>';
161
- }
162
- $h_layout_xml .='
163
- <block type="mobilenow/home" name="homepage" as="homepage">';
164
- if(count($themeSubSettings['homepagelayoutmain']) > 0){
165
-
166
- //echo '<pre>';
167
-
168
- asort($themeSubSettings['homepagelayoutmain']);
169
- foreach($themeSubSettings['homepagelayoutmain'] as $hkey=>$hvalue){
170
- $h_layout_xml .= $h_org_xml[$hkey];
171
- }
172
- }
173
- $h_layout_xml .='
174
- </block>
175
- </reference>
176
- <reference name="footer">
177
- <action method="unsetChildren"/>';
178
- $h_layout_xml .= $pre_footer_content;
179
- if($footer_nodes != ''){
180
- $h_layout_xml .='<block type="mobilenow/home" name="mobilelinks-footer" as="mobilelinks-footer" template="mobilenow/footerlinks.phtml">'.$footer_nodes.'</block>';
181
- }
182
- $h_layout_xml .= $footer_content;
183
- $h_layout_xml .='
184
- </reference>
185
- ';
186
-
187
-
188
- //echo($h_layout_xml);
189
-
190
- //die;
191
-
192
- return $h_layout_xml;
193
-
194
-
195
-
196
-
197
- }
198
-
199
- // function for generationg Default layout xml
200
- static public function generateDefaultPageLayoutXML($post_data,$css_name)
201
- {
202
- $themeSubSettings['homepagelayoutmain'] = array();
203
- $themeSubSettings['homepagelayoutmain']['h_layout_search_cart'] = 0;
204
- $themeSubSettings['homepagelayoutmain']['h_layout_sub_header'] = 0;
205
- $themeSubSettings['homepagelayoutmain']['h_layout_banner'] = 0;
206
- $themeSubSettings['homepagelayoutmain']['h_layout_feature'] = 0;
207
- $themeSubSettings['homepagelayoutmain']['h_layout_categories'] = 0;
208
- $themeSubSettings['homepagelayoutmain']['h_layout_news_signup'] = 0;
209
- if($post_data['h_layout_search_cart'] > 0)
210
- $themeSubSettings['homepagelayoutmain']['h_layout_search_cart'] = $post_data['h_layout_search_cart'];
211
- if($post_data['h_layout_sub_header'] > 0)
212
- $themeSubSettings['homepagelayoutmain']['h_layout_sub_header'] = $post_data['h_layout_sub_header'];
213
- if($post_data['h_layout_categories'] > 0)
214
- $themeSubSettings['homepagelayoutmain']['h_layout_categories'] = $post_data['h_layout_categories'];
215
- if($post_data['h_layout_news_signup'] > 0)
216
- $themeSubSettings['homepagelayoutmain']['h_layout_news_signup'] = $post_data['h_layout_news_signup'];
217
-
218
- $header_nodes = '';
219
- if($post_data['header_link_home'] && $post_data['header_link_home'] == '1'){
220
- if($post_data['header_link_home_name'] > 0) {
221
- $header_nodes .=' <action method="setData"><name>home</name><value>'.$post_data['header_link_home_name'].'</value></action>';
222
- } else {
223
- $header_nodes .=' <action method="setData"><name>home</name><value>0</value></action>';
224
- }
225
- }
226
- if($post_data['header_link_login'] && $post_data['header_link_login'] == '1'){
227
- if($post_data['header_link_login_name'] > 0) {
228
- $header_nodes .=' <action method="setData"><name>login</name><value>'.$post_data['header_link_login_name'].'</value></action>';
229
- } else {
230
- $header_nodes .=' <action method="setData"><name>login</name><value>0</value></action>';
231
- }
232
- }
233
- if($post_data['header_link_myaccount'] && $post_data['header_link_myaccount'] == '1'){
234
- if($post_data['header_link_myaccount_name'] > 0) {
235
- $header_nodes .=' <action method="setData"><name>account</name><value>'.$post_data['header_link_myaccount_name'].'</value></action>';
236
- } else {
237
- $header_nodes .=' <action method="setData"><name>account</name><value>0</value></action>';
238
- }
239
- }
240
- if($post_data['header_link_wishlist'] && $post_data['header_link_wishlist'] == '1'){
241
- if($post_data['header_link_wishlist_name'] > 0) {
242
- $header_nodes .=' <action method="setData"><name>wishlist</name><value>'.$post_data['header_link_wishlist_name'].'</value></action>';
243
- } else {
244
- $header_nodes .=' <action method="setData"><name>wishlist</name><value>0</value></action>';
245
- }
246
- }
247
- $footer_nodes = '';
248
- if($post_data['footer_link_home'] && $post_data['footer_link_home'] == '1'){
249
- if($post_data['footer_link_home_name'] > 0) {
250
- $footer_nodes .=' <action method="setData"><name>home</name><value>'.$post_data['footer_link_home_name'].'</value></action>';
251
- } else {
252
- $footer_nodes .=' <action method="setData"><name>home</name><value>0</value></action>';
253
- }
254
- }
255
- if($post_data['footer_link_login'] && $post_data['footer_link_login'] == '1'){
256
- if($post_data['footer_link_login_name'] > 0) {
257
- $footer_nodes .=' <action method="setData"><name>login</name><value>'.$post_data['footer_link_login_name'].'</value></action>';
258
- } else {
259
- $footer_nodes .=' <action method="setData"><name>login</name><value>0</value></action>';
260
- }
261
- }
262
- if($post_data['footer_link_myaccount'] && $post_data['footer_link_myaccount'] == '1'){
263
- if($post_data['footer_link_myaccount_name'] > 0) {
264
- $footer_nodes .=' <action method="setData"><name>account</name><value>'.$post_data['footer_link_myaccount_name'].'</value></action>';
265
- } else {
266
- $footer_nodes .=' <action method="setData"><name>account</name><value>0</value></action>';
267
- }
268
- }
269
- if($post_data['footer_link_wishlist'] && $post_data['footer_link_wishlist'] == '1'){
270
- if($post_data['footer_link_wishlist_name'] > 0) {
271
- $footer_nodes .=' <action method="setData"><name>wishlist</name><value>'.$post_data['footer_link_wishlist_name'].'</value></action>';
272
- } else {
273
- $footer_nodes .=' <action method="setData"><name>wishlist</name><value>0</value></action>';
274
- }
275
- }
276
-
277
- $footer_content = '';
278
- if($post_data['footer_section'] && $post_data['footer_section'] != ''){
279
- $footer_content .= '<block type="mobilenow/home" name="footercontent" template="mobilenow/footercontent.phtml"/>';
280
- }
281
-
282
-
283
- //print_r($themeSubSettings['homepagelayoutmain']);
284
- //echo '</pre>';
285
- $h_org_xml = array();
286
- if(!$post_data['show_search_cart_area'] ||$post_data['show_search_cart_area'] != '1'){
287
- $h_org_xml['h_layout_search_cart'] = '';
288
- } else {
289
- $h_org_xml['h_layout_search_cart'] = '
290
- <block type="mobilenow/home" name="catalog.search" template="mobilenow/search-panel.phtml">
291
- <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
292
- </block>';
293
- }
294
- if(!$post_data['subheader_section'] || trim($post_data['subheader_section']) == ''){
295
- $h_org_xml['h_layout_sub_header'] = '';
296
- } else{
297
- $h_org_xml['h_layout_sub_header'] = '<block type="mobilenow/home" name="subheader" template="mobilenow/subheader.phtml"/>';
298
- }
299
-
300
- //finding out category menu type
301
- $menu_type = '';
302
- if(!$post_data['categories'] ||$post_data['categories'] != ''){
303
- $menu_type = '<action method="setData"><name>menutype</name><value>'.$post_data['categories'].'</value></action>';
304
- }
305
-
306
- $h_org_xml['h_layout_categories'] = '
307
- <block type="mobilenow/home" name="catalog.topnav" template="mobilenow/nav.phtml">'.
308
- $menu_type
309
- .'
310
- <block type="catalog/navigation" name="catalog_footernav" as="catalog_footernav" template="catalog/navigation/mobile-menu.phtml"/>
311
- <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
312
- <label>Navigation Bar</label>
313
- <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
314
- </block>
315
- </block>';
316
- // if(!$post_data['show_newsletter'] ||$post_data['show_newsletter'] != '1'){
317
- // $h_org_xml['h_layout_news_signup'] = '';
318
- // } else {
319
- // $h_org_xml['h_layout_news_signup'] = '<block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"/>';
320
- // }
321
-
322
-
323
-
324
-
325
- $default_layout_xml = '
326
- <remove name="right"/>
327
- <reference name="root">
328
- <action method="setTemplate"><template>page/1column.phtml</template></action>
329
- </reference>
330
- <reference name="head">
331
- <block type="core/text" name="include_themecss">
332
- <action method="setText"><text><![CDATA[<link rel="stylesheet" type="text/css" href="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_css/'.$css_name.'.css?'.time().'" media="all"/>]]></text></action>
333
- </block> </reference>
334
- <reference name="header">';
335
- if($header_nodes != ''){
336
- $default_layout_xml .='<block type="mobilenow/home" name="mobilelinks" as="mobilelinks" template="mobilenow/toplinks.phtml">'.$header_nodes.'</block>';
337
- }
338
- $default_layout_xml .='
339
- <block type="mobilenow/home" name="homepage" as="homepage">';
340
- if(count($themeSubSettings['homepagelayoutmain']) > 0){
341
- asort($themeSubSettings['homepagelayoutmain']);
342
- foreach($themeSubSettings['homepagelayoutmain'] as $hkey=>$hvalue){
343
- $default_layout_xml .= $h_org_xml[$hkey];
344
- }
345
- }
346
- $default_layout_xml .='
347
- </block>';
348
- $default_layout_xml .='</reference>';
349
- $default_layout_xml .= '<reference name="footer">
350
- <action method="unsetChildren"/>';
351
- if($footer_nodes != ''){
352
- $default_layout_xml .='<block type="mobilenow/home" name="mobilelinks-footer" as="mobilelinks-footer" template="mobilenow/footerlinks.phtml">'.$footer_nodes.'</block>';
353
- }
354
- $default_layout_xml .= $footer_content;
355
- $default_layout_xml .='</reference>';
356
- return $default_layout_xml;
357
- }
358
- }
359
 
1
+ <?php
2
+ class Redstage_Mobilenow_Helper_Homepage extends Mage_Core_Helper_Abstract
3
+ {
4
+ // function for generationg homepage layout xml
5
+ static public function generateHomePageLayoutXML($post_data)
6
+ {
7
+
8
+ $themeSubSettings['homepagelayoutmain'] = array();
9
+ $themeSubSettings['homepagelayoutmain']['h_layout_search_cart'] = 0;
10
+ $themeSubSettings['homepagelayoutmain']['h_layout_sub_header'] = 0;
11
+ $themeSubSettings['homepagelayoutmain']['h_layout_banner'] = 0;
12
+ $themeSubSettings['homepagelayoutmain']['h_layout_feature'] = 0;
13
+ $themeSubSettings['homepagelayoutmain']['h_layout_categories'] = 0;
14
+ $themeSubSettings['homepagelayoutmain']['h_layout_news_signup'] = 0;
15
+ if($post_data['h_layout_search_cart'] > 0)
16
+ $themeSubSettings['homepagelayoutmain']['h_layout_search_cart'] = $post_data['h_layout_search_cart'];
17
+ if($post_data['h_layout_sub_header'] > 0)
18
+ $themeSubSettings['homepagelayoutmain']['h_layout_sub_header'] = $post_data['h_layout_sub_header'];
19
+ if($post_data['h_layout_banner'] > 0)
20
+ $themeSubSettings['homepagelayoutmain']['h_layout_banner'] = $post_data['h_layout_banner'];
21
+ if($post_data['h_layout_feature'] > 0)
22
+ $themeSubSettings['homepagelayoutmain']['h_layout_feature'] = $post_data['h_layout_feature'];
23
+ if($post_data['h_layout_categories'] > 0)
24
+ $themeSubSettings['homepagelayoutmain']['h_layout_categories'] = $post_data['h_layout_categories'];
25
+ if($post_data['h_layout_news_signup'] > 0)
26
+ $themeSubSettings['homepagelayoutmain']['h_layout_news_signup'] = $post_data['h_layout_news_signup'];
27
+
28
+
29
+ $header_nodes = '';
30
+ if($post_data['header_link_home'] && $post_data['header_link_home'] == '1'){
31
+ if($post_data['header_link_home_name'] > 0) {
32
+ $header_nodes .=' <action method="setData"><name>home</name><value>'.$post_data['header_link_home_name'].'</value></action>';
33
+ } else {
34
+ $header_nodes .=' <action method="setData"><name>home</name><value>0</value></action>';
35
+ }
36
+ }
37
+ if($post_data['header_link_login'] && $post_data['header_link_login'] == '1'){
38
+ if($post_data['header_link_login_name'] > 0) {
39
+ $header_nodes .=' <action method="setData"><name>login</name><value>'.$post_data['header_link_login_name'].'</value></action>';
40
+ } else {
41
+ $header_nodes .=' <action method="setData"><name>login</name><value>0</value></action>';
42
+ }
43
+ }
44
+ if($post_data['header_link_myaccount'] && $post_data['header_link_myaccount'] == '1'){
45
+ if($post_data['header_link_myaccount_name'] > 0) {
46
+ $header_nodes .=' <action method="setData"><name>account</name><value>'.$post_data['header_link_myaccount_name'].'</value></action>';
47
+ } else {
48
+ $header_nodes .=' <action method="setData"><name>account</name><value>0</value></action>';
49
+ }
50
+ }
51
+ if($post_data['header_link_wishlist'] && $post_data['header_link_wishlist'] == '1'){
52
+ if($post_data['header_link_wishlist_name'] > 0) {
53
+ $header_nodes .=' <action method="setData"><name>wishlist</name><value>'.$post_data['header_link_wishlist_name'].'</value></action>';
54
+ } else {
55
+ $header_nodes .=' <action method="setData"><name>wishlist</name><value>0</value></action>';
56
+ }
57
+ }
58
+ $footer_nodes = '';
59
+ if($post_data['footer_link_home'] && $post_data['footer_link_home'] == '1'){
60
+ if($post_data['footer_link_home_name'] > 0) {
61
+ $footer_nodes .=' <action method="setData"><name>home</name><value>'.$post_data['footer_link_home_name'].'</value></action>';
62
+ } else {
63
+ $footer_nodes .=' <action method="setData"><name>home</name><value>0</value></action>';
64
+ }
65
+ }
66
+ if($post_data['footer_link_login'] && $post_data['footer_link_login'] == '1'){
67
+ if($post_data['footer_link_login_name'] > 0) {
68
+ $footer_nodes .=' <action method="setData"><name>login</name><value>'.$post_data['footer_link_login_name'].'</value></action>';
69
+ } else {
70
+ $footer_nodes .=' <action method="setData"><name>login</name><value>0</value></action>';
71
+ }
72
+ }
73
+ if($post_data['footer_link_myaccount'] && $post_data['footer_link_myaccount'] == '1'){
74
+ if($post_data['footer_link_myaccount_name'] > 0) {
75
+ $footer_nodes .=' <action method="setData"><name>account</name><value>'.$post_data['footer_link_myaccount_name'].'</value></action>';
76
+ } else {
77
+ $footer_nodes .=' <action method="setData"><name>account</name><value>0</value></action>';
78
+ }
79
+ }
80
+ if($post_data['footer_link_wishlist'] && $post_data['footer_link_wishlist'] == '1'){
81
+ if($post_data['footer_link_wishlist_name'] > 0) {
82
+ $footer_nodes .=' <action method="setData"><name>wishlist</name><value>'.$post_data['footer_link_wishlist_name'].'</value></action>';
83
+ } else {
84
+ $footer_nodes .=' <action method="setData"><name>wishlist</name><value>0</value></action>';
85
+ }
86
+ }
87
+ $pre_footer_content = '';
88
+ if($post_data['pre_footer_section'] && $post_data['pre_footer_section'] != ''){
89
+ $pre_footer_content .= '<block type="mobilenow/home" name="prefootercontent" template="mobilenow/prefootercontent.phtml"/>';
90
+ }
91
+ $footer_content = '';
92
+ if($post_data['footer_section'] && $post_data['footer_section'] != ''){
93
+ $footer_content .= '<block type="mobilenow/home" name="footercontent" template="mobilenow/footercontent.phtml"/>';
94
+ }
95
+
96
+
97
+ //print_r($themeSubSettings['homepagelayoutmain']);
98
+ //echo '</pre>';
99
+ $h_org_xml = array();
100
+ if(!$post_data['show_search_cart_area'] ||$post_data['show_search_cart_area'] != '1'){
101
+ $h_org_xml['h_layout_search_cart'] = '';
102
+ } else {
103
+ $h_org_xml['h_layout_search_cart'] = '
104
+ <block type="mobilenow/home" name="catalog.search" template="mobilenow/search-panel.phtml">
105
+ <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
106
+ </block>';
107
+ }
108
+ if(!$post_data['subheader_section'] || trim($post_data['subheader_section']) == ''){
109
+ $h_org_xml['h_layout_sub_header'] = '';
110
+ } else{
111
+ $h_org_xml['h_layout_sub_header'] = '<block type="mobilenow/home" name="subheader" template="mobilenow/subheader.phtml"/>';
112
+ }
113
+ if(!$post_data['show_home_page_banner'] ||$post_data['show_home_page_banner'] != '1'){
114
+ $h_org_xml['h_layout_banner'] = '';
115
+ } else {
116
+ $h_org_xml['h_layout_banner'] = '<block type="mobilenow/home" name="homebanner" template="mobilenow/banner.phtml"/>';
117
+ }
118
+ //finding out category menu type
119
+ $menu_type = '';
120
+ if(!$post_data['categories'] ||$post_data['categories'] != ''){
121
+ $menu_type = '<action method="setData"><name>menutype</name><value>'.$post_data['categories'].'</value></action>';
122
+ }
123
+
124
+ $h_org_xml['h_layout_categories'] = '
125
+ <block type="mobilenow/home" name="catalog.topnav" template="mobilenow/nav.phtml">'.
126
+ $menu_type
127
+ .'
128
+ <block type="catalog/navigation" name="catalog_footernav" as="catalog_footernav" template="catalog/navigation/mobile-menu.phtml"/>
129
+ <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
130
+ <label>Navigation Bar</label>
131
+ <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
132
+ </block>
133
+ </block>';
134
+ if(!$post_data['homepage_custom_code'] || trim($post_data['homepage_custom_code']) == ''){
135
+ $h_org_xml['h_layout_feature'] = '';
136
+ } else{
137
+ $h_org_xml['h_layout_feature'] = '<block type="mobilenow/home" name="homepagefeature" template="mobilenow/customhome.phtml"/>';
138
+ }
139
+ if(!$post_data['show_newsletter'] ||$post_data['show_newsletter'] != '1'){
140
+ $h_org_xml['h_layout_news_signup'] = '';
141
+ } else {
142
+ $h_org_xml['h_layout_news_signup'] = '<block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"/>';
143
+ }
144
+
145
+ // $h_i = 0;
146
+ // foreach($themeSubSettings['homepagelayoutmain'] as $hkey=>$hvalue){
147
+ // $hvar[$h_i] = $h_org_xml[$hkey];
148
+ // $h_i++;
149
+ // }
150
+
151
+ $h_layout_xml = '
152
+ <remove name="breadcrumbs" />
153
+ <remove name="right"/>
154
+ <remove name="content"/>
155
+ <reference name="root">
156
+ <action method="setTemplate"><template>page/mobilenow-home.phtml</template></action>
157
+ </reference>
158
+ <reference name="header">';
159
+ if($header_nodes != ''){
160
+ $h_layout_xml .='<block type="mobilenow/home" name="mobilelinks" as="mobilelinks" template="mobilenow/toplinks.phtml">'.$header_nodes.'</block>';
161
+ }
162
+ $h_layout_xml .='
163
+ <block type="mobilenow/home" name="homepage" as="homepage">';
164
+ if(count($themeSubSettings['homepagelayoutmain']) > 0){
165
+
166
+ //echo '<pre>';
167
+
168
+ asort($themeSubSettings['homepagelayoutmain']);
169
+ foreach($themeSubSettings['homepagelayoutmain'] as $hkey=>$hvalue){
170
+ $h_layout_xml .= $h_org_xml[$hkey];
171
+ }
172
+ }
173
+ $h_layout_xml .='
174
+ </block>
175
+ </reference>
176
+ <reference name="footer">
177
+ <action method="unsetChildren"/>';
178
+ $h_layout_xml .= $pre_footer_content;
179
+ if($footer_nodes != ''){
180
+ $h_layout_xml .='<block type="mobilenow/home" name="mobilelinks-footer" as="mobilelinks-footer" template="mobilenow/footerlinks.phtml">'.$footer_nodes.'</block>';
181
+ }
182
+ $h_layout_xml .= $footer_content;
183
+ $h_layout_xml .='
184
+ </reference>
185
+ ';
186
+
187
+
188
+ //echo($h_layout_xml);
189
+
190
+ //die;
191
+
192
+ return $h_layout_xml;
193
+
194
+
195
+
196
+
197
+ }
198
+
199
+ // function for generationg Default layout xml
200
+ static public function generateDefaultPageLayoutXML($post_data,$css_name)
201
+ {
202
+ $themeSubSettings['homepagelayoutmain'] = array();
203
+ $themeSubSettings['homepagelayoutmain']['h_layout_search_cart'] = 0;
204
+ $themeSubSettings['homepagelayoutmain']['h_layout_sub_header'] = 0;
205
+ $themeSubSettings['homepagelayoutmain']['h_layout_banner'] = 0;
206
+ $themeSubSettings['homepagelayoutmain']['h_layout_feature'] = 0;
207
+ $themeSubSettings['homepagelayoutmain']['h_layout_categories'] = 0;
208
+ $themeSubSettings['homepagelayoutmain']['h_layout_news_signup'] = 0;
209
+ if($post_data['h_layout_search_cart'] > 0)
210
+ $themeSubSettings['homepagelayoutmain']['h_layout_search_cart'] = $post_data['h_layout_search_cart'];
211
+ if($post_data['h_layout_sub_header'] > 0)
212
+ $themeSubSettings['homepagelayoutmain']['h_layout_sub_header'] = $post_data['h_layout_sub_header'];
213
+ if($post_data['h_layout_categories'] > 0)
214
+ $themeSubSettings['homepagelayoutmain']['h_layout_categories'] = $post_data['h_layout_categories'];
215
+ if($post_data['h_layout_news_signup'] > 0)
216
+ $themeSubSettings['homepagelayoutmain']['h_layout_news_signup'] = $post_data['h_layout_news_signup'];
217
+
218
+ $header_nodes = '';
219
+ if($post_data['header_link_home'] && $post_data['header_link_home'] == '1'){
220
+ if($post_data['header_link_home_name'] > 0) {
221
+ $header_nodes .=' <action method="setData"><name>home</name><value>'.$post_data['header_link_home_name'].'</value></action>';
222
+ } else {
223
+ $header_nodes .=' <action method="setData"><name>home</name><value>0</value></action>';
224
+ }
225
+ }
226
+ if($post_data['header_link_login'] && $post_data['header_link_login'] == '1'){
227
+ if($post_data['header_link_login_name'] > 0) {
228
+ $header_nodes .=' <action method="setData"><name>login</name><value>'.$post_data['header_link_login_name'].'</value></action>';
229
+ } else {
230
+ $header_nodes .=' <action method="setData"><name>login</name><value>0</value></action>';
231
+ }
232
+ }
233
+ if($post_data['header_link_myaccount'] && $post_data['header_link_myaccount'] == '1'){
234
+ if($post_data['header_link_myaccount_name'] > 0) {
235
+ $header_nodes .=' <action method="setData"><name>account</name><value>'.$post_data['header_link_myaccount_name'].'</value></action>';
236
+ } else {
237
+ $header_nodes .=' <action method="setData"><name>account</name><value>0</value></action>';
238
+ }
239
+ }
240
+ if($post_data['header_link_wishlist'] && $post_data['header_link_wishlist'] == '1'){
241
+ if($post_data['header_link_wishlist_name'] > 0) {
242
+ $header_nodes .=' <action method="setData"><name>wishlist</name><value>'.$post_data['header_link_wishlist_name'].'</value></action>';
243
+ } else {
244
+ $header_nodes .=' <action method="setData"><name>wishlist</name><value>0</value></action>';
245
+ }
246
+ }
247
+ $footer_nodes = '';
248
+ if($post_data['footer_link_home'] && $post_data['footer_link_home'] == '1'){
249
+ if($post_data['footer_link_home_name'] > 0) {
250
+ $footer_nodes .=' <action method="setData"><name>home</name><value>'.$post_data['footer_link_home_name'].'</value></action>';
251
+ } else {
252
+ $footer_nodes .=' <action method="setData"><name>home</name><value>0</value></action>';
253
+ }
254
+ }
255
+ if($post_data['footer_link_login'] && $post_data['footer_link_login'] == '1'){
256
+ if($post_data['footer_link_login_name'] > 0) {
257
+ $footer_nodes .=' <action method="setData"><name>login</name><value>'.$post_data['footer_link_login_name'].'</value></action>';
258
+ } else {
259
+ $footer_nodes .=' <action method="setData"><name>login</name><value>0</value></action>';
260
+ }
261
+ }
262
+ if($post_data['footer_link_myaccount'] && $post_data['footer_link_myaccount'] == '1'){
263
+ if($post_data['footer_link_myaccount_name'] > 0) {
264
+ $footer_nodes .=' <action method="setData"><name>account</name><value>'.$post_data['footer_link_myaccount_name'].'</value></action>';
265
+ } else {
266
+ $footer_nodes .=' <action method="setData"><name>account</name><value>0</value></action>';
267
+ }
268
+ }
269
+ if($post_data['footer_link_wishlist'] && $post_data['footer_link_wishlist'] == '1'){
270
+ if($post_data['footer_link_wishlist_name'] > 0) {
271
+ $footer_nodes .=' <action method="setData"><name>wishlist</name><value>'.$post_data['footer_link_wishlist_name'].'</value></action>';
272
+ } else {
273
+ $footer_nodes .=' <action method="setData"><name>wishlist</name><value>0</value></action>';
274
+ }
275
+ }
276
+
277
+ $footer_content = '';
278
+ if($post_data['footer_section'] && $post_data['footer_section'] != ''){
279
+ $footer_content .= '<block type="mobilenow/home" name="footercontent" template="mobilenow/footercontent.phtml"/>';
280
+ }
281
+
282
+
283
+ //print_r($themeSubSettings['homepagelayoutmain']);
284
+ //echo '</pre>';
285
+ $h_org_xml = array();
286
+ if(!$post_data['show_search_cart_area'] ||$post_data['show_search_cart_area'] != '1'){
287
+ $h_org_xml['h_layout_search_cart'] = '';
288
+ } else {
289
+ $h_org_xml['h_layout_search_cart'] = '
290
+ <block type="mobilenow/home" name="catalog.search" template="mobilenow/search-panel.phtml">
291
+ <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
292
+ </block>';
293
+ }
294
+ if(!$post_data['subheader_section'] || trim($post_data['subheader_section']) == ''){
295
+ $h_org_xml['h_layout_sub_header'] = '';
296
+ } else{
297
+ $h_org_xml['h_layout_sub_header'] = '<block type="mobilenow/home" name="subheader" template="mobilenow/subheader.phtml"/>';
298
+ }
299
+
300
+ //finding out category menu type
301
+ $menu_type = '';
302
+ if(!$post_data['categories'] ||$post_data['categories'] != ''){
303
+ $menu_type = '<action method="setData"><name>menutype</name><value>'.$post_data['categories'].'</value></action>';
304
+ }
305
+
306
+ $h_org_xml['h_layout_categories'] = '
307
+ <block type="mobilenow/home" name="catalog.topnav" template="mobilenow/nav.phtml">'.
308
+ $menu_type
309
+ .'
310
+ <block type="catalog/navigation" name="catalog_footernav" as="catalog_footernav" template="catalog/navigation/mobile-menu.phtml"/>
311
+ <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
312
+ <label>Navigation Bar</label>
313
+ <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
314
+ </block>
315
+ </block>';
316
+ // if(!$post_data['show_newsletter'] ||$post_data['show_newsletter'] != '1'){
317
+ // $h_org_xml['h_layout_news_signup'] = '';
318
+ // } else {
319
+ // $h_org_xml['h_layout_news_signup'] = '<block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"/>';
320
+ // }
321
+
322
+
323
+
324
+
325
+ $default_layout_xml = '
326
+ <remove name="right"/>
327
+ <reference name="root">
328
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
329
+ </reference>
330
+ <reference name="head">
331
+ <block type="core/text" name="include_themecss">
332
+ <action method="setText"><text><![CDATA[<link rel="stylesheet" type="text/css" href="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_css/'.$css_name.'.css?'.time().'" media="all"/>]]></text></action>
333
+ </block> </reference>
334
+ <reference name="header">';
335
+ if($header_nodes != ''){
336
+ $default_layout_xml .='<block type="mobilenow/home" name="mobilelinks" as="mobilelinks" template="mobilenow/toplinks.phtml">'.$header_nodes.'</block>';
337
+ }
338
+ $default_layout_xml .='
339
+ <block type="mobilenow/home" name="homepage" as="homepage">';
340
+ if(count($themeSubSettings['homepagelayoutmain']) > 0){
341
+ asort($themeSubSettings['homepagelayoutmain']);
342
+ foreach($themeSubSettings['homepagelayoutmain'] as $hkey=>$hvalue){
343
+ $default_layout_xml .= $h_org_xml[$hkey];
344
+ }
345
+ }
346
+ $default_layout_xml .='
347
+ </block>';
348
+ $default_layout_xml .='</reference>';
349
+ $default_layout_xml .= '<reference name="footer">
350
+ <action method="unsetChildren"/>';
351
+ if($footer_nodes != ''){
352
+ $default_layout_xml .='<block type="mobilenow/home" name="mobilelinks-footer" as="mobilelinks-footer" template="mobilenow/footerlinks.phtml">'.$footer_nodes.'</block>';
353
+ }
354
+ $default_layout_xml .= $footer_content;
355
+ $default_layout_xml .='</reference>';
356
+ return $default_layout_xml;
357
+ }
358
+ }
359
 
app/code/community/Redstage/Mobilenow/Helper/Theme.php CHANGED
@@ -1,273 +1,273 @@
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
- }
56
-
57
-
58
- a, a:not(img), a span:not(.price) {
59
- color: {%links_color%} !important;
60
- }
61
-
62
- a:focus, a:active, a:not(img):focus, a:not(img):active, a span:not(.price):focus, a span:not(.price):active {
63
- color: {%links_color%} !important;
64
- }
65
-
66
- a:hover, a:not(img):hover, a span:not(.price):hover {
67
- text-decoration: none !important;
68
- border-bottom-color: {%links_color%} !important;
69
- color: {%links_color%} !important;
70
- border-bottom: 1px solid {%links_color%};
71
- }
72
-
73
- body, p, fieldset, table, span:not(.counter), span:not(.price), span span:not(.label), label, h1, h2, h3, h4, h5, h6,
74
- input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="datetime-local"],
75
- input[type="month"], input[type="week"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"],
76
- input[type="time"], input[type="url"], textarea {
77
- color: {%text_color%} !important;
78
- }
79
-
80
- .nav-container #nav, .nav-container #nav ul a, .top-bar, .top-bar-section ul, #mobile-menu li {
81
- background-color: {%categories_bg_color%};
82
- }
83
- .nav-container #nav li a{border-bottom:{%categories_bg_borderwidth%}px solid {%categories_bg_color%}; }
84
-
85
- ul.title-area .name a { color: {%text_color%} !important;}
86
-
87
- button.secondary, .button.secondary {
88
- background-color: {%button_bg_color%} !important;
89
- border-color: {%button_border_color%} !important;
90
- color: {%button_text_color%} !important;
91
- }
92
- div.breadcrumbs {
93
- background: none repeat scroll 0 0 {%breadcrumb_bg_color%} !important;
94
- }
95
- div.breadcrumbs span, div.breadcrumbs a, div.breadcrumbs span {
96
- color: {%breadcrumb_font_color%} !important;
97
- }
98
- div.breadcrumbs a:hover {
99
- text-decoration: none !important;
100
- border-bottom-color: {%breadcrumb_font_color%};
101
- color: {%breadcrumb_font_color%} !important;
102
- border-bottom: 1px solid {%breadcrumb_font_color%};
103
- }
104
- .toolbar-panel {
105
- background-color: {%toolbar_bg_color%} !important;
106
- }
107
- .toolbar-panel label {
108
- color: {%toolbar_text_color%} !important;
109
- }
110
- .pager-panel {
111
- background: none repeat scroll 0 0 {%pagination_panel_bg_color%} !important;
112
- color: {%pagination_button_text_color%} !important;
113
- }
114
- .pager-panel a.previous, .pager-panel a.link {
115
- background: none repeat scroll 0 0 {%pagination_button_bg_color%} !important;
116
- color: {%pagination_button_text_color%} !important;
117
- text-decoration: none !important;
118
- border-bottom: 1px solid {%pagination_button_bg_color%} !important;
119
- }
120
- .pager-panel a.previous span.notch, .pager-panel a.link span.notch {
121
- border: 11px solid transparent;
122
- border-right: 11px solid {%pagination_button_bg_color%} !important;
123
- border-right: 11px solid {%pagination_button_bg_color%} !important;
124
- }
125
- .pager-panel a.previous span.counter, .pager-panel a.link span.counter {
126
- color: {%pagination_button_text_color%} !important;
127
- }
128
- .pager-panel a.next {
129
- background: none repeat scroll 0 0 {%pagination_button_bg_color%} !important;
130
- color: {%pagination_button_text_color%} !important;
131
- border-bottom: 1px solid {%pagination_button_bg_color%} !important;
132
- }
133
- .pager-panel a.next span.notch {
134
- border: 11px solid transparent;
135
- border-left: 11px solid {%pagination_button_bg_color%} !important;
136
- border-left: 11px solid {%pagination_button_bg_color%} !important;
137
- }
138
- .pager-panel a.next span.counter {
139
- color: {%pagination_button_text_color%} !important;
140
- }
141
- .pager-panel ul.pagination li .arrow .notch:hover {
142
- text-decoration: none !important;
143
- border-color: {%pagination_button_bg_color%} !important;
144
- }
145
- .pager-panel ul.pagination .arrow a:hover, .pager-panel ul.pagination ul.pagination .arrow a:active, .pager-panel ul.pagination ul.pagination li .arrow a:focus, .pager-panel ul.pagination ul.pagination li .arrow a:focus span.notch, .pager-panel ul.pagination ul.pagination li .arrow .notch:hover {
146
- text-decoration: none !important;
147
- background: none repeat scroll 0 0 {%pagination_button_bg_color%} !important;
148
- }
149
-
150
- .products-list .item {
151
- border-bottom: {%gridlines_color_width%}px solid {%gridlines_color%} !important;
152
- }
153
- .products-list .item .product-image {
154
- border: {%image_border_width%}px solid {%image_border_color%} !important;
155
- }
156
- .product-view .product-image img{
157
- border: {%product_image_border_width%}px solid {%product_image_border_color%} !important;
158
- }
159
-
160
- .product-name {
161
- color: {%product_title_color%} !important;
162
- text-decoration: none !important;
163
- }
164
- .products-list h2.product-name a {
165
- color: {%product_title_color%} !important;
166
- text-decoration: underline !important;
167
- }
168
- .products-list h2.product-name a:hover {
169
- text-decoration: none !important;
170
- color: {%product_title_color%} !important;
171
- border-bottom: 1px solid {%product_title_color%} !important;
172
- }
173
- .product-name h3,h2.product-name a {
174
- color: {%productpage_title_color%} !important;
175
- }
176
- h2.product-name a:hover{
177
- color: {%productpage_title_color%} !important;
178
- text-decoration: none !important;
179
- border-bottom: 1px solid {%productpage_title_color%} !important;
180
- }
181
- .regular-price span.price, .regular-price span.price-label, .minimal-price span.price, .minimal-price span.price-label,.mobile-price .cart-price span.price,
182
- .special-price .price{
183
- color: {%product_price_color%} !important;
184
- font-weight: bold;
185
- }
186
-
187
- .price-box a span.price {
188
- color: {%product_special_price_color%} !important;
189
- }
190
- .price-box a:hover span.price {
191
- text-decoration: none !important;
192
- border-bottom-color: {%product_special_price_color%};
193
- color: {%product_special_price_color%} !important;
194
- border-bottom: 1px solid {%product_special_price_color%};
195
- }
196
-
197
- .rating-box .rating {
198
- color: {%review_star_color%} !important;
199
- }
200
-
201
- .add-to-cart button.secondary, .add-to-cart .button.secondary {
202
- background-color: {%add_to_cart_bg_color%} !important;
203
- border-color: {%add_to_cart_border_color%} !important;
204
- color: {%add_to_cart_button_text_color%} !important;
205
- margin :0px!important;
206
- }
207
- .addtocart.secondary, .addtocart.secondary {
208
- background-color: {%add_to_cart_bg_color%} !important;
209
- border-color: {%add_to_cart_border_color%} !important;
210
- color: {%add_to_cart_button_text_color%} !important;
211
- margin :0px!important;
212
- }
213
- .block-subscribe {
214
- background-color: {%newsletter_bg_color%} !important;
215
- }
216
- .products-list .item .product-image-mobilelist{width:auto !important;}
217
- a.menucart,a.mycarticon{color:{%cart_link_color%} !important;}
218
- a.menucart:hover,a.mycarticon:hover{color:{%cart_link_color%} !important;border-bottom-color:{%cart_link_color%} !important;}
219
- .product-view .product-collateral .box-description h2,
220
- .product-view .product-collateral .box-additional h2,
221
- .product-view .product-collateral .box-up-sell h2,
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
+ 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
+ }
56
+
57
+
58
+ a, a:not(img), a span:not(.price) {
59
+ color: {%links_color%} !important;
60
+ }
61
+
62
+ a:focus, a:active, a:not(img):focus, a:not(img):active, a span:not(.price):focus, a span:not(.price):active {
63
+ color: {%links_color%} !important;
64
+ }
65
+
66
+ a:hover, a:not(img):hover, a span:not(.price):hover {
67
+ text-decoration: none !important;
68
+ border-bottom-color: {%links_color%} !important;
69
+ color: {%links_color%} !important;
70
+ border-bottom: 1px solid {%links_color%};
71
+ }
72
+
73
+ body, p, fieldset, table, span:not(.counter), span:not(.price), span span:not(.label), label, h1, h2, h3, h4, h5, h6,
74
+ input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="datetime-local"],
75
+ input[type="month"], input[type="week"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"],
76
+ input[type="time"], input[type="url"], textarea {
77
+ color: {%text_color%} !important;
78
+ }
79
+
80
+ .nav-container #nav, .nav-container #nav ul a, .top-bar, .top-bar-section ul, #mobile-menu li {
81
+ background-color: {%categories_bg_color%};
82
+ }
83
+ .nav-container #nav li a{border-bottom:{%categories_bg_borderwidth%}px solid {%categories_bg_color%}; }
84
+
85
+ ul.title-area .name a { color: {%text_color%} !important;}
86
+
87
+ button.secondary, .button.secondary {
88
+ background-color: {%button_bg_color%} !important;
89
+ border-color: {%button_border_color%} !important;
90
+ color: {%button_text_color%} !important;
91
+ }
92
+ div.breadcrumbs {
93
+ background: none repeat scroll 0 0 {%breadcrumb_bg_color%} !important;
94
+ }
95
+ div.breadcrumbs span, div.breadcrumbs a, div.breadcrumbs span {
96
+ color: {%breadcrumb_font_color%} !important;
97
+ }
98
+ div.breadcrumbs a:hover {
99
+ text-decoration: none !important;
100
+ border-bottom-color: {%breadcrumb_font_color%};
101
+ color: {%breadcrumb_font_color%} !important;
102
+ border-bottom: 1px solid {%breadcrumb_font_color%};
103
+ }
104
+ .toolbar-panel {
105
+ background-color: {%toolbar_bg_color%} !important;
106
+ }
107
+ .toolbar-panel label {
108
+ color: {%toolbar_text_color%} !important;
109
+ }
110
+ .pager-panel {
111
+ background: none repeat scroll 0 0 {%pagination_panel_bg_color%} !important;
112
+ color: {%pagination_button_text_color%} !important;
113
+ }
114
+ .pager-panel a.previous, .pager-panel a.link {
115
+ background: none repeat scroll 0 0 {%pagination_button_bg_color%} !important;
116
+ color: {%pagination_button_text_color%} !important;
117
+ text-decoration: none !important;
118
+ border-bottom: 1px solid {%pagination_button_bg_color%} !important;
119
+ }
120
+ .pager-panel a.previous span.notch, .pager-panel a.link span.notch {
121
+ border: 11px solid transparent;
122
+ border-right: 11px solid {%pagination_button_bg_color%} !important;
123
+ border-right: 11px solid {%pagination_button_bg_color%} !important;
124
+ }
125
+ .pager-panel a.previous span.counter, .pager-panel a.link span.counter {
126
+ color: {%pagination_button_text_color%} !important;
127
+ }
128
+ .pager-panel a.next {
129
+ background: none repeat scroll 0 0 {%pagination_button_bg_color%} !important;
130
+ color: {%pagination_button_text_color%} !important;
131
+ border-bottom: 1px solid {%pagination_button_bg_color%} !important;
132
+ }
133
+ .pager-panel a.next span.notch {
134
+ border: 11px solid transparent;
135
+ border-left: 11px solid {%pagination_button_bg_color%} !important;
136
+ border-left: 11px solid {%pagination_button_bg_color%} !important;
137
+ }
138
+ .pager-panel a.next span.counter {
139
+ color: {%pagination_button_text_color%} !important;
140
+ }
141
+ .pager-panel ul.pagination li .arrow .notch:hover {
142
+ text-decoration: none !important;
143
+ border-color: {%pagination_button_bg_color%} !important;
144
+ }
145
+ .pager-panel ul.pagination .arrow a:hover, .pager-panel ul.pagination ul.pagination .arrow a:active, .pager-panel ul.pagination ul.pagination li .arrow a:focus, .pager-panel ul.pagination ul.pagination li .arrow a:focus span.notch, .pager-panel ul.pagination ul.pagination li .arrow .notch:hover {
146
+ text-decoration: none !important;
147
+ background: none repeat scroll 0 0 {%pagination_button_bg_color%} !important;
148
+ }
149
+
150
+ .products-list .item {
151
+ border-bottom: {%gridlines_color_width%}px solid {%gridlines_color%} !important;
152
+ }
153
+ .products-list .item .product-image {
154
+ border: {%image_border_width%}px solid {%image_border_color%} !important;
155
+ }
156
+ .product-view .product-image img{
157
+ border: {%product_image_border_width%}px solid {%product_image_border_color%} !important;
158
+ }
159
+
160
+ .product-name {
161
+ color: {%product_title_color%} !important;
162
+ text-decoration: none !important;
163
+ }
164
+ .products-list h2.product-name a {
165
+ color: {%product_title_color%} !important;
166
+ text-decoration: underline !important;
167
+ }
168
+ .products-list h2.product-name a:hover {
169
+ text-decoration: none !important;
170
+ color: {%product_title_color%} !important;
171
+ border-bottom: 1px solid {%product_title_color%} !important;
172
+ }
173
+ .product-name h3,h2.product-name a {
174
+ color: {%productpage_title_color%} !important;
175
+ }
176
+ h2.product-name a:hover{
177
+ color: {%productpage_title_color%} !important;
178
+ text-decoration: none !important;
179
+ border-bottom: 1px solid {%productpage_title_color%} !important;
180
+ }
181
+ .regular-price span.price, .regular-price span.price-label, .minimal-price span.price, .minimal-price span.price-label,.mobile-price .cart-price span.price,
182
+ .special-price .price{
183
+ color: {%product_price_color%} !important;
184
+ font-weight: bold;
185
+ }
186
+
187
+ .price-box a span.price {
188
+ color: {%product_special_price_color%} !important;
189
+ }
190
+ .price-box a:hover span.price {
191
+ text-decoration: none !important;
192
+ border-bottom-color: {%product_special_price_color%};
193
+ color: {%product_special_price_color%} !important;
194
+ border-bottom: 1px solid {%product_special_price_color%};
195
+ }
196
+
197
+ .rating-box .rating {
198
+ color: {%review_star_color%} !important;
199
+ }
200
+
201
+ .add-to-cart button.secondary, .add-to-cart .button.secondary {
202
+ background-color: {%add_to_cart_bg_color%} !important;
203
+ border-color: {%add_to_cart_border_color%} !important;
204
+ color: {%add_to_cart_button_text_color%} !important;
205
+ margin :0px!important;
206
+ }
207
+ .addtocart.secondary, .addtocart.secondary {
208
+ background-color: {%add_to_cart_bg_color%} !important;
209
+ border-color: {%add_to_cart_border_color%} !important;
210
+ color: {%add_to_cart_button_text_color%} !important;
211
+ margin :0px!important;
212
+ }
213
+ .block-subscribe {
214
+ background-color: {%newsletter_bg_color%} !important;
215
+ }
216
+ .products-list .item .product-image-mobilelist{width:auto !important;}
217
+ a.menucart,a.mycarticon{color:{%cart_link_color%} !important;}
218
+ a.menucart:hover,a.mycarticon:hover{color:{%cart_link_color%} !important;border-bottom-color:{%cart_link_color%} !important;}
219
+ .product-view .product-collateral .box-description h2,
220
+ .product-view .product-collateral .box-additional h2,
221
+ .product-view .product-collateral .box-up-sell h2,
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
 
app/code/community/Redstage/Mobilenow/Model/Corelayoutlink.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
-
3
- class Redstage_Mobilenow_Model_Corelayoutlink extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct(){
6
- parent::_construct();
7
- $this->_init("mobilenow/corelayoutlink");
8
-
9
- }
10
-
11
- }
12
 
1
+ <?php
2
+
3
+ class Redstage_Mobilenow_Model_Corelayoutlink extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+ parent::_construct();
7
+ $this->_init("mobilenow/corelayoutlink");
8
+
9
+ }
10
+
11
+ }
12
 
app/code/community/Redstage/Mobilenow/Model/Corelayoutupdate.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
-
3
- class Redstage_Mobilenow_Model_Corelayoutupdate extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct(){
6
- parent::_construct();
7
- $this->_init("mobilenow/corelayoutupdate");
8
-
9
- }
10
-
11
- }
12
 
1
+ <?php
2
+
3
+ class Redstage_Mobilenow_Model_Corelayoutupdate extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+ parent::_construct();
7
+ $this->_init("mobilenow/corelayoutupdate");
8
+
9
+ }
10
+
11
+ }
12
 
app/code/community/Redstage/Mobilenow/Model/Design/Package.php CHANGED
@@ -1,221 +1,221 @@
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
+
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
+ }
app/code/community/Redstage/Mobilenow/Model/Layout/Update.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
-
3
-
4
- class Redstage_Mobilenow_Model_Layout_update extends Mage_Core_Model_Layout_Update
5
- {
6
- public function saveCache()
7
- {
8
- if (!Mage::app()->useCache('layout')) {
9
- return false;
10
- }
11
- $str = $this->asString();
12
- $tags = $this->getHandles();
13
- $tags[] = self::LAYOUT_GENERAL_CACHE_TAG;
14
- return Mage::app()->saveCache($str, $this->getCacheId().Mage::getSingleton('core/session')->getMobileNowId().Mage::getSingleton('core/session')->getLoadFrom(), $tags, null);
15
- }
16
- }
17
 
1
+ <?php
2
+
3
+
4
+ class Redstage_Mobilenow_Model_Layout_update extends Mage_Core_Model_Layout_Update
5
+ {
6
+ public function saveCache()
7
+ {
8
+ if (!Mage::app()->useCache('layout')) {
9
+ return false;
10
+ }
11
+ $str = $this->asString();
12
+ $tags = $this->getHandles();
13
+ $tags[] = self::LAYOUT_GENERAL_CACHE_TAG;
14
+ return Mage::app()->saveCache($str, $this->getCacheId().Mage::getSingleton('core/session')->getMobileNowId().Mage::getSingleton('core/session')->getLoadFrom(), $tags, null);
15
+ }
16
+ }
17
 
app/code/community/Redstage/Mobilenow/Model/Mobilenow.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
-
3
- class Redstage_Mobilenow_Model_Mobilenow extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct(){
6
-
7
- $this->_init("mobilenow/mobilenow");
8
-
9
- }
10
- }
11
 
1
+ <?php
2
+
3
+ class Redstage_Mobilenow_Model_Mobilenow extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+
7
+ $this->_init("mobilenow/mobilenow");
8
+
9
+ }
10
+ }
11
 
app/code/community/Redstage/Mobilenow/Model/Mysql4/Corelayoutlink.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Corelayoutlink extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("mobilenow/corelayoutlink", "layout_link_id");
7
- }
8
-
9
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Corelayoutlink extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("mobilenow/corelayoutlink", "layout_link_id");
7
+ }
8
+
9
  }
app/code/community/Redstage/Mobilenow/Model/Mysql4/Corelayoutlink/Collection.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Corelayoutlink_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
- public function _construct()
5
- {
6
- parent::_construct();
7
- $this->_init("mobilenow/corelayoutlink");
8
- }
9
- }
10
 
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Corelayoutlink_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init("mobilenow/corelayoutlink");
8
+ }
9
+ }
10
 
app/code/community/Redstage/Mobilenow/Model/Mysql4/Corelayoutupdate.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Corelayoutupdate extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("mobilenow/corelayoutupdate", "layout_update_id");
7
- }
8
-
9
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Corelayoutupdate extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("mobilenow/corelayoutupdate", "layout_update_id");
7
+ }
8
+
9
  }
app/code/community/Redstage/Mobilenow/Model/Mysql4/Corelayoutupdate/Collection.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Corelayoutupdate_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
- public function _construct()
5
- {
6
- parent::_construct();
7
- $this->_init("mobilenow/corelayoutupdate");
8
- }
9
- }
10
 
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Corelayoutupdate_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init("mobilenow/corelayoutupdate");
8
+ }
9
+ }
10
 
app/code/community/Redstage/Mobilenow/Model/Mysql4/Mobilenow.php CHANGED
@@ -1,160 +1,160 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Mobilenow extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("mobilenow/mobilenow", "theme_id");
7
- }
8
- protected function _beforeSave(Mage_Core_Model_Abstract $object)
9
- {
10
- $arrayUserAgent=Mage::helper("mobilenow")->getOptionArrayUserAgent();
11
- if($object->getStatus()==1)
12
- {
13
- $allStores = Mage::app()->getStores();
14
- foreach ($allStores as $_eachStoreId => $val)
15
- {
16
- $_storeId[] = Mage::app()->getStore($_eachStoreId)->getId();
17
- }
18
- if(implode('',$object->getStores())==0){
19
- $checkStores=$_storeId;
20
- }
21
- else{
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
- {
32
- /////////////// Processing values from DB on each iteration////////
33
- $mobilenowCollection=Mage::getModel('mobilenow/mobilenow')->load($themeStore['theme_id']);
34
- if($object->getThemeId()!=$mobilenowCollection->getThemeID() && $mobilenowCollection->getStatus()==1){
35
- $collectionUserAgent=explode(',',$mobilenowCollection->getUserAgentRegexValues());
36
- foreach($collectionUserAgent as $collectAgent)
37
- {
38
- $finalCollectionUserAgent[]=$arrayUserAgent[$collectAgent];
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
- {
47
- $finalobjectUserAgent[]=$arrayUserAgent[$objectAgent];
48
- }
49
- $objectCustomUserAgent=explode('|',$object->getUserAgentRegexCustomValues());
50
- $mergedObjectUserAgent=array_filter(array_map('strtolower',array_merge($finalobjectUserAgent,$objectCustomUserAgent)));
51
- $resultUseragent=array_intersect($mergedObjectUserAgent,$mergedCollectionUserAgent);
52
- if (!empty($resultUseragent) || in_array('all',$mergedCollectionUserAgent) || in_array('all',$mergedObjectUserAgent))
53
- {
54
- Mage::throwException(Mage::helper('mobilenow')->__('The selected User Agents and Store View combination already exists.'));
55
- }
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))
64
- Mage::throwException(Mage::helper('mobilenow')->__('You cannot activate theme, because you are using a Free account.'));
65
- }
66
- protected function _afterSave(Mage_Core_Model_Abstract $object)
67
- {
68
- $oldStores = $this->lookupStoreIds($object->getId());
69
- $newStores = (array)$object->getStores();
70
-
71
- $table = $this->getTable('mobilenow/themestore');
72
- $insert = array_diff($newStores, $oldStores);
73
- $delete = array_diff($oldStores, $newStores);
74
-
75
- if ($delete) {
76
- $where = array(
77
- 'theme_id = ?' => (int) $object->getId(),
78
- 'store_id IN (?)' => $delete
79
- );
80
-
81
- $this->_getWriteAdapter()->delete($table, $where);
82
- }
83
-
84
- if ($insert) {
85
- $data = array();
86
-
87
- foreach ($insert as $storeId) {
88
- $data[] = array(
89
- 'theme_id' => (int) $object->getId(),
90
- 'store_id' => (int) $storeId
91
- );
92
- }
93
-
94
- $this->_getWriteAdapter()->insertMultiple($table, $data);
95
- }
96
-
97
- return parent::_afterSave($object);
98
-
99
- }
100
- public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
101
- {
102
- if (!is_numeric($value) && is_null($field)) {
103
- $field = 'identifier';
104
- }
105
-
106
- return parent::load($object, $value, $field);
107
- }
108
- protected function _afterLoad(Mage_Core_Model_Abstract $object)
109
- {
110
- if ($object->getId()) {
111
- $stores = $this->lookupStoreIds($object->getId());
112
- $object->setData('store_id', $stores);
113
- $object->setData('stores', $stores);
114
- }
115
-
116
- return parent::_afterLoad($object);
117
- }
118
- protected function _getLoadSelect($field, $value, $object)
119
- {
120
- $select = parent::_getLoadSelect($field, $value, $object);
121
-
122
- if ($object->getStoreId()) {
123
- $stores = array(
124
- (int) $object->getStoreId(),
125
- Mage_Core_Model_App::ADMIN_STORE_ID,
126
- );
127
-
128
- $select->join(
129
- array('cbs' => $this->getTable('mobilenow/themestore')),
130
- $this->getMainTable().'.theme_id = cbs.theme_id',
131
- array('store_id')
132
- )/*->where('is_active = ?', 1)*/
133
- ->where('cbs.store_id in (?) ', $stores)
134
- ->order('store_id DESC')
135
- ->limit(1);
136
- }
137
-
138
- return $select;
139
- }
140
- /**
141
- * Get store ids to which specified item is assigned
142
- *
143
- * @param int $id
144
- * @return array
145
- */
146
- public function lookupStoreIds($id)
147
- {
148
- $adapter = $this->_getReadAdapter();
149
-
150
- $select = $adapter->select()
151
- ->from($this->getTable('mobilenow/themestore'), 'store_id')
152
- ->where('theme_id = :theme_id');
153
-
154
- $binds = array(
155
- ':theme_id' => (int) $id
156
- );
157
-
158
- return $adapter->fetchCol($select, $binds);
159
- }
160
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Mobilenow extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("mobilenow/mobilenow", "theme_id");
7
+ }
8
+ protected function _beforeSave(Mage_Core_Model_Abstract $object)
9
+ {
10
+ $arrayUserAgent=Mage::helper("mobilenow")->getOptionArrayUserAgent();
11
+ if($object->getStatus()==1)
12
+ {
13
+ $allStores = Mage::app()->getStores();
14
+ foreach ($allStores as $_eachStoreId => $val)
15
+ {
16
+ $_storeId[] = Mage::app()->getStore($_eachStoreId)->getId();
17
+ }
18
+ if(implode('',$object->getStores())==0){
19
+ $checkStores=$_storeId;
20
+ }
21
+ else{
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
+ {
32
+ /////////////// Processing values from DB on each iteration////////
33
+ $mobilenowCollection=Mage::getModel('mobilenow/mobilenow')->load($themeStore['theme_id']);
34
+ if($object->getThemeId()!=$mobilenowCollection->getThemeID() && $mobilenowCollection->getStatus()==1){
35
+ $collectionUserAgent=explode(',',$mobilenowCollection->getUserAgentRegexValues());
36
+ foreach($collectionUserAgent as $collectAgent)
37
+ {
38
+ $finalCollectionUserAgent[]=$arrayUserAgent[$collectAgent];
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
+ {
47
+ $finalobjectUserAgent[]=$arrayUserAgent[$objectAgent];
48
+ }
49
+ $objectCustomUserAgent=explode('|',$object->getUserAgentRegexCustomValues());
50
+ $mergedObjectUserAgent=array_filter(array_map('strtolower',array_merge($finalobjectUserAgent,$objectCustomUserAgent)));
51
+ $resultUseragent=array_intersect($mergedObjectUserAgent,$mergedCollectionUserAgent);
52
+ if (!empty($resultUseragent) || in_array('all',$mergedCollectionUserAgent) || in_array('all',$mergedObjectUserAgent))
53
+ {
54
+ Mage::throwException(Mage::helper('mobilenow')->__('The selected User Agents and Store View combination already exists.'));
55
+ }
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))
64
+ Mage::throwException(Mage::helper('mobilenow')->__('You cannot activate theme, because you are using a Free account.'));
65
+ }
66
+ protected function _afterSave(Mage_Core_Model_Abstract $object)
67
+ {
68
+ $oldStores = $this->lookupStoreIds($object->getId());
69
+ $newStores = (array)$object->getStores();
70
+
71
+ $table = $this->getTable('mobilenow/themestore');
72
+ $insert = array_diff($newStores, $oldStores);
73
+ $delete = array_diff($oldStores, $newStores);
74
+
75
+ if ($delete) {
76
+ $where = array(
77
+ 'theme_id = ?' => (int) $object->getId(),
78
+ 'store_id IN (?)' => $delete
79
+ );
80
+
81
+ $this->_getWriteAdapter()->delete($table, $where);
82
+ }
83
+
84
+ if ($insert) {
85
+ $data = array();
86
+
87
+ foreach ($insert as $storeId) {
88
+ $data[] = array(
89
+ 'theme_id' => (int) $object->getId(),
90
+ 'store_id' => (int) $storeId
91
+ );
92
+ }
93
+
94
+ $this->_getWriteAdapter()->insertMultiple($table, $data);
95
+ }
96
+
97
+ return parent::_afterSave($object);
98
+
99
+ }
100
+ public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
101
+ {
102
+ if (!is_numeric($value) && is_null($field)) {
103
+ $field = 'identifier';
104
+ }
105
+
106
+ return parent::load($object, $value, $field);
107
+ }
108
+ protected function _afterLoad(Mage_Core_Model_Abstract $object)
109
+ {
110
+ if ($object->getId()) {
111
+ $stores = $this->lookupStoreIds($object->getId());
112
+ $object->setData('store_id', $stores);
113
+ $object->setData('stores', $stores);
114
+ }
115
+
116
+ return parent::_afterLoad($object);
117
+ }
118
+ protected function _getLoadSelect($field, $value, $object)
119
+ {
120
+ $select = parent::_getLoadSelect($field, $value, $object);
121
+
122
+ if ($object->getStoreId()) {
123
+ $stores = array(
124
+ (int) $object->getStoreId(),
125
+ Mage_Core_Model_App::ADMIN_STORE_ID,
126
+ );
127
+
128
+ $select->join(
129
+ array('cbs' => $this->getTable('mobilenow/themestore')),
130
+ $this->getMainTable().'.theme_id = cbs.theme_id',
131
+ array('store_id')
132
+ )/*->where('is_active = ?', 1)*/
133
+ ->where('cbs.store_id in (?) ', $stores)
134
+ ->order('store_id DESC')
135
+ ->limit(1);
136
+ }
137
+
138
+ return $select;
139
+ }
140
+ /**
141
+ * Get store ids to which specified item is assigned
142
+ *
143
+ * @param int $id
144
+ * @return array
145
+ */
146
+ public function lookupStoreIds($id)
147
+ {
148
+ $adapter = $this->_getReadAdapter();
149
+
150
+ $select = $adapter->select()
151
+ ->from($this->getTable('mobilenow/themestore'), 'store_id')
152
+ ->where('theme_id = :theme_id');
153
+
154
+ $binds = array(
155
+ ':theme_id' => (int) $id
156
+ );
157
+
158
+ return $adapter->fetchCol($select, $binds);
159
+ }
160
  }
app/code/community/Redstage/Mobilenow/Model/Mysql4/Mobilenow/Collection.php CHANGED
@@ -1,81 +1,81 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Mobilenow_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
- public function _construct(){
5
- $this->_init("mobilenow/mobilenow");
6
- $this->_map['fields']['store'] = 'store_table.store_id';
7
- }
8
- /**
9
- * Add filter by store
10
- *
11
- * @param int|Mage_Core_Model_Store $store
12
- * @param bool $withAdmin
13
- * @return Mage_Cms_Model_Resource_Block_Collection
14
- */
15
- public function addStoreFilter($store, $withAdmin = true)
16
- {
17
- if ($store instanceof Mage_Core_Model_Store) {
18
- $store = array($store->getId());
19
- }
20
-
21
- if (!is_array($store)) {
22
- $store = array($store);
23
- }
24
-
25
- if ($withAdmin) {
26
- $store[] = Mage_Core_Model_App::ADMIN_STORE_ID;
27
- }
28
- $this->addFilter('store', array('in' => $store), 'public');
29
-
30
- return $this;
31
- }
32
- /**
33
- * Get SQL for get record count.
34
- * Extra GROUP BY strip added.
35
- *
36
- * @return Varien_Db_Select
37
- */
38
- public function getSelectCountSql()
39
- {
40
- /*Previous Code
41
- $countSelect = parent::getSelectCountSql();
42
- $countSelect->reset(Zend_Db_Select::GROUP);
43
- return $countSelect;*/
44
- $this->_renderFilters();
45
- $countSelect = clone $this->getSelect();
46
- $countSelect->reset(Zend_Db_Select::ORDER);
47
- $countSelect->reset(Zend_Db_Select::LIMIT_COUNT);
48
- $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
49
- $countSelect->reset(Zend_Db_Select::COLUMNS);
50
- if(count($this->getSelect()->getPart(Zend_Db_Select::GROUP)) > 0)
51
- {
52
- $countSelect->reset(Zend_Db_Select::GROUP);
53
- $countSelect->distinct(true);
54
- $group = $this->getSelect()->getPart(Zend_Db_Select::GROUP);
55
- $countSelect->columns("COUNT(DISTINCT ".implode(", ", $group).")");
56
- }
57
- else
58
- {
59
- $countSelect->columns('COUNT(*)');
60
- }
61
- return $countSelect;
62
- }
63
-
64
- /**
65
- * Join store relation table if there is store filter
66
- */
67
- protected function _renderFiltersBefore()
68
- {
69
- //if ($this->getFilter('store')) {
70
- $this->getSelect()->join(
71
- array('store_table' => $this->getTable('mobilenow/themestore')),'main_table.theme_id = store_table.theme_id',array())->group('main_table.theme_id');
72
-
73
- /*
74
- * Allow analytic functions usage because of one field grouping
75
- */
76
- $this->_useAnalyticFunction = true;
77
- //}
78
- return parent::_renderFiltersBefore();
79
- }
80
- }
81
 
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Mobilenow_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct(){
5
+ $this->_init("mobilenow/mobilenow");
6
+ $this->_map['fields']['store'] = 'store_table.store_id';
7
+ }
8
+ /**
9
+ * Add filter by store
10
+ *
11
+ * @param int|Mage_Core_Model_Store $store
12
+ * @param bool $withAdmin
13
+ * @return Mage_Cms_Model_Resource_Block_Collection
14
+ */
15
+ public function addStoreFilter($store, $withAdmin = true)
16
+ {
17
+ if ($store instanceof Mage_Core_Model_Store) {
18
+ $store = array($store->getId());
19
+ }
20
+
21
+ if (!is_array($store)) {
22
+ $store = array($store);
23
+ }
24
+
25
+ if ($withAdmin) {
26
+ $store[] = Mage_Core_Model_App::ADMIN_STORE_ID;
27
+ }
28
+ $this->addFilter('store', array('in' => $store), 'public');
29
+
30
+ return $this;
31
+ }
32
+ /**
33
+ * Get SQL for get record count.
34
+ * Extra GROUP BY strip added.
35
+ *
36
+ * @return Varien_Db_Select
37
+ */
38
+ public function getSelectCountSql()
39
+ {
40
+ /*Previous Code
41
+ $countSelect = parent::getSelectCountSql();
42
+ $countSelect->reset(Zend_Db_Select::GROUP);
43
+ return $countSelect;*/
44
+ $this->_renderFilters();
45
+ $countSelect = clone $this->getSelect();
46
+ $countSelect->reset(Zend_Db_Select::ORDER);
47
+ $countSelect->reset(Zend_Db_Select::LIMIT_COUNT);
48
+ $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
49
+ $countSelect->reset(Zend_Db_Select::COLUMNS);
50
+ if(count($this->getSelect()->getPart(Zend_Db_Select::GROUP)) > 0)
51
+ {
52
+ $countSelect->reset(Zend_Db_Select::GROUP);
53
+ $countSelect->distinct(true);
54
+ $group = $this->getSelect()->getPart(Zend_Db_Select::GROUP);
55
+ $countSelect->columns("COUNT(DISTINCT ".implode(", ", $group).")");
56
+ }
57
+ else
58
+ {
59
+ $countSelect->columns('COUNT(*)');
60
+ }
61
+ return $countSelect;
62
+ }
63
+
64
+ /**
65
+ * Join store relation table if there is store filter
66
+ */
67
+ protected function _renderFiltersBefore()
68
+ {
69
+ //if ($this->getFilter('store')) {
70
+ $this->getSelect()->join(
71
+ array('store_table' => $this->getTable('mobilenow/themestore')),'main_table.theme_id = store_table.theme_id',array())->group('main_table.theme_id');
72
+
73
+ /*
74
+ * Allow analytic functions usage because of one field grouping
75
+ */
76
+ $this->_useAnalyticFunction = true;
77
+ //}
78
+ return parent::_renderFiltersBefore();
79
+ }
80
+ }
81
 
app/code/community/Redstage/Mobilenow/Model/Mysql4/Themelayoutsettings.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Themelayoutsettings extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("mobilenow/themelayoutsettings", "id");
7
- }
8
-
9
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Themelayoutsettings extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("mobilenow/themelayoutsettings", "id");
7
+ }
8
+
9
  }
app/code/community/Redstage/Mobilenow/Model/Mysql4/Themelayoutsettings/Collection.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Themelayoutsettings_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
- public function _construct()
5
- {
6
- parent::_construct();
7
- $this->_init("mobilenow/themelayoutsettings");
8
- }
9
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Themelayoutsettings_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init("mobilenow/themelayoutsettings");
8
+ }
9
  }
app/code/community/Redstage/Mobilenow/Model/Mysql4/Themestore.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Themestore extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("mobilenow/themestore", "theme_id");
7
- }
8
-
9
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Themestore extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("mobilenow/themestore", "theme_id");
7
+ }
8
+
9
  }
app/code/community/Redstage/Mobilenow/Model/Mysql4/Themestore/Collection.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Themestore_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
- public function _construct()
5
- {
6
- parent::_construct();
7
- $this->_init("mobilenow/themestore");
8
- }
9
- }
10
 
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Themestore_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init("mobilenow/themestore");
8
+ }
9
+ }
10
 
app/code/community/Redstage/Mobilenow/Model/Mysql4/Themesubsettings.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Themesubsettings extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("mobilenow/themesubsettings", "id");
7
- }
8
- public function loadByAttributes($attributes)
9
- {
10
- $adapter = $this->_getReadAdapter();
11
- $where = array();
12
- foreach ($attributes as $attributeCode=> $value) {
13
- $where[] = sprintf('%s=:%s', $attributeCode, $attributeCode);
14
- }
15
- $select = $adapter->select()
16
- ->from($this->getMainTable())
17
- ->where(implode(' AND ', $where));
18
-
19
- $binds = $attributes;
20
-
21
- return $adapter->fetchRow($select, $binds);
22
- }
23
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Themesubsettings extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("mobilenow/themesubsettings", "id");
7
+ }
8
+ public function loadByAttributes($attributes)
9
+ {
10
+ $adapter = $this->_getReadAdapter();
11
+ $where = array();
12
+ foreach ($attributes as $attributeCode=> $value) {
13
+ $where[] = sprintf('%s=:%s', $attributeCode, $attributeCode);
14
+ }
15
+ $select = $adapter->select()
16
+ ->from($this->getMainTable())
17
+ ->where(implode(' AND ', $where));
18
+
19
+ $binds = $attributes;
20
+
21
+ return $adapter->fetchRow($select, $binds);
22
+ }
23
  }
app/code/community/Redstage/Mobilenow/Model/Mysql4/Themesubsettings/Collection.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- class Redstage_Mobilenow_Model_Mysql4_Themesubsettings_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
- public function _construct()
5
- {
6
- parent::_construct();
7
- $this->_init("mobilenow/themesubsettings");
8
- }
9
- }
10
 
1
+ <?php
2
+ class Redstage_Mobilenow_Model_Mysql4_Themesubsettings_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init("mobilenow/themesubsettings");
8
+ }
9
+ }
10
 
app/code/community/Redstage/Mobilenow/Model/Resource/Layout.php CHANGED
@@ -1,86 +1,86 @@
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])) {
40
- $bind[$key] = $value;
41
- }
42
- }
43
- $bind['layout_update_handle'] = $handle;
44
- $result = '';
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
+
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])) {
40
+ $bind[$key] = $value;
41
+ }
42
+ }
43
+ $bind['layout_update_handle'] = $handle;
44
+ $result = '';
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
  }
app/code/community/Redstage/Mobilenow/Model/Themelayoutsettings.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
-
3
- class Redstage_Mobilenow_Model_Themelayoutsettings extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct(){
6
- parent::_construct();
7
- $this->_init("mobilenow/themelayoutsettings");
8
-
9
- }
10
-
11
- }
12
 
1
+ <?php
2
+
3
+ class Redstage_Mobilenow_Model_Themelayoutsettings extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+ parent::_construct();
7
+ $this->_init("mobilenow/themelayoutsettings");
8
+
9
+ }
10
+
11
+ }
12
 
app/code/community/Redstage/Mobilenow/Model/Themestore.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
-
3
- class Redstage_Mobilenow_Model_Themestore extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct(){
6
- parent::_construct();
7
- $this->_init("mobilenow/themestore");
8
-
9
- }
10
-
11
- }
12
 
1
+ <?php
2
+
3
+ class Redstage_Mobilenow_Model_Themestore extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+ parent::_construct();
7
+ $this->_init("mobilenow/themestore");
8
+
9
+ }
10
+
11
+ }
12
 
app/code/community/Redstage/Mobilenow/Model/Themesubsettings.php CHANGED
@@ -1,18 +1,18 @@
1
- <?php
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
 
1
+ <?php
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
 
app/code/community/Redstage/Mobilenow/controllers/Adminhtml/IndexController.php CHANGED
@@ -1,33 +1,33 @@
1
- <?php
2
- class Redstage_Mobilenow_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
3
- {
4
- public function indexAction()
5
- {
6
- $this->loadLayout();
7
- $this->_title($this->__("Mobile Now App"));
8
- $this->renderLayout();
9
- }
10
- public function createthemeAction()
11
- {
12
- $this->loadLayout()->_setActiveMenu('mobilenow/createtheme');
13
- $this->renderLayout();
14
- }
15
- public function managethemeAction()
16
- {
17
- $this->loadLayout()->_setActiveMenu('mobilenow/managetheme');
18
- $this->renderLayout();
19
- }
20
- public function manageaccountAction()
21
- {
22
- $this->loadLayout()->_setActiveMenu('mobilenow/manageaccount');
23
- $this->renderLayout();
24
- }
25
- public function configoptAction()
26
- {
27
- Mage::app()->getResponse()->setRedirect(Mage::helper('adminhtml')->getUrl("adminhtml/system_config/"));
28
- }
29
- public function helpAction()
30
- {
31
- $this->_redirectUrl('http://mobilenowapp.com/');
32
- }
33
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->_title($this->__("Mobile Now App"));
8
+ $this->renderLayout();
9
+ }
10
+ public function createthemeAction()
11
+ {
12
+ $this->loadLayout()->_setActiveMenu('mobilenow/createtheme');
13
+ $this->renderLayout();
14
+ }
15
+ public function managethemeAction()
16
+ {
17
+ $this->loadLayout()->_setActiveMenu('mobilenow/managetheme');
18
+ $this->renderLayout();
19
+ }
20
+ public function manageaccountAction()
21
+ {
22
+ $this->loadLayout()->_setActiveMenu('mobilenow/manageaccount');
23
+ $this->renderLayout();
24
+ }
25
+ public function configoptAction()
26
+ {
27
+ Mage::app()->getResponse()->setRedirect(Mage::helper('adminhtml')->getUrl("adminhtml/system_config/"));
28
+ }
29
+ public function helpAction()
30
+ {
31
+ $this->_redirectUrl('http://mobilenowapp.com/');
32
+ }
33
  }
app/code/community/Redstage/Mobilenow/controllers/Adminhtml/MobilenowController.php CHANGED
@@ -1,911 +1,913 @@
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
-
76
- $post_data=$this->getRequest()->getPost();
77
- $button_type = $this->getRequest()->getParam('buttontype');
78
- // echo '<pre>'; print_r($post_data); echo '</pre>';exit;
79
- if($post_data['show_learn_more']!=1)$post_data['show_learn_more']=0;
80
- if ($post_data)
81
- {
82
- try
83
- {
84
- $themeSubSettingsModel = Mage::getModel('mobilenow/themesubsettings');
85
- $arg_array = array();
86
- if($this->getRequest()->getParam("active_tab")){
87
- $arg_array['active_tab'] = $this->getRequest()->getParam("active_tab");
88
- }
89
- if($this->getRequest()->getParam("design_subtab")){
90
- $arg_array['design_subtab'] = $this->getRequest()->getParam("design_subtab");
91
- }
92
- if($this->getRequest()->getParam("layout_subtab")){
93
- $arg_array['layout_subtab'] = $this->getRequest()->getParam("layout_subtab");
94
- }
95
- if($this->getRequest()->getParam("load_id")){
96
- $arg_array['load_id'] = $this->getRequest()->getParam("load_id");
97
- }
98
- if(!$post_data['hidden_action_val'])
99
- $arg_array['loadPreivew'] = 1;
100
- //This Condition saves the Theme and the respective Sub Settings
101
- if (!$this->getRequest()->getParam("savesubsettings"))
102
- {
103
- if( !$post_data['stores']) $this->_redirect("*/*/");
104
- $createnewThemeFlag='';
105
- $saveAsTop=$this->getRequest()->getParam("savenew");
106
- $post_data['user_agent_regex_values']=implode(',',$post_data['user_agent_regex_values']);
107
- //Save Theme
108
- // saving advanced settings
109
- $post_data['css_override'] = $post_data['custom_css'];
110
- $post_data['social_links'] = json_encode(array('show_social_links'=>$post_data['show_social_links'],
111
- 'facebook_link'=>$post_data['facebook_link'],
112
- 'twitter_link'=>$post_data['twitter_link'],
113
- 'pinterest_link'=>$post_data['pinterest_link'],
114
- 'google_link'=>$post_data['google_link']
115
- ));
116
- $post_data['cart_inputs'] = json_encode(array('show_cart_discount'=>$post_data['show_cart_discount'],
117
- 'show_cart_shipping_quote'=>$post_data['show_cart_shipping_quote']));
118
-
119
-
120
- $model = Mage::getModel("mobilenow/mobilenow");
121
- if(!$saveAsTop)
122
- {
123
- $model->addData($post_data)->setId($this->getRequest()->getParam("id"))->save();
124
- }
125
- else
126
- {
127
- $createnewThemeFlag=1;
128
- $post_data['theme_name']=$post_data['hidden_theme_sub_setting_name'];
129
- $model->addData($post_data)->save();
130
- }
131
- //Save Preset Subsettings with respect to Theme
132
- $saveProcessedData=Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data,'',$model->getId(),$createnewThemeFlag);
133
- //Check for values whether to save / Update in themesubsettings table
134
- $selectAttributes = array('themeid'=> $model->getId(), 'preview'=> 0);
135
- $selectCurrentRecord=$themeSubSettingsModel->loadByAttributes($selectAttributes);
136
- //$selectCurrentRecord=$themeSubSettingsModel->load($model->getId(),'themeid');
137
-
138
- // preset_sub_settings and preset_layout_sub_settings will have the same value
139
- if(!$saveAsTop)
140
- $saveProcessedData['parent']=$post_data['preset_sub_settings'];
141
- else
142
- $saveProcessedData['parent']=0;
143
- //If Condition will updated the record in themesubsettings table and else will insert a new record
144
- if($selectCurrentRecord->getId())
145
- {
146
- $ThemesubsetId=$selectCurrentRecord->getId();
147
- $themeSubSettingsModel->setData($saveProcessedData)->setId($ThemesubsetId)->save();
148
- }
149
- else
150
- {
151
- /* if($saveAsTop)
152
- {
153
- //Create new subsetting
154
- $themeSubSettingsModel->setData($saveProcessedData)->save();
155
- $saveProcessedData['parent']=$themeSubSettingsModel->getId();
156
- $saveProcessedData['themeid']=$model->getId();
157
- $saveProcessedData['subsetname']='';
158
- }*/
159
- //Insert the same record and assign it to a theme
160
- if($post_data['hidden_action_val'])
161
- $themeSubSettingsModel->setData($saveProcessedData)->save();
162
- }
163
-
164
- //Check for values whether to save / Update in themesubsettings table
165
- $themeSubSettingsModelDel = Mage::getModel('mobilenow/themesubsettings');
166
- $attributesDel = array('themeid'=> $model->getId(), 'preview'=> 1);
167
- $selectCurrentRecordDel=$themeSubSettingsModelDel->loadByAttributes($attributesDel);
168
- if($selectCurrentRecordDel->getId()){
169
- $selectCurrentRecordDel->delete();
170
- }
171
-
172
- $css_var_arr = $this->__setCssVariables($post_data);
173
- $csspath = Mage::getBaseDir('media').DS.'mobilenow_theme_css'.DS;
174
- $css_file_name = Mage::getBaseDir('media').DS.'mobilenow_theme_css'.DS.md5($model->getId()).'.css';
175
- mkdir($csspath);
176
- $css_string = Mage::helper('mobilenow/theme')->generateThemeCssFile($css_var_arr);
177
- if (file_exists($css_file_name) ){
178
- @unlink($css_file_name);
179
- }
180
- if($post_data['custom_css'] != ''){
181
- $css_string .= $post_data['custom_css'];
182
- }
183
-
184
- file_put_contents($css_file_name, $css_string);
185
- // generating homepage layout xml
186
-
187
-
188
- // echo $css_string;die;
189
- // echo $css_string;die;
190
-
191
-
192
- // generating homepage layout xml
193
- $home_xml_string = Mage::helper('mobilenow/homepage')->generateHomePageLayoutXML($post_data);
194
-
195
- if($home_xml_string != ''){
196
- $this->__saveHomePageLayoutXML($model->getId(),$home_xml_string,'cms_index_index',$post_data['stores']);
197
- }
198
-
199
-
200
- // generating default layout xml
201
- $default_xml_string = Mage::helper('mobilenow/homepage')->generateDefaultPageLayoutXML($post_data,md5($model->getId()));
202
- if($default_xml_string != ''){
203
- $this->__saveHomePageLayoutXML($model->getId(),$default_xml_string,'default',$post_data['stores']);
204
- }
205
-
206
- // generating catalog layout xml
207
- $catalog_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
208
- //echo $catalog_xml_string;die;
209
- if($catalog_xml_string != ''){
210
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_xml_string,'catalog_category_layered',$post_data['stores']);
211
- }
212
- // generating catalog layout xml
213
- $catalog_default_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
214
- //echo $catalog_xml_string;die;
215
- if($catalog_default_xml_string != ''){
216
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_default_xml_string,'catalog_category_default',$post_data['stores']);
217
- }
218
- // generating catalog search page layout xml
219
- $catalog_search_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogSearchPageLayoutXML($post_data);
220
- //echo $catalog_search_xml_string;die;
221
- if($catalog_search_xml_string != ''){
222
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_search_xml_string,'catalogsearch_result_index',$post_data['stores']);
223
- }
224
- if($this->getRequest()->getParam("id")){
225
- $cache = Mage::app()->getCache();
226
- $cache->remove("Mobilethemefront".$this->getRequest()->getParam("id"));
227
- $cache = Mage::app()->getCache();
228
- $cache->remove("Mobilethemepreview".$this->getRequest()->getParam("id"));
229
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Theme was updated successfully"));
230
- } else {
231
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Theme was successfully saved"));
232
- }
233
- Mage::getSingleton("adminhtml/session")->setMobilenowData(false);
234
- if ($this->getRequest()->getParam("back"))
235
- {
236
- $arg_array["id"] = $model->getId();
237
- $this->_redirect("*/*/edit", $arg_array);
238
- return;
239
- }
240
- $this->_redirect("*/*/",$arg_array);
241
- return;
242
- }
243
- /****************************************Save Theme Sub setting only starts here************************************/
244
- else
245
- {
246
- //Condition updates the value in each records (Edit subsettings)
247
- if($post_data['hidden_selected_val']!='')
248
- {
249
-
250
- $themeSubSettingsModel->load($post_data['hidden_selected_val']);
251
- //Condition to teset primary / Default subsetting
252
- if($themeSubSettingsModel->getPrimary()==1 || $themeSubSettingsModel->getDefaultsubsetting()==1)
253
- {
254
- //If Primary / Default throughs errior messgae
255
- Mage::getSingleton("adminhtml/session")->addError('Default / Pre-defined Preset Sub Settings Cannot be edited. Please create a new theme.');
256
- //$themeSubSettingsModel->setData($saveProcessedData)->setId($post_data['hidden_selected_val']);
257
- // Condition to check whether we are from new/edit action
258
- if ($this->getRequest()->getParam("back"))
259
- {
260
- //Set the parameter and redirect
261
- $arg_array["id"] = $this->getRequest()->getParam("id");
262
- $this->_redirect("*/*/edit", $arg_array);
263
- return;
264
- }
265
- $this->_redirect("*/*/",$arg_array);
266
- return;
267
- }
268
- else
269
- {
270
- $saveProcessedData=Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data,'',$this->getRequest()->getParam("id"));
271
- //Set The Data to update
272
- $getsubsetIdToSet=$themeSubSettingsModel->getcollection()->addFieldToFilter('themeid',$this->getRequest()->getParam("id"))->addFieldToFilter('preview','0')->getFirstItem();
273
- $saveProcessedData['parent']=$post_data['preset_sub_settings'];
274
- $currentSubsetId= $getsubsetIdToSet->getId();
275
- $themeSubSettingsModel->setData($saveProcessedData)->setId($currentSubsetId);
276
- $arg_array["load_id"] = $post_data['hidden_selected_val'];
277
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was sucessfully Updated"));
278
- }
279
- }
280
- else
281
- {
282
- $saveProcessedData=Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data,$button_type,$this->getRequest()->getParam("id"));
283
- //Set the Data to Insert
284
- $themeSubSettingsModel->setData($saveProcessedData);
285
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Preset Sub Settings was successfully saved"));
286
- }
287
- //save Data
288
- $themeSubSettingsModel->save();
289
- if ($this->getRequest()->getParam("back"))
290
- {
291
- $arg_array["id"] = $this->getRequest()->getParam("id");
292
- if(!$arg_array["load_id"])
293
- $arg_array["load_id"] = $themeSubSettingsModel->getId();
294
- $this->_redirect("*/*/edit", $arg_array);
295
- return;
296
- }
297
- $this->_redirect("*/*/",$arg_array);
298
- return;
299
- }
300
- }
301
- catch (Exception $e) {
302
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
303
- Mage::getSingleton("adminhtml/session")->setMobilenowData($this->getRequest()->getPost());
304
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
305
- return;
306
- }
307
-
308
- }
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');
598
- $coreLayoutLinkModel->setTheme('default');
599
- $coreLayoutLinkModel->setLayoutUpdateId($coreLayoutUpdateModel->getLayoutUpdateId());
600
- $coreLayoutLinkModel->save();
601
- $themeLayoutSettingsModel = Mage::getModel('mobilenow/themelayoutsettings');
602
- $themeLayoutSettingsModel->setThemeId($theme_id);
603
- $themeLayoutSettingsModel->setLayoutLinkId($coreLayoutLinkModel->getLayoutLinkId());
604
- $themeLayoutSettingsModel->setLayoutUpdateId($coreLayoutUpdateModel->getLayoutUpdateId());
605
- $themeLayoutSettingsModel->setPreview($preview);
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'];
712
- $css_var_arr['cart_link_color'] = $post_data['cart_link_color'];
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'];
720
-
721
- $css_var_arr['breadcrumb_bg_color'] = $post_data['breadcrumbs_bg_color'];
722
- $css_var_arr['breadcrumb_font_color'] = $post_data['breadcrumbs_font_color'];
723
-
724
- $css_var_arr['toolbar_bg_color'] = $post_data['toolbar_bg_color'];
725
- $css_var_arr['toolbar_text_color'] = $post_data['toolbar_text_color'];
726
- $css_var_arr['pagination_panel_bg_color'] = $post_data['pagination_bg_color'];
727
- $css_var_arr['pagination_button_bg_color'] = $post_data['pagination_button_bg_color'];
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'];
735
- $css_var_arr['review_star_color'] = $post_data['review_star_color'];
736
-
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
- $post_data=$this->getRequest()->getPost();
757
- if($post_data['show_learn_more']!=1)$post_data['show_learn_more']=0;
758
- if(!isset($post_data['stores']) || count($post_data['stores']) == 0){
759
- $post_data['stores'] = array(0);
760
- }
761
- if ($post_data & $post_data['stores'])
762
- {
763
- try
764
- {
765
- $themeSubSettingsModel = Mage::getModel('mobilenow/themesubsettings');
766
- if ($this->getRequest()->getParam("theme_id")){
767
- $theme_id = $this->getRequest()->getParam("theme_id");
768
- $model = Mage::getModel("mobilenow/mobilenow")->load($theme_id,'theme_id');
769
-
770
- $createnewThemeFlag='';
771
- //Save Preset Subsettings with respect to Theme
772
- $saveProcessedData=Mage::helper("mobilenow")->ProcessThemeDesignFormData($post_data,'',$model->getId(),$createnewThemeFlag,'1');
773
-
774
- //Check for values whether to save / Update in themesubsettings table
775
- $attributes = array('themeid'=> $model->getId(), 'preview'=> 1);
776
- $selectCurrentRecord=$themeSubSettingsModel->loadByAttributes($attributes);
777
- // preset_sub_settings and preset_layout_sub_settings will have the same value
778
- $saveProcessedData['parent']=$post_data['preset_sub_settings'];
779
- //If Condition will updated the record in themesubsettings table and else will insert a new record
780
- if($selectCurrentRecord->getId())
781
- {
782
- $ThemesubsetId=$selectCurrentRecord->getId();
783
- $themeSubSettingsModel->setData($saveProcessedData)->setId($ThemesubsetId)->save();
784
- }
785
- else
786
- {
787
- $saveProcessedData['preview'] = 1;
788
- //Insert the same record and assign it to a theme
789
- $themeSubSettingsModel->setData($saveProcessedData)->save();
790
- }
791
- $css_var_arr = $this->__setCssVariables($post_data);
792
- $csspath = Mage::getBaseDir('media').DS.'mobilenow_theme_css'.DS;
793
- $css_file_name = Mage::getBaseDir('media').DS.'mobilenow_theme_css'.DS.md5($model->getId().'_preview').'.css';
794
- mkdir($csspath);
795
- $css_string = Mage::helper('mobilenow/theme')->generateThemeCssFile($css_var_arr);
796
- if (file_exists($css_file_name) ){
797
- @unlink($css_file_name);
798
- }
799
- if($post_data['custom_css'] != ''){
800
- $css_string .= $post_data['custom_css'];
801
- }
802
-
803
- file_put_contents($css_file_name, $css_string);
804
- // generating homepage layout xml
805
-
806
-
807
- // echo $css_string;die;
808
- // echo $css_string;die;
809
-
810
-
811
- // generating homepage layout xml
812
- $home_xml_string = Mage::helper('mobilenow/homepage')->generateHomePageLayoutXML($post_data);
813
-
814
- if($home_xml_string != ''){
815
- $this->__saveHomePageLayoutXML($model->getId(),$home_xml_string,'cms_index_index',$post_data['stores'],1);
816
- }
817
-
818
-
819
- // generating default layout xml
820
- $default_xml_string = Mage::helper('mobilenow/homepage')->generateDefaultPageLayoutXML($post_data,md5($model->getId().'_preview'));
821
- if($default_xml_string != ''){
822
- $this->__saveHomePageLayoutXML($model->getId(),$default_xml_string,'default',$post_data['stores'],1);
823
- }
824
-
825
- // generating catalog layout xml
826
- $catalog_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
827
- //echo $catalog_xml_string;die;
828
- if($catalog_xml_string != ''){
829
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_xml_string,'catalog_category_layered',$post_data['stores'],1);
830
- }
831
- // generating catalog layout xml
832
- $catalog_default_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogPageLayoutXML($post_data);
833
- //echo $catalog_xml_string;die;
834
- if($catalog_default_xml_string != ''){
835
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_default_xml_string,'catalog_category_default',$post_data['stores'],1);
836
- }
837
- // generating catalog search page layout xml
838
- $catalog_search_xml_string = Mage::helper('mobilenow/catalogpage')->generateCatalogSearchPageLayoutXML($post_data);
839
- //echo $catalog_search_xml_string;die;
840
- if($catalog_search_xml_string != ''){
841
- $this->__saveHomePageLayoutXML($model->getId(),$catalog_search_xml_string,'catalogsearch_result_index',$post_data['stores'],1);
842
- }
843
-
844
- $cache = Mage::app()->getCache();
845
- $cache->remove("Mobilethemepreview".$theme_id);
846
-
847
- echo 'success';die;
848
-
849
- }else{
850
- echo 'failed';
851
-
852
- }
853
- die;
854
- }
855
- catch (Exception $e) {
856
- echo $e->getMessage();
857
-
858
- die;
859
- }
860
-
861
- }
862
- }
863
-
864
- public function uploadDesignImageAction(){
865
- $theme_id = $this->getRequest()->getParam("theme_id");
866
- $data = array();
867
- $data['mesasage'] = 'success';
868
- $data['preview_name'] = '';
869
- if ($this->getRequest()->getParam("upload_type") == 'logo'){
870
- if($_FILES['logo']['name']!=''){ $logo = time().str_replace(' ', '_',$_FILES['logo']['name']);}//else{$themeSubSettings['logo']='';}
871
- if(trim($logo)!='')
872
- {
873
- try{
874
- $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'logo'.DS.'preview'.DS.$theme_id;
875
- $uploader = new Varien_File_Uploader('logo');
876
- $uploader->setAllowedExtensions(array('jpg','jpeg','png','gif'));
877
- $uploader->setAllowCreateFolders(true);
878
- $uploader->setAllowRenameFiles(false);
879
- $uploader->setFilesDispersion(false);
880
- $uploader->save($path,$logo);
881
- $data['preview_name'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images'.DS.'logo'.DS.'preview'.DS.$theme_id.DS.$logo;
882
- } catch (Exception $e) {
883
- $data['mesasage'] = $e->getMessage();
884
- }
885
- }
886
- $data['logo_image_name'] = $logo;
887
- echo json_encode($data);
888
- exit;
889
- } else if($this->getRequest()->getParam("upload_type") == 'banner'){
890
- if($_FILES['homepage_banner']['name']!=''){ $logo = time().str_replace(' ', '_',$_FILES['homepage_banner']['name']);}//else{$themeSubSettings['logo']='';}
891
- if(trim($logo)!='')
892
- {
893
- try{
894
- $path = Mage::getBaseDir('media').DS.'mobilenow_theme_images'.DS.'banner'.DS.'preview'.DS.$theme_id;
895
- $uploader = new Varien_File_Uploader('homepage_banner');
896
- $uploader->setAllowedExtensions(array('jpg','jpeg','png','gif'));
897
- $uploader->setAllowCreateFolders(true);
898
- $uploader->setAllowRenameFiles(false);
899
- $uploader->setFilesDispersion(false);
900
- $uploader->save($path,$logo);
901
- $data['preview_name'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'mobilenow_theme_images'.DS.'banner'.DS.'preview'.DS.$theme_id.DS.$logo;
902
- } catch (Exception $e) {
903
- $data['mesasage'] = $e->getMessage();
904
- }
905
- }
906
- $data['banner_image_name'] = $logo;
907
- echo json_encode($data);
908
- exit;
909
- }
910
- }
911
- }
 
 
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');
598
+ $coreLayoutLinkModel->setTheme('default');
599
+ $coreLayoutLinkModel->setLayoutUpdateId($coreLayoutUpdateModel->getLayoutUpdateId());
600
+ $coreLayoutLinkModel->save();
601
+ $themeLayoutSettingsModel = Mage::getModel('mobilenow/themelayoutsettings');
602
+ $themeLayoutSettingsModel->setThemeId($theme_id);
603
+ $themeLayoutSettingsModel->setLayoutLinkId($coreLayoutLinkModel->getLayoutLinkId());
604
+ $themeLayoutSettingsModel->setLayoutUpdateId($coreLayoutUpdateModel->getLayoutUpdateId());
605
+ $themeLayoutSettingsModel->setPreview($preview);
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'];
712
+ $css_var_arr['cart_link_color'] = $post_data['cart_link_color'];
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'];
720
+
721
+ $css_var_arr['breadcrumb_bg_color'] = $post_data['breadcrumbs_bg_color'];
722
+ $css_var_arr['breadcrumb_font_color'] = $post_data['breadcrumbs_font_color'];
723
+
724
+ $css_var_arr['toolbar_bg_color'] = $post_data['toolbar_bg_color'];
725
+ $css_var_arr['toolbar_text_color'] = $post_data['toolbar_text_color'];
726
+ $css_var_arr['pagination_panel_bg_color'] = $post_data['pagination_bg_color'];
727
+ $css_var_arr['pagination_button_bg_color'] = $post_data['pagination_button_bg_color'];
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'];
735
+ $css_var_arr['review_star_color'] = $post_data['review_star_color'];
736
+
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
+ }
app/code/community/Redstage/Mobilenow/controllers/Adminhtml/MobilenowbackendController.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- class Redstage_Mobilenow_Adminhtml_MobilenowbackendController extends Mage_Adminhtml_Controller_Action
3
- {
4
- public function indexAction()
5
- {
6
- $this->loadLayout();
7
- $this->_title($this->__("Backend Page Title"));
8
- $this->renderLayout();
9
- }
10
  }
1
+ <?php
2
+ class Redstage_Mobilenow_Adminhtml_MobilenowbackendController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->_title($this->__("Backend Page Title"));
8
+ $this->renderLayout();
9
+ }
10
  }
app/code/community/Redstage/Mobilenow/controllers/IndexController.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
- class Redstage_Mobilenow_IndexController extends Mage_Core_Controller_Front_Action{
3
- public function IndexAction() {
4
-
5
- $this->loadLayout();
6
- $this->getLayout()->getBlock("head")->setTitle($this->__("Mobile Now"));
7
- $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
- $breadcrumbs->addCrumb("home", array(
9
- "label" => $this->__("Home Page"),
10
- "title" => $this->__("Home Page"),
11
- "link" => Mage::getBaseUrl()
12
- ));
13
-
14
- $breadcrumbs->addCrumb("mobile now", array(
15
- "label" => $this->__("Mobile Now"),
16
- "title" => $this->__("Mobile Now")
17
- ));
18
- $this->renderLayout();
19
-
20
- }
21
  }
1
+ <?php
2
+ class Redstage_Mobilenow_IndexController extends Mage_Core_Controller_Front_Action{
3
+ public function IndexAction() {
4
+
5
+ $this->loadLayout();
6
+ $this->getLayout()->getBlock("head")->setTitle($this->__("Mobile Now"));
7
+ $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
+ $breadcrumbs->addCrumb("home", array(
9
+ "label" => $this->__("Home Page"),
10
+ "title" => $this->__("Home Page"),
11
+ "link" => Mage::getBaseUrl()
12
+ ));
13
+
14
+ $breadcrumbs->addCrumb("mobile now", array(
15
+ "label" => $this->__("Mobile Now"),
16
+ "title" => $this->__("Mobile Now")
17
+ ));
18
+ $this->renderLayout();
19
+
20
+ }
21
  }
app/code/community/Redstage/Mobilenow/etc/adminhtml.xml CHANGED
@@ -1,23 +1,23 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <acl>
4
- <resources>
5
- <admin>
6
- <children>
7
- <system>
8
- <children>
9
- <config>
10
- <children>
11
- <mobilenowsettings translate="title" module="mobilenow">
12
- <title>Settings Section</title>
13
- <sort_order>101</sort_order>
14
- </mobilenowsettings>
15
- </children>
16
- </config>
17
- </children>
18
- </system>
19
- </children>
20
- </admin>
21
- </resources>
22
- </acl>
23
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <mobilenowsettings translate="title" module="mobilenow">
12
+ <title>Settings Section</title>
13
+ <sort_order>101</sort_order>
14
+ </mobilenowsettings>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
  </config>
app/code/community/Redstage/Mobilenow/etc/config.xml CHANGED
@@ -1,212 +1,212 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Redstage_Mobilenow>
5
- <version>0.1.4</version>
6
- </Redstage_Mobilenow>
7
- </modules>
8
- <frontend>
9
- <routers>
10
- <mobilenow>
11
- <use>standard</use>
12
- <args>
13
- <module>Redstage_Mobilenow</module>
14
- <frontName>mobilenow</frontName>
15
- </args>
16
- </mobilenow>
17
- </routers>
18
- <layout>
19
- <updates>
20
- <mobilenow>
21
- <file>mobilenow.xml</file>
22
- </mobilenow>
23
- </updates>
24
- </layout>
25
- </frontend>
26
- <global>
27
- <helpers>
28
- <cms>
29
- <rewrite>
30
- <page>Redstage_Mobilenow_Helper_Cms_Page</page>
31
- </rewrite>
32
- </cms>
33
- <mobilenow>
34
- <class>Redstage_Mobilenow_Helper</class>
35
- </mobilenow>
36
- </helpers>
37
- <blocks>
38
- <mobilenow>
39
- <class>Redstage_Mobilenow_Block</class>
40
- </mobilenow>
41
- </blocks>
42
- <models>
43
- <core>
44
- <rewrite>
45
- <design_package>Redstage_Mobilenow_Model_Design_Package</design_package>
46
- <layout_update>Redstage_Mobilenow_Model_Layout_Update</layout_update>
47
- </rewrite>
48
- </core>
49
- <core_resource>
50
- <rewrite>
51
- <layout>Redstage_Mobilenow_Model_Resource_Layout</layout>
52
- </rewrite>
53
- </core_resource>
54
-
55
- <mobilenow>
56
- <class>Redstage_Mobilenow_Model</class>
57
- <resourceModel>mobilenow_mysql4</resourceModel>
58
- </mobilenow>
59
- <mobilenow_mysql4>
60
- <class>Redstage_Mobilenow_Model_Mysql4</class>
61
- <entities>
62
- <mobilenow>
63
- <table>themesettings</table>
64
- </mobilenow>
65
- <themestore>
66
- <table>theme_store_id</table>
67
- </themestore>
68
- <themesubsettings>
69
- <table>themesubsettings</table>
70
- </themesubsettings>
71
- <corelayoutupdate>
72
- <table>core_layout_update</table>
73
- </corelayoutupdate>
74
- <corelayoutlink>
75
- <table>core_layout_link</table>
76
- </corelayoutlink>
77
- <themelayoutsettings>
78
- <table>themelayoutsettings</table>
79
- </themelayoutsettings>
80
- </entities>
81
- </mobilenow_mysql4>
82
- </models>
83
- <resources>
84
- <mobilenow_setup>
85
- <setup>
86
- <module>Redstage_Mobilenow</module>
87
- </setup>
88
- <connection>
89
- <use>core_setup</use>
90
- </connection>
91
- </mobilenow_setup>
92
- <mobilenow_write>
93
- <connection>
94
- <use>core_write</use>
95
- </connection>
96
- </mobilenow_write>
97
- <mobilenow_read>
98
- <connection>
99
- <use>core_read</use>
100
- </connection>
101
- </mobilenow_read>
102
- </resources>
103
- </global>
104
- <admin>
105
- <routers>
106
- <mobilenow>
107
- <use>admin</use>
108
- <args>
109
- <module>Redstage_Mobilenow</module>
110
- <frontName>mobilenow</frontName>
111
- </args>
112
- </mobilenow>
113
- </routers>
114
- </admin>
115
- <adminhtml>
116
- <menu>
117
- <mobilenow module="mobilenow">
118
- <title>MobileNow</title>
119
- <sort_order>90</sort_order>
120
- <children>
121
- <!--<mobilenowbackend module="mobilenow">
122
- <title>Backend Page Title</title>
123
- <sort_order>0</sort_order>
124
- <action>mobilenow/adminhtml_mobilenowbackend</action>
125
- </mobilenowbackend>-->
126
- <createtheme module="mobilenow">
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>
143
- <sort_order>4</sort_order>
144
- <action>adminhtml/system_config/edit/section/mobilenowsettings</action>
145
- </configopt>
146
- <help module="mobilenow">
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>
153
- </menu>
154
- <acl>
155
- <resources>
156
- <all>
157
- <title>Allow Everything</title>
158
- </all>
159
- <admin>
160
- <children>
161
- <mobilenow translate="title" module="mobilenow">
162
- <title>MobileNow</title>
163
- <sort_order>1000</sort_order>
164
- <children>
165
- <!--<mobilenowbackend translate="title">
166
- <title>Backend Page Title</title>
167
- </mobilenowbackend>-->
168
- <createtheme translate="title">
169
- <title>Add New Mobile Theme</title>
170
- <sort_order>1</sort_order>
171
- </createtheme>
172
- <managetheme translate="title">
173
- <title>Manage Mobile Themes</title>
174
- <sort_order>2</sort_order>
175
- </managetheme>
176
- <manageaccount translate="title">
177
- <title>Manage/Upgrade My Account</title>
178
- <sort_order>3</sort_order>
179
- </manageaccount>
180
- <configopt translate="title">
181
- <title>Configuration Options</title>
182
- <sort_order>4</sort_order>
183
- </configopt>
184
- <help translate="title">
185
- <title>Help &amp; Documentation</title>
186
- <sort_order>5</sort_order>
187
- </help>
188
- </children>
189
- </mobilenow>
190
- </children>
191
- </admin>
192
- </resources>
193
- </acl>
194
- <layout>
195
- <updates>
196
- <mobilenow>
197
- <file>mobilenow.xml</file>
198
- </mobilenow>
199
- </updates>
200
- </layout>
201
- </adminhtml>
202
- <stores>
203
- <admin>
204
- <dev>
205
- <debug>
206
- <template_hints>0</template_hints>
207
- <template_hints_blocks>0</template_hints_blocks>
208
- </debug>
209
- </dev>
210
- </admin>
211
- </stores>
212
- </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Redstage_Mobilenow>
5
+ <version>0.1.4</version>
6
+ </Redstage_Mobilenow>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <mobilenow>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Redstage_Mobilenow</module>
14
+ <frontName>mobilenow</frontName>
15
+ </args>
16
+ </mobilenow>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <mobilenow>
21
+ <file>mobilenow.xml</file>
22
+ </mobilenow>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <helpers>
28
+ <cms>
29
+ <rewrite>
30
+ <page>Redstage_Mobilenow_Helper_Cms_Page</page>
31
+ </rewrite>
32
+ </cms>
33
+ <mobilenow>
34
+ <class>Redstage_Mobilenow_Helper</class>
35
+ </mobilenow>
36
+ </helpers>
37
+ <blocks>
38
+ <mobilenow>
39
+ <class>Redstage_Mobilenow_Block</class>
40
+ </mobilenow>
41
+ </blocks>
42
+ <models>
43
+ <core>
44
+ <rewrite>
45
+ <design_package>Redstage_Mobilenow_Model_Design_Package</design_package>
46
+ <layout_update>Redstage_Mobilenow_Model_Layout_Update</layout_update>
47
+ </rewrite>
48
+ </core>
49
+ <core_resource>
50
+ <rewrite>
51
+ <layout>Redstage_Mobilenow_Model_Resource_Layout</layout>
52
+ </rewrite>
53
+ </core_resource>
54
+
55
+ <mobilenow>
56
+ <class>Redstage_Mobilenow_Model</class>
57
+ <resourceModel>mobilenow_mysql4</resourceModel>
58
+ </mobilenow>
59
+ <mobilenow_mysql4>
60
+ <class>Redstage_Mobilenow_Model_Mysql4</class>
61
+ <entities>
62
+ <mobilenow>
63
+ <table>themesettings</table>
64
+ </mobilenow>
65
+ <themestore>
66
+ <table>theme_store_id</table>
67
+ </themestore>
68
+ <themesubsettings>
69
+ <table>themesubsettings</table>
70
+ </themesubsettings>
71
+ <corelayoutupdate>
72
+ <table>core_layout_update</table>
73
+ </corelayoutupdate>
74
+ <corelayoutlink>
75
+ <table>core_layout_link</table>
76
+ </corelayoutlink>
77
+ <themelayoutsettings>
78
+ <table>themelayoutsettings</table>
79
+ </themelayoutsettings>
80
+ </entities>
81
+ </mobilenow_mysql4>
82
+ </models>
83
+ <resources>
84
+ <mobilenow_setup>
85
+ <setup>
86
+ <module>Redstage_Mobilenow</module>
87
+ </setup>
88
+ <connection>
89
+ <use>core_setup</use>
90
+ </connection>
91
+ </mobilenow_setup>
92
+ <mobilenow_write>
93
+ <connection>
94
+ <use>core_write</use>
95
+ </connection>
96
+ </mobilenow_write>
97
+ <mobilenow_read>
98
+ <connection>
99
+ <use>core_read</use>
100
+ </connection>
101
+ </mobilenow_read>
102
+ </resources>
103
+ </global>
104
+ <admin>
105
+ <routers>
106
+ <mobilenow>
107
+ <use>admin</use>
108
+ <args>
109
+ <module>Redstage_Mobilenow</module>
110
+ <frontName>mobilenow</frontName>
111
+ </args>
112
+ </mobilenow>
113
+ </routers>
114
+ </admin>
115
+ <adminhtml>
116
+ <menu>
117
+ <mobilenow module="mobilenow">
118
+ <title>MobileNow</title>
119
+ <sort_order>90</sort_order>
120
+ <children>
121
+ <!--<mobilenowbackend module="mobilenow">
122
+ <title>Backend Page Title</title>
123
+ <sort_order>0</sort_order>
124
+ <action>mobilenow/adminhtml_mobilenowbackend</action>
125
+ </mobilenowbackend>-->
126
+ <createtheme module="mobilenow">
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>
143
+ <sort_order>4</sort_order>
144
+ <action>adminhtml/system_config/edit/section/mobilenowsettings</action>
145
+ </configopt>
146
+ <help module="mobilenow">
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>
153
+ </menu>
154
+ <acl>
155
+ <resources>
156
+ <all>
157
+ <title>Allow Everything</title>
158
+ </all>
159
+ <admin>
160
+ <children>
161
+ <mobilenow translate="title" module="mobilenow">
162
+ <title>MobileNow</title>
163
+ <sort_order>1000</sort_order>
164
+ <children>
165
+ <!--<mobilenowbackend translate="title">
166
+ <title>Backend Page Title</title>
167
+ </mobilenowbackend>-->
168
+ <createtheme translate="title">
169
+ <title>Add New Mobile Theme</title>
170
+ <sort_order>1</sort_order>
171
+ </createtheme>
172
+ <managetheme translate="title">
173
+ <title>Manage Mobile Themes</title>
174
+ <sort_order>2</sort_order>
175
+ </managetheme>
176
+ <manageaccount translate="title">
177
+ <title>Manage/Upgrade My Account</title>
178
+ <sort_order>3</sort_order>
179
+ </manageaccount>
180
+ <configopt translate="title">
181
+ <title>Configuration Options</title>
182
+ <sort_order>4</sort_order>
183
+ </configopt>
184
+ <help translate="title">
185
+ <title>Help &amp; Documentation</title>
186
+ <sort_order>5</sort_order>
187
+ </help>
188
+ </children>
189
+ </mobilenow>
190
+ </children>
191
+ </admin>
192
+ </resources>
193
+ </acl>
194
+ <layout>
195
+ <updates>
196
+ <mobilenow>
197
+ <file>mobilenow.xml</file>
198
+ </mobilenow>
199
+ </updates>
200
+ </layout>
201
+ </adminhtml>
202
+ <stores>
203
+ <admin>
204
+ <dev>
205
+ <debug>
206
+ <template_hints>0</template_hints>
207
+ <template_hints_blocks>0</template_hints_blocks>
208
+ </debug>
209
+ </dev>
210
+ </admin>
211
+ </stores>
212
+ </config>
app/code/community/Redstage/Mobilenow/etc/system.xml CHANGED
@@ -1,122 +1,122 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <tabs>
4
- <mobilenow translate="label" module="mobilenow">
5
- <label>Mobile Now</label>
6
- <sort_order>101</sort_order>
7
- </mobilenow>
8
- </tabs>
9
- <sections>
10
- <mobilenowsettings translate="label" module="mobilenow">
11
- <label>Settings</label>
12
- <tab>mobilenow</tab>
13
- <frontend_type>text</frontend_type>
14
- <sort_order>100</sort_order>
15
- <show_in_default>1</show_in_default>
16
- <show_in_website>1</show_in_website>
17
- <show_in_store>1</show_in_store>
18
- <groups>
19
- <mobilenowaccount translate="label">
20
- <label>Mobile Now Account Settings</label>
21
- <frontend_type>text</frontend_type>
22
- <sort_order>0</sort_order>
23
- <show_in_default>1</show_in_default>
24
- <show_in_website>1</show_in_website>
25
- <show_in_store>1</show_in_store>
26
- <comment><![CDATA[
27
- <table class="form-list" id="current_membership_level" cellpadding="0" cellspaceing="0" width="63%">
28
- <tr id="current_membership_level_error_row">
29
- <td colspan="2"><span id="connect_error" style="color:red"></span></td>
30
- </tr>
31
- <tr id="current_membership_level_text_row">
32
- <td class="label">Current Membership Level:</td>
33
- <td class="value"><strong>No Account Set Up - <a href="https://mobilenowapp.com/am/login/index" target="_blank">Click here to Get Your 30 Day Free Trial!</strong></a></td>
34
- </tr>
35
- </table>
36
- ]]></comment>
37
- <fields>
38
- <email translate="label">
39
- <label>E-mail</label>
40
- <frontend_type>text</frontend_type>
41
- <validate>validate-email</validate>
42
- <sort_order>1</sort_order>
43
- <show_in_default>1</show_in_default>
44
- <show_in_website>1</show_in_website>
45
- <show_in_store>1</show_in_store>
46
- <comment>Please enter email</comment>
47
- </email>
48
- <username translate="label">
49
- <label>Username</label>
50
- <frontend_type>text</frontend_type>
51
- <sort_order>2</sort_order>
52
- <show_in_default>1</show_in_default>
53
- <show_in_website>1</show_in_website>
54
- <show_in_store>1</show_in_store>
55
- <comment>Please enter username</comment>
56
- </username>
57
- <password translate="label">
58
- <label>Password</label>
59
- <frontend_type>password</frontend_type>
60
- <sort_order>3</sort_order>
61
- <show_in_default>1</show_in_default>
62
- <show_in_website>1</show_in_website>
63
- <show_in_store>1</show_in_store>
64
- <comment>Please enter password</comment>
65
- </password>
66
- <subscription translate="label">
67
- <label>Password</label>
68
- <frontend_type>text</frontend_type>
69
- <sort_order>3</sort_order>
70
- <show_in_default>1</show_in_default>
71
- <show_in_website>1</show_in_website>
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>
78
- <frontend_model>mobilenow/adminhtml_system_config_form_link</frontend_model>
79
- <sort_order>4</sort_order>
80
- <show_in_default>1</show_in_default>
81
- <show_in_website>1</show_in_website>
82
- <show_in_store>1</show_in_store>
83
- </link>
84
-
85
- <button translate="label">
86
- <label></label>
87
- <frontend_type>button</frontend_type>
88
- <frontend_model>mobilenow/adminhtml_system_config_form_button</frontend_model>
89
- <sort_order>5</sort_order>
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/am/login/index" 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>
122
- </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <mobilenow translate="label" module="mobilenow">
5
+ <label>Mobile Now</label>
6
+ <sort_order>101</sort_order>
7
+ </mobilenow>
8
+ </tabs>
9
+ <sections>
10
+ <mobilenowsettings translate="label" module="mobilenow">
11
+ <label>Settings</label>
12
+ <tab>mobilenow</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>100</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <mobilenowaccount translate="label">
20
+ <label>Mobile Now Account Settings</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>0</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <comment><![CDATA[
27
+ <table class="form-list" id="current_membership_level" cellpadding="0" cellspaceing="0" width="63%">
28
+ <tr id="current_membership_level_error_row">
29
+ <td colspan="2"><span id="connect_error" style="color:red"></span></td>
30
+ </tr>
31
+ <tr id="current_membership_level_text_row">
32
+ <td class="label">Current Membership Level:</td>
33
+ <td class="value"><strong>No Account Set Up - <a href="https://mobilenowapp.com/am/login/index" target="_blank">Click here to Get Your 30 Day Free Trial!</strong></a></td>
34
+ </tr>
35
+ </table>
36
+ ]]></comment>
37
+ <fields>
38
+ <email translate="label">
39
+ <label>E-mail</label>
40
+ <frontend_type>text</frontend_type>
41
+ <validate>validate-email</validate>
42
+ <sort_order>1</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>1</show_in_store>
46
+ <comment>Please enter email</comment>
47
+ </email>
48
+ <username translate="label">
49
+ <label>Username</label>
50
+ <frontend_type>text</frontend_type>
51
+ <sort_order>2</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ <show_in_store>1</show_in_store>
55
+ <comment>Please enter username</comment>
56
+ </username>
57
+ <password translate="label">
58
+ <label>Password</label>
59
+ <frontend_type>password</frontend_type>
60
+ <sort_order>3</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>1</show_in_website>
63
+ <show_in_store>1</show_in_store>
64
+ <comment>Please enter password</comment>
65
+ </password>
66
+ <subscription translate="label">
67
+ <label>Password</label>
68
+ <frontend_type>text</frontend_type>
69
+ <sort_order>3</sort_order>
70
+ <show_in_default>1</show_in_default>
71
+ <show_in_website>1</show_in_website>
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>
78
+ <frontend_model>mobilenow/adminhtml_system_config_form_link</frontend_model>
79
+ <sort_order>4</sort_order>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>1</show_in_store>
83
+ </link>
84
+
85
+ <button translate="label">
86
+ <label></label>
87
+ <frontend_type>button</frontend_type>
88
+ <frontend_model>mobilenow/adminhtml_system_config_form_button</frontend_model>
89
+ <sort_order>5</sort_order>
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>
122
+ </config>
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,98 +1,95 @@
1
- <?php
2
- $installer = $this;
3
- $installer->startSetup();
4
- $sql=<<<SQLTEXT
5
- DROP TABLE IF EXISTS {$this->getTable('theme_store_id')};
6
- DROP TABLE IF EXISTS {$this->getTable('themesubsettings')};
7
- DROP TABLE IF EXISTS {$this->getTable('themelayoutsettings')};
8
- DROP TABLE IF EXISTS {$this->getTable('themesettings')};
9
- CREATE TABLE IF NOT EXISTS `themesettings` (
10
- `theme_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
11
- `theme_name` varchar(255) NOT NULL,
12
- `mobile_device_design_interface` int(11) NOT NULL,
13
- `user_agent_regex_values` varchar(255) NOT NULL,
14
- `user_agent_regex_custom_values` varchar(255) NOT NULL,
15
- `exclude_user_agent_regex_custom_values` varchar(255) NOT NULL,
16
- `ip_override` VARCHAR( 255 ) NOT NULL,
17
- `css_override` TEXT NOT NULL,
18
- `social_links` VARCHAR( 255 ) NOT NULL,
19
- `cart_inputs` VARCHAR( 255 ) NOT NULL,
20
- `analytics` TEXT NOT NULL,
21
- `status` int(11) NOT NULL,
22
- `theme_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
23
- PRIMARY KEY (`theme_id`)
24
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
25
- CREATE TABLE {$this->getTable('theme_store_id')} (
26
- `theme_id` int(11) unsigned NOT NULL COMMENT 'Theme ID',
27
- `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
28
- PRIMARY KEY (`theme_id`,`store_id`)
29
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
30
- ALTER TABLE {$this->getTable('theme_store_id')}
31
- ADD CONSTRAINT `FK_THEME_ID` FOREIGN KEY (`theme_id`) REFERENCES {$this->getTable('themesettings')} (`theme_id`) ON DELETE CASCADE ON UPDATE CASCADE,
32
- ADD CONSTRAINT `FK_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE;
33
- CREATE TABLE IF NOT EXISTS `themesubsettings` (
34
- `id` int(10) NOT NULL AUTO_INCREMENT,
35
- `defaultsubsetting` int(10) NOT NULL,
36
- `subsetname` varchar(255) NOT NULL,
37
- `primary` int(10) NOT NULL,
38
- `logo` varchar(255) NOT NULL,
39
- `bgcolor` varchar(255) NOT NULL,
40
- `links` text NOT NULL,
41
- `textcolor` varchar(255) NOT NULL,
42
- `searchcart` text NOT NULL,
43
- `homepagebanner` text NOT NULL,
44
- `subheadersection` text NOT NULL,
45
- `categories` text NOT NULL,
46
- `newsletter` text NOT NULL,
47
- `homepagecustomcode` text NOT NULL,
48
- `prefootersection` text NOT NULL,
49
- `footersection` text NOT NULL,
50
- `buttoncolor` text NOT NULL,
51
- `breadcrumb` text NOT NULL,
52
- `catalogview` text NOT NULL,
53
- `numberofproductsperpage` varchar(255) NOT NULL,
54
- `numberofproductschoice` varchar(255) NOT NULL,
55
- `catalogsortby` text NOT NULL,
56
- `toolbarcolor` text NOT NULL,
57
- `pagination` text NOT NULL,
58
- `catalogimagedetails` text NOT NULL,
59
- `catalogproductcolor` text NOT NULL,
60
- `catalogreviews` text NOT NULL,
61
- `cataloglearnmore` text NOT NULL,
62
- `catalogaddtocart` text NOT NULL,
63
- `cataloggridlines` text NOT NULL,
64
- `producttitlecolor` text NOT NULL,
65
- `productimagedetails` text NOT NULL,
66
- `showproductdeails` text NOT NULL,
67
- `homepagelayoutmain` text NOT NULL,
68
- `cataloglayoutmain` text NOT NULL,
69
- `cataloglayoutgrid` text NOT NULL,
70
- `cataloglayoutlist` text NOT NULL,
71
- `productlayoutmain` text NOT NULL,
72
- `parent` INT(10) NOT NULL,
73
- `themeid` int(10) NOT NULL,
74
- `preview` tinyint(1) NOT NULL DEFAULT '0',
75
- `css_filename` VARCHAR( 255 ) NOT NULL,
76
- `dateinserted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
77
- PRIMARY KEY (`id`)
78
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
79
- CREATE TABLE IF NOT EXISTS `themelayoutsettings` (
80
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
81
- `theme_id` int(11) unsigned NOT NULL,
82
- `layout_link_id` int(10) unsigned NOT NULL,
83
- `preview` tinyint(1) NOT NULL DEFAULT '0',
84
- PRIMARY KEY (`id`),
85
- KEY `theme_id` (`theme_id`),
86
- KEY `layout_link_id` (`layout_link_id`)
87
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
88
- ALTER TABLE `themelayoutsettings`
89
- ADD CONSTRAINT `themelayoutsettings_ibfk_2` FOREIGN KEY (`theme_id`) REFERENCES `themesettings` (`theme_id`) ON DELETE CASCADE ON UPDATE CASCADE,
90
- ADD CONSTRAINT `themelayoutsettings_ibfk_1` FOREIGN KEY (`layout_link_id`) REFERENCES `core_layout_link` (`layout_link_id`) ON DELETE CASCADE ON UPDATE CASCADE;
91
- SQLTEXT;
92
-
93
- $installer->run($sql);
94
- //demo
95
- //Mage::getModel('core/url_rewrite')->setId(null);
96
- //demo
97
- $installer->endSetup();
98
-
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $sql=<<<SQLTEXT
5
+ DROP TABLE IF EXISTS {$this->getTable('theme_store_id')};
6
+ DROP TABLE IF EXISTS {$this->getTable('themesubsettings')};
7
+ DROP TABLE IF EXISTS {$this->getTable('themelayoutsettings')};
8
+ DROP TABLE IF EXISTS {$this->getTable('themesettings')};
9
+ CREATE TABLE IF NOT EXISTS {$this->getTable('themesettings')} (
10
+ `theme_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
11
+ `theme_name` varchar(255) NOT NULL,
12
+ `mobile_device_design_interface` int(11) NOT NULL,
13
+ `user_agent_regex_values` varchar(255) NOT NULL,
14
+ `user_agent_regex_custom_values` varchar(255) NOT NULL,
15
+ `exclude_user_agent_regex_custom_values` varchar(255) NOT NULL,
16
+ `ip_override` VARCHAR( 255 ) NOT NULL,
17
+ `css_override` TEXT NOT NULL,
18
+ `social_links` VARCHAR( 255 ) NOT NULL,
19
+ `cart_inputs` VARCHAR( 255 ) NOT NULL,
20
+ `analytics` TEXT NOT NULL,
21
+ `status` int(11) NOT NULL,
22
+ `theme_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
23
+ PRIMARY KEY (`theme_id`)
24
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
25
+ CREATE TABLE {$this->getTable('theme_store_id')} (
26
+ `theme_id` int(11) unsigned NOT NULL COMMENT 'Theme ID',
27
+ `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
28
+ PRIMARY KEY (`theme_id`,`store_id`)
29
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
30
+ ALTER TABLE {$this->getTable('theme_store_id')}
31
+ ADD CONSTRAINT `FK_THEME_ID` FOREIGN KEY (`theme_id`) REFERENCES {$this->getTable('themesettings')} (`theme_id`) ON DELETE CASCADE ON UPDATE CASCADE,
32
+ ADD CONSTRAINT `FK_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE;
33
+ CREATE TABLE IF NOT EXISTS {$this->getTable('themesubsettings')} (
34
+ `id` int(10) NOT NULL AUTO_INCREMENT,
35
+ `defaultsubsetting` int(10) NOT NULL,
36
+ `subsetname` varchar(255) NOT NULL,
37
+ `primary` int(10) NOT NULL,
38
+ `logo` varchar(255) NOT NULL,
39
+ `bgcolor` varchar(255) NOT NULL,
40
+ `links` text NOT NULL,
41
+ `textcolor` varchar(255) NOT NULL,
42
+ `searchcart` text NOT NULL,
43
+ `homepagebanner` text NOT NULL,
44
+ `subheadersection` text NOT NULL,
45
+ `categories` text NOT NULL,
46
+ `newsletter` text NOT NULL,
47
+ `homepagecustomcode` text NOT NULL,
48
+ `prefootersection` text NOT NULL,
49
+ `footersection` text NOT NULL,
50
+ `buttoncolor` text NOT NULL,
51
+ `breadcrumb` text NOT NULL,
52
+ `catalogview` text NOT NULL,
53
+ `numberofproductsperpage` varchar(255) NOT NULL,
54
+ `numberofproductschoice` varchar(255) NOT NULL,
55
+ `catalogsortby` text NOT NULL,
56
+ `toolbarcolor` text NOT NULL,
57
+ `pagination` text NOT NULL,
58
+ `catalogimagedetails` text NOT NULL,
59
+ `catalogproductcolor` text NOT NULL,
60
+ `catalogreviews` text NOT NULL,
61
+ `cataloglearnmore` text NOT NULL,
62
+ `catalogaddtocart` text NOT NULL,
63
+ `cataloggridlines` text NOT NULL,
64
+ `producttitlecolor` text NOT NULL,
65
+ `productimagedetails` text NOT NULL,
66
+ `showproductdeails` text NOT NULL,
67
+ `homepagelayoutmain` text NOT NULL,
68
+ `cataloglayoutmain` text NOT NULL,
69
+ `cataloglayoutgrid` text NOT NULL,
70
+ `cataloglayoutlist` text NOT NULL,
71
+ `productlayoutmain` text NOT NULL,
72
+ `parent` INT(10) NOT NULL,
73
+ `themeid` int(10) NOT NULL,
74
+ `preview` tinyint(1) NOT NULL DEFAULT '0',
75
+ `css_filename` VARCHAR( 255 ) NOT NULL,
76
+ `dateinserted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
77
+ PRIMARY KEY (`id`)
78
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
79
+ CREATE TABLE IF NOT EXISTS {$this->getTable('themelayoutsettings')} (
80
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
81
+ `theme_id` int(11) unsigned NOT NULL,
82
+ `layout_link_id` int(10) unsigned NOT NULL,
83
+ `preview` tinyint(1) NOT NULL DEFAULT '0',
84
+ PRIMARY KEY (`id`),
85
+ KEY `theme_id` (`theme_id`),
86
+ KEY `layout_link_id` (`layout_link_id`)
87
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
88
+ ALTER TABLE {$this->getTable('themelayoutsettings')}
89
+ ADD CONSTRAINT `themelayoutsettings_ibfk_2` FOREIGN KEY (`theme_id`) REFERENCES {$this->getTable('themesettings')} (`theme_id`) ON DELETE CASCADE ON UPDATE CASCADE,
90
+ ADD CONSTRAINT `themelayoutsettings_ibfk_1` FOREIGN KEY (`layout_link_id`) REFERENCES {$this->getTable('core_layout_link')} (`layout_link_id`) ON DELETE CASCADE ON UPDATE CASCADE;
91
+ SQLTEXT;
92
+
93
+ $installer->run($sql);
94
+ $installer->endSetup();
95
+
 
 
 
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.0-0.1.1.php CHANGED
@@ -1,26 +1,21 @@
1
- <?php
2
-
3
- $installer = $this;
4
-
5
- $themesettings = array(
6
- array( 'theme_name' => 'preview','mobile_device_design_interface' => '1','user_agent_regex_values' => '0','user_agent_regex_custom_values' => '','exclude_user_agent_regex_custom_values' => '','ip_override' => '','css_override' => '','social_links' => '{"show_social_links":null,"facebook_link":"","twitter_link":"","pinterest_link":"","google_link":""}','cart_inputs' => '{"show_cart_discount":null,"show_cart_shipping_quote":null}','status' => '1')
7
- );
8
-
9
- foreach ($themesettings as $settings) {
10
- $installer->getConnection()->insertForce($installer->getTable('themesettings'), $settings);
11
- }
12
-
13
-
14
- /*$data = array(
15
- array('id' => '1','defaultsubsetting' => '1','subsetname' => 'black fashion','primary' => '1','logo' => '','bgcolor' => '#808783','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":"#bdb6b6"}','textcolor' => '#1f1b1b','searchcart' => '{"show_search_cart_area":"1","search_cart_bg_color":"#857d7d","cart_link_color":"#857d7d"}','homepagebanner' => '{"show_home_page_banner":"1","homepage_banner":"","homepage_banner_url":"black fashion"}','subheadersection' => 'black fashion','categories' => '{"categories":"2","categories_background_color":"#b8aaaa"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#857575"}','homepagecustomcode' => 'blackfashion','prefootersection' => 'black fashion','footersection' => 'black fashion','buttoncolor' => '{"button_background_color":"#ad1010","button_text_color":"#cc2929","button_border_color":"#0f0d0d"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#c2b8b8","breadcrumbs_font_color":"#383434"}','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":"#ada3a3","toolbar_text_color":"#5c4e4e"}','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":"#baafaf","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#403838","product_price_color":"#7d7676","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":"#9ba6b0","add_to_cart_button_font_color":"#8a7f89","add_to_cart_button_border_color":"#5f6c7a"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#9a9e98"}','producttitlecolor' => '#b3a3a3','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#826b6b","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'),
16
- 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')
17
- );*/
18
- $data = array(
19
- 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' => '#1f1b1b','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;">Free Shipping over $50!</div>','categories' => '{"categories":"1","categories_background_color":"#b8aaaa"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#b8aaaa"}','homepagecustomcode' => 'blackfashion','prefootersection' => 'black fashion','footersection' => 'black fashion','buttoncolor' => '{"button_background_color":"#e08d37","button_text_color":"#f5f2f2","button_border_color":"#ffffff"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#c2b8b8","breadcrumbs_font_color":"#383434"}','catalogview' => '','numberofproductsperpage' => '10','numberofproductschoice' => '5,10,15,20','catalogsortby' => '{"show_sortby_dropdown":"1","sort_options":"1,2,3,4,5"}','toolbarcolor' => '{"toolbar_bg_color":"#ada3a3","toolbar_text_color":"#5c4e4e"}','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":"#baafaf","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#403838","product_price_color":"#7d7676","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":"#9ba6b0","add_to_cart_button_font_color":"#8a7f89","add_to_cart_button_border_color":"#5f6c7a"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#9a9e98"}','producttitlecolor' => '#b3a3a3','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#826b6b","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":"#826b6b","show_product_additional_information":"1","additional_information_bg_color":"#826b6b","additional_information_font_color":"#826b6b","show_full_reviews_on_product_page":"#826b6b","full_reviews_bg_color":"1","full_reviews_font_color":"#826b6b","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','dateinserted' => '2013-10-07 21:13:12','css_filename' => 'a5771bce93e200c36f7cd9dfd0e5deaa.css')
20
- );
21
-
22
- foreach ($data as $bind) {
23
- $installer->getConnection()->insertForce($installer->getTable('themesubsettings'), $bind);
24
- }
25
- // array('id' => '2','defaultsubsetting' => '0','subsetname' => 'Black fashion','primary' => '1','logo' => '1380512898Logo.png','bgcolor' => '#fcfcfc','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' => '#141313','searchcart' => '{"show_search_cart_area":"1","search_cart_bg_color":"#b8aaaa","cart_link_color":"#ffffff"}','homepagebanner' => '{"show_home_page_banner":"1","homepage_banner":"1380513075Banner.jpg","homepage_banner_url":"Free shipping!!!!"}','subheadersection' => 'Sub header seciton!!!!','categories' => '{"categories":"1","categories_background_color":"#b8aaaa"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#b8aaaa"}','homepagecustomcode' => 'Homepage custom code!!!!','prefootersection' => 'Pre-footer section!!!','footersection' => '@2013 Copy rights| Terms and Conditions','buttoncolor' => '{"button_background_color":"#0f0e0e","button_text_color":"#f5eded","button_border_color":"#998080"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#c2b8b8","breadcrumbs_font_color":"#383434"}','catalogview' => '{"default_catalog_view":"2","show_grid_list_choice":"1"}','numberofproductsperpage' => '10','numberofproductschoice' => '5,10,15,20','catalogsortby' => '{"show_sortby_dropdown":"1","sort_options":"1,2,3,4,5"}','toolbarcolor' => '{"toolbar_bg_color":"#ada3a3","toolbar_text_color":"#5c4e4e"}','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":"#baafaf","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#403838","product_price_color":"#7d7676","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":"#9ba6b0","add_to_cart_button_font_color":"#8a7f89","add_to_cart_button_border_color":"#5f6c7a"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#9a9e98"}','producttitlecolor' => '#b3a3a3','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#826b6b","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":"#826b6b","show_product_additional_information":"1","additional_information_bg_color":"#826b6b","additional_information_font_color":"#826b6b","show_full_reviews_on_product_page":"1","full_reviews_bg_color":"1","full_reviews_font_color":"#826b6b","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','dateinserted' => '2013-09-25 13:22:44','css_filename' => 'd41d8cd98f00b204e9800998ecf8427e.css')
26
- ?>
1
+ <?php
2
+ $installer = $this;
3
+ $themesettings = array(
4
+ array( 'theme_name' => 'preview','mobile_device_design_interface' => '1','user_agent_regex_values' => '0','user_agent_regex_custom_values' => '','exclude_user_agent_regex_custom_values' => '','ip_override' => '','css_override' => '','social_links' => '{"show_social_links":null,"facebook_link":"","twitter_link":"","pinterest_link":"","google_link":""}','cart_inputs' => '{"show_cart_discount":null,"show_cart_shipping_quote":null}','status' => '1')
5
+ );
6
+ foreach ($themesettings as $settings) {
7
+ $installer->getConnection()->insertForce($installer->getTable('themesettings'), $settings);
8
+ }
9
+ /*$data = array(
10
+ array('id' => '1','defaultsubsetting' => '1','subsetname' => 'black fashion','primary' => '1','logo' => '','bgcolor' => '#808783','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":"#bdb6b6"}','textcolor' => '#1f1b1b','searchcart' => '{"show_search_cart_area":"1","search_cart_bg_color":"#857d7d","cart_link_color":"#857d7d"}','homepagebanner' => '{"show_home_page_banner":"1","homepage_banner":"","homepage_banner_url":"black fashion"}','subheadersection' => 'black fashion','categories' => '{"categories":"2","categories_background_color":"#b8aaaa"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#857575"}','homepagecustomcode' => 'blackfashion','prefootersection' => 'black fashion','footersection' => 'black fashion','buttoncolor' => '{"button_background_color":"#ad1010","button_text_color":"#cc2929","button_border_color":"#0f0d0d"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#c2b8b8","breadcrumbs_font_color":"#383434"}','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":"#ada3a3","toolbar_text_color":"#5c4e4e"}','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":"#baafaf","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#403838","product_price_color":"#7d7676","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":"#9ba6b0","add_to_cart_button_font_color":"#8a7f89","add_to_cart_button_border_color":"#5f6c7a"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#9a9e98"}','producttitlecolor' => '#b3a3a3','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#826b6b","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'),
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) {
18
+ $installer->getConnection()->insertForce($installer->getTable('themesubsettings'), $bind);
19
+ }
20
+ // array('id' => '2','defaultsubsetting' => '0','subsetname' => 'Black fashion','primary' => '1','logo' => '1380512898Logo.png','bgcolor' => '#fcfcfc','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' => '#141313','searchcart' => '{"show_search_cart_area":"1","search_cart_bg_color":"#b8aaaa","cart_link_color":"#ffffff"}','homepagebanner' => '{"show_home_page_banner":"1","homepage_banner":"1380513075Banner.jpg","homepage_banner_url":"Free shipping!!!!"}','subheadersection' => 'Sub header seciton!!!!','categories' => '{"categories":"1","categories_background_color":"#b8aaaa"}','newsletter' => '{"show_newsletter":"1","newsletter_area_backgorund":"#b8aaaa"}','homepagecustomcode' => 'Homepage custom code!!!!','prefootersection' => 'Pre-footer section!!!','footersection' => '@2013 Copy rights| Terms and Conditions','buttoncolor' => '{"button_background_color":"#0f0e0e","button_text_color":"#f5eded","button_border_color":"#998080"}','breadcrumb' => '{"show_breadcrumbs":"1","breadcrumbs_bg_color":"#c2b8b8","breadcrumbs_font_color":"#383434"}','catalogview' => '{"default_catalog_view":"2","show_grid_list_choice":"1"}','numberofproductsperpage' => '10','numberofproductschoice' => '5,10,15,20','catalogsortby' => '{"show_sortby_dropdown":"1","sort_options":"1,2,3,4,5"}','toolbarcolor' => '{"toolbar_bg_color":"#ada3a3","toolbar_text_color":"#5c4e4e"}','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":"#baafaf","catalog_image_width":""}','catalogproductcolor' => '{"product_title_color":"#403838","product_price_color":"#7d7676","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":"#9ba6b0","add_to_cart_button_font_color":"#8a7f89","add_to_cart_button_border_color":"#5f6c7a"}','cataloggridlines' => '{"show_gridlines":"1","gridlines_color":"#9a9e98"}','producttitlecolor' => '#b3a3a3','productimagedetails' => '{"show_product_image_border":"1","product_image_border_color":"#826b6b","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":"#826b6b","show_product_additional_information":"1","additional_information_bg_color":"#826b6b","additional_information_font_color":"#826b6b","show_full_reviews_on_product_page":"1","full_reviews_bg_color":"1","full_reviews_font_color":"#826b6b","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','dateinserted' => '2013-09-25 13:22:44','css_filename' => 'd41d8cd98f00b204e9800998ecf8427e.css')
21
+ ?>
 
 
 
 
 
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.1-0.1.2.php CHANGED
@@ -1,15 +1,16 @@
1
- <?php
2
-
3
- $installer = $this;
4
-
5
- $installer->startSetup();
6
-
7
- $installer->run("
8
- ALTER TABLE `themelayoutsettings` ADD `layout_update_id` INT( 10 ) UNSIGNED NOT NULL ,
9
- ADD INDEX ( `layout_update_id` );
10
- ALTER TABLE `themelayoutsettings` ADD FOREIGN KEY ( `layout_update_id` ) REFERENCES `core_layout_update` (
11
- `layout_update_id`
12
- ) ON DELETE CASCADE ON UPDATE CASCADE ;
13
- ");
14
- $installer->endSetup();
15
- ?>
 
1
+ <?php
2
+
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
+ ");
15
+ $installer->endSetup();
16
+ ?>
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.2-0.1.3.php CHANGED
@@ -1,10 +1,11 @@
1
- <?php
2
-
3
- $installer = $this;
4
-
5
- $installer->startSetup();
6
-
7
- $installer->run("
8
- INSERT INTO `core_config_data` (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES (NULL, 'default', '0', 'mobilenowsettings/mobilenowaccount/subscription', '0');");
9
- $installer->endSetup();
10
- ?>
 
1
+ <?php
2
+
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
+ ?>
app/code/community/Redstage/Mobilenow/sql/mobilenow_setup/mysql4-upgrade-0.1.3-0.1.4.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
-
3
- $installer = $this;
4
-
5
- $installer->startSetup();
6
-
7
- /*$installer->run("
8
- ALTER TABLE `themesettings` ADD `ip_override` VARCHAR( 255 ) NOT NULL AFTER `exclude_user_agent_regex_custom_values` ,
9
- ADD `css_override` TEXT NOT NULL AFTER `ip_override` ,
10
- ADD `social_links` VARCHAR( 255 ) NOT NULL AFTER `css_override` ,
11
- ADD `cart_inputs` VARCHAR( 255 ) NOT NULL AFTER `social_links`,
12
- ADD `analytics` TEXT NOT NULL AFTER `cart_inputs`;");
13
- $installer->endSetup();*/
14
-
15
- ?>
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ /*$installer->run("
8
+ ALTER TABLE `themesettings` ADD `ip_override` VARCHAR( 255 ) NOT NULL AFTER `exclude_user_agent_regex_custom_values` ,
9
+ ADD `css_override` TEXT NOT NULL AFTER `ip_override` ,
10
+ ADD `social_links` VARCHAR( 255 ) NOT NULL AFTER `css_override` ,
11
+ ADD `cart_inputs` VARCHAR( 255 ) NOT NULL AFTER `social_links`,
12
+ ADD `analytics` TEXT NOT NULL AFTER `cart_inputs`;");
13
+ $installer->endSetup();*/
14
+
15
+ ?>
app/design/adminhtml/default/default/layout/mobilenow.xml CHANGED
@@ -1,27 +1,27 @@
1
- <?xml version="1.0"?>
2
- <layout version="0.1.0">
3
- <default>
4
- <reference name="head">
5
- <action method="addItem"><type>skin_js</type><name>js/jquery-1.10.2.min.js</name></action>
6
- <action method="addItem"><type>skin_js</type><name>js/mobilenow.js</name></action>
7
- <action method="addItem"><type>skin_js</type><name>js/jquery-ui-1.10.3.custom.js</name></action>
8
- <action method="addItem"><type>skin_js</type><name>js/jquery.minicolors.js</name></action>
9
- <action method="addItem"><type>skin_js</type><name>js/jquery.colorbox.js</name></action>
10
- <action method="addItem"><type>skin_js</type><name>js/ajaxupload.js</name></action>
11
- <action method="addItem"><type>skin_css</type><name>css/mobilenow.css</name></action>
12
- <action method="addItem"><type>skin_css</type><name>css/colorbox.css</name></action>
13
- <action method="addItem"><type>skin_css</type><name>css/ui-lightness/jquery-ui-1.10.3.custom.css</name></action>
14
- <action method="addItem"><type>skin_css</type><name>css/jquery.minicolors.css</name></action>
15
- </reference>
16
- </default>
17
- <adminhtml_system_config_edit>
18
- <reference name="content">
19
- <block type="mobilenow/adminhtml_mobilenowbackend" name="mobilenowbackend" template="mobilenow/mobilenowbackend.phtml"/>
20
- </reference>
21
- </adminhtml_system_config_edit>
22
- <mobilenow_adminhtml_mobilenow_index>
23
- <reference name="content">
24
- <block type="mobilenow/adminhtml_mobilenow" name="mobilenow" />
25
- </reference>
26
- </mobilenow_adminhtml_mobilenow_index>
27
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addItem"><type>skin_js</type><name>js/jquery-1.10.2.min.js</name></action>
6
+ <action method="addItem"><type>skin_js</type><name>js/mobilenow.js</name></action>
7
+ <action method="addItem"><type>skin_js</type><name>js/jquery-ui-1.10.3.custom.js</name></action>
8
+ <action method="addItem"><type>skin_js</type><name>js/jquery.minicolors.js</name></action>
9
+ <action method="addItem"><type>skin_js</type><name>js/jquery.colorbox.js</name></action>
10
+ <action method="addItem"><type>skin_js</type><name>js/ajaxupload.js</name></action>
11
+ <action method="addItem"><type>skin_css</type><name>css/mobilenow.css</name></action>
12
+ <action method="addItem"><type>skin_css</type><name>css/colorbox.css</name></action>
13
+ <action method="addItem"><type>skin_css</type><name>css/ui-lightness/jquery-ui-1.10.3.custom.css</name></action>
14
+ <action method="addItem"><type>skin_css</type><name>css/jquery.minicolors.css</name></action>
15
+ </reference>
16
+ </default>
17
+ <adminhtml_system_config_edit>
18
+ <reference name="content">
19
+ <block type="mobilenow/adminhtml_mobilenowbackend" name="mobilenowbackend" template="mobilenow/mobilenowbackend.phtml"/>
20
+ </reference>
21
+ </adminhtml_system_config_edit>
22
+ <mobilenow_adminhtml_mobilenow_index>
23
+ <reference name="content">
24
+ <block type="mobilenow/adminhtml_mobilenow" name="mobilenow" />
25
+ </reference>
26
+ </mobilenow_adminhtml_mobilenow_index>
27
  </layout>
app/design/adminhtml/default/default/template/mobilenow/mobilenowbackend.phtml CHANGED
@@ -1,5 +1,5 @@
1
- <script type="text/javascript">
2
- var baseURL='<?php echo Mage::getBaseUrl();?>';
3
- var disconnectMobilenow='<?php echo Mage::helper('adminhtml')->getUrl('mobilenow/adminhtml_mobilenow/disconnectMobilenow');?>';
4
- var refreshMobilenow='<?php echo Mage::helper('adminhtml')->getUrl('mobilenow/adminhtml_mobilenow/refreshMobilenow');?>';
5
  </script>
1
+ <script type="text/javascript">
2
+ var baseURL='<?php echo Mage::getBaseUrl();?>';
3
+ var disconnectMobilenow='<?php echo Mage::helper('adminhtml')->getUrl('mobilenow/adminhtml_mobilenow/disconnectMobilenow');?>';
4
+ var refreshMobilenow='<?php echo Mage::helper('adminhtml')->getUrl('mobilenow/adminhtml_mobilenow/refreshMobilenow');?>';
5
  </script>
app/design/adminhtml/default/default/template/mobilenow/system/config/button.phtml CHANGED
@@ -1 +1 @@
1
- <?php echo $this->getButtonHtml() ?>
1
+ <?php echo $this->getButtonHtml() ?>
app/design/adminhtml/default/default/template/mobilenow/widget/advsettings.phtml CHANGED
@@ -1,30 +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 default_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="entry-edit">
28
- <?php echo $this->getFormHtml();?>
29
- </div>
30
- <?php echo $this->getChildHtml('form_after');?>
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 default_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="entry-edit">
28
+ <?php echo $this->getFormHtml();?>
29
+ </div>
30
+ <?php echo $this->getChildHtml('form_after');?>
app/design/adminhtml/default/default/template/mobilenow/widget/design.phtml CHANGED
@@ -1,279 +1,279 @@
1
- <?php
2
- $form_d = Mage::registry("mobilenow_data")->getData();
3
- if(isset($form_d['store_id']))
4
- $stores = implode(',',$form_d['store_id']);
5
- else
6
- $stores=0;
7
-
8
- $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getRequest()->getParam("id"):1;
9
- ?>
10
- <div class="entry-edit insideborder">
11
- <div class="entry-edit-head">
12
- <h4 class="icon-head head-edit-form fieldset-legend">Customize Mobile Theme Design</h4>
13
- <div class="form-buttons"></div>
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;
23
- <?php if($this->getRequest()->getParam("design_subtab") != ''){?>
24
- sel_tab = <?php echo $this->getRequest()->getParam("design_subtab");?>;
25
- <?php }?>
26
- $j('#tabs').tabs( "option", "active", sel_tab );
27
- });
28
- $j(document).ready( function() {
29
- $j('.minicolors').minicolors(
30
- {
31
- swatchPosition: 'right',
32
- animationSpeed: 500,
33
- animationEasing: 'swing',
34
- hideSpeed: 500,
35
- showSpeed: 500
36
- }
37
- );
38
- $j(".inline_save_as").colorbox({inline:true, width:"50%",opacity: 0.6,
39
- onClosed: function () {
40
- $j('#sub_setting_theme_name').val('');
41
- $j('#save_error').html('');
42
- $j('#layout_theme_name').val('');
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
-
55
- $j(".inline_delete").colorbox({inline:true, width:"50%",opacity: 0.6});
56
- $j("#mobilenow_tabs_design").click(function(){
57
- activeSubTabs =$j("#tabs").tabs('option', 'active');
58
- if(activeSubTabs == 0){
59
- homeFrame('iframe-preview', home_url);
60
- } else if(activeSubTabs == 1){
61
- categoryFrame('iframe-preview',catalog_url);
62
- } else{
63
- productFrame('iframe-preview',product_url);
64
- }
65
- var loadPreview= '<?php echo $this->getRequest()->getParam("loadPreivew");?>';
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",
74
- autoSubmit :true,
75
- onSubmit: function(file, extension) {
76
- Element.show('loading-mask');
77
- this.setData({
78
- type: 'preview',
79
- form_key : FORM_KEY
80
- });
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);
88
- } else {
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
-
98
- new AjaxUpload('homepage_banner', {
99
- action: uploadImageUrl+'upload_type/banner/theme_id/<?php echo $theme_id;?>/?isAjax=true',
100
- name: 'homepage_banner',
101
- dataType: "json",
102
- autoSubmit :true,
103
- onSubmit: function(file, extension) {
104
- Element.show('loading-mask');
105
- this.setData({
106
- type: 'preview',
107
- form_key : FORM_KEY
108
- });
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);
116
- } else {
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');
129
-
130
- });
131
-
132
- function getDocHeight(doc)
133
- {
134
- doc = doc || document;
135
- // stackoverflow.com/questions/...
136
- var body = doc.body, html = doc.documentElement;
137
- var height = Math.max( body.scrollHeight, body.offsetHeight,
138
- html.clientHeight, html.scrollHeight, html.offsetHeight );
139
- return height;
140
- }
141
- function setIframeHeight(id) {
142
- var ifrm = document.getElementById(id);
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";
152
- ifrm_div.style.height = getDocHeight( doc ) + 2 + "px";
153
- ifrm.style.visibility = 'visible';
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'>
166
- <div class="update-preview-button">
167
- <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_top">
168
- <span>
169
- <span>
170
- <span>Click Here to Update Preview</span>
171
- </span>
172
- </span>
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">
182
- <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">
183
- <span>
184
- <span>
185
- <span>Click Here to Update Preview</span>
186
- </span>
187
- </span>
188
- </button>
189
- </div>
190
- </div>
191
- </div>
192
- </div>
193
- </div>
194
- <?php
195
- echo $this->getChildHtml('form_after');
196
- $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/resetSubsettings',array('id'=>$this->getRequest()->getParam("id"),'reset_delete'=>Mage::registry("subsettings_data")->getPresetSubSettings()));
197
- ?>
198
- <script type="text/javascript">
199
- var uniqueUrl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/checkUniqueNameSave');?>';
200
- var updatePreviewurl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/updatePreview');?>';
201
- var uploadImageUrl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/uploadDesignImage');?>';
202
- </script>
203
- <!------------------------------- Save As------------------------------------>
204
- <div style='display:none'>
205
- <div id='inline_save_as' style='padding:10px; background:#fff;'>
206
- <div class="save_as_title">Save Sub Settings As..</div>
207
- <hr/>
208
- <div>
209
- <div class="save_as_content">Specify a name for your design sub settings and confirm your save as action below:</div>
210
- <div>Sub Setting Theme Name <input type="text" id="sub_setting_theme_name" name="sub_setting_theme_name"/> <button class="scalable save" type="button" title="Save As.." id="theme_save_as"><span>Save</span></button></div>
211
- <div style="height:150px;"><div id="save_error"></div></div>
212
- <div><b>You are currently saving color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_save"><span>Cancel</span></button></span></div>
213
- </div>
214
- </div>
215
- </div>
216
- <!------------------------------- Save Setting------------------------------------>
217
- <div style='display:none'>
218
- <div id='inline_save_setting' style='padding:10px; background:#fff;'>
219
- <div class="save_as_title">Are you sure ?</div>
220
- <hr/>
221
- <div>
222
- <div class="save_as_content">Click on the below button, so that the sub setting changes are updated.</div>
223
- <div></div>
224
- <div style="height:150px;"><button class="scalable save" type="button" title="Save Settings.." id="save_settings"><span>Save Settings..</span></button></div>
225
- <div><b>You are currently updating color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_save_settings"><span>Cancel</span></button></span></div>
226
- </div>
227
- </div>
228
- </div>
229
- <!------------------------------- Reset Setting------------------------------------>
230
- <div style='display:none'>
231
- <div id='inline_reset_setting' style='padding:10px; background:#fff;'>
232
- <div class="save_as_title">Are you sure ?</div>
233
- <hr/>
234
- <div>
235
- <div class="save_as_content">Click on the below button to reset the sub settings</div>
236
- <div></div>
237
- <div style="height:150px;"><button class="scalable save" type="button" onclick="resetToDefault('<?php echo $newRedrict;?>');" title="Reset Settings to Default" id="reset_settings"><span>Reset Settings to Default</span></button></div>
238
- <div><b>You are currently resetting color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_save_settings"><span>Cancel</span></button></span></div>
239
- </div>
240
- </div>
241
- </div>
242
- <!------------------------------- Delete Setting------------------------------------>
243
- <div style='display:none'>
244
- <div id='inline_delete' style='padding:10px; background:#fff;'>
245
- <div class="save_as_title">Are You Sure?</div>
246
- <hr/>
247
- <div>
248
- <div class="save_as_content">You have selected to delete this theme sub-setting. You cannot recover these settings. Please confirm your delete action:</div>
249
- <div><button class="scalable save" type="button" title="Confirm Delete" onclick="deleteSubsetting('<?php echo Mage::helper('adminhtml')->getUrl('*/*/deleteSettings', array('id' => $this->getRequest()->getParam('id')));?>')" id="sub_settings_delete"><span>Confirm Delete</span></button></div>
250
- <div style="height:150px;"></div>
251
- <div><b>You are currently deleting a theme sub-setting, previously saved. </b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_delete"><span>Cancel</span></button></span></div>
252
- </div>
253
- </div>
254
- </div>
255
- <script type="text/javascript">
256
- //<![CDATA[
257
- Validation.add('validate-per-page-value-list', 'Please enter a valid value, ex: 10,20,30,all', function(v) {
258
- var isValid = !Validation.get('IsEmpty').test(v);
259
- var values = v.split(',');
260
- for (var i=0;i<values.length;i++) {
261
- if (!/^[0-9]+$/.test(values[i])) {
262
- if(values[i]!='all')
263
- {
264
- isValid = false;
265
- }
266
- }
267
- }
268
- return isValid;
269
- });
270
- Validation.add('validate-per-page-value', 'Please enter a valid value from list', function(v, elm) {
271
- if (Validation.get('IsEmpty').test(v)) {
272
- return false;
273
- }
274
- var values = $('number_of_products_choice_steps').value.split(',');
275
- return values.indexOf(v) != -1;
276
- });
277
-
278
- //]]>
279
  </script>
1
+ <?php
2
+ $form_d = Mage::registry("mobilenow_data")->getData();
3
+ if(isset($form_d['store_id']))
4
+ $stores = implode(',',$form_d['store_id']);
5
+ else
6
+ $stores=0;
7
+
8
+ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getRequest()->getParam("id"):1;
9
+ ?>
10
+ <div class="entry-edit insideborder">
11
+ <div class="entry-edit-head">
12
+ <h4 class="icon-head head-edit-form fieldset-legend">Customize Mobile Theme Design</h4>
13
+ <div class="form-buttons"></div>
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;
23
+ <?php if($this->getRequest()->getParam("design_subtab") != ''){?>
24
+ sel_tab = <?php echo $this->getRequest()->getParam("design_subtab");?>;
25
+ <?php }?>
26
+ $j('#tabs').tabs( "option", "active", sel_tab );
27
+ });
28
+ $j(document).ready( function() {
29
+ $j('.minicolors').minicolors(
30
+ {
31
+ swatchPosition: 'right',
32
+ animationSpeed: 500,
33
+ animationEasing: 'swing',
34
+ hideSpeed: 500,
35
+ showSpeed: 500
36
+ }
37
+ );
38
+ $j(".inline_save_as").colorbox({inline:true, width:"50%",opacity: 0.6,
39
+ onClosed: function () {
40
+ $j('#sub_setting_theme_name').val('');
41
+ $j('#save_error').html('');
42
+ $j('#layout_theme_name').val('');
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
+
55
+ $j(".inline_delete").colorbox({inline:true, width:"50%",opacity: 0.6});
56
+ $j("#mobilenow_tabs_design").click(function(){
57
+ activeSubTabs =$j("#tabs").tabs('option', 'active');
58
+ if(activeSubTabs == 0){
59
+ homeFrame('iframe-preview', home_url);
60
+ } else if(activeSubTabs == 1){
61
+ categoryFrame('iframe-preview',catalog_url);
62
+ } else{
63
+ productFrame('iframe-preview',product_url);
64
+ }
65
+ var loadPreview= '<?php echo $this->getRequest()->getParam("loadPreivew");?>';
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",
74
+ autoSubmit :true,
75
+ onSubmit: function(file, extension) {
76
+ Element.show('loading-mask');
77
+ this.setData({
78
+ type: 'preview',
79
+ form_key : FORM_KEY
80
+ });
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);
88
+ } else {
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
+
98
+ new AjaxUpload('homepage_banner', {
99
+ action: uploadImageUrl+'upload_type/banner/theme_id/<?php echo $theme_id;?>/?isAjax=true',
100
+ name: 'homepage_banner',
101
+ dataType: "json",
102
+ autoSubmit :true,
103
+ onSubmit: function(file, extension) {
104
+ Element.show('loading-mask');
105
+ this.setData({
106
+ type: 'preview',
107
+ form_key : FORM_KEY
108
+ });
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);
116
+ } else {
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');
129
+
130
+ });
131
+
132
+ function getDocHeight(doc)
133
+ {
134
+ doc = doc || document;
135
+ // stackoverflow.com/questions/...
136
+ var body = doc.body, html = doc.documentElement;
137
+ var height = Math.max( body.scrollHeight, body.offsetHeight,
138
+ html.clientHeight, html.scrollHeight, html.offsetHeight );
139
+ return height;
140
+ }
141
+ function setIframeHeight(id) {
142
+ var ifrm = document.getElementById(id);
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";
152
+ ifrm_div.style.height = getDocHeight( doc ) + 2 + "px";
153
+ ifrm.style.visibility = 'visible';
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'>
166
+ <div class="update-preview-button">
167
+ <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_top">
168
+ <span>
169
+ <span>
170
+ <span>Click Here to Update Preview</span>
171
+ </span>
172
+ </span>
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">
182
+ <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">
183
+ <span>
184
+ <span>
185
+ <span>Click Here to Update Preview</span>
186
+ </span>
187
+ </span>
188
+ </button>
189
+ </div>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ <?php
195
+ echo $this->getChildHtml('form_after');
196
+ $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/resetSubsettings',array('id'=>$this->getRequest()->getParam("id"),'reset_delete'=>Mage::registry("subsettings_data")->getPresetSubSettings()));
197
+ ?>
198
+ <script type="text/javascript">
199
+ var uniqueUrl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/checkUniqueNameSave');?>';
200
+ var updatePreviewurl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/updatePreview');?>';
201
+ var uploadImageUrl= '<?php echo Mage::helper('adminhtml')->getUrl('*/*/uploadDesignImage');?>';
202
+ </script>
203
+ <!------------------------------- Save As------------------------------------>
204
+ <div style='display:none'>
205
+ <div id='inline_save_as' style='padding:10px; background:#fff;'>
206
+ <div class="save_as_title">Save Sub Settings As..</div>
207
+ <hr/>
208
+ <div>
209
+ <div class="save_as_content">Specify a name for your design sub settings and confirm your save as action below:</div>
210
+ <div>Sub Setting Theme Name <input type="text" id="sub_setting_theme_name" name="sub_setting_theme_name"/> <button class="scalable save" type="button" title="Save As.." id="theme_save_as"><span>Save</span></button></div>
211
+ <div style="height:150px;"><div id="save_error"></div></div>
212
+ <div><b>You are currently saving color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_save"><span>Cancel</span></button></span></div>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <!------------------------------- Save Setting------------------------------------>
217
+ <div style='display:none'>
218
+ <div id='inline_save_setting' style='padding:10px; background:#fff;'>
219
+ <div class="save_as_title">Are you sure ?</div>
220
+ <hr/>
221
+ <div>
222
+ <div class="save_as_content">Click on the below button, so that the sub setting changes are updated.</div>
223
+ <div></div>
224
+ <div style="height:150px;"><button class="scalable save" type="button" title="Save Settings.." id="save_settings"><span>Save Settings..</span></button></div>
225
+ <div><b>You are currently updating color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_save_settings"><span>Cancel</span></button></span></div>
226
+ </div>
227
+ </div>
228
+ </div>
229
+ <!------------------------------- Reset Setting------------------------------------>
230
+ <div style='display:none'>
231
+ <div id='inline_reset_setting' style='padding:10px; background:#fff;'>
232
+ <div class="save_as_title">Are you sure ?</div>
233
+ <hr/>
234
+ <div>
235
+ <div class="save_as_content">Click on the below button to reset the sub settings</div>
236
+ <div></div>
237
+ <div style="height:150px;"><button class="scalable save" type="button" onclick="resetToDefault('<?php echo $newRedrict;?>');" title="Reset Settings to Default" id="reset_settings"><span>Reset Settings to Default</span></button></div>
238
+ <div><b>You are currently resetting color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_save_settings"><span>Cancel</span></button></span></div>
239
+ </div>
240
+ </div>
241
+ </div>
242
+ <!------------------------------- Delete Setting------------------------------------>
243
+ <div style='display:none'>
244
+ <div id='inline_delete' style='padding:10px; background:#fff;'>
245
+ <div class="save_as_title">Are You Sure?</div>
246
+ <hr/>
247
+ <div>
248
+ <div class="save_as_content">You have selected to delete this theme sub-setting. You cannot recover these settings. Please confirm your delete action:</div>
249
+ <div><button class="scalable save" type="button" title="Confirm Delete" onclick="deleteSubsetting('<?php echo Mage::helper('adminhtml')->getUrl('*/*/deleteSettings', array('id' => $this->getRequest()->getParam('id')));?>')" id="sub_settings_delete"><span>Confirm Delete</span></button></div>
250
+ <div style="height:150px;"></div>
251
+ <div><b>You are currently deleting a theme sub-setting, previously saved. </b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_delete"><span>Cancel</span></button></span></div>
252
+ </div>
253
+ </div>
254
+ </div>
255
+ <script type="text/javascript">
256
+ //<![CDATA[
257
+ Validation.add('validate-per-page-value-list', 'Please enter a valid value, ex: 10,20,30,all', function(v) {
258
+ var isValid = !Validation.get('IsEmpty').test(v);
259
+ var values = v.split(',');
260
+ for (var i=0;i<values.length;i++) {
261
+ if (!/^[0-9]+$/.test(values[i])) {
262
+ if(values[i]!='all')
263
+ {
264
+ isValid = false;
265
+ }
266
+ }
267
+ }
268
+ return isValid;
269
+ });
270
+ Validation.add('validate-per-page-value', 'Please enter a valid value from list', function(v, elm) {
271
+ if (Validation.get('IsEmpty').test(v)) {
272
+ return false;
273
+ }
274
+ var values = $('number_of_products_choice_steps').value.split(',');
275
+ return values.indexOf(v) != -1;
276
+ });
277
+
278
+ //]]>
279
  </script>
app/design/adminhtml/default/default/template/mobilenow/widget/form.phtml CHANGED
@@ -1,67 +1,67 @@
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 default_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
- <!--[if IE]>
28
- <style>
29
- .form-list td.label, .form-list td.value, .form-list td.value2, .form-list td.note, .form-list td.scope-label, .form-list td.use-default {
30
- background: none repeat scroll 0 center rgba(0, 0, 0, 0) !important;
31
- border: 0 none !important;
32
- padding-bottom: 5px !important;
33
- padding-left: 0px !important;
34
- padding-top: 5px !important;
35
- }
36
- .columns .preset_subsettings .form-list td.value {width: 112px}
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 () {
45
- $j('#sub_setting_theme_name_text').val('');
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'>
57
- <div id='inline_save_as_top' style='padding:10px; background:#fff;'>
58
- <div class="save_as_title">Save Theme As..</div>
59
- <hr/>
60
- <div>
61
- <div class="save_as_content">Specify a name for your new theme and confirm your save as action below:</div>
62
- <div>Theme Name <input type="text" id="sub_setting_theme_name_text" name="sub_setting_theme_name_text"/> <button class="scalable save" type="button" title="Save As.." id="theme_save_as_top"><span>Save</span></button></div>
63
- <div style="height:150px;"><div id="save_error_top"></div></div>
64
- <div><b>You are currently saving new theme.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_save"><span>Cancel</span></button></span></div>
65
- </div>
66
- </div>
67
  </div>
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 default_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
+ <!--[if IE]>
28
+ <style>
29
+ .form-list td.label, .form-list td.value, .form-list td.value2, .form-list td.note, .form-list td.scope-label, .form-list td.use-default {
30
+ background: none repeat scroll 0 center rgba(0, 0, 0, 0) !important;
31
+ border: 0 none !important;
32
+ padding-bottom: 5px !important;
33
+ padding-left: 0px !important;
34
+ padding-top: 5px !important;
35
+ }
36
+ .columns .preset_subsettings .form-list td.value {width: 112px}
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 () {
45
+ $j('#sub_setting_theme_name_text').val('');
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'>
57
+ <div id='inline_save_as_top' style='padding:10px; background:#fff;'>
58
+ <div class="save_as_title">Save Theme As..</div>
59
+ <hr/>
60
+ <div>
61
+ <div class="save_as_content">Specify a name for your new theme and confirm your save as action below:</div>
62
+ <div>Theme Name <input type="text" id="sub_setting_theme_name_text" name="sub_setting_theme_name_text"/> <button class="scalable save" type="button" title="Save As.." id="theme_save_as_top"><span>Save</span></button></div>
63
+ <div style="height:150px;"><div id="save_error_top"></div></div>
64
+ <div><b>You are currently saving new theme.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel" id="cancel_save"><span>Cancel</span></button></span></div>
65
+ </div>
66
+ </div>
67
  </div>
app/design/adminhtml/default/default/template/mobilenow/widget/layout.phtml CHANGED
@@ -1,169 +1,169 @@
1
- <?php
2
- $form_d = Mage::registry("mobilenow_data")->getData();
3
-
4
- if(isset($form_d['store_id']))
5
- $stores = implode(',',$form_d['store_id']);
6
- else
7
- $stores=0;
8
-
9
- $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getRequest()->getParam("id"):1;
10
- ?>
11
- <div class="entry-edit insideborder">
12
- <div class="entry-edit-head">
13
- <h4 class="icon-head head-edit-form fieldset-legend">Customize Mobile Theme Layout</h4>
14
- <div class="form-buttons"></div>
15
- </div>
16
- <div class="fieldset ">
17
- <script>
18
- var home_url = '<?php echo Mage::getBaseUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
19
- var catalog_url ='<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewCategoryUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
20
- var product_url ='<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewProductUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
21
-
22
- $j(function() {
23
- $j( "#layout_tabs" ).tabs();
24
- var l_sel_tab = 0;
25
- <?php if($this->getRequest()->getParam("layout_subtab") != ''){?>
26
- l_sel_tab = <?php echo $this->getRequest()->getParam("layout_subtab");?>;
27
- <?php }?>
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
- {
54
- doc = doc || document;
55
- // stackoverflow.com/questions/...
56
- var body = doc.body, html = doc.documentElement;
57
- var height = Math.max( body.scrollHeight, body.offsetHeight,
58
- html.clientHeight, html.scrollHeight, html.offsetHeight );
59
- return height;
60
- }
61
- function setIframeHeight(id) {
62
- var ifrm = document.getElementById(id);
63
-
64
- var ifrm_div = document.getElementById(id+'_div');
65
- var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
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';
74
- }
75
-
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>
92
- </span>
93
- </span>
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">
104
- <span>
105
- <span>
106
- <span>Click Here to Update Preview</span>
107
- </span>
108
- </span>
109
- </button>
110
- </div>
111
- </div>
112
- </div>
113
- </div>
114
- </div>
115
- <?php echo $this->getChildHtml('form_after');
116
- $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/resetSubsettings',array('id'=>$this->getRequest()->getParam("id"),'reset_delete'=>Mage::registry("subsettings_data")->getPresetSubSettings()));
117
- ?>
118
- <!------------------------------- Save As------------------------------------>
119
- <div style='display:none'>
120
- <div id='inline_save_as_layout' style='padding:10px; background:#fff;'>
121
- <div class="save_as_title">Save Sub Settings As..</div>
122
- <hr/>
123
- <div>
124
- <div class="save_as_content">Specify a name for your design sub settings and confirm your save as action below:</div>
125
- <div>Sub Setting Theme Name <input type="text" id="layout_theme_name" name="sub_setting_theme_name"/> <button class="scalable save" type="button" title="Save As.." id="layout_save_as"><span>Save</span></button></div>
126
- <div style="height:150px;"><div id="layout_save_error"></div></div>
127
- <div><b>You are currently saving color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel"><span>Cancel</span></button></span></div>
128
- </div>
129
- </div>
130
- </div>
131
- <!------------------------------- Save Setting------------------------------------>
132
- <div style='display:none'>
133
- <div id='inline_save_setting_layout' style='padding:10px; background:#fff;'>
134
- <div class="save_as_title">Are you sure ?</div>
135
- <hr/>
136
- <div>
137
- <div class="save_as_content">Click on the below button, so that the sub setting changes are updated.</div>
138
- <div></div>
139
- <div style="height:150px;"><button class="scalable save" type="button" title="Save Settings.." id="layout_save_settings"><span>Save Settings..</span></button></div>
140
- <div><b>You are currently updating color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel"><span>Cancel</span></button></span></div>
141
- </div>
142
- </div>
143
- </div>
144
- <!------------------------------- Reset Setting------------------------------------>
145
- <div style='display:none'>
146
- <div id='inline_reset_setting_layout' style='padding:10px; background:#fff;'>
147
- <div class="save_as_title">Are you sure ?</div>
148
- <hr/>
149
- <div>
150
- <div class="save_as_content">Click on the below button to reset the sub settings</div>
151
- <div></div>
152
- <div style="height:150px;"><button class="scalable save" type="button" onclick="resetToDefault('<?php echo $newRedrict;?>');" title="Reset Settings to Default" id="layout_reset_settings"><span>Reset Settings to Default</span></button></div>
153
- <div><b>You are currently resetting color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel"><span>Cancel</span></button></span></div>
154
- </div>
155
- </div>
156
- </div>
157
- <!------------------------------- Delete Setting------------------------------------>
158
- <div style='display:none'>
159
- <div id='inline_delete_layout' style='padding:10px; background:#fff;'>
160
- <div class="save_as_title">Are You Sure?</div>
161
- <hr/>
162
- <div>
163
- <div class="save_as_content">You have selected to delete this theme sub-setting. You cannot recover these settings. Please confirm your delete action:</div>
164
- <div><button class="scalable save" type="button" title="Confirm Delete" onclick="deleteLayoutSubsetting('<?php echo Mage::helper('adminhtml')->getUrl('*/*/deleteSettings', array('id' => $this->getRequest()->getParam('id')));?>')" id="layout_sub_settings_delete"><span>Confirm Delete</span></button></div>
165
- <div style="height:150px;"></div>
166
- <div><b>You are currently deleting a theme sub-setting, previously saved.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel"><span>Cancel</span></button></span></div>
167
- </div>
168
- </div>
169
  </div>
1
+ <?php
2
+ $form_d = Mage::registry("mobilenow_data")->getData();
3
+
4
+ if(isset($form_d['store_id']))
5
+ $stores = implode(',',$form_d['store_id']);
6
+ else
7
+ $stores=0;
8
+
9
+ $theme_id = ((int)$this->getRequest()->getParam("id") > 0)?(int)$this->getRequest()->getParam("id"):1;
10
+ ?>
11
+ <div class="entry-edit insideborder">
12
+ <div class="entry-edit-head">
13
+ <h4 class="icon-head head-edit-form fieldset-legend">Customize Mobile Theme Layout</h4>
14
+ <div class="form-buttons"></div>
15
+ </div>
16
+ <div class="fieldset ">
17
+ <script>
18
+ var home_url = '<?php echo Mage::getBaseUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
19
+ var catalog_url ='<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewCategoryUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
20
+ var product_url ='<?php echo Mage::getBaseUrl().Mage::helper('mobilenow')->getPreviewProductUrl();?>?theme_id=<?php echo $theme_id;?>&isadmin=1&store_id=<?php echo $stores?>';
21
+
22
+ $j(function() {
23
+ $j( "#layout_tabs" ).tabs();
24
+ var l_sel_tab = 0;
25
+ <?php if($this->getRequest()->getParam("layout_subtab") != ''){?>
26
+ l_sel_tab = <?php echo $this->getRequest()->getParam("layout_subtab");?>;
27
+ <?php }?>
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
+ {
54
+ doc = doc || document;
55
+ // stackoverflow.com/questions/...
56
+ var body = doc.body, html = doc.documentElement;
57
+ var height = Math.max( body.scrollHeight, body.offsetHeight,
58
+ html.clientHeight, html.scrollHeight, html.offsetHeight );
59
+ return height;
60
+ }
61
+ function setIframeHeight(id) {
62
+ var ifrm = document.getElementById(id);
63
+
64
+ var ifrm_div = document.getElementById(id+'_div');
65
+ var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
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';
74
+ }
75
+
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>
92
+ </span>
93
+ </span>
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">
104
+ <span>
105
+ <span>
106
+ <span>Click Here to Update Preview</span>
107
+ </span>
108
+ </span>
109
+ </button>
110
+ </div>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ </div>
115
+ <?php echo $this->getChildHtml('form_after');
116
+ $newRedrict = Mage::helper('adminhtml')->getUrl('*/*/resetSubsettings',array('id'=>$this->getRequest()->getParam("id"),'reset_delete'=>Mage::registry("subsettings_data")->getPresetSubSettings()));
117
+ ?>
118
+ <!------------------------------- Save As------------------------------------>
119
+ <div style='display:none'>
120
+ <div id='inline_save_as_layout' style='padding:10px; background:#fff;'>
121
+ <div class="save_as_title">Save Sub Settings As..</div>
122
+ <hr/>
123
+ <div>
124
+ <div class="save_as_content">Specify a name for your design sub settings and confirm your save as action below:</div>
125
+ <div>Sub Setting Theme Name <input type="text" id="layout_theme_name" name="sub_setting_theme_name"/> <button class="scalable save" type="button" title="Save As.." id="layout_save_as"><span>Save</span></button></div>
126
+ <div style="height:150px;"><div id="layout_save_error"></div></div>
127
+ <div><b>You are currently saving color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel"><span>Cancel</span></button></span></div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ <!------------------------------- Save Setting------------------------------------>
132
+ <div style='display:none'>
133
+ <div id='inline_save_setting_layout' style='padding:10px; background:#fff;'>
134
+ <div class="save_as_title">Are you sure ?</div>
135
+ <hr/>
136
+ <div>
137
+ <div class="save_as_content">Click on the below button, so that the sub setting changes are updated.</div>
138
+ <div></div>
139
+ <div style="height:150px;"><button class="scalable save" type="button" title="Save Settings.." id="layout_save_settings"><span>Save Settings..</span></button></div>
140
+ <div><b>You are currently updating color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel"><span>Cancel</span></button></span></div>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ <!------------------------------- Reset Setting------------------------------------>
145
+ <div style='display:none'>
146
+ <div id='inline_reset_setting_layout' style='padding:10px; background:#fff;'>
147
+ <div class="save_as_title">Are you sure ?</div>
148
+ <hr/>
149
+ <div>
150
+ <div class="save_as_content">Click on the below button to reset the sub settings</div>
151
+ <div></div>
152
+ <div style="height:150px;"><button class="scalable save" type="button" onclick="resetToDefault('<?php echo $newRedrict;?>');" title="Reset Settings to Default" id="layout_reset_settings"><span>Reset Settings to Default</span></button></div>
153
+ <div><b>You are currently resetting color & design sub-settings.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel"><span>Cancel</span></button></span></div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ <!------------------------------- Delete Setting------------------------------------>
158
+ <div style='display:none'>
159
+ <div id='inline_delete_layout' style='padding:10px; background:#fff;'>
160
+ <div class="save_as_title">Are You Sure?</div>
161
+ <hr/>
162
+ <div>
163
+ <div class="save_as_content">You have selected to delete this theme sub-setting. You cannot recover these settings. Please confirm your delete action:</div>
164
+ <div><button class="scalable save" type="button" title="Confirm Delete" onclick="deleteLayoutSubsetting('<?php echo Mage::helper('adminhtml')->getUrl('*/*/deleteSettings', array('id' => $this->getRequest()->getParam('id')));?>')" id="layout_sub_settings_delete"><span>Confirm Delete</span></button></div>
165
+ <div style="height:150px;"></div>
166
+ <div><b>You are currently deleting a theme sub-setting, previously saved.</b><span style="float:right;"><button class="scalable delete cancel_final" type="button" title="Cancel"><span>Cancel</span></button></span></div>
167
+ </div>
168
+ </div>
169
  </div>
app/design/frontend/redstage-mobilenow/default/layout/catalog.xml CHANGED
@@ -1,354 +1,354 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- * that is bundled with this package in the file LICENSE_AFL.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/afl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @category design
23
- * @package base_default
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
- */
27
-
28
- Supported layout update handles (action):
29
- - catalog_product_gallery
30
- - catalog_product_compare_index
31
-
32
- Supported layout update handles (special):
33
- - default
34
- - catalog_category_default
35
- - catalog_category_layered
36
- - catalog_product_view
37
-
38
- -->
39
- <layout version="0.1.0">
40
-
41
- <!--
42
- Default layout, loads most of the pages
43
- -->
44
-
45
- <default>
46
-
47
- <!-- Mage_Catalog -->
48
- <reference name="left">
49
- <block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
50
- <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
51
- <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
52
- <action method="setLinkUrl"><url>checkout/cart</url></action>
53
- </block>
54
- </reference>
55
- <reference name="right">
56
- <block type="catalog/product_compare_sidebar" after="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
57
- <block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
58
- <action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
59
- <action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>
60
- </block>
61
- </reference>
62
- <reference name="footer_links">
63
- <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
64
- </reference>
65
- <block type="catalog/product_price_template" name="catalog_product_price_template" />
66
-
67
- <!-- Menu mobile -->
68
- <reference name="header">
69
- <block type="catalog/navigation" name="catalog_footernav" template="catalog/navigation/mobile-menu.phtml" before="-" />
70
- </reference>
71
-
72
- </default>
73
-
74
-
75
- <!--
76
- Category default layout
77
- -->
78
-
79
-
80
-
81
- <!--
82
- Category layered navigation layout
83
- -->
84
-
85
-
86
-
87
- <!--
88
- Compare products page
89
- -->
90
-
91
- <catalog_product_compare_index translate="label">
92
- <label>Catalog Product Compare List</label>
93
- <!-- Mage_Catalog -->
94
- <reference name="root">
95
- <action method="setTemplate"><template>page/popup.phtml</template></action>
96
- </reference>
97
- <reference name="head">
98
- <action method="addJs"><script>scriptaculous/scriptaculous.js</script></action>
99
- <action method="addJs"><script>varien/product.js</script></action>
100
- </reference>
101
- <reference name="content">
102
- <block type="catalog/product_compare_list" name="catalog.compare.list" template="catalog/product/compare/list.phtml"/>
103
- </reference>
104
- </catalog_product_compare_index>
105
-
106
- <customer_account_index>
107
- <reference name="right">
108
- <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
109
- </reference>
110
- </customer_account_index>
111
-
112
- <!--
113
- Product view
114
- -->
115
-
116
- <catalog_product_view translate="label">
117
- <label>Catalog Product View (Any)</label>
118
- <!-- Mage_Catalog -->
119
- <reference name="root">
120
- <action method="setTemplate"><template>page/1column.phtml</template></action>
121
- </reference>
122
- <reference name="head">
123
- <action method="addJs"><script>varien/product.js</script></action>
124
- <action method="addJs"><script>varien/configurable.js</script></action>
125
-
126
- <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
127
- <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
128
- <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
129
- </reference>
130
- <reference name="content">
131
- <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
132
- <!--
133
- <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/summary.phtml</template></action>
134
- <action method="addReviewSummaryTemplate"><type>short</type><template>review/helper/summary_short.phtml</template></action>
135
- <action method="addReviewSummaryTemplate"><type>...</type><template>...</template></action>
136
- -->
137
- <block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml"/>
138
- <block type="core/text_list" name="alert.urls" as="alert_urls" translate="label">
139
- <label>Alert Urls</label>
140
- </block>
141
- <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
142
- <block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
143
- <label>Product Extra Info</label>
144
- </block>
145
- </block>
146
- <action method="setTierPriceTemplate"><template>catalog/product/view/tierprices.phtml</template></action>
147
-
148
- <block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
149
- <action method="setColumnCount"><columns>4</columns></action>
150
- <action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
151
- </block>
152
- <block type="catalog/product_list_related" name="catalog.product.related" as="related_products" template="catalog/product/list/related.phtml"/>
153
-
154
- <block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
155
- <action method="addToParentGroup"><group>detailed_info</group></action>
156
- </block>
157
- <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
158
- <action method="addToParentGroup"><group>detailed_info</group></action>
159
- </block>
160
- <block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
161
- <block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>
162
- <block type="review/product_view_list" name="product.info.product_additional_data" as="reviews" template="review/product/view/list.phtml"/>
163
- <block type="core/text_list" name="product.info.extrahint" as="extrahint" translate="label">
164
- <label>Product View Extra Hint</label>
165
- </block>
166
-
167
- <block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label">
168
- <label>Info Column Options Wrapper</label>
169
- <block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/>
170
- <block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
171
- <action method="addOptionRenderer"><type>text</type><block>catalog/product_view_options_type_text</block><template>catalog/product/view/options/type/text.phtml</template></action>
172
- <action method="addOptionRenderer"><type>file</type><block>catalog/product_view_options_type_file</block><template>catalog/product/view/options/type/file.phtml</template></action>
173
- <action method="addOptionRenderer"><type>select</type><block>catalog/product_view_options_type_select</block><template>catalog/product/view/options/type/select.phtml</template></action>
174
- <action method="addOptionRenderer"><type>date</type><block>catalog/product_view_options_type_date</block><template>catalog/product/view/options/type/date.phtml</template></action>
175
- </block>
176
- <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
177
- </block>
178
- <block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
179
- <label>Bottom Block Options Wrapper</label>
180
- <action method="insert"><block>product.tierprices</block></action>
181
- <!--block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/-->
182
- <action method="append"><block>product.info.addtocart</block></action>
183
- <!--action method="append"><block>product.info.addto</block></action-->
184
- </block>
185
-
186
- <block type="core/template_facade" name="product.info.container1" as="container1">
187
- <action method="setDataByKey"><key>alias_in_layout</key><value>container1</value></action>
188
- <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
189
- <action method="append"><block>product.info.options.wrapper</block></action>
190
- <action method="append"><block>product.info.options.wrapper.bottom</block></action>
191
- </block>
192
- <block type="core/template_facade" name="product.info.container2" as="container2">
193
- <action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>
194
- <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
195
- <action method="append"><block>product.info.options.wrapper</block></action>
196
- <action method="append"><block>product.info.options.wrapper.bottom</block></action>
197
- </block>
198
- <action method="unsetCallChild"><child>container1</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
199
- <action method="unsetCallChild"><child>container2</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
200
- </block>
201
- </reference>
202
- <reference name="right">
203
-
204
- </reference>
205
- </catalog_product_view>
206
-
207
- <!--
208
- Additional block dependant on product type
209
- -->
210
-
211
- <PRODUCT_TYPE_configurable translate="label" module="catalog">
212
- <label>Catalog Product View (Configurable)</label>
213
- <reference name="product.info">
214
- <block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/default.phtml">
215
- <block type="core/text_list" name="product.info.configurable.extra" as="product_type_data_extra" translate="label">
216
- <label>Product Extra Info</label>
217
- </block>
218
- </block>
219
- </reference>
220
- <reference name="product.info.options.wrapper">
221
- <block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml"/>
222
- </reference>
223
- </PRODUCT_TYPE_configurable>
224
- <PRODUCT_TYPE_grouped translate="label" module="catalog">
225
- <label>Catalog Product View (Grouped)</label>
226
- <reference name="product.info">
227
- <block type="catalog/product_view_type_grouped" name="product.info.grouped" as="product_type_data" template="catalog/product/view/type/grouped.phtml">
228
- <block type="core/text_list" name="product.info.grouped.extra" as="product_type_data_extra" translate="label">
229
- <label>Product Extra Info</label>
230
- </block>
231
- </block>
232
- </reference>
233
- </PRODUCT_TYPE_grouped>
234
- <PRODUCT_TYPE_virtual translate="label" module="catalog">
235
- <label>Catalog Product View (Virtual)</label>
236
- <reference name="product.info">
237
- <block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
238
- <block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
239
- <label>Product Extra Info</label>
240
- </block>
241
- </block>
242
- </reference>
243
- </PRODUCT_TYPE_virtual>
244
-
245
-
246
-
247
- <!--
248
- Product send to friend
249
- -->
250
-
251
- <catalog_product_send translate="label">
252
- <label>Catalog Product Email to a Friend</label>
253
- <!-- Mage_Catalog -->
254
- <reference name="root">
255
- <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
256
- </reference>
257
- <reference name="head">
258
- <action method="addJs"><script>varien/product.js</script></action>
259
- </reference>
260
- <reference name="content">
261
- <block type="catalog/product_send" name="product.send" template="catalog/product/send.phtml">
262
- </block>
263
- </reference>
264
- </catalog_product_send>
265
-
266
- <!--
267
- Product additional images gallery popup
268
- -->
269
-
270
- <catalog_product_gallery translate="label">
271
- <label>Catalog Product Image Gallery Popup</label>
272
- <!-- Mage_Catalog -->
273
- <reference name="root">
274
- <action method="setTemplate"><template>page/popup.phtml</template></action>
275
- </reference>
276
- <reference name="content">
277
- <block type="catalog/product_gallery" name="catalog_product_gallery" template="catalog/product/gallery.phtml"/>
278
- </reference>
279
- </catalog_product_gallery>
280
-
281
- <!--
282
- SEO Site Map
283
- -->
284
-
285
- <catalog_seo_sitemap translate="label">
286
- <label>Catalog Seo Sitemap (Common)</label>
287
- <remove name="right"/>
288
- <remove name="left"/>
289
-
290
- <reference name="root">
291
- <action method="setTemplate"><template>page/1column.phtml</template></action>
292
- </reference>
293
- <reference name="content">
294
- <block type="page/template_container" name="seo.sitemap.container" template="catalog/seo/sitemap/container.phtml">
295
- <block type="page/template_links" name="seo.sitemap.links" as="links" template="page/template/links.phtml"/>
296
- <block type="page/html_pager" name="seo.sitemap.pager.top" as="pager_top" template="page/html/pager.phtml"/>
297
- <block type="page/html_pager" name="seo.sitemap.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
298
- </block>
299
- </reference>
300
- </catalog_seo_sitemap>
301
-
302
- <catalog_seo_sitemap_category translate="label">
303
- <label>Catalog Seo Sitemap (Category List)</label>
304
- <reference name="head">
305
- <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
306
- </reference>
307
- <update handle="catalog_seo_sitemap" />
308
- <reference name="seo.sitemap.container">
309
- <action method="setTitle" translate="title" module="catalog"><title>Categories</title></action>
310
- <block type="catalog/seo_sitemap_category" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
311
- <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
312
- <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
313
- <action method="setItemsTitle" translate="title" module="catalog"><title>categories</title></action>
314
- </block>
315
- </reference>
316
- <reference name="seo.sitemap.links">
317
- <action method="addLink" translate="label title" module="catalog"><label>Products Sitemap</label><url helper="catalog/map/getProductUrl"/><title>Products Sitemap</title></action>
318
- </reference>
319
- </catalog_seo_sitemap_category>
320
-
321
- <catalog_seo_sitemap_category_tree translate="label">
322
- <label>Catalog Seo Sitemap (Category Tree)</label>
323
- <reference name="seo.sitemap.container">
324
- <remove name="seo.sitemap.pager.top" />
325
- <remove name="seo.sitemap.pager.bottom" />
326
- <block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.top" as="pager_top" template="page/html/pager.phtml"/>
327
- <block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
328
- <remove name="seo.sitemap.sitemap" />
329
- <block type="catalog/seo_sitemap_tree_category" name="seo.sitemap.sitemap_tree" as="sitemap" after="pager_top" template="catalog/seo/tree.phtml">
330
- <action method="bindPager"><pager>seo.sitemap.tree.pager.top</pager></action>
331
- <action method="bindPager"><pager>seo.sitemap.tree.pager.bottom</pager></action>
332
- </block>
333
- </reference>
334
- </catalog_seo_sitemap_category_tree>
335
-
336
- <catalog_seo_sitemap_product translate="label">
337
- <label>Catalog Seo Sitemap (Product List)</label>
338
- <reference name="head">
339
- <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
340
- </reference>
341
- <update handle="catalog_seo_sitemap" />
342
- <reference name="seo.sitemap.container">
343
- <action method="setTitle" translate="title" module="catalog"><title>Products</title></action>
344
- <block type="catalog/seo_sitemap_product" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
345
- <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
346
- <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
347
- <action method="setItemsTitle" translate="title" module="catalog"><title>products</title></action>
348
- </block>
349
- </reference>
350
- <reference name="seo.sitemap.links">
351
- <action method="addLink" translate="label title" module="catalog"><label>Categories Sitemap</label><url helper="catalog/map/getCategoryUrl"/><title>Categories Sitemap</title></action>
352
- </reference>
353
- </catalog_seo_sitemap_product>
354
- </layout>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ Supported layout update handles (action):
29
+ - catalog_product_gallery
30
+ - catalog_product_compare_index
31
+
32
+ Supported layout update handles (special):
33
+ - default
34
+ - catalog_category_default
35
+ - catalog_category_layered
36
+ - catalog_product_view
37
+
38
+ -->
39
+ <layout version="0.1.0">
40
+
41
+ <!--
42
+ Default layout, loads most of the pages
43
+ -->
44
+
45
+ <default>
46
+
47
+ <!-- Mage_Catalog -->
48
+ <reference name="left">
49
+ <block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
50
+ <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
51
+ <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
52
+ <action method="setLinkUrl"><url>checkout/cart</url></action>
53
+ </block>
54
+ </reference>
55
+ <reference name="right">
56
+ <block type="catalog/product_compare_sidebar" after="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
57
+ <block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
58
+ <action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
59
+ <action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>
60
+ </block>
61
+ </reference>
62
+ <reference name="footer_links">
63
+ <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
64
+ </reference>
65
+ <block type="catalog/product_price_template" name="catalog_product_price_template" />
66
+
67
+ <!-- Menu mobile -->
68
+ <reference name="header">
69
+ <block type="catalog/navigation" name="catalog_footernav" template="catalog/navigation/mobile-menu.phtml" before="-" />
70
+ </reference>
71
+
72
+ </default>
73
+
74
+
75
+ <!--
76
+ Category default layout
77
+ -->
78
+
79
+
80
+
81
+ <!--
82
+ Category layered navigation layout
83
+ -->
84
+
85
+
86
+
87
+ <!--
88
+ Compare products page
89
+ -->
90
+
91
+ <catalog_product_compare_index translate="label">
92
+ <label>Catalog Product Compare List</label>
93
+ <!-- Mage_Catalog -->
94
+ <reference name="root">
95
+ <action method="setTemplate"><template>page/popup.phtml</template></action>
96
+ </reference>
97
+ <reference name="head">
98
+ <action method="addJs"><script>scriptaculous/scriptaculous.js</script></action>
99
+ <action method="addJs"><script>varien/product.js</script></action>
100
+ </reference>
101
+ <reference name="content">
102
+ <block type="catalog/product_compare_list" name="catalog.compare.list" template="catalog/product/compare/list.phtml"/>
103
+ </reference>
104
+ </catalog_product_compare_index>
105
+
106
+ <customer_account_index>
107
+ <reference name="right">
108
+ <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
109
+ </reference>
110
+ </customer_account_index>
111
+
112
+ <!--
113
+ Product view
114
+ -->
115
+
116
+ <catalog_product_view translate="label">
117
+ <label>Catalog Product View (Any)</label>
118
+ <!-- Mage_Catalog -->
119
+ <reference name="root">
120
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
121
+ </reference>
122
+ <reference name="head">
123
+ <action method="addJs"><script>varien/product.js</script></action>
124
+ <action method="addJs"><script>varien/configurable.js</script></action>
125
+
126
+ <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
127
+ <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
128
+ <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
129
+ </reference>
130
+ <reference name="content">
131
+ <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
132
+ <!--
133
+ <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/summary.phtml</template></action>
134
+ <action method="addReviewSummaryTemplate"><type>short</type><template>review/helper/summary_short.phtml</template></action>
135
+ <action method="addReviewSummaryTemplate"><type>...</type><template>...</template></action>
136
+ -->
137
+ <block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml"/>
138
+ <block type="core/text_list" name="alert.urls" as="alert_urls" translate="label">
139
+ <label>Alert Urls</label>
140
+ </block>
141
+ <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
142
+ <block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
143
+ <label>Product Extra Info</label>
144
+ </block>
145
+ </block>
146
+ <action method="setTierPriceTemplate"><template>catalog/product/view/tierprices.phtml</template></action>
147
+
148
+ <block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
149
+ <action method="setColumnCount"><columns>4</columns></action>
150
+ <action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
151
+ </block>
152
+ <block type="catalog/product_list_related" name="catalog.product.related" as="related_products" template="catalog/product/list/related.phtml"/>
153
+
154
+ <block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
155
+ <action method="addToParentGroup"><group>detailed_info</group></action>
156
+ </block>
157
+ <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
158
+ <action method="addToParentGroup"><group>detailed_info</group></action>
159
+ </block>
160
+ <block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
161
+ <block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>
162
+ <block type="review/product_view_list" name="product.info.product_additional_data" as="reviews" template="review/product/view/list.phtml"/>
163
+ <block type="core/text_list" name="product.info.extrahint" as="extrahint" translate="label">
164
+ <label>Product View Extra Hint</label>
165
+ </block>
166
+
167
+ <block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label">
168
+ <label>Info Column Options Wrapper</label>
169
+ <block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/>
170
+ <block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
171
+ <action method="addOptionRenderer"><type>text</type><block>catalog/product_view_options_type_text</block><template>catalog/product/view/options/type/text.phtml</template></action>
172
+ <action method="addOptionRenderer"><type>file</type><block>catalog/product_view_options_type_file</block><template>catalog/product/view/options/type/file.phtml</template></action>
173
+ <action method="addOptionRenderer"><type>select</type><block>catalog/product_view_options_type_select</block><template>catalog/product/view/options/type/select.phtml</template></action>
174
+ <action method="addOptionRenderer"><type>date</type><block>catalog/product_view_options_type_date</block><template>catalog/product/view/options/type/date.phtml</template></action>
175
+ </block>
176
+ <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
177
+ </block>
178
+ <block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
179
+ <label>Bottom Block Options Wrapper</label>
180
+ <action method="insert"><block>product.tierprices</block></action>
181
+ <!--block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/-->
182
+ <action method="append"><block>product.info.addtocart</block></action>
183
+ <!--action method="append"><block>product.info.addto</block></action-->
184
+ </block>
185
+
186
+ <block type="core/template_facade" name="product.info.container1" as="container1">
187
+ <action method="setDataByKey"><key>alias_in_layout</key><value>container1</value></action>
188
+ <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
189
+ <action method="append"><block>product.info.options.wrapper</block></action>
190
+ <action method="append"><block>product.info.options.wrapper.bottom</block></action>
191
+ </block>
192
+ <block type="core/template_facade" name="product.info.container2" as="container2">
193
+ <action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>
194
+ <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
195
+ <action method="append"><block>product.info.options.wrapper</block></action>
196
+ <action method="append"><block>product.info.options.wrapper.bottom</block></action>
197
+ </block>
198
+ <action method="unsetCallChild"><child>container1</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
199
+ <action method="unsetCallChild"><child>container2</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
200
+ </block>
201
+ </reference>
202
+ <reference name="right">
203
+
204
+ </reference>
205
+ </catalog_product_view>
206
+
207
+ <!--
208
+ Additional block dependant on product type
209
+ -->
210
+
211
+ <PRODUCT_TYPE_configurable translate="label" module="catalog">
212
+ <label>Catalog Product View (Configurable)</label>
213
+ <reference name="product.info">
214
+ <block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/default.phtml">
215
+ <block type="core/text_list" name="product.info.configurable.extra" as="product_type_data_extra" translate="label">
216
+ <label>Product Extra Info</label>
217
+ </block>
218
+ </block>
219
+ </reference>
220
+ <reference name="product.info.options.wrapper">
221
+ <block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml"/>
222
+ </reference>
223
+ </PRODUCT_TYPE_configurable>
224
+ <PRODUCT_TYPE_grouped translate="label" module="catalog">
225
+ <label>Catalog Product View (Grouped)</label>
226
+ <reference name="product.info">
227
+ <block type="catalog/product_view_type_grouped" name="product.info.grouped" as="product_type_data" template="catalog/product/view/type/grouped.phtml">
228
+ <block type="core/text_list" name="product.info.grouped.extra" as="product_type_data_extra" translate="label">
229
+ <label>Product Extra Info</label>
230
+ </block>
231
+ </block>
232
+ </reference>
233
+ </PRODUCT_TYPE_grouped>
234
+ <PRODUCT_TYPE_virtual translate="label" module="catalog">
235
+ <label>Catalog Product View (Virtual)</label>
236
+ <reference name="product.info">
237
+ <block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
238
+ <block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
239
+ <label>Product Extra Info</label>
240
+ </block>
241
+ </block>
242
+ </reference>
243
+ </PRODUCT_TYPE_virtual>
244
+
245
+
246
+
247
+ <!--
248
+ Product send to friend
249
+ -->
250
+
251
+ <catalog_product_send translate="label">
252
+ <label>Catalog Product Email to a Friend</label>
253
+ <!-- Mage_Catalog -->
254
+ <reference name="root">
255
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
256
+ </reference>
257
+ <reference name="head">
258
+ <action method="addJs"><script>varien/product.js</script></action>
259
+ </reference>
260
+ <reference name="content">
261
+ <block type="catalog/product_send" name="product.send" template="catalog/product/send.phtml">
262
+ </block>
263
+ </reference>
264
+ </catalog_product_send>
265
+
266
+ <!--
267
+ Product additional images gallery popup
268
+ -->
269
+
270
+ <catalog_product_gallery translate="label">
271
+ <label>Catalog Product Image Gallery Popup</label>
272
+ <!-- Mage_Catalog -->
273
+ <reference name="root">
274
+ <action method="setTemplate"><template>page/popup.phtml</template></action>
275
+ </reference>
276
+ <reference name="content">
277
+ <block type="catalog/product_gallery" name="catalog_product_gallery" template="catalog/product/gallery.phtml"/>
278
+ </reference>
279
+ </catalog_product_gallery>
280
+
281
+ <!--
282
+ SEO Site Map
283
+ -->
284
+
285
+ <catalog_seo_sitemap translate="label">
286
+ <label>Catalog Seo Sitemap (Common)</label>
287
+ <remove name="right"/>
288
+ <remove name="left"/>
289
+
290
+ <reference name="root">
291
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
292
+ </reference>
293
+ <reference name="content">
294
+ <block type="page/template_container" name="seo.sitemap.container" template="catalog/seo/sitemap/container.phtml">
295
+ <block type="page/template_links" name="seo.sitemap.links" as="links" template="page/template/links.phtml"/>
296
+ <block type="page/html_pager" name="seo.sitemap.pager.top" as="pager_top" template="page/html/pager.phtml"/>
297
+ <block type="page/html_pager" name="seo.sitemap.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
298
+ </block>
299
+ </reference>
300
+ </catalog_seo_sitemap>
301
+
302
+ <catalog_seo_sitemap_category translate="label">
303
+ <label>Catalog Seo Sitemap (Category List)</label>
304
+ <reference name="head">
305
+ <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
306
+ </reference>
307
+ <update handle="catalog_seo_sitemap" />
308
+ <reference name="seo.sitemap.container">
309
+ <action method="setTitle" translate="title" module="catalog"><title>Categories</title></action>
310
+ <block type="catalog/seo_sitemap_category" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
311
+ <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
312
+ <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
313
+ <action method="setItemsTitle" translate="title" module="catalog"><title>categories</title></action>
314
+ </block>
315
+ </reference>
316
+ <reference name="seo.sitemap.links">
317
+ <action method="addLink" translate="label title" module="catalog"><label>Products Sitemap</label><url helper="catalog/map/getProductUrl"/><title>Products Sitemap</title></action>
318
+ </reference>
319
+ </catalog_seo_sitemap_category>
320
+
321
+ <catalog_seo_sitemap_category_tree translate="label">
322
+ <label>Catalog Seo Sitemap (Category Tree)</label>
323
+ <reference name="seo.sitemap.container">
324
+ <remove name="seo.sitemap.pager.top" />
325
+ <remove name="seo.sitemap.pager.bottom" />
326
+ <block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.top" as="pager_top" template="page/html/pager.phtml"/>
327
+ <block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
328
+ <remove name="seo.sitemap.sitemap" />
329
+ <block type="catalog/seo_sitemap_tree_category" name="seo.sitemap.sitemap_tree" as="sitemap" after="pager_top" template="catalog/seo/tree.phtml">
330
+ <action method="bindPager"><pager>seo.sitemap.tree.pager.top</pager></action>
331
+ <action method="bindPager"><pager>seo.sitemap.tree.pager.bottom</pager></action>
332
+ </block>
333
+ </reference>
334
+ </catalog_seo_sitemap_category_tree>
335
+
336
+ <catalog_seo_sitemap_product translate="label">
337
+ <label>Catalog Seo Sitemap (Product List)</label>
338
+ <reference name="head">
339
+ <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
340
+ </reference>
341
+ <update handle="catalog_seo_sitemap" />
342
+ <reference name="seo.sitemap.container">
343
+ <action method="setTitle" translate="title" module="catalog"><title>Products</title></action>
344
+ <block type="catalog/seo_sitemap_product" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
345
+ <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
346
+ <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
347
+ <action method="setItemsTitle" translate="title" module="catalog"><title>products</title></action>
348
+ </block>
349
+ </reference>
350
+ <reference name="seo.sitemap.links">
351
+ <action method="addLink" translate="label title" module="catalog"><label>Categories Sitemap</label><url helper="catalog/map/getCategoryUrl"/><title>Categories Sitemap</title></action>
352
+ </reference>
353
+ </catalog_seo_sitemap_product>
354
+ </layout>
app/design/frontend/redstage-mobilenow/default/layout/catalogsearch.xml CHANGED
@@ -1,114 +1,114 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- * that is bundled with this package in the file LICENSE_AFL.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/afl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @category design
23
- * @package base_default
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
- */
27
-
28
- -->
29
- <layout version="0.1.0">
30
-
31
- <default>
32
- <reference name="header">
33
- <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
34
- </reference>
35
- <reference name="footer_links">
36
- <action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms">
37
- <label>Search Terms</label>
38
- <url helper="catalogsearch/getSearchTermUrl" />
39
- <title>Search Terms</title>
40
- </action>
41
- <action method="addLink" translate="label title" module="catalogsearch">
42
- <label>Advanced Search</label>
43
- <url helper="catalogsearch/getAdvancedSearchUrl" />
44
- <title>Advanced Search</title>
45
- </action>
46
- </reference>
47
- </default>
48
-
49
- <catalogsearch_advanced_index translate="label">
50
- <label>Advanced Search Form</label>
51
- <!-- Mage_Catalogsearch -->
52
- <reference name="root">
53
- <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
54
- </reference>
55
- <reference name="head">
56
- <action method="setTitle" translate="title" module="catalogsearch"><title>Advanced Search</title></action>
57
- <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
58
- <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
59
- <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
60
- </reference>
61
- <reference name="content">
62
- <block type="catalogsearch/advanced_form" name="catalogsearch_advanced_form" template="catalogsearch/advanced/form.phtml"/>
63
- <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
64
- </reference>
65
- </catalogsearch_advanced_index>
66
-
67
- <!--
68
- Advanced search results
69
- -->
70
-
71
- <catalogsearch_advanced_result translate="label">
72
- <label>Advanced Search Result</label>
73
- <update handle="page_two_columns_right" />
74
- <!-- Mage_Catalogsearch -->
75
- <reference name="root">
76
- <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
77
- </reference>
78
- <reference name="content">
79
- <block type="catalogsearch/advanced_result" name="catalogsearch_advanced_result" template="catalogsearch/advanced/result.phtml">
80
- <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
81
- <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
82
- <block type="page/html_pager" name="product_list_toolbar_pager"/>
83
- </block>
84
- <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
85
- <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
86
- <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
87
- <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
88
- <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
89
- <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
90
- </block>
91
- <action method="setListOrders"/>
92
- <action method="setListModes"/>
93
- <action method="setListCollection"/>
94
- </block>
95
- </reference>
96
- </catalogsearch_advanced_result>
97
-
98
- <catalogsearch_term_popular translate="label">
99
- <label>Popular Search Terms</label>
100
- <remove name="right"/>
101
- <remove name="left"/>
102
-
103
- <reference name="head">
104
- <action method="setTitle" translate="title" module="catalogsearch"><title>Search Terms</title></action>
105
- </reference>
106
- <reference name="root">
107
- <action method="setTemplate"><template>page/1column.phtml</template></action>
108
- </reference>
109
- <reference name="content">
110
- <block type="catalogsearch/term" name="seo.searchterm" template="catalogsearch/term.phtml"/>
111
- </reference>
112
- </catalogsearch_term_popular>
113
-
114
- </layout>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+
31
+ <default>
32
+ <reference name="header">
33
+ <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
34
+ </reference>
35
+ <reference name="footer_links">
36
+ <action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms">
37
+ <label>Search Terms</label>
38
+ <url helper="catalogsearch/getSearchTermUrl" />
39
+ <title>Search Terms</title>
40
+ </action>
41
+ <action method="addLink" translate="label title" module="catalogsearch">
42
+ <label>Advanced Search</label>
43
+ <url helper="catalogsearch/getAdvancedSearchUrl" />
44
+ <title>Advanced Search</title>
45
+ </action>
46
+ </reference>
47
+ </default>
48
+
49
+ <catalogsearch_advanced_index translate="label">
50
+ <label>Advanced Search Form</label>
51
+ <!-- Mage_Catalogsearch -->
52
+ <reference name="root">
53
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
54
+ </reference>
55
+ <reference name="head">
56
+ <action method="setTitle" translate="title" module="catalogsearch"><title>Advanced Search</title></action>
57
+ <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
58
+ <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
59
+ <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
60
+ </reference>
61
+ <reference name="content">
62
+ <block type="catalogsearch/advanced_form" name="catalogsearch_advanced_form" template="catalogsearch/advanced/form.phtml"/>
63
+ <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
64
+ </reference>
65
+ </catalogsearch_advanced_index>
66
+
67
+ <!--
68
+ Advanced search results
69
+ -->
70
+
71
+ <catalogsearch_advanced_result translate="label">
72
+ <label>Advanced Search Result</label>
73
+ <update handle="page_two_columns_right" />
74
+ <!-- Mage_Catalogsearch -->
75
+ <reference name="root">
76
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
77
+ </reference>
78
+ <reference name="content">
79
+ <block type="catalogsearch/advanced_result" name="catalogsearch_advanced_result" template="catalogsearch/advanced/result.phtml">
80
+ <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
81
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
82
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
83
+ </block>
84
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
85
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
86
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
87
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
88
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
89
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
90
+ </block>
91
+ <action method="setListOrders"/>
92
+ <action method="setListModes"/>
93
+ <action method="setListCollection"/>
94
+ </block>
95
+ </reference>
96
+ </catalogsearch_advanced_result>
97
+
98
+ <catalogsearch_term_popular translate="label">
99
+ <label>Popular Search Terms</label>
100
+ <remove name="right"/>
101
+ <remove name="left"/>
102
+
103
+ <reference name="head">
104
+ <action method="setTitle" translate="title" module="catalogsearch"><title>Search Terms</title></action>
105
+ </reference>
106
+ <reference name="root">
107
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
108
+ </reference>
109
+ <reference name="content">
110
+ <block type="catalogsearch/term" name="seo.searchterm" template="catalogsearch/term.phtml"/>
111
+ </reference>
112
+ </catalogsearch_term_popular>
113
+
114
+ </layout>
app/design/frontend/redstage-mobilenow/default/layout/checkout.xml CHANGED
@@ -1,446 +1,446 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- * that is bundled with this package in the file LICENSE_AFL.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/afl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @category design
23
- * @package base_default
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
- */
27
-
28
- -->
29
- <layout version="0.1.0">
30
-
31
- <!--
32
- Default layout, loads most of the pages
33
- -->
34
-
35
- <default>
36
-
37
- <!-- Mage_Checkout -->
38
- <!--reference name="top.links">
39
- <block type="checkout/links" name="checkout_cart_link">
40
- <action method="addCartLink"></action>
41
- <action method="addCheckoutLink"></action>
42
- </block>
43
- </reference-->
44
- <reference name="right">
45
- <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
46
- <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
47
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
48
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
49
- <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
50
- <label>Shopping Cart Sidebar Extra Actions</label>
51
- </block>
52
- </block>
53
- </reference>
54
- </default>
55
-
56
- <checkout_cart_index translate="label">
57
- <label>Shopping Cart</label>
58
- <remove name="right"/>
59
- <remove name="left"/>
60
- <!-- Mage_Checkout -->
61
- <reference name="root">
62
- <action method="setTemplate"><template>page/1column.phtml</template></action>
63
- </reference>
64
- <reference name="head">
65
-
66
- <action method="addCss"><stylesheet>css/onepage.css</stylesheet></action>
67
- </reference>
68
- <reference name="content">
69
- <block type="checkout/cart" name="checkout.cart">
70
- <action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
71
- <action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
72
- <action method="chooseTemplate"/>
73
- <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
74
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
75
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>
76
-
77
- <block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
78
- <label>Payment Methods Before Checkout Button</label>
79
- <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
80
- </block>
81
-
82
- <block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
83
- <label>Shopping Cart Form Before</label>
84
- </block>
85
-
86
- <block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
87
- <label>Payment Methods After Checkout Button</label>
88
- <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
89
- <block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
90
- </block>
91
-
92
- <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
93
- <block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
94
- <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
95
-
96
- <block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
97
- </block>
98
- </reference>
99
- <block type="core/text_list" name="additional.product.info" translate="label">
100
- <label>Additional Product Info</label>
101
- </block>
102
- </checkout_cart_index>
103
-
104
- <checkout_cart_configure translate="label">
105
- <label>Configure Cart Item</label>
106
- <update handle="catalog_product_view"/>
107
- <reference name="product.info">
108
- <block type="checkout/cart_item_configure" name="checkout.cart.item.configure.block"></block>
109
- </reference>
110
- </checkout_cart_configure>
111
-
112
- <!--
113
- Multi address shipping checkout main layout,
114
- will be rendered on all checkout pages
115
- -->
116
-
117
- <checkout_multishipping translate="label">
118
- <label>Multishipping Checkout</label>
119
- <!-- Mage_Checkout -->
120
- <remove name="right"/>
121
- <remove name="left"/>
122
-
123
- <reference name="root">
124
- <action method="setTemplate"><template>page/1column.phtml</template></action>
125
- </reference>
126
- <reference name="content">
127
- <block type="checkout/multishipping_state" name="checkout_state" template="checkout/multishipping/state.phtml"/>
128
- </reference>
129
- </checkout_multishipping>
130
-
131
- <checkout_multishipping_login>
132
- <update handle="customer_account_login"/>
133
- </checkout_multishipping_login>
134
-
135
- <checkout_multishipping_register>
136
- <update handle="customer_account_create"/>
137
- </checkout_multishipping_register>
138
-
139
- <!--
140
- Multi address shipping checkout selection of address per item page
141
- -->
142
-
143
- <checkout_multishipping_address_select translate="label">
144
- <label>Multishipping Checkout Shipping Address Selection</label>
145
- <update handle="checkout_multishipping"/>
146
- <!-- Mage_Checkout -->
147
- <reference name="content">
148
- <block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
149
- </reference>
150
- </checkout_multishipping_address_select>
151
-
152
- <checkout_multishipping_address_selectbilling translate="label">
153
- <label>Multishipping Checkout Billing Address Selection</label>
154
- <update handle="checkout_multishipping"/>
155
- <!-- Mage_Checkout -->
156
- <reference name="content">
157
- <block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
158
- </reference>
159
- </checkout_multishipping_address_selectbilling>
160
-
161
-
162
- <checkout_multishipping_address_newshipping translate="label">
163
- <label>Multishipping Checkout Shipping Address Creation</label>
164
- <update handle="checkout_multishipping"/>
165
- <update handle="checkout_multishipping_customer_address"/>
166
- </checkout_multishipping_address_newshipping>
167
-
168
- <checkout_multishipping_address_newbilling translate="label">
169
- <label>Multishipping Checkout Billing Address Creation</label>
170
- <update handle="checkout_multishipping"/>
171
- <update handle="checkout_multishipping_customer_address"/>
172
- </checkout_multishipping_address_newbilling>
173
-
174
- <checkout_multishipping_address_editshipping translate="label">
175
- <label>Multishipping Checkout Shipping Address Edit Form</label>
176
- <update handle="checkout_multishipping"/>
177
- <update handle="checkout_multishipping_customer_address"/>
178
- </checkout_multishipping_address_editshipping>
179
-
180
- <checkout_multishipping_address_editaddress>
181
- <update handle="checkout_multishipping"/>
182
- <update handle="checkout_multishipping_customer_address"/>
183
- </checkout_multishipping_address_editaddress>
184
-
185
- <checkout_multishipping_address_editbilling translate="label">
186
- <label>Multishipping Checkout Billing Address Edit Form</label>
187
- <update handle="checkout_multishipping"/>
188
- <update handle="checkout_multishipping_customer_address"/>
189
- </checkout_multishipping_address_editbilling>
190
-
191
- <checkout_multishipping_customer_address translate="label">
192
- <label>Multishipping Checkout Customer Address Edit Form</label>
193
- <reference name="content">
194
- <block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
195
- </reference>
196
- </checkout_multishipping_customer_address>
197
-
198
- <!--
199
- Multi address shipping checkout address page
200
- -->
201
-
202
- <checkout_multishipping_addresses translate="label">
203
- <label>Multishipping Checkout Address (Any) Form</label>
204
- <update handle="checkout_multishipping"/>
205
- <!-- Mage_Checkout -->
206
- <reference name="content">
207
- <block type="checkout/multishipping_addresses" name="checkout_addresses" template="checkout/multishipping/addresses.phtml">
208
- <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
209
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
210
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
211
- </block>
212
- </reference>
213
- </checkout_multishipping_addresses>
214
-
215
- <!--
216
- Multi address shipping checkout shipping information
217
- -->
218
-
219
- <checkout_multishipping_shipping translate="label">
220
- <label>Multishipping Checkout Shipping Information Step</label>
221
- <update handle="checkout_multishipping"/>
222
- <!-- Mage_Checkout -->
223
- <reference name="content">
224
- <block type="checkout/multishipping_shipping" name="checkout_shipping" template="checkout/multishipping/shipping.phtml">
225
- <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
226
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
227
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
228
-
229
- <block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
230
- <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
231
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
232
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
233
- </block>
234
- </block>
235
- </reference>
236
- </checkout_multishipping_shipping>
237
-
238
- <!--
239
- Multi address shipping checkout billing information
240
- -->
241
-
242
- <checkout_multishipping_billing translate="label">
243
- <label>Multishipping Checkout Billing Information Step</label>
244
- <update handle="checkout_multishipping"/>
245
- <!-- Mage_Checkout -->
246
- <reference name="content">
247
- <block type="checkout/multishipping_billing" name="checkout_billing" template="checkout/multishipping/billing.phtml">
248
- <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
249
-
250
- <!--<block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
251
- <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
252
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
253
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
254
- </block>-->
255
-
256
- </block>
257
- </reference>
258
- </checkout_multishipping_billing>
259
-
260
- <!--
261
- Multi address shipping checkout overview
262
- -->
263
-
264
- <checkout_multishipping_overview translate="label">
265
- <label>Multishipping Checkout Overview</label>
266
- <update handle="checkout_multishipping"/>
267
- <!-- Mage_Checkout -->
268
- <reference name="content">
269
- <block type="checkout/multishipping_overview" name="checkout_overview" template="checkout/multishipping/overview.phtml">
270
- <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
271
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
272
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
273
- <action method="addRowItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/overview/item.phtml</template></action>
274
- <action method="addRowItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/overview/item.phtml</template></action>
275
- <block type="checkout/multishipping_payment_info" name="payment_info">
276
- <action method="setInfoTemplate"><method></method><template></template></action>
277
- </block>
278
- <block type="checkout/agreements" name="checkout.multishipping.agreements" as="agreements" template="checkout/multishipping/agreements.phtml"/>
279
- <block type="checkout/cart_totals" name="totals" />
280
- <block type="core/text_list" name="checkout.multishipping.overview.items.after" as="items_after" translate="label">
281
- <label>Overview Items After</label>
282
- </block>
283
- </block>
284
- </reference>
285
- </checkout_multishipping_overview>
286
-
287
- <!--
288
- Multi address shipping checkout success
289
- -->
290
-
291
- <checkout_multishipping_success translate="label">
292
- <label>Multishipping Checkout Success</label>
293
- <update handle="checkout_multishipping"/>
294
- <!-- Mage_Checkout -->
295
- <reference name="content">
296
- <block type="checkout/multishipping_success" name="checkout_success" template="checkout/multishipping/success.phtml"/>
297
- </reference>
298
- </checkout_multishipping_success>
299
-
300
- <!--
301
- One page checkout main layout
302
- -->
303
-
304
- <checkout_onepage_index translate="label">
305
- <label>One Page Checkout</label>
306
- <!-- Mage_Checkout -->
307
- <remove name="left"/>
308
- <remove name="right"/>
309
- <reference name="root">
310
- <action method="setTemplate"><template>page/1column.phtml</template></action>
311
- </reference>
312
- <reference name="right">
313
- <action method="unsetChildren"></action>
314
- <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
315
- <label>Checkout Progress Wrapper</label>
316
- <action method="setElementId"><value>checkout-progress-wrapper</value></action>
317
- <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"/>
318
- </block>
319
- </reference>
320
- <reference name="content">
321
- <block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml">
322
- <block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml">
323
- <block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before" translate="label">
324
- <label>Login/Registration Before</label>
325
- <action method="setMayBeInvisible"><value>1</value></action>
326
- </block>
327
- </block>
328
- <block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/>
329
- <block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/>
330
- <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml">
331
- <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/>
332
- <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
333
- </block>
334
- <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml">
335
- <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml">
336
- <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
337
- </block>
338
- </block>
339
- <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"/>
340
- </block>
341
- </reference>
342
- </checkout_onepage_index>
343
-
344
- <!--
345
- One page checkout progress block
346
- -->
347
-
348
- <checkout_onepage_progress>
349
- <!-- Mage_Checkout -->
350
- <remove name="right"/>
351
- <remove name="left"/>
352
-
353
- <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml">
354
- <block type="checkout/onepage_payment_info" name="payment_info">
355
- <action method="setInfoTemplate"><method></method><template></template></action>
356
- </block>
357
- </block>
358
- </checkout_onepage_progress>
359
-
360
- <!--
361
- One page checkout payment methods block
362
- -->
363
- <checkout_onepage_paymentmethod>
364
- <remove name="right"/>
365
- <remove name="left"/>
366
-
367
- <block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
368
- <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
369
- </block>
370
- </checkout_onepage_paymentmethod>
371
-
372
-
373
- <!--
374
- One page checkout shipping methods block
375
- -->
376
-
377
- <checkout_onepage_shippingmethod>
378
- <!-- Mage_Checkout -->
379
- <remove name="right"/>
380
- <remove name="left"/>
381
-
382
- <block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="checkout/onepage/shipping_method/available.phtml"/>
383
- </checkout_onepage_shippingmethod>
384
-
385
- <checkout_onepage_additional>
386
- <!-- Mage_Checkout -->
387
- <remove name="right"/>
388
- <remove name="left"/>
389
-
390
- <block type="checkout/onepage_shipping_method_additional" name="root" output="toHtml" template="checkout/onepage/shipping_method/additional.phtml">
391
- <action method="setDontDisplayContainer"><param>1</param></action>
392
- </block>
393
- </checkout_onepage_additional>
394
-
395
- <!--
396
- One page checkout order review block
397
- -->
398
-
399
- <checkout_onepage_review translate="label">
400
- <label>One Page Checkout Overview</label>
401
- <!-- Mage_Checkout -->
402
- <remove name="right"/>
403
- <remove name="left"/>
404
-
405
- <block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
406
- <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
407
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
408
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action>
409
- <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
410
- <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
411
- <label>Items Before</label>
412
- </block>
413
- <block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
414
- <label>Items After</label>
415
- </block>
416
- <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
417
- <block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/>
418
- </block>
419
- </checkout_onepage_review>
420
-
421
- <checkout_onepage_success translate="label">
422
- <label>One Page Checkout Success</label>
423
-
424
- <remove name="right"/>
425
- <remove name="left"/>
426
-
427
- <reference name="root">
428
- <action method="setTemplate"><template>page/1column.phtml</template></action>
429
- </reference>
430
- <reference name="content">
431
- <block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
432
- </reference>
433
- </checkout_onepage_success>
434
- <checkout_onepage_failure translate="label">
435
- <label>One Page Checkout Failure</label>
436
- <remove name="right"/>
437
- <remove name="left"/>
438
- <reference name="root">
439
- <action method="setTemplate"><template>page/1column.phtml</template></action>
440
- </reference>
441
- <reference name="content">
442
- <block type="checkout/onepage_failure" name="checkout.failure" template="checkout/onepage/failure.phtml"/>
443
- </reference>
444
- </checkout_onepage_failure>
445
- <block type="core/list" name="additional.product.info"/>
446
- </layout>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+
31
+ <!--
32
+ Default layout, loads most of the pages
33
+ -->
34
+
35
+ <default>
36
+
37
+ <!-- Mage_Checkout -->
38
+ <!--reference name="top.links">
39
+ <block type="checkout/links" name="checkout_cart_link">
40
+ <action method="addCartLink"></action>
41
+ <action method="addCheckoutLink"></action>
42
+ </block>
43
+ </reference-->
44
+ <reference name="right">
45
+ <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
46
+ <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
47
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
48
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
49
+ <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
50
+ <label>Shopping Cart Sidebar Extra Actions</label>
51
+ </block>
52
+ </block>
53
+ </reference>
54
+ </default>
55
+
56
+ <checkout_cart_index translate="label">
57
+ <label>Shopping Cart</label>
58
+ <remove name="right"/>
59
+ <remove name="left"/>
60
+ <!-- Mage_Checkout -->
61
+ <reference name="root">
62
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
63
+ </reference>
64
+ <reference name="head">
65
+
66
+ <action method="addCss"><stylesheet>css/onepage.css</stylesheet></action>
67
+ </reference>
68
+ <reference name="content">
69
+ <block type="checkout/cart" name="checkout.cart">
70
+ <action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
71
+ <action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
72
+ <action method="chooseTemplate"/>
73
+ <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
74
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
75
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>
76
+
77
+ <block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
78
+ <label>Payment Methods Before Checkout Button</label>
79
+ <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
80
+ </block>
81
+
82
+ <block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
83
+ <label>Shopping Cart Form Before</label>
84
+ </block>
85
+
86
+ <block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
87
+ <label>Payment Methods After Checkout Button</label>
88
+ <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
89
+ <block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
90
+ </block>
91
+
92
+ <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
93
+ <block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
94
+ <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
95
+
96
+ <block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
97
+ </block>
98
+ </reference>
99
+ <block type="core/text_list" name="additional.product.info" translate="label">
100
+ <label>Additional Product Info</label>
101
+ </block>
102
+ </checkout_cart_index>
103
+
104
+ <checkout_cart_configure translate="label">
105
+ <label>Configure Cart Item</label>
106
+ <update handle="catalog_product_view"/>
107
+ <reference name="product.info">
108
+ <block type="checkout/cart_item_configure" name="checkout.cart.item.configure.block"></block>
109
+ </reference>
110
+ </checkout_cart_configure>
111
+
112
+ <!--
113
+ Multi address shipping checkout main layout,
114
+ will be rendered on all checkout pages
115
+ -->
116
+
117
+ <checkout_multishipping translate="label">
118
+ <label>Multishipping Checkout</label>
119
+ <!-- Mage_Checkout -->
120
+ <remove name="right"/>
121
+ <remove name="left"/>
122
+
123
+ <reference name="root">
124
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
125
+ </reference>
126
+ <reference name="content">
127
+ <block type="checkout/multishipping_state" name="checkout_state" template="checkout/multishipping/state.phtml"/>
128
+ </reference>
129
+ </checkout_multishipping>
130
+
131
+ <checkout_multishipping_login>
132
+ <update handle="customer_account_login"/>
133
+ </checkout_multishipping_login>
134
+
135
+ <checkout_multishipping_register>
136
+ <update handle="customer_account_create"/>
137
+ </checkout_multishipping_register>
138
+
139
+ <!--
140
+ Multi address shipping checkout selection of address per item page
141
+ -->
142
+
143
+ <checkout_multishipping_address_select translate="label">
144
+ <label>Multishipping Checkout Shipping Address Selection</label>
145
+ <update handle="checkout_multishipping"/>
146
+ <!-- Mage_Checkout -->
147
+ <reference name="content">
148
+ <block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
149
+ </reference>
150
+ </checkout_multishipping_address_select>
151
+
152
+ <checkout_multishipping_address_selectbilling translate="label">
153
+ <label>Multishipping Checkout Billing Address Selection</label>
154
+ <update handle="checkout_multishipping"/>
155
+ <!-- Mage_Checkout -->
156
+ <reference name="content">
157
+ <block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
158
+ </reference>
159
+ </checkout_multishipping_address_selectbilling>
160
+
161
+
162
+ <checkout_multishipping_address_newshipping translate="label">
163
+ <label>Multishipping Checkout Shipping Address Creation</label>
164
+ <update handle="checkout_multishipping"/>
165
+ <update handle="checkout_multishipping_customer_address"/>
166
+ </checkout_multishipping_address_newshipping>
167
+
168
+ <checkout_multishipping_address_newbilling translate="label">
169
+ <label>Multishipping Checkout Billing Address Creation</label>
170
+ <update handle="checkout_multishipping"/>
171
+ <update handle="checkout_multishipping_customer_address"/>
172
+ </checkout_multishipping_address_newbilling>
173
+
174
+ <checkout_multishipping_address_editshipping translate="label">
175
+ <label>Multishipping Checkout Shipping Address Edit Form</label>
176
+ <update handle="checkout_multishipping"/>
177
+ <update handle="checkout_multishipping_customer_address"/>
178
+ </checkout_multishipping_address_editshipping>
179
+
180
+ <checkout_multishipping_address_editaddress>
181
+ <update handle="checkout_multishipping"/>
182
+ <update handle="checkout_multishipping_customer_address"/>
183
+ </checkout_multishipping_address_editaddress>
184
+
185
+ <checkout_multishipping_address_editbilling translate="label">
186
+ <label>Multishipping Checkout Billing Address Edit Form</label>
187
+ <update handle="checkout_multishipping"/>
188
+ <update handle="checkout_multishipping_customer_address"/>
189
+ </checkout_multishipping_address_editbilling>
190
+
191
+ <checkout_multishipping_customer_address translate="label">
192
+ <label>Multishipping Checkout Customer Address Edit Form</label>
193
+ <reference name="content">
194
+ <block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
195
+ </reference>
196
+ </checkout_multishipping_customer_address>
197
+
198
+ <!--
199
+ Multi address shipping checkout address page
200
+ -->
201
+
202
+ <checkout_multishipping_addresses translate="label">
203
+ <label>Multishipping Checkout Address (Any) Form</label>
204
+ <update handle="checkout_multishipping"/>
205
+ <!-- Mage_Checkout -->
206
+ <reference name="content">
207
+ <block type="checkout/multishipping_addresses" name="checkout_addresses" template="checkout/multishipping/addresses.phtml">
208
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
209
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
210
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
211
+ </block>
212
+ </reference>
213
+ </checkout_multishipping_addresses>
214
+
215
+ <!--
216
+ Multi address shipping checkout shipping information
217
+ -->
218
+
219
+ <checkout_multishipping_shipping translate="label">
220
+ <label>Multishipping Checkout Shipping Information Step</label>
221
+ <update handle="checkout_multishipping"/>
222
+ <!-- Mage_Checkout -->
223
+ <reference name="content">
224
+ <block type="checkout/multishipping_shipping" name="checkout_shipping" template="checkout/multishipping/shipping.phtml">
225
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
226
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
227
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
228
+
229
+ <block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
230
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
231
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
232
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
233
+ </block>
234
+ </block>
235
+ </reference>
236
+ </checkout_multishipping_shipping>
237
+
238
+ <!--
239
+ Multi address shipping checkout billing information
240
+ -->
241
+
242
+ <checkout_multishipping_billing translate="label">
243
+ <label>Multishipping Checkout Billing Information Step</label>
244
+ <update handle="checkout_multishipping"/>
245
+ <!-- Mage_Checkout -->
246
+ <reference name="content">
247
+ <block type="checkout/multishipping_billing" name="checkout_billing" template="checkout/multishipping/billing.phtml">
248
+ <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
249
+
250
+ <!--<block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
251
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
252
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
253
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
254
+ </block>-->
255
+
256
+ </block>
257
+ </reference>
258
+ </checkout_multishipping_billing>
259
+
260
+ <!--
261
+ Multi address shipping checkout overview
262
+ -->
263
+
264
+ <checkout_multishipping_overview translate="label">
265
+ <label>Multishipping Checkout Overview</label>
266
+ <update handle="checkout_multishipping"/>
267
+ <!-- Mage_Checkout -->
268
+ <reference name="content">
269
+ <block type="checkout/multishipping_overview" name="checkout_overview" template="checkout/multishipping/overview.phtml">
270
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
271
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
272
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
273
+ <action method="addRowItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/overview/item.phtml</template></action>
274
+ <action method="addRowItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/overview/item.phtml</template></action>
275
+ <block type="checkout/multishipping_payment_info" name="payment_info">
276
+ <action method="setInfoTemplate"><method></method><template></template></action>
277
+ </block>
278
+ <block type="checkout/agreements" name="checkout.multishipping.agreements" as="agreements" template="checkout/multishipping/agreements.phtml"/>
279
+ <block type="checkout/cart_totals" name="totals" />
280
+ <block type="core/text_list" name="checkout.multishipping.overview.items.after" as="items_after" translate="label">
281
+ <label>Overview Items After</label>
282
+ </block>
283
+ </block>
284
+ </reference>
285
+ </checkout_multishipping_overview>
286
+
287
+ <!--
288
+ Multi address shipping checkout success
289
+ -->
290
+
291
+ <checkout_multishipping_success translate="label">
292
+ <label>Multishipping Checkout Success</label>
293
+ <update handle="checkout_multishipping"/>
294
+ <!-- Mage_Checkout -->
295
+ <reference name="content">
296
+ <block type="checkout/multishipping_success" name="checkout_success" template="checkout/multishipping/success.phtml"/>
297
+ </reference>
298
+ </checkout_multishipping_success>
299
+
300
+ <!--
301
+ One page checkout main layout
302
+ -->
303
+
304
+ <checkout_onepage_index translate="label">
305
+ <label>One Page Checkout</label>
306
+ <!-- Mage_Checkout -->
307
+ <remove name="left"/>
308
+ <remove name="right"/>
309
+ <reference name="root">
310
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
311
+ </reference>
312
+ <reference name="right">
313
+ <action method="unsetChildren"></action>
314
+ <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
315
+ <label>Checkout Progress Wrapper</label>
316
+ <action method="setElementId"><value>checkout-progress-wrapper</value></action>
317
+ <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"/>
318
+ </block>
319
+ </reference>
320
+ <reference name="content">
321
+ <block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml">
322
+ <block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml">
323
+ <block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before" translate="label">
324
+ <label>Login/Registration Before</label>
325
+ <action method="setMayBeInvisible"><value>1</value></action>
326
+ </block>
327
+ </block>
328
+ <block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/>
329
+ <block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/>
330
+ <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml">
331
+ <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/>
332
+ <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
333
+ </block>
334
+ <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml">
335
+ <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml">
336
+ <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
337
+ </block>
338
+ </block>
339
+ <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"/>
340
+ </block>
341
+ </reference>
342
+ </checkout_onepage_index>
343
+
344
+ <!--
345
+ One page checkout progress block
346
+ -->
347
+
348
+ <checkout_onepage_progress>
349
+ <!-- Mage_Checkout -->
350
+ <remove name="right"/>
351
+ <remove name="left"/>
352
+
353
+ <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml">
354
+ <block type="checkout/onepage_payment_info" name="payment_info">
355
+ <action method="setInfoTemplate"><method></method><template></template></action>
356
+ </block>
357
+ </block>
358
+ </checkout_onepage_progress>
359
+
360
+ <!--
361
+ One page checkout payment methods block
362
+ -->
363
+ <checkout_onepage_paymentmethod>
364
+ <remove name="right"/>
365
+ <remove name="left"/>
366
+
367
+ <block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
368
+ <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
369
+ </block>
370
+ </checkout_onepage_paymentmethod>
371
+
372
+
373
+ <!--
374
+ One page checkout shipping methods block
375
+ -->
376
+
377
+ <checkout_onepage_shippingmethod>
378
+ <!-- Mage_Checkout -->
379
+ <remove name="right"/>
380
+ <remove name="left"/>
381
+
382
+ <block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="checkout/onepage/shipping_method/available.phtml"/>
383
+ </checkout_onepage_shippingmethod>
384
+
385
+ <checkout_onepage_additional>
386
+ <!-- Mage_Checkout -->
387
+ <remove name="right"/>
388
+ <remove name="left"/>
389
+
390
+ <block type="checkout/onepage_shipping_method_additional" name="root" output="toHtml" template="checkout/onepage/shipping_method/additional.phtml">
391
+ <action method="setDontDisplayContainer"><param>1</param></action>
392
+ </block>
393
+ </checkout_onepage_additional>
394
+
395
+ <!--
396
+ One page checkout order review block
397
+ -->
398
+
399
+ <checkout_onepage_review translate="label">
400
+ <label>One Page Checkout Overview</label>
401
+ <!-- Mage_Checkout -->
402
+ <remove name="right"/>
403
+ <remove name="left"/>
404
+
405
+ <block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
406
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
407
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
408
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action>
409
+ <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
410
+ <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
411
+ <label>Items Before</label>
412
+ </block>
413
+ <block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
414
+ <label>Items After</label>
415
+ </block>
416
+ <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
417
+ <block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/>
418
+ </block>
419
+ </checkout_onepage_review>
420
+
421
+ <checkout_onepage_success translate="label">
422
+ <label>One Page Checkout Success</label>
423
+
424
+ <remove name="right"/>
425
+ <remove name="left"/>
426
+
427
+ <reference name="root">
428
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
429
+ </reference>
430
+ <reference name="content">
431
+ <block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
432
+ </reference>
433
+ </checkout_onepage_success>
434
+ <checkout_onepage_failure translate="label">
435
+ <label>One Page Checkout Failure</label>
436
+ <remove name="right"/>
437
+ <remove name="left"/>
438
+ <reference name="root">
439
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
440
+ </reference>
441
+ <reference name="content">
442
+ <block type="checkout/onepage_failure" name="checkout.failure" template="checkout/onepage/failure.phtml"/>
443
+ </reference>
444
+ </checkout_onepage_failure>
445
+ <block type="core/list" name="additional.product.info"/>
446
+ </layout>
app/design/frontend/redstage-mobilenow/default/layout/cms.xml CHANGED
@@ -1,88 +1,88 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- * that is bundled with this package in the file LICENSE_AFL.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/afl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @category design
23
- * @package base_default
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
- */
27
- -->
28
- <layout version="0.1.0">
29
- <!--
30
- Default layout, loads most of the pages
31
- -->
32
-
33
- <default>
34
- <reference name="footer">
35
- <block type="cms/block" name="cms_footer_links" before="footer_links">
36
- <!--
37
- The content of this block is taken from the database by its block_id.
38
- You can manage it in admin CMS -> Static Blocks
39
- -->
40
- <action method="setBlockId"><block_id>footer_links</block_id></action>
41
- </block>
42
- </reference>
43
- </default>
44
-
45
- <cms_page translate="label">
46
- <label>CMS Pages (All)</label>
47
- <reference name="content">
48
-
49
- <block type="core/template" name="page_content_heading" template="cms/content_heading.phtml"/>
50
- <block type="page/html_wrapper" name="cms.wrapper" translate="label">
51
- <label>CMS Content Wrapper</label>
52
- <action method="setElementClass"><value>std</value></action>
53
- <block type="cms/page" name="cms_page"/>
54
- </block>
55
- </reference>
56
- </cms_page>
57
-
58
-
59
-
60
- <cms_index_defaultindex>
61
- <remove name="right"/>
62
- <remove name="left"/>
63
-
64
- <reference name="root">
65
- <action method="setTemplate"><template>page/1column.phtml</template></action>
66
- </reference>
67
- <reference name="content">
68
- <block type="core/template" name="default_home_page" template="cms/default/home.phtml"/>
69
- </reference>
70
- </cms_index_defaultindex>
71
-
72
- <cms_index_noroute translate="label">
73
- <label>CMS No-Route Page</label>
74
- </cms_index_noroute>
75
-
76
- <cms_index_defaultnoroute>
77
- <remove name="right"/>
78
- <remove name="left"/>
79
-
80
- <reference name="root">
81
- <action method="setTemplate"><template>page/1column.phtml</template></action>
82
- </reference>
83
- <reference name="content">
84
- <block type="core/template" name="default_no_route" template="cms/default/no-route.phtml"/>
85
- </reference>
86
- </cms_index_defaultnoroute>
87
-
88
- </layout>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <layout version="0.1.0">
29
+ <!--
30
+ Default layout, loads most of the pages
31
+ -->
32
+
33
+ <default>
34
+ <reference name="footer">
35
+ <block type="cms/block" name="cms_footer_links" before="footer_links">
36
+ <!--
37
+ The content of this block is taken from the database by its block_id.
38
+ You can manage it in admin CMS -> Static Blocks
39
+ -->
40
+ <action method="setBlockId"><block_id>footer_links</block_id></action>
41
+ </block>
42
+ </reference>
43
+ </default>
44
+
45
+ <cms_page translate="label">
46
+ <label>CMS Pages (All)</label>
47
+ <reference name="content">
48
+
49
+ <block type="core/template" name="page_content_heading" template="cms/content_heading.phtml"/>
50
+ <block type="page/html_wrapper" name="cms.wrapper" translate="label">
51
+ <label>CMS Content Wrapper</label>
52
+ <action method="setElementClass"><value>std</value></action>
53
+ <block type="cms/page" name="cms_page"/>
54
+ </block>
55
+ </reference>
56
+ </cms_page>
57
+
58
+
59
+
60
+ <cms_index_defaultindex>
61
+ <remove name="right"/>
62
+ <remove name="left"/>
63
+
64
+ <reference name="root">
65
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
66
+ </reference>
67
+ <reference name="content">
68
+ <block type="core/template" name="default_home_page" template="cms/default/home.phtml"/>
69
+ </reference>
70
+ </cms_index_defaultindex>
71
+
72
+ <cms_index_noroute translate="label">
73
+ <label>CMS No-Route Page</label>
74
+ </cms_index_noroute>
75
+
76
+ <cms_index_defaultnoroute>
77
+ <remove name="right"/>
78
+ <remove name="left"/>
79
+
80
+ <reference name="root">
81
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
82
+ </reference>
83
+ <reference name="content">
84
+ <block type="core/template" name="default_no_route" template="cms/default/no-route.phtml"/>
85
+ </reference>
86
+ </cms_index_defaultnoroute>
87
+
88
+ </layout>
app/design/frontend/redstage-mobilenow/default/layout/customer.xml CHANGED
@@ -1,293 +1,293 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- * that is bundled with this package in the file LICENSE_AFL.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/afl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @category design
23
- * @package base_default
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
- */
27
-
28
- Supported layout update handles (action):
29
- - customer_account_index
30
- - customer_address_index
31
- - customer_address_view
32
- - customer_account_login
33
- - customer_account_logoutsuccess
34
- - customer_account_create
35
- - customer_account_forgotpassword
36
- - customer_account_confirmation
37
- - customer_account_edit
38
-
39
- Supported layout update handles (special):
40
- - default
41
-
42
- -->
43
- <layout version="0.1.0">
44
-
45
- <!--
46
- Default layout, loads most of the pages
47
- -->
48
-
49
- <default>
50
- <!-- Mage_Customer -->
51
- <reference name="top.links">
52
- <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
53
- </reference>
54
- </default>
55
-
56
- <!--
57
- Load this update on every page when customer is logged in
58
- -->
59
-
60
- <customer_logged_in>
61
- <reference name="top.links">
62
- <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
63
- </reference>
64
- </customer_logged_in>
65
-
66
- <!--
67
- Load this update on every page when customer is logged out
68
- -->
69
-
70
- <customer_logged_out>
71
- <!---<reference name="right">
72
- <block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
73
- </reference>-->
74
- <reference name="top.links">
75
- <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
76
- </reference>
77
- <remove name="reorder"></remove>
78
- </customer_logged_out>
79
-
80
- <!--
81
- Layout for customer login page
82
- -->
83
-
84
- <customer_account_login translate="label">
85
- <label>Customer Account Login Form</label>
86
- <!-- Mage_Customer -->
87
- <remove name="right"/>
88
- <remove name="left"/>
89
-
90
- <reference name="root">
91
- <action method="setTemplate"><template>page/1column.phtml</template></action>
92
- </reference>
93
- <reference name="content">
94
- <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
95
- </reference>
96
- </customer_account_login>
97
-
98
- <!--
99
- Layout for customer log out page
100
- -->
101
-
102
- <customer_account_logoutsuccess translate="label">
103
- <label>Customer Account Logout Success</label>
104
- <!-- Mage_Customer -->
105
- <remove name="right"/>
106
- <remove name="left"/>
107
-
108
- <reference name="root">
109
- <action method="setTemplate"><template>page/1column.phtml</template></action>
110
- </reference>
111
- <reference name="content">
112
- <block type="core/template" name="customer_logout" template="customer/logout.phtml"/>
113
- </reference>
114
- </customer_account_logoutsuccess>
115
-
116
- <!--
117
- New customer registration
118
- -->
119
-
120
- <customer_account_create translate="label">
121
- <label>Customer Account Registration Form</label>
122
- <!-- Mage_Customer -->
123
- <remove name="right"/>
124
- <remove name="left"/>
125
-
126
- <reference name="root">
127
- <action method="setTemplate"><template>page/1column.phtml</template></action>
128
- </reference>
129
- <reference name="content">
130
- <block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
131
- <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
132
- <label>Form Fields Before</label>
133
- </block>
134
- </block>
135
- </reference>
136
- </customer_account_create>
137
-
138
- <customer_account_forgotpassword translate="label">
139
- <label>Customer Forgot Password Form</label>
140
- <remove name="right"/>
141
- <remove name="left"/>
142
-
143
- <reference name="head">
144
- <action method="setTitle" translate="title" module="customer"><title>Forgot Your Password</title></action>
145
- </reference>
146
- <reference name="root">
147
- <action method="setTemplate"><template>page/1column.phtml</template></action>
148
- <action method="setHeaderTitle" translate="title" module="customer"><title>Password forgotten</title></action>
149
- </reference>
150
- <reference name="content">
151
- <!--<block type="core/template" name="forgotPassword" template="customer/form/forgotpassword.phtml"/>-->
152
- <block type="customer/account_forgotpassword" name="forgotPassword" template="customer/form/forgotpassword.phtml" />
153
- </reference>
154
- </customer_account_forgotpassword>
155
-
156
- <customer_account_resetpassword translate="label">
157
- <label>Reset a Password</label>
158
- <remove name="right"/>
159
- <remove name="left"/>
160
-
161
- <reference name="head">
162
- <action method="setTitle" translate="title" module="customer">
163
- <title>Reset a Password</title>
164
- </action>
165
- </reference>
166
- <reference name="root">
167
- <action method="setTemplate">
168
- <template>page/1column.phtml</template>
169
- </action>
170
- <action method="setHeaderTitle" translate="title" module="customer">
171
- <title>Reset a Password</title>
172
- </action>
173
- </reference>
174
- <reference name="content">
175
- <block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
176
- </reference>
177
- </customer_account_resetpassword>
178
-
179
- <customer_account_confirmation>
180
- <remove name="right"/>
181
- <remove name="left"/>
182
-
183
- <reference name="root">
184
- <action method="setTemplate"><template>page/1column.phtml</template></action>
185
- <action method="setHeaderTitle" translate="title" module="customer"><title>Send confirmation link</title></action>
186
- </reference>
187
- <reference name="content">
188
- <block type="core/template" name="accountConfirmation" template="customer/form/confirmation.phtml"/>
189
- </reference>
190
- </customer_account_confirmation>
191
-
192
- <customer_account_edit translate="label">
193
- <label>Customer Account Edit Form</label>
194
- <update handle="customer_account"/>
195
- <reference name="root">
196
- <action method="setHeaderTitle" translate="title" module="customer"><title>Edit Account Info</title></action>
197
- </reference>
198
- <reference name="my.account.wrapper">
199
- <block type="customer/form_edit" name="customer_edit" template="customer/form/edit.phtml"/>
200
- </reference>
201
-
202
- <reference name="left">
203
- <action method="unsetChild"><name>left.permanent.callout</name></action>
204
- </reference>
205
- </customer_account_edit>
206
-
207
- <!--
208
- Customer account pages, rendered for all tabs in dashboard
209
- -->
210
-
211
- <customer_account translate="label">
212
- <label>Customer My Account (All Pages)</label>
213
- <!--remove name="catalog.compare.sidebar"/>
214
- <remove name="sale.reorder.sidebar"/-->
215
- <!-- Mage_Customer -->
216
- <reference name="root">
217
- <action method="setTemplate"><template>page/1column.phtml</template></action>
218
- </reference>
219
-
220
- <reference name="content">
221
- <block type="page/html_wrapper" name="my.account.wrapper" translate="label">
222
- <label>My Account Wrapper</label>
223
- <action method="setElementClass"><value>my-account</value></action>
224
- </block>
225
- </reference>
226
-
227
- <reference name="left">
228
- <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
229
- <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
230
- <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
231
- <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
232
- </block>
233
- <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
234
- <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
235
- <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
236
- <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
237
- </block>
238
- <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
239
- <remove name="tags_popular"/>
240
-
241
- </reference>
242
- </customer_account>
243
-
244
- <!--
245
- Customer account home dashboard layout
246
- -->
247
-
248
- <customer_account_index translate="label">
249
- <label>Customer My Account Dashboard</label>
250
- <update handle="customer_account"/>
251
- <!-- Mage_Customer -->
252
- <reference name="root">
253
- <action method="setTemplate"><template>page/1column.phtml</template></action>
254
- </reference>
255
- <reference name="my.account.wrapper">
256
- <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
257
- <block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
258
- <block type="core/template" name="customer_account_dashboard_top" as="top" />
259
- <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
260
- <block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
261
- <block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
262
- </block>
263
- </reference>
264
-
265
- </customer_account_index>
266
-
267
- <!--
268
- Customer account address book
269
- -->
270
-
271
- <customer_address_index translate="label">
272
- <label>Customer My Account Address Book</label>
273
- <!-- Mage_Customer -->
274
- <update handle="customer_account"/>
275
- <reference name="my.account.wrapper">
276
- <block type="customer/address_book" name="address_book" template="customer/address/book.phtml"/>
277
- </reference>
278
- </customer_address_index>
279
-
280
- <!--
281
- Customer account address edit page
282
- -->
283
-
284
- <customer_address_form translate="label">
285
- <label>Customer My Account Address Edit Form</label>
286
- <!-- Mage_Customer -->
287
- <update handle="customer_account"/>
288
- <reference name="my.account.wrapper">
289
- <block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
290
- </reference>
291
- </customer_address_form>
292
-
293
- </layout>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ Supported layout update handles (action):
29
+ - customer_account_index
30
+ - customer_address_index
31
+ - customer_address_view
32
+ - customer_account_login
33
+ - customer_account_logoutsuccess
34
+ - customer_account_create
35
+ - customer_account_forgotpassword
36
+ - customer_account_confirmation
37
+ - customer_account_edit
38
+
39
+ Supported layout update handles (special):
40
+ - default
41
+
42
+ -->
43
+ <layout version="0.1.0">
44
+
45
+ <!--
46
+ Default layout, loads most of the pages
47
+ -->
48
+
49
+ <default>
50
+ <!-- Mage_Customer -->
51
+ <reference name="top.links">
52
+ <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
53
+ </reference>
54
+ </default>
55
+
56
+ <!--
57
+ Load this update on every page when customer is logged in
58
+ -->
59
+
60
+ <customer_logged_in>
61
+ <reference name="top.links">
62
+ <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
63
+ </reference>
64
+ </customer_logged_in>
65
+
66
+ <!--
67
+ Load this update on every page when customer is logged out
68
+ -->
69
+
70
+ <customer_logged_out>
71
+ <!---<reference name="right">
72
+ <block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
73
+ </reference>-->
74
+ <reference name="top.links">
75
+ <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
76
+ </reference>
77
+ <remove name="reorder"></remove>
78
+ </customer_logged_out>
79
+
80
+ <!--
81
+ Layout for customer login page
82
+ -->
83
+
84
+ <customer_account_login translate="label">
85
+ <label>Customer Account Login Form</label>
86
+ <!-- Mage_Customer -->
87
+ <remove name="right"/>
88
+ <remove name="left"/>
89
+
90
+ <reference name="root">
91
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
92
+ </reference>
93
+ <reference name="content">
94
+ <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
95
+ </reference>
96
+ </customer_account_login>
97
+
98
+ <!--
99
+ Layout for customer log out page
100
+ -->
101
+
102
+ <customer_account_logoutsuccess translate="label">
103
+ <label>Customer Account Logout Success</label>
104
+ <!-- Mage_Customer -->
105
+ <remove name="right"/>
106
+ <remove name="left"/>
107
+
108
+ <reference name="root">
109
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
110
+ </reference>
111
+ <reference name="content">
112
+ <block type="core/template" name="customer_logout" template="customer/logout.phtml"/>
113
+ </reference>
114
+ </customer_account_logoutsuccess>
115
+
116
+ <!--
117
+ New customer registration
118
+ -->
119
+
120
+ <customer_account_create translate="label">
121
+ <label>Customer Account Registration Form</label>
122
+ <!-- Mage_Customer -->
123
+ <remove name="right"/>
124
+ <remove name="left"/>
125
+
126
+ <reference name="root">
127
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
128
+ </reference>
129
+ <reference name="content">
130
+ <block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
131
+ <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
132
+ <label>Form Fields Before</label>
133
+ </block>
134
+ </block>
135
+ </reference>
136
+ </customer_account_create>
137
+
138
+ <customer_account_forgotpassword translate="label">
139
+ <label>Customer Forgot Password Form</label>
140
+ <remove name="right"/>
141
+ <remove name="left"/>
142
+
143
+ <reference name="head">
144
+ <action method="setTitle" translate="title" module="customer"><title>Forgot Your Password</title></action>
145
+ </reference>
146
+ <reference name="root">
147
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
148
+ <action method="setHeaderTitle" translate="title" module="customer"><title>Password forgotten</title></action>
149
+ </reference>
150
+ <reference name="content">
151
+ <!--<block type="core/template" name="forgotPassword" template="customer/form/forgotpassword.phtml"/>-->
152
+ <block type="customer/account_forgotpassword" name="forgotPassword" template="customer/form/forgotpassword.phtml" />
153
+ </reference>
154
+ </customer_account_forgotpassword>
155
+
156
+ <customer_account_resetpassword translate="label">
157
+ <label>Reset a Password</label>
158
+ <remove name="right"/>
159
+ <remove name="left"/>
160
+
161
+ <reference name="head">
162
+ <action method="setTitle" translate="title" module="customer">
163
+ <title>Reset a Password</title>
164
+ </action>
165
+ </reference>
166
+ <reference name="root">
167
+ <action method="setTemplate">
168
+ <template>page/1column.phtml</template>
169
+ </action>
170
+ <action method="setHeaderTitle" translate="title" module="customer">
171
+ <title>Reset a Password</title>
172
+ </action>
173
+ </reference>
174
+ <reference name="content">
175
+ <block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
176
+ </reference>
177
+ </customer_account_resetpassword>
178
+
179
+ <customer_account_confirmation>
180
+ <remove name="right"/>
181
+ <remove name="left"/>
182
+
183
+ <reference name="root">
184
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
185
+ <action method="setHeaderTitle" translate="title" module="customer"><title>Send confirmation link</title></action>
186
+ </reference>
187
+ <reference name="content">
188
+ <block type="core/template" name="accountConfirmation" template="customer/form/confirmation.phtml"/>
189
+ </reference>
190
+ </customer_account_confirmation>
191
+
192
+ <customer_account_edit translate="label">
193
+ <label>Customer Account Edit Form</label>
194
+ <update handle="customer_account"/>
195
+ <reference name="root">
196
+ <action method="setHeaderTitle" translate="title" module="customer"><title>Edit Account Info</title></action>
197
+ </reference>
198
+ <reference name="my.account.wrapper">
199
+ <block type="customer/form_edit" name="customer_edit" template="customer/form/edit.phtml"/>
200
+ </reference>
201
+
202
+ <reference name="left">
203
+ <action method="unsetChild"><name>left.permanent.callout</name></action>
204
+ </reference>
205
+ </customer_account_edit>
206
+
207
+ <!--
208
+ Customer account pages, rendered for all tabs in dashboard
209
+ -->
210
+
211
+ <customer_account translate="label">
212
+ <label>Customer My Account (All Pages)</label>
213
+ <!--remove name="catalog.compare.sidebar"/>
214
+ <remove name="sale.reorder.sidebar"/-->
215
+ <!-- Mage_Customer -->
216
+ <reference name="root">
217
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
218
+ </reference>
219
+
220
+ <reference name="content">
221
+ <block type="page/html_wrapper" name="my.account.wrapper" translate="label">
222
+ <label>My Account Wrapper</label>
223
+ <action method="setElementClass"><value>my-account</value></action>
224
+ </block>
225
+ </reference>
226
+
227
+ <reference name="left">
228
+ <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
229
+ <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
230
+ <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
231
+ <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
232
+ </block>
233
+ <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
234
+ <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
235
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
236
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
237
+ </block>
238
+ <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
239
+ <remove name="tags_popular"/>
240
+
241
+ </reference>
242
+ </customer_account>
243
+
244
+ <!--
245
+ Customer account home dashboard layout
246
+ -->
247
+
248
+ <customer_account_index translate="label">
249
+ <label>Customer My Account Dashboard</label>
250
+ <update handle="customer_account"/>
251
+ <!-- Mage_Customer -->
252
+ <reference name="root">
253
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
254
+ </reference>
255
+ <reference name="my.account.wrapper">
256
+ <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
257
+ <block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
258
+ <block type="core/template" name="customer_account_dashboard_top" as="top" />
259
+ <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
260
+ <block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
261
+ <block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
262
+ </block>
263
+ </reference>
264
+
265
+ </customer_account_index>
266
+
267
+ <!--
268
+ Customer account address book
269
+ -->
270
+
271
+ <customer_address_index translate="label">
272
+ <label>Customer My Account Address Book</label>
273
+ <!-- Mage_Customer -->
274
+ <update handle="customer_account"/>
275
+ <reference name="my.account.wrapper">
276
+ <block type="customer/address_book" name="address_book" template="customer/address/book.phtml"/>
277
+ </reference>
278
+ </customer_address_index>
279
+
280
+ <!--
281
+ Customer account address edit page
282
+ -->
283
+
284
+ <customer_address_form translate="label">
285
+ <label>Customer My Account Address Edit Form</label>
286
+ <!-- Mage_Customer -->
287
+ <update handle="customer_account"/>
288
+ <reference name="my.account.wrapper">
289
+ <block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
290
+ </reference>
291
+ </customer_address_form>
292
+
293
+ </layout>
app/design/frontend/redstage-mobilenow/default/layout/local.xml CHANGED
@@ -1,41 +1,41 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- * that is bundled with this package in the file LICENSE_AFL.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/afl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @category design
23
- * @package base_default
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
- */
27
-
28
- -->
29
-
30
- <layout>
31
- <default>
32
- <reference name="head">
33
-
34
-
35
- <action method="addItem"><type>skin_js</type><name>js/foundation/jquery-1.8.1.min.js</name><params/></action>
36
- <action method="addItem"><type>skin_js</type><name>js/mobile-menu.js</name><params/></action>
37
- <action method="addItem"><type>skin_js</type><name>js/foundation.min.js</name><params/></action>
38
-
39
- </reference>
40
- </default>
41
  </layout>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+
30
+ <layout>
31
+ <default>
32
+ <reference name="head">
33
+
34
+
35
+ <action method="addItem"><type>skin_js</type><name>js/foundation/jquery-1.8.1.min.js</name><params/></action>
36
+ <action method="addItem"><type>skin_js</type><name>js/mobile-menu.js</name><params/></action>
37
+ <action method="addItem"><type>skin_js</type><name>js/foundation.min.js</name><params/></action>
38
+
39
+ </reference>
40
+ </default>
41
  </layout>
app/design/frontend/redstage-mobilenow/default/layout/page.xml CHANGED
@@ -1,203 +1,203 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- * that is bundled with this package in the file LICENSE_AFL.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/afl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @category design
23
- * @package magento-foundation_default
24
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
- */
27
- -->
28
- <layout version="0.1.0">
29
- <!--
30
- Default layout, loads most of the pages
31
- -->
32
-
33
- <default translate="label" module="page">
34
- <label>All Pages</label>
35
-
36
- <block type="page/html" name="root" output="toHtml" template="page/1column.phtml">
37
-
38
- <block type="page/html_head" name="head" as="head">
39
- <action method="addJs"><script>prototype/prototype.js</script></action>
40
- <action method="addJs"><script>lib/ccard.js</script></action>
41
- <action method="addJs"><script>prototype/validation.js</script></action>
42
- <action method="addJs"><script>scriptaculous/builder.js</script></action>
43
- <action method="addJs"><script>scriptaculous/effects.js</script></action>
44
- <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
45
- <action method="addJs"><script>scriptaculous/controls.js</script></action>
46
- <action method="addJs"><script>scriptaculous/slider.js</script></action>
47
- <action method="addJs"><script>varien/js.js</script></action>
48
- <action method="addJs"><script>varien/form.js</script></action>
49
- <action method="addJs"><script>varien/menu.js</script></action>
50
- <action method="addJs"><script>mage/translate.js</script></action>
51
- <action method="addJs"><script>mage/cookies.js</script></action>
52
-
53
- <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
54
-
55
- <action method="addCss"><stylesheet>css/mobile-menu.css</stylesheet></action>
56
- <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
57
- <!-- <action method="addCss"><stylesheet>css/theme_typo.css</stylesheet></action>-->
58
-
59
-
60
- <action method="addCss"><stylesheet>css/foundation.css</stylesheet></action>
61
- <action method="addCss"><stylesheet>css/foundation-icons.css</stylesheet></action>
62
- <action method="addCss"><stylesheet>css/normalize.css</stylesheet></action>
63
-
64
- <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
65
- <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
66
-
67
- <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
68
- <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
69
- </block>
70
-
71
- <block type="core/text_list" name="after_body_start" as="after_body_start" translate="label">
72
- <label>Page Top</label>
73
- </block>
74
-
75
- <block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" />
76
-
77
- <block type="page/html_header" name="header" as="header">
78
- <block type="page/template_links" name="top.links" as="topLinks">
79
- <action method="addLink" translate="label" module="core"><name>Home</name><path></path><label>Home</label></action>
80
- </block>
81
- <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
82
- <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
83
- <label>Navigation Bar</label>
84
- <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
85
- </block>
86
- <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
87
- <label>Page Header</label>
88
- <action method="setElementClass"><value>top-container</value></action>
89
- </block>
90
- </block>
91
-
92
- <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
93
-
94
- <block type="core/text_list" name="left" as="left" translate="label">
95
- <label>Left Column</label>
96
- </block>
97
-
98
- <block type="core/messages" name="global_messages" as="global_messages"/>
99
- <block type="core/messages" name="messages" as="messages"/>
100
- <block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"/>
101
- <block type="core/text_list" name="content" as="content" translate="label">
102
- <label>Main Content Area</label>
103
- </block>
104
-
105
- <block type="core/text_list" name="right" as="right" translate="label">
106
- <label>Right Column</label>
107
- </block>
108
-
109
- <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
110
- <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
111
- <label>Page Footer</label>
112
- <action method="setElementClass"><value>bottom-container</value></action>
113
- </block>
114
-
115
- <!--block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
116
- <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/-->
117
- <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
118
- </block>
119
-
120
- <block type="core/text_list" name="before_body_end" as="before_body_end" translate="label">
121
- <label>Page Bottom</label>
122
- </block>
123
- </block>
124
-
125
- <block type="core/profiler" output="toHtml" name="core_profiler"/>
126
- </default>
127
-
128
- <print translate="label" module="page">
129
- <label>All Pages (Print Version)</label>
130
- <!-- Mage_Page -->
131
- <block type="page/html" name="root" output="toHtml" template="page/print.phtml">
132
-
133
- <block type="page/html_head" name="head" as="head">
134
- <action method="addJs"><script>prototype/prototype.js</script></action>
135
- <action method="addJs"><script>mage/translate.js</script></action>
136
- <action method="addJs"><script>lib/ccard.js</script></action>
137
- <action method="addJs"><script>prototype/validation.js</script></action>
138
- <action method="addJs"><script>varien/js.js</script></action>
139
-
140
- <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
141
- <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
142
- <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
143
- <action method="addCss"><stylesheet>css/foundation.css</stylesheet></action>
144
-
145
- <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
146
- <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
147
-
148
- </block>
149
-
150
- <block type="core/text_list" name="content" as="content" translate="label">
151
- <label>Main Content Area</label>
152
- </block>
153
-
154
- </block>
155
- </print>
156
-
157
- <!-- Custom page layout handles -->
158
- <page_empty translate="label">
159
- <label>All Empty Layout Pages</label>
160
- <reference name="root">
161
- <action method="setTemplate"><template>page/empty.phtml</template></action>
162
- <!-- Mark root page block that template is applied -->
163
- <action method="setIsHandle"><applied>1</applied></action>
164
- </reference>
165
- </page_empty>
166
-
167
- <page_one_column translate="label">
168
- <label>All One-Column Layout Pages</label>
169
- <reference name="root">
170
- <action method="setTemplate"><template>page/1column.phtml</template></action>
171
- <!-- Mark root page block that template is applied -->
172
- <action method="setIsHandle"><applied>1</applied></action>
173
- </reference>
174
-
175
- </page_one_column>
176
-
177
- <page_two_columns_left translate="label">
178
- <label>All Two-Column Layout Pages (Left Column)</label>
179
- <reference name="root">
180
- <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
181
- <!-- Mark root page block that template is applied -->
182
- <action method="setIsHandle"><applied>1</applied></action>
183
- </reference>
184
- </page_two_columns_left>
185
-
186
- <page_two_columns_right translate="label">
187
- <label>All Two-Column Layout Pages (Right Column)</label>
188
- <reference name="root">
189
- <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
190
- <!-- Mark root page block that template is applied -->
191
- <action method="setIsHandle"><applied>1</applied></action>
192
- </reference>
193
- </page_two_columns_right>
194
-
195
- <page_three_columns translate="label">
196
- <label>All Three-Column Layout Pages</label>
197
- <reference name="root">
198
- <action method="setTemplate"><template>page/3columns.phtml</template></action>
199
- <!-- Mark root page block that template is applied -->
200
- <action method="setIsHandle"><applied>1</applied></action>
201
- </reference>
202
- </page_three_columns>
203
- </layout>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package magento-foundation_default
24
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <layout version="0.1.0">
29
+ <!--
30
+ Default layout, loads most of the pages
31
+ -->
32
+
33
+ <default translate="label" module="page">
34
+ <label>All Pages</label>
35
+
36
+ <block type="page/html" name="root" output="toHtml" template="page/1column.phtml">
37
+
38
+ <block type="page/html_head" name="head" as="head">
39
+ <action method="addJs"><script>prototype/prototype.js</script></action>
40
+ <action method="addJs"><script>lib/ccard.js</script></action>
41
+ <action method="addJs"><script>prototype/validation.js</script></action>
42
+ <action method="addJs"><script>scriptaculous/builder.js</script></action>
43
+ <action method="addJs"><script>scriptaculous/effects.js</script></action>
44
+ <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
45
+ <action method="addJs"><script>scriptaculous/controls.js</script></action>
46
+ <action method="addJs"><script>scriptaculous/slider.js</script></action>
47
+ <action method="addJs"><script>varien/js.js</script></action>
48
+ <action method="addJs"><script>varien/form.js</script></action>
49
+ <action method="addJs"><script>varien/menu.js</script></action>
50
+ <action method="addJs"><script>mage/translate.js</script></action>
51
+ <action method="addJs"><script>mage/cookies.js</script></action>
52
+
53
+ <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
54
+
55
+ <action method="addCss"><stylesheet>css/mobile-menu.css</stylesheet></action>
56
+ <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
57
+ <!-- <action method="addCss"><stylesheet>css/theme_typo.css</stylesheet></action>-->
58
+
59
+
60
+ <action method="addCss"><stylesheet>css/foundation.css</stylesheet></action>
61
+ <action method="addCss"><stylesheet>css/foundation-icons.css</stylesheet></action>
62
+ <action method="addCss"><stylesheet>css/normalize.css</stylesheet></action>
63
+
64
+ <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
65
+ <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
66
+
67
+ <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
68
+ <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
69
+ </block>
70
+
71
+ <block type="core/text_list" name="after_body_start" as="after_body_start" translate="label">
72
+ <label>Page Top</label>
73
+ </block>
74
+
75
+ <block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" />
76
+
77
+ <block type="page/html_header" name="header" as="header">
78
+ <block type="page/template_links" name="top.links" as="topLinks">
79
+ <action method="addLink" translate="label" module="core"><name>Home</name><path></path><label>Home</label></action>
80
+ </block>
81
+ <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
82
+ <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
83
+ <label>Navigation Bar</label>
84
+ <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
85
+ </block>
86
+ <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
87
+ <label>Page Header</label>
88
+ <action method="setElementClass"><value>top-container</value></action>
89
+ </block>
90
+ </block>
91
+
92
+ <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
93
+
94
+ <block type="core/text_list" name="left" as="left" translate="label">
95
+ <label>Left Column</label>
96
+ </block>
97
+
98
+ <block type="core/messages" name="global_messages" as="global_messages"/>
99
+ <block type="core/messages" name="messages" as="messages"/>
100
+ <block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"/>
101
+ <block type="core/text_list" name="content" as="content" translate="label">
102
+ <label>Main Content Area</label>
103
+ </block>
104
+
105
+ <block type="core/text_list" name="right" as="right" translate="label">
106
+ <label>Right Column</label>
107
+ </block>
108
+
109
+ <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
110
+ <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
111
+ <label>Page Footer</label>
112
+ <action method="setElementClass"><value>bottom-container</value></action>
113
+ </block>
114
+
115
+ <!--block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
116
+ <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/-->
117
+ <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
118
+ </block>
119
+
120
+ <block type="core/text_list" name="before_body_end" as="before_body_end" translate="label">
121
+ <label>Page Bottom</label>
122
+ </block>
123
+ </block>
124
+
125
+ <block type="core/profiler" output="toHtml" name="core_profiler"/>
126
+ </default>
127
+
128
+ <print translate="label" module="page">
129
+ <label>All Pages (Print Version)</label>
130
+ <!-- Mage_Page -->
131
+ <block type="page/html" name="root" output="toHtml" template="page/print.phtml">
132
+
133
+ <block type="page/html_head" name="head" as="head">
134
+ <action method="addJs"><script>prototype/prototype.js</script></action>
135
+ <action method="addJs"><script>mage/translate.js</script></action>
136
+ <action method="addJs"><script>lib/ccard.js</script></action>
137
+ <action method="addJs"><script>prototype/validation.js</script></action>
138
+ <action method="addJs"><script>varien/js.js</script></action>
139
+
140
+ <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
141
+ <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
142
+ <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
143
+ <action method="addCss"><stylesheet>css/foundation.css</stylesheet></action>
144
+
145
+ <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
146
+ <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
147
+
148
+ </block>
149
+
150
+ <block type="core/text_list" name="content" as="content" translate="label">
151
+ <label>Main Content Area</label>
152
+ </block>
153
+
154
+ </block>
155
+ </print>
156
+
157
+ <!-- Custom page layout handles -->
158
+ <page_empty translate="label">
159
+ <label>All Empty Layout Pages</label>
160
+ <reference name="root">
161
+ <action method="setTemplate"><template>page/empty.phtml</template></action>
162
+ <!-- Mark root page block that template is applied -->
163
+ <action method="setIsHandle"><applied>1</applied></action>
164
+ </reference>
165
+ </page_empty>
166
+
167
+ <page_one_column translate="label">
168
+ <label>All One-Column Layout Pages</label>
169
+ <reference name="root">
170
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
171
+ <!-- Mark root page block that template is applied -->
172
+ <action method="setIsHandle"><applied>1</applied></action>
173
+ </reference>
174
+
175
+ </page_one_column>
176
+
177
+ <page_two_columns_left translate="label">
178
+ <label>All Two-Column Layout Pages (Left Column)</label>
179
+ <reference name="root">
180
+ <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
181
+ <!-- Mark root page block that template is applied -->
182
+ <action method="setIsHandle"><applied>1</applied></action>
183
+ </reference>
184
+ </page_two_columns_left>
185
+
186
+ <page_two_columns_right translate="label">
187
+ <label>All Two-Column Layout Pages (Right Column)</label>
188
+ <reference name="root">
189
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
190
+ <!-- Mark root page block that template is applied -->
191
+ <action method="setIsHandle"><applied>1</applied></action>
192
+ </reference>
193
+ </page_two_columns_right>
194
+
195
+ <page_three_columns translate="label">
196
+ <label>All Three-Column Layout Pages</label>
197
+ <reference name="root">
198
+ <action method="setTemplate"><template>page/3columns.phtml</template></action>
199
+ <!-- Mark root page block that template is applied -->
200
+ <action method="setIsHandle"><applied>1</applied></action>
201
+ </reference>
202
+ </page_three_columns>
203
+ </layout>
app/design/frontend/redstage-mobilenow/default/template/catalog/category/view.phtml CHANGED
@@ -1,76 +1,76 @@
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
28
- /**
29
- * Category view template
30
- *
31
- * @see Mage_Catalog_Block_Category_View
32
- */
33
- ?>
34
- <?php
35
- $_helper = $this->helper('catalog/output');
36
- $_category = $this->getCurrentCategory();
37
- $_imgHtml = '';
38
- /*
39
- if ($_imgUrl = $_category->getImageUrl()) {
40
- $_imgHtml = '<p class="category-image"><img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" /></p>';
41
- $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
42
- }
43
- ?>
44
-
45
- <div class="page-title category-title">
46
- <?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
47
- <a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
48
- <?php endif; ?>
49
- <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
50
- </div>
51
-
52
- <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
53
-
54
- <?php if($_imgUrl): ?>
55
- <?php echo $_imgHtml ?>
56
- <?php endif; ?>
57
-
58
- <?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
59
- <div class="category-description std">
60
- <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
61
- </div>
62
- <?php endif; ?>
63
-
64
- */ ?>
65
-
66
- <?php if($this->isContentMode()): ?>
67
- <?php //echo $this->getCmsBlockHtml() ?>
68
-
69
- <?php elseif($this->isMixedMode()): ?>
70
- <?php //echo $this->getCmsBlockHtml() ?>
71
- <?php echo $this->getProductListHtml() ?>
72
-
73
- <?php else: ?>
74
- <?php echo $this->getProductListHtml() ?>
75
- <?php endif; ?>
76
-
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
28
+ /**
29
+ * Category view template
30
+ *
31
+ * @see Mage_Catalog_Block_Category_View
32
+ */
33
+ ?>
34
+ <?php
35
+ $_helper = $this->helper('catalog/output');
36
+ $_category = $this->getCurrentCategory();
37
+ $_imgHtml = '';
38
+ /*
39
+ if ($_imgUrl = $_category->getImageUrl()) {
40
+ $_imgHtml = '<p class="category-image"><img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" /></p>';
41
+ $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
42
+ }
43
+ ?>
44
+
45
+ <div class="page-title category-title">
46
+ <?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
47
+ <a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
48
+ <?php endif; ?>
49
+ <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
50
+ </div>
51
+
52
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
53
+
54
+ <?php if($_imgUrl): ?>
55
+ <?php echo $_imgHtml ?>
56
+ <?php endif; ?>
57
+
58
+ <?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
59
+ <div class="category-description std">
60
+ <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
61
+ </div>
62
+ <?php endif; ?>
63
+
64
+ */ ?>
65
+
66
+ <?php if($this->isContentMode()): ?>
67
+ <?php //echo $this->getCmsBlockHtml() ?>
68
+
69
+ <?php elseif($this->isMixedMode()): ?>
70
+ <?php //echo $this->getCmsBlockHtml() ?>
71
+ <?php echo $this->getProductListHtml() ?>
72
+
73
+ <?php else: ?>
74
+ <?php echo $this->getProductListHtml() ?>
75
+ <?php endif; ?>
76
+
app/design/frontend/redstage-mobilenow/default/template/catalog/product/compare/sidebar.phtml CHANGED
@@ -1,64 +1,64 @@
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 magento-foundation_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
- /* @var $this Mage_Catalog_Block_Product_Compare_Sidebar */
27
- ?>
28
- <?php
29
- $_helper = $this->helper('catalog/product_compare');
30
- $_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null;
31
- ?>
32
- <div class="block block-list block-compare">
33
- <div class="block-title">
34
- <h3><?php echo $this->__('Compare Products') ?>
35
- <?php if($_helper->getItemCount() > 0): ?>
36
- <small><?php echo $this->__('(%d)', $_helper->getItemCount()) ?></small>
37
- <?php endif; ?>
38
- </h3>
39
- </div>
40
- <div class="block-content">
41
- <?php if($_helper->getItemCount() > 0): ?>
42
- <ol id="compare-items">
43
- <?php foreach($_items as $_index => $_item): ?>
44
- <li class="item">
45
- <input type="hidden" class="compare-item-id" value="<?php echo $_item->getId() ?>" />
46
- <a href="<?php echo $_helper->getRemoveUrl($_item) ?>" title="<?php echo $this->__('Remove This Item') ?>" class="btn-remove" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the compare products?') ?>');"><?php echo $this->__('Remove This Item') ?></a>
47
- <p class="product-name">
48
- <a href="<?php echo $this->getProductUrl($_item) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName(), 'name') ?></a>
49
- </p>
50
- </li>
51
- <?php endforeach; ?>
52
- </ol>
53
- <script type="text/javascript">decorateList('compare-items')</script>
54
- <div class="actions">
55
- <a href="<?php echo $_helper->getClearListUrl() ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove all products from your comparison?') ?>');"><?php echo $this->__('Clear All') ?></a>
56
- <button type="button" title="<?php echo $this->__('Compare') ?>" class="button small round secondary" onclick="popWin('<?php echo $_helper->getListUrl() ?>','compare','top:0,left:0,width=820,height=600,resizable=yes,scrollbars=yes')">
57
- <?php echo $this->__('Compare') ?>
58
- </button>
59
- </div>
60
- <?php else: ?>
61
- <p class="empty"><?php echo $this->__('You have no items to compare.') ?></p>
62
- <?php endif; ?>
63
- </div>
64
- </div>
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 magento-foundation_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
+ /* @var $this Mage_Catalog_Block_Product_Compare_Sidebar */
27
+ ?>
28
+ <?php
29
+ $_helper = $this->helper('catalog/product_compare');
30
+ $_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null;
31
+ ?>
32
+ <div class="block block-list block-compare">
33
+ <div class="block-title">
34
+ <h3><?php echo $this->__('Compare Products') ?>
35
+ <?php if($_helper->getItemCount() > 0): ?>
36
+ <small><?php echo $this->__('(%d)', $_helper->getItemCount()) ?></small>
37
+ <?php endif; ?>
38
+ </h3>
39
+ </div>
40
+ <div class="block-content">
41
+ <?php if($_helper->getItemCount() > 0): ?>
42
+ <ol id="compare-items">
43
+ <?php foreach($_items as $_index => $_item): ?>
44
+ <li class="item">
45
+ <input type="hidden" class="compare-item-id" value="<?php echo $_item->getId() ?>" />
46
+ <a href="<?php echo $_helper->getRemoveUrl($_item) ?>" title="<?php echo $this->__('Remove This Item') ?>" class="btn-remove" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the compare products?') ?>');"><?php echo $this->__('Remove This Item') ?></a>
47
+ <p class="product-name">
48
+ <a href="<?php echo $this->getProductUrl($_item) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName(), 'name') ?></a>
49
+ </p>
50
+ </li>
51
+ <?php endforeach; ?>
52
+ </ol>
53
+ <script type="text/javascript">decorateList('compare-items')</script>
54
+ <div class="actions">
55
+ <a href="<?php echo $_helper->getClearListUrl() ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove all products from your comparison?') ?>');"><?php echo $this->__('Clear All') ?></a>
56
+ <button type="button" title="<?php echo $this->__('Compare') ?>" class="button small round secondary" onclick="popWin('<?php echo $_helper->getListUrl() ?>','compare','top:0,left:0,width=820,height=600,resizable=yes,scrollbars=yes')">
57
+ <?php echo $this->__('Compare') ?>
58
+ </button>
59
+ </div>
60
+ <?php else: ?>
61
+ <p class="empty"><?php echo $this->__('You have no items to compare.') ?></p>
62
+ <?php endif; ?>
63
+ </div>
64
+ </div>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/list.phtml CHANGED
@@ -1,198 +1,198 @@
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
28
- /**
29
- * Product list template
30
- *
31
- * @see Mage_Catalog_Block_Product_List
32
- */
33
- ?>
34
- <?php
35
- $_productCollection=$this->getLoadedProductCollection();
36
- $_helper = $this->helper('catalog/output');
37
- ?>
38
- <?php if(!$_productCollection->count()): ?>
39
- <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
40
- <?php else: ?>
41
- <div class="category-products">
42
-
43
- <?php //echo $this->getToolbarHtml() ?>
44
- <?php
45
- //$p_mode = $this->getMode()// List mode
46
- $p_mode = 'list';?>
47
- <?php if($p_mode!='grid'): ?>
48
- <?php $_iterator = 0; ?>
49
- <div>
50
- <ol class="products-list" id="products-list">
51
- <?php foreach ($_productCollection as $_product): ?>
52
- <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
53
- <?php // Product Image ?>
54
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
55
- <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(240); ?>" width="240" height="240" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
56
- </a>
57
- <?php // Product description ?>
58
- <div class="product-shop">
59
- <div class="f-fix">
60
- <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
61
- <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
62
-
63
- <div class="row">
64
- <div class="left">
65
- <?php echo $this->getPriceHtml($_product, true) ?>
66
-
67
- <?php if($_product->getRatingSummary()): ?>
68
- <?php echo $this->getReviewsSummaryHtml($_product) ?>
69
- <?php endif; ?>
70
-
71
- </div>
72
- <div class="right">
73
- <?php if($_product->isSaleable()): ?>
74
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>
75
- <?php else: ?>
76
- <p class="availability out-of-stock">
77
- <?php echo $this->__('Out of stock') ?>
78
- </p>
79
- <?php endif; ?>
80
-
81
- <div class="desc std">
82
- <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
83
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
84
- <?php echo $this->__('Learn More...') ?>
85
- </a>
86
- </div>
87
-
88
-
89
- </div>
90
- </div>
91
-
92
- <?php /* ?>
93
- <ul class="add-to-links">
94
- <?php if ($this->helper('wishlist')->isAllow()) : ?>
95
- <li>
96
- <a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a>
97
- </li>
98
- <?php endif; ?>
99
- <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
100
- <li>
101
- <span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a>
102
- </li>
103
- <?php endif; ?>
104
- </ul>
105
- <?php */ ?>
106
-
107
-
108
- </div>
109
- </div>
110
- </li>
111
- <?php endforeach; ?>
112
- </ol>
113
-
114
- </div>
115
-
116
- <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
117
-
118
- <?php else: ?>
119
-
120
- <?php // Grid Mode ?>
121
-
122
- <?php $_collectionSize = $_productCollection->count() ?>
123
- <?php $_columnCount = $this->getColumnCount(); ?>
124
- <?php $i=0; foreach ($_productCollection as $_product): ?>
125
- <?php if ($i++%$_columnCount==0): ?>
126
- <ul class="small-block-grid-2 large-block-grid-4 products-grid">
127
- <?php endif ?>
128
- <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
129
- <div class="item-wrapper">
130
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
131
- <span class="product-image">
132
- <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(240); ?>" width="240" height="240" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
133
- </span>
134
- <div>
135
- <div class="text-center">
136
-
137
- <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
138
- </div>
139
- </div>
140
- </a>
141
-
142
- <div class="text-center">
143
- <?php echo $this->getPriceHtml($_product, true) ?>
144
- </div>
145
-
146
- <div class="row">
147
- <div class="large-centered small-centered medium-centered medium-8 small-8 large-4 columns">
148
-
149
- <?php if($_product->getRatingSummary()): ?>
150
- <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
151
- <?php endif; ?>
152
- </div>
153
- </div>
154
-
155
- <div>
156
- <div class="text-center">
157
- <div class="desc std">
158
- <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
159
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
160
- <?php echo $this->__('Learn More...') ?>
161
- </a>
162
- </div>
163
-
164
- <?php if($_product->isSaleable()): ?>
165
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')">
166
- <?php echo $this->__('Add to Cart') ?>
167
- </button>
168
- <?php else: ?>
169
- <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
170
- <?php endif; ?>
171
- <!-- Hidden Add to links on Grid view
172
- <ul class="add-to-links">
173
- <?php //if ($this->helper('wishlist')->isAllow()) : ?>
174
- <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php //echo $this->__('Add to Wishlist') ?></a></li>
175
- <?php //endif; ?>
176
- <?php //if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
177
- <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php //echo $this->__('Add to Compare') ?></a></li>
178
- <?php //endif; ?>
179
- </ul>-->
180
- </div>
181
- </div>
182
- </div>
183
-
184
-
185
-
186
- </li>
187
- <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
188
- </ul>
189
- <?php endif ?>
190
- <?php endforeach ?>
191
- <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
192
- <?php endif; ?>
193
-
194
- <div class="toolbar-bottom">
195
- <?php //echo $this->getToolbarHtml() ?>
196
- </div>
197
- </div>
198
- <?php endif; ?>
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
28
+ /**
29
+ * Product list template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+ $_productCollection=$this->getLoadedProductCollection();
36
+ $_helper = $this->helper('catalog/output');
37
+ ?>
38
+ <?php if(!$_productCollection->count()): ?>
39
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
40
+ <?php else: ?>
41
+ <div class="category-products">
42
+
43
+ <?php //echo $this->getToolbarHtml() ?>
44
+ <?php
45
+ //$p_mode = $this->getMode()// List mode
46
+ $p_mode = 'list';?>
47
+ <?php if($p_mode!='grid'): ?>
48
+ <?php $_iterator = 0; ?>
49
+ <div>
50
+ <ol class="products-list" id="products-list">
51
+ <?php foreach ($_productCollection as $_product): ?>
52
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
53
+ <?php // Product Image ?>
54
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
55
+ <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(240); ?>" width="240" height="240" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
56
+ </a>
57
+ <?php // Product description ?>
58
+ <div class="product-shop">
59
+ <div class="f-fix">
60
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
61
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
62
+
63
+ <div class="row">
64
+ <div class="left">
65
+ <?php echo $this->getPriceHtml($_product, true) ?>
66
+
67
+ <?php if($_product->getRatingSummary()): ?>
68
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
69
+ <?php endif; ?>
70
+
71
+ </div>
72
+ <div class="right">
73
+ <?php if($_product->isSaleable()): ?>
74
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>
75
+ <?php else: ?>
76
+ <p class="availability out-of-stock">
77
+ <?php echo $this->__('Out of stock') ?>
78
+ </p>
79
+ <?php endif; ?>
80
+
81
+ <div class="desc std">
82
+ <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
83
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
84
+ <?php echo $this->__('Learn More...') ?>
85
+ </a>
86
+ </div>
87
+
88
+
89
+ </div>
90
+ </div>
91
+
92
+ <?php /* ?>
93
+ <ul class="add-to-links">
94
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
95
+ <li>
96
+ <a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a>
97
+ </li>
98
+ <?php endif; ?>
99
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
100
+ <li>
101
+ <span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a>
102
+ </li>
103
+ <?php endif; ?>
104
+ </ul>
105
+ <?php */ ?>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ </li>
111
+ <?php endforeach; ?>
112
+ </ol>
113
+
114
+ </div>
115
+
116
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
117
+
118
+ <?php else: ?>
119
+
120
+ <?php // Grid Mode ?>
121
+
122
+ <?php $_collectionSize = $_productCollection->count() ?>
123
+ <?php $_columnCount = $this->getColumnCount(); ?>
124
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
125
+ <?php if ($i++%$_columnCount==0): ?>
126
+ <ul class="small-block-grid-2 large-block-grid-4 products-grid">
127
+ <?php endif ?>
128
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
129
+ <div class="item-wrapper">
130
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
131
+ <span class="product-image">
132
+ <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(240); ?>" width="240" height="240" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
133
+ </span>
134
+ <div>
135
+ <div class="text-center">
136
+
137
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
138
+ </div>
139
+ </div>
140
+ </a>
141
+
142
+ <div class="text-center">
143
+ <?php echo $this->getPriceHtml($_product, true) ?>
144
+ </div>
145
+
146
+ <div class="row">
147
+ <div class="large-centered small-centered medium-centered medium-8 small-8 large-4 columns">
148
+
149
+ <?php if($_product->getRatingSummary()): ?>
150
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
151
+ <?php endif; ?>
152
+ </div>
153
+ </div>
154
+
155
+ <div>
156
+ <div class="text-center">
157
+ <div class="desc std">
158
+ <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
159
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
160
+ <?php echo $this->__('Learn More...') ?>
161
+ </a>
162
+ </div>
163
+
164
+ <?php if($_product->isSaleable()): ?>
165
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')">
166
+ <?php echo $this->__('Add to Cart') ?>
167
+ </button>
168
+ <?php else: ?>
169
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
170
+ <?php endif; ?>
171
+ <!-- Hidden Add to links on Grid view
172
+ <ul class="add-to-links">
173
+ <?php //if ($this->helper('wishlist')->isAllow()) : ?>
174
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php //echo $this->__('Add to Wishlist') ?></a></li>
175
+ <?php //endif; ?>
176
+ <?php //if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
177
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php //echo $this->__('Add to Compare') ?></a></li>
178
+ <?php //endif; ?>
179
+ </ul>-->
180
+ </div>
181
+ </div>
182
+ </div>
183
+
184
+
185
+
186
+ </li>
187
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
188
+ </ul>
189
+ <?php endif ?>
190
+ <?php endforeach ?>
191
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
192
+ <?php endif; ?>
193
+
194
+ <div class="toolbar-bottom">
195
+ <?php //echo $this->getToolbarHtml() ?>
196
+ </div>
197
+ </div>
198
+ <?php endif; ?>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/list/customtoolbar.phtml CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
- echo $this->getCustomToolBarHtml();
3
-
4
  ?>
1
+ <?php
2
+ echo $this->getCustomToolBarHtml();
3
+
4
  ?>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/list/toolbar.phtml CHANGED
@@ -1,151 +1,151 @@
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
- <div class="toolbar">
29
- <?php
30
-
31
- $this->setData('_current_grid_mode', 'list');
32
-
33
- $bd["breadcrumb"] = $this->getData('breadcrumb');
34
- $bd["pager"] = $this->getData('pager');
35
- $bd["sortbox"] = $this->getData('sortbox');
36
- $showbreadcrumb = $this->getData('showbreadcrumb');
37
- asort($bd);
38
- $size =$this->getCollection()->getSize();
39
- foreach($bd as $key=>$bdv):
40
-
41
- if($key == 'breadcrumb' && $showbreadcrumb == 1 ):
42
- ?>
43
- <div class="row">
44
- <?php echo $this->getLayout()->getBlock('breadcrumbs')->toHtml(); ?>
45
- </div>
46
- <?php
47
- endif;
48
- if($key == 'pager' && $size && $bd["pager"] != ''):
49
- ?>
50
- <div class="row pager-panel">
51
- <?php echo $this->getPagerHtml() ?>
52
- </div>
53
- <?php
54
- endif;
55
- if($key == 'sortbox' && $size ):?>
56
- <div class="row toolbar-panel">
57
- <!--div class="small-3 medium-4 large-4 columns">
58
- <?php if( $this->isExpanded() ): ?>
59
- <div class="sorter">
60
- <?php if( $this->isEnabledViewSwitcher() ): ?>
61
- <p class="view-mode">
62
- <?php $_modes = $this->getModes(); ?>
63
- <?php if($_modes && count($_modes)>1): ?>
64
-
65
- <?php
66
- $mod_seperator = 1;
67
- foreach ($this->getModes() as $_code=>$_label): ?>
68
- <?php if($this->isModeActive($_code)): ?>
69
- <strong title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></strong>&nbsp;
70
- <?php else: ?>
71
- <a href="<?php echo $this->getModeUrl($_code) ?>" title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></a>&nbsp;
72
- <?php endif; ?>
73
-
74
- <?php echo ($mod_seperator == 1) ? ' / ' : ''; $mod_seperator++;?>
75
-
76
- <?php endforeach; ?>
77
- <?php endif; ?>
78
- </p>
79
- <?php endif; ?>
80
- </div>
81
-
82
- </div-->
83
-
84
- <div class="left">
85
-
86
- <div class="pager">
87
- <p id="product_amount" class="amount" style="display:none">
88
- <?php if($this->getLastPageNum()>1): ?>
89
- <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
90
- <?php else: ?>
91
- <?php echo $this->__('( %s )', $this->getTotalNum()) ?>
92
- <?php endif; ?>
93
- </p>
94
- <div class="limiter">
95
- <label><?php echo $this->__('Show') ?></label>
96
- <select onchange="setLocation(this.value)">
97
- <?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
98
- <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
99
- <?php echo $_limit ?>
100
- </option>
101
- <?php endforeach; ?>
102
- </select>
103
- <label><?php echo $this->__('/page') ?></label>
104
- </div>
105
-
106
- </div>
107
- </div>
108
-
109
- <?php
110
-
111
- $sort_opt = $this->helper('mobilenow/theme')->getThemeData('catalogsortby');
112
-
113
- $show = $sort_opt->show_sortby_dropdown ;
114
- $option_array = $this->helper('mobilenow/theme')->getSortbox();
115
-
116
- $options = explode(',',$sort_opt->sort_options );
117
- //var_dump($options);exit($show);
118
- if($show==1):
119
- ?>
120
- <div class="right">
121
- <div class="sort-by">
122
-
123
- <select onchange="setLocation(this.value)">
124
-
125
- <?php foreach($options as $_key):
126
- $current_sel = $this->getCurrentOrder().'-'.$this->getCurrentDirection()
127
- ?>
128
- <option value="<?php echo $this->getOrderUrl($option_array[$_key]['order'], $option_array[$_key]['dir']) ?>"<?php if($current_sel ==$option_array[$_key]['order'].'-'.$option_array[$_key]['dir']): ?> selected="selected"<?php endif; ?>>
129
- <?php echo $this->__($option_array[$_key]['label']) ?>
130
- </option>
131
- <?php endforeach; ?>
132
- </select>
133
- <?php if($this->getCurrentDirection() == 'desc'): ?>
134
- <a class="arrow-down" href="<?php echo $this->getOrderUrl(null, 'asc') ?>" title="<?php echo $this->__('Set Ascending Direction') ?>"> </a>
135
- <?php else: ?>
136
- <a class="arrow-up" href="<?php echo $this->getOrderUrl(null, 'desc') ?>" title="<?php echo $this->__('Set Descending Direction') ?>"> </a>
137
- <?php endif; ?>
138
- </div>
139
-
140
- </div>
141
- <?php endif; ?>
142
- <?php endif; ?>
143
-
144
- </div>
145
-
146
- <?php
147
- endif;
148
- endforeach;
149
-
150
- ?>
151
  </div>
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
+ <div class="toolbar">
29
+ <?php
30
+
31
+ $this->setData('_current_grid_mode', 'list');
32
+
33
+ $bd["breadcrumb"] = $this->getData('breadcrumb');
34
+ $bd["pager"] = $this->getData('pager');
35
+ $bd["sortbox"] = $this->getData('sortbox');
36
+ $showbreadcrumb = $this->getData('showbreadcrumb');
37
+ asort($bd);
38
+ $size =$this->getCollection()->getSize();
39
+ foreach($bd as $key=>$bdv):
40
+
41
+ if($key == 'breadcrumb' && $showbreadcrumb == 1 ):
42
+ ?>
43
+ <div class="row">
44
+ <?php echo $this->getLayout()->getBlock('breadcrumbs')->toHtml(); ?>
45
+ </div>
46
+ <?php
47
+ endif;
48
+ if($key == 'pager' && $size && $bd["pager"] != ''):
49
+ ?>
50
+ <div class="row pager-panel">
51
+ <?php echo $this->getPagerHtml() ?>
52
+ </div>
53
+ <?php
54
+ endif;
55
+ if($key == 'sortbox' && $size ):?>
56
+ <div class="row toolbar-panel">
57
+ <!--div class="small-3 medium-4 large-4 columns">
58
+ <?php if( $this->isExpanded() ): ?>
59
+ <div class="sorter">
60
+ <?php if( $this->isEnabledViewSwitcher() ): ?>
61
+ <p class="view-mode">
62
+ <?php $_modes = $this->getModes(); ?>
63
+ <?php if($_modes && count($_modes)>1): ?>
64
+
65
+ <?php
66
+ $mod_seperator = 1;
67
+ foreach ($this->getModes() as $_code=>$_label): ?>
68
+ <?php if($this->isModeActive($_code)): ?>
69
+ <strong title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></strong>&nbsp;
70
+ <?php else: ?>
71
+ <a href="<?php echo $this->getModeUrl($_code) ?>" title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></a>&nbsp;
72
+ <?php endif; ?>
73
+
74
+ <?php echo ($mod_seperator == 1) ? ' / ' : ''; $mod_seperator++;?>
75
+
76
+ <?php endforeach; ?>
77
+ <?php endif; ?>
78
+ </p>
79
+ <?php endif; ?>
80
+ </div>
81
+
82
+ </div-->
83
+
84
+ <div class="left">
85
+
86
+ <div class="pager">
87
+ <p id="product_amount" class="amount" style="display:none">
88
+ <?php if($this->getLastPageNum()>1): ?>
89
+ <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
90
+ <?php else: ?>
91
+ <?php echo $this->__('( %s )', $this->getTotalNum()) ?>
92
+ <?php endif; ?>
93
+ </p>
94
+ <div class="limiter">
95
+ <label><?php echo $this->__('Show') ?></label>
96
+ <select onchange="setLocation(this.value)">
97
+ <?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
98
+ <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
99
+ <?php echo $_limit ?>
100
+ </option>
101
+ <?php endforeach; ?>
102
+ </select>
103
+ <label><?php echo $this->__('/page') ?></label>
104
+ </div>
105
+
106
+ </div>
107
+ </div>
108
+
109
+ <?php
110
+
111
+ $sort_opt = $this->helper('mobilenow/theme')->getThemeData('catalogsortby');
112
+
113
+ $show = $sort_opt->show_sortby_dropdown ;
114
+ $option_array = $this->helper('mobilenow/theme')->getSortbox();
115
+
116
+ $options = explode(',',$sort_opt->sort_options );
117
+ //var_dump($options);exit($show);
118
+ if($show==1):
119
+ ?>
120
+ <div class="right">
121
+ <div class="sort-by">
122
+
123
+ <select onchange="setLocation(this.value)">
124
+
125
+ <?php foreach($options as $_key):
126
+ $current_sel = $this->getCurrentOrder().'-'.$this->getCurrentDirection()
127
+ ?>
128
+ <option value="<?php echo $this->getOrderUrl($option_array[$_key]['order'], $option_array[$_key]['dir']) ?>"<?php if($current_sel ==$option_array[$_key]['order'].'-'.$option_array[$_key]['dir']): ?> selected="selected"<?php endif; ?>>
129
+ <?php echo $this->__($option_array[$_key]['label']) ?>
130
+ </option>
131
+ <?php endforeach; ?>
132
+ </select>
133
+ <?php if($this->getCurrentDirection() == 'desc'): ?>
134
+ <a class="arrow-down" href="<?php echo $this->getOrderUrl(null, 'asc') ?>" title="<?php echo $this->__('Set Ascending Direction') ?>"> </a>
135
+ <?php else: ?>
136
+ <a class="arrow-up" href="<?php echo $this->getOrderUrl(null, 'desc') ?>" title="<?php echo $this->__('Set Descending Direction') ?>"> </a>
137
+ <?php endif; ?>
138
+ </div>
139
+
140
+ </div>
141
+ <?php endif; ?>
142
+ <?php endif; ?>
143
+
144
+ </div>
145
+
146
+ <?php
147
+ endif;
148
+ endforeach;
149
+
150
+ ?>
151
  </div>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/list/upsell.phtml CHANGED
@@ -1,58 +1,58 @@
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
- <div >
29
-
30
- <?php if(count($this->getItemCollection()->getItems())): ?>
31
- <div class="box-collateral box-up-sell">
32
- <h2><?php echo $this->__('Related product(s)') ?></h2>
33
-
34
- <?php // $this->setColumnCount(5); // uncomment this line if you want to have another number of columns. also can be changed in layout ?>
35
- <?php $this->resetItemsIterator() ?>
36
- <?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
37
-
38
- <ul class="small-block-grid-2 medium-block-grid-2 large-block-grid-4">
39
- <?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
40
- <?php if($_link=$this->getIterableItem()): ?>
41
- <li>
42
- <a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_link, 'small_image')->resize(250) ?>" width="250" height="250" alt="<?php echo $this->htmlEscape($_link->getName()) ?>" /></a>
43
- <h3 class="product-name"><a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>"><?php echo $this->htmlEscape($_link->getName()) ?></a></h3>
44
- <?php echo $this->getPriceHtml($_link, true, '-upsell') ?>
45
- <?php echo $this->getReviewsSummaryHtml($_link) ?>
46
- </li>
47
- <?php else: ?>
48
- <li class="empty">&nbsp;</li>
49
- <?php endif; ?>
50
- <?php endfor; ?>
51
- </ul>
52
- <?php endfor; ?>
53
-
54
- <script type="text/javascript">decorateTable('upsell-product-table')</script>
55
- </div>
56
- <?php endif ?>
57
-
58
  </div>
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
+ <div >
29
+
30
+ <?php if(count($this->getItemCollection()->getItems())): ?>
31
+ <div class="box-collateral box-up-sell">
32
+ <h2><?php echo $this->__('Related product(s)') ?></h2>
33
+
34
+ <?php // $this->setColumnCount(5); // uncomment this line if you want to have another number of columns. also can be changed in layout ?>
35
+ <?php $this->resetItemsIterator() ?>
36
+ <?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
37
+
38
+ <ul class="small-block-grid-2 medium-block-grid-2 large-block-grid-4">
39
+ <?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
40
+ <?php if($_link=$this->getIterableItem()): ?>
41
+ <li>
42
+ <a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_link, 'small_image')->resize(250) ?>" width="250" height="250" alt="<?php echo $this->htmlEscape($_link->getName()) ?>" /></a>
43
+ <h3 class="product-name"><a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>"><?php echo $this->htmlEscape($_link->getName()) ?></a></h3>
44
+ <?php echo $this->getPriceHtml($_link, true, '-upsell') ?>
45
+ <?php echo $this->getReviewsSummaryHtml($_link) ?>
46
+ </li>
47
+ <?php else: ?>
48
+ <li class="empty">&nbsp;</li>
49
+ <?php endif; ?>
50
+ <?php endfor; ?>
51
+ </ul>
52
+ <?php endfor; ?>
53
+
54
+ <script type="text/javascript">decorateTable('upsell-product-table')</script>
55
+ </div>
56
+ <?php endif ?>
57
+
58
  </div>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/mobilelist.phtml CHANGED
@@ -1,273 +1,273 @@
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
28
- /**
29
- * Product list template
30
- *
31
- * @see Mage_Catalog_Block_Product_List
32
- */
33
- ?>
34
- <?php
35
- $_productCollection=$this->getLoadedProductCollection();
36
- $_helper = $this->helper('catalog/output');
37
- $cl["price"] = $this->getData('price');
38
- $cl["ratings"] = $this->getData('ratings');
39
- $cl["cart"] = $this->getData('cart');
40
- $cl["more"] = $this->getData('more');
41
- asort($cl);
42
- $helperObj = $this->helper('mobilenow/theme');
43
- $image_det = $helperObj->getThemeData('catalogimagedetails');
44
- ?>
45
- <?php if(!$_productCollection->count()): ?>
46
- <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
47
- <?php else: ?>
48
- <div class="category-products">
49
-
50
- <?php //echo $this->getToolbarHtml() ?>
51
- <?php
52
- //$p_mode = $this->getMode()// List mode
53
- $p_mode = 'list';?>
54
- <?php if($p_mode!='grid'): ?>
55
- <?php $_iterator = 0; ?>
56
- <div>
57
- <ol class="products-list " id="products-list">
58
- <?php foreach ($_productCollection as $_product): ?>
59
- <li class=" row item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
60
- <div class="small-3 medium-3 large-3 columns">
61
- <?php // Product Image ?>
62
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image product-image-mobilelist">
63
-
64
- <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(62); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
65
- </a>
66
- </div>
67
- <div class="small-9 medium-9 large-9 columns">
68
- <?php // Product description ?>
69
- <div class="product-shop">
70
- <div class="f-fix">
71
- <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
72
- <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
73
-
74
- <div class="show-for-medium-up ">
75
- <div class="row">
76
- <?php
77
- foreach($cl as $key=>$clist):
78
- if($key == 'price' ):
79
- ?>
80
- <div class="small-3 medium-3 large-3 columns" >
81
- <?php echo $this->getPriceHtml($_product, true) ?>
82
- </div>
83
- <?php endif;?>
84
- <?php
85
- if($_product->getRatingSummary() && $this->getData('showstar') && $key == 'ratings'): ?>
86
- <div class="small-3 medium-3 large-3 columns" >
87
- <?php echo $this->getReviewsSummaryHtml($_product) ?>
88
- </div>
89
- <?php endif; ?>
90
-
91
- <?php if($this->getData('showcartbtn') && $key == 'cart'): ?>
92
- <div class="small-3 medium-3 large-3 columns" >
93
- <?php if($_product->isSaleable()): ?>
94
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>
95
- <?php else: ?>
96
- <p class="availability out-of-stock">
97
- <?php echo $this->__('Out of stock') ?>
98
- </p>
99
- <?php endif; ?>
100
- </div>
101
- <?php endif; ?>
102
- <?php if($this->getData('showlernmore') && $key == 'more'):?>
103
- <div class="small-3 medium-3 large-3 columns" >
104
- <div class="desc std">
105
- <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
106
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
107
- <?php echo $this->__('Learn More...') ?>
108
- </a>
109
- </div>
110
- </div>
111
- <?php
112
- endif;
113
- endforeach;
114
-
115
- ?>
116
- </div>
117
-
118
- </div>
119
-
120
- <div class="show-for-small">
121
-
122
- <ul class="small-block-grid-2">
123
- <?php
124
- foreach($cl as $key=>$clist):
125
- if($key == 'price' ):
126
- ?>
127
- <li>
128
- <?php echo $this->getPriceHtml($_product, true) ?>
129
- </li>
130
- <?php endif ;?>
131
- <?php if($_product->getRatingSummary() && $this->getData('showstar')&& $key == 'ratings'): ?>
132
- <li >
133
- <?php echo $this->getReviewsSummaryHtml($_product) ?>
134
- </li>
135
- <?php endif; ?>
136
-
137
- <?php if($this->getData('showcartbtn') && $key == 'cart'): ?>
138
- <li>
139
- <?php if($_product->isSaleable()): ?>
140
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>
141
- <?php else: ?>
142
- <p class="availability out-of-stock">
143
- <?php echo $this->__('Out of stock') ?>
144
- </p>
145
- <?php endif; ?>
146
- </li>
147
- <?php endif; ?>
148
- <?php if($this->getData('showlernmore') && $key == 'more'):?>
149
- <li>
150
- <div class="desc std">
151
- <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
152
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
153
- <?php echo $this->__('Learn More...') ?>
154
- </a>
155
- </div>
156
- </li>
157
- <?php endif;
158
- endforeach;
159
- ?>
160
- </ul>
161
-
162
-
163
-
164
- </div>
165
-
166
- <?php /* ?>
167
- <ul class="add-to-links">
168
- <?php if ($this->helper('wishlist')->isAllow()) : ?>
169
- <li>
170
- <a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a>
171
- </li>
172
- <?php endif; ?>
173
- <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
174
- <li>
175
- <span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a>
176
- </li>
177
- <?php endif; ?>
178
- </ul>
179
- <?php */ ?>
180
-
181
-
182
- </div>
183
- </div>
184
- </div>
185
- </li>
186
- <?php endforeach; ?>
187
- </ol>
188
-
189
- </div>
190
-
191
- <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
192
-
193
- <?php else: ?>
194
-
195
- <?php // Grid Mode ?>
196
-
197
- <?php $_collectionSize = $_productCollection->count() ?>
198
- <?php $_columnCount = $this->getColumnCount(); ?>
199
- <?php $i=0; foreach ($_productCollection as $_product): ?>
200
- <?php if ($i++%$_columnCount==0): ?>
201
- <ul class="small-block-grid-2 large-block-grid-4 products-grid">
202
- <?php endif ?>
203
- <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
204
- <div class="item-wrapper">
205
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
206
- <span class="product-image">
207
- <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(240); ?>" width="240" height="240" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
208
- </span>
209
- <div>
210
- <div class="text-center">
211
-
212
- <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
213
- </div>
214
- </div>
215
- </a>
216
-
217
- <div class="text-center">
218
- <?php echo $this->getPriceHtml($_product, true) ?>
219
- </div>
220
-
221
- <div class="row">
222
- <div class="large-centered small-centered medium-centered medium-8 small-8 large-4 columns">
223
-
224
- <?php if($_product->getRatingSummary()): ?>
225
- <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
226
- <?php endif; ?>
227
- </div>
228
- </div>
229
-
230
- <div>
231
- <div class="text-center">
232
- <div class="desc std">
233
- <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
234
- <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
235
- <?php echo $this->__('Learn More...') ?>
236
- </a>
237
- </div>
238
-
239
- <?php if($_product->isSaleable()): ?>
240
- <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')">
241
- <?php echo $this->__('Add to Cart') ?>
242
- </button>
243
- <?php else: ?>
244
- <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
245
- <?php endif; ?>
246
- <!-- Hidden Add to links on Grid view
247
- <ul class="add-to-links">
248
- <?php //if ($this->helper('wishlist')->isAllow()) : ?>
249
- <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php //echo $this->__('Add to Wishlist') ?></a></li>
250
- <?php //endif; ?>
251
- <?php //if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
252
- <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php //echo $this->__('Add to Compare') ?></a></li>
253
- <?php //endif; ?>
254
- </ul>-->
255
- </div>
256
- </div>
257
- </div>
258
-
259
-
260
-
261
- </li>
262
- <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
263
- </ul>
264
- <?php endif ?>
265
- <?php endforeach ?>
266
- <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
267
- <?php endif; ?>
268
-
269
- <div class="toolbar-bottom">
270
- <?php //echo $this->getToolbarHtml() ?>
271
- </div>
272
- </div>
273
- <?php endif; ?>
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
28
+ /**
29
+ * Product list template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+ $_productCollection=$this->getLoadedProductCollection();
36
+ $_helper = $this->helper('catalog/output');
37
+ $cl["price"] = $this->getData('price');
38
+ $cl["ratings"] = $this->getData('ratings');
39
+ $cl["cart"] = $this->getData('cart');
40
+ $cl["more"] = $this->getData('more');
41
+ asort($cl);
42
+ $helperObj = $this->helper('mobilenow/theme');
43
+ $image_det = $helperObj->getThemeData('catalogimagedetails');
44
+ ?>
45
+ <?php if(!$_productCollection->count()): ?>
46
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
47
+ <?php else: ?>
48
+ <div class="category-products">
49
+
50
+ <?php //echo $this->getToolbarHtml() ?>
51
+ <?php
52
+ //$p_mode = $this->getMode()// List mode
53
+ $p_mode = 'list';?>
54
+ <?php if($p_mode!='grid'): ?>
55
+ <?php $_iterator = 0; ?>
56
+ <div>
57
+ <ol class="products-list " id="products-list">
58
+ <?php foreach ($_productCollection as $_product): ?>
59
+ <li class=" row item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
60
+ <div class="small-3 medium-3 large-3 columns">
61
+ <?php // Product Image ?>
62
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image product-image-mobilelist">
63
+
64
+ <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(62); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
65
+ </a>
66
+ </div>
67
+ <div class="small-9 medium-9 large-9 columns">
68
+ <?php // Product description ?>
69
+ <div class="product-shop">
70
+ <div class="f-fix">
71
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
72
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
73
+
74
+ <div class="show-for-medium-up ">
75
+ <div class="row">
76
+ <?php
77
+ foreach($cl as $key=>$clist):
78
+ if($key == 'price' ):
79
+ ?>
80
+ <div class="small-3 medium-3 large-3 columns" >
81
+ <?php echo $this->getPriceHtml($_product, true) ?>
82
+ </div>
83
+ <?php endif;?>
84
+ <?php
85
+ if($_product->getRatingSummary() && $this->getData('showstar') && $key == 'ratings'): ?>
86
+ <div class="small-3 medium-3 large-3 columns" >
87
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
88
+ </div>
89
+ <?php endif; ?>
90
+
91
+ <?php if($this->getData('showcartbtn') && $key == 'cart'): ?>
92
+ <div class="small-3 medium-3 large-3 columns" >
93
+ <?php if($_product->isSaleable()): ?>
94
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>
95
+ <?php else: ?>
96
+ <p class="availability out-of-stock">
97
+ <?php echo $this->__('Out of stock') ?>
98
+ </p>
99
+ <?php endif; ?>
100
+ </div>
101
+ <?php endif; ?>
102
+ <?php if($this->getData('showlernmore') && $key == 'more'):?>
103
+ <div class="small-3 medium-3 large-3 columns" >
104
+ <div class="desc std">
105
+ <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
106
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
107
+ <?php echo $this->__('Learn More...') ?>
108
+ </a>
109
+ </div>
110
+ </div>
111
+ <?php
112
+ endif;
113
+ endforeach;
114
+
115
+ ?>
116
+ </div>
117
+
118
+ </div>
119
+
120
+ <div class="show-for-small">
121
+
122
+ <ul class="small-block-grid-2">
123
+ <?php
124
+ foreach($cl as $key=>$clist):
125
+ if($key == 'price' ):
126
+ ?>
127
+ <li>
128
+ <?php echo $this->getPriceHtml($_product, true) ?>
129
+ </li>
130
+ <?php endif ;?>
131
+ <?php if($_product->getRatingSummary() && $this->getData('showstar')&& $key == 'ratings'): ?>
132
+ <li >
133
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
134
+ </li>
135
+ <?php endif; ?>
136
+
137
+ <?php if($this->getData('showcartbtn') && $key == 'cart'): ?>
138
+ <li>
139
+ <?php if($_product->isSaleable()): ?>
140
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>
141
+ <?php else: ?>
142
+ <p class="availability out-of-stock">
143
+ <?php echo $this->__('Out of stock') ?>
144
+ </p>
145
+ <?php endif; ?>
146
+ </li>
147
+ <?php endif; ?>
148
+ <?php if($this->getData('showlernmore') && $key == 'more'):?>
149
+ <li>
150
+ <div class="desc std">
151
+ <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
152
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
153
+ <?php echo $this->__('Learn More...') ?>
154
+ </a>
155
+ </div>
156
+ </li>
157
+ <?php endif;
158
+ endforeach;
159
+ ?>
160
+ </ul>
161
+
162
+
163
+
164
+ </div>
165
+
166
+ <?php /* ?>
167
+ <ul class="add-to-links">
168
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
169
+ <li>
170
+ <a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a>
171
+ </li>
172
+ <?php endif; ?>
173
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
174
+ <li>
175
+ <span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a>
176
+ </li>
177
+ <?php endif; ?>
178
+ </ul>
179
+ <?php */ ?>
180
+
181
+
182
+ </div>
183
+ </div>
184
+ </div>
185
+ </li>
186
+ <?php endforeach; ?>
187
+ </ol>
188
+
189
+ </div>
190
+
191
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
192
+
193
+ <?php else: ?>
194
+
195
+ <?php // Grid Mode ?>
196
+
197
+ <?php $_collectionSize = $_productCollection->count() ?>
198
+ <?php $_columnCount = $this->getColumnCount(); ?>
199
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
200
+ <?php if ($i++%$_columnCount==0): ?>
201
+ <ul class="small-block-grid-2 large-block-grid-4 products-grid">
202
+ <?php endif ?>
203
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
204
+ <div class="item-wrapper">
205
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
206
+ <span class="product-image">
207
+ <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(240); ?>" width="240" height="240" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
208
+ </span>
209
+ <div>
210
+ <div class="text-center">
211
+
212
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
213
+ </div>
214
+ </div>
215
+ </a>
216
+
217
+ <div class="text-center">
218
+ <?php echo $this->getPriceHtml($_product, true) ?>
219
+ </div>
220
+
221
+ <div class="row">
222
+ <div class="large-centered small-centered medium-centered medium-8 small-8 large-4 columns">
223
+
224
+ <?php if($_product->getRatingSummary()): ?>
225
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
226
+ <?php endif; ?>
227
+ </div>
228
+ </div>
229
+
230
+ <div>
231
+ <div class="text-center">
232
+ <div class="desc std">
233
+ <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
234
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn">
235
+ <?php echo $this->__('Learn More...') ?>
236
+ </a>
237
+ </div>
238
+
239
+ <?php if($_product->isSaleable()): ?>
240
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button secondary small round addtocart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')">
241
+ <?php echo $this->__('Add to Cart') ?>
242
+ </button>
243
+ <?php else: ?>
244
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
245
+ <?php endif; ?>
246
+ <!-- Hidden Add to links on Grid view
247
+ <ul class="add-to-links">
248
+ <?php //if ($this->helper('wishlist')->isAllow()) : ?>
249
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php //echo $this->__('Add to Wishlist') ?></a></li>
250
+ <?php //endif; ?>
251
+ <?php //if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
252
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php //echo $this->__('Add to Compare') ?></a></li>
253
+ <?php //endif; ?>
254
+ </ul>-->
255
+ </div>
256
+ </div>
257
+ </div>
258
+
259
+
260
+
261
+ </li>
262
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
263
+ </ul>
264
+ <?php endif ?>
265
+ <?php endforeach ?>
266
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
267
+ <?php endif; ?>
268
+
269
+ <div class="toolbar-bottom">
270
+ <?php //echo $this->getToolbarHtml() ?>
271
+ </div>
272
+ </div>
273
+ <?php endif; ?>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/price.phtml CHANGED
@@ -1,428 +1,428 @@
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
- /**
30
- * Template for displaying product price in different places (products grid, product view page etc)
31
- *
32
- * @see Mage_Catalog_Block_Product_Abstract
33
- */
34
- ?>
35
- <?php
36
- $_coreHelper = $this->helper('core');
37
- $_weeeHelper = $this->helper('weee');
38
- $_taxHelper = $this->helper('tax');
39
- /* @var $_coreHelper Mage_Core_Helper_Data */
40
- /* @var $_weeeHelper Mage_Weee_Helper_Data */
41
- /* @var $_taxHelper Mage_Tax_Helper_Data */
42
-
43
- $_product = $this->getProduct();
44
- $_storeId = $_product->getStoreId();
45
- $_id = $_product->getId();
46
- $_weeeSeparator = '';
47
- $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
48
- $_minimalPriceValue = $_product->getMinimalPrice();
49
- $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
50
- ?>
51
-
52
- <?php if (!$_product->isGrouped()): ?>
53
- <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
54
- <?php if ($_weeeHelper->typeOfDisplay($_product, array(Mage_Weee_Model_Tax::DISPLAY_INCL_DESCR, Mage_Weee_Model_Tax::DISPLAY_EXCL_DESCR_INCL, 4))): ?>
55
- <?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product); ?>
56
- <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForDisplay($_product); ?>
57
- <?php endif; ?>
58
- <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
59
- <?php if ($_weeeHelper->isTaxable() && !$_taxHelper->priceIncludesTax($_storeId)): ?>
60
- <?php $_attributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
61
- <?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_attributes); ?>
62
- <?php endif; ?>
63
-
64
- <div class="price-box">
65
- <?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
66
- <?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
67
- <?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
68
- <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
69
- <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
70
- <?php if ($_finalPrice >= $_price): ?>
71
- <?php if ($_taxHelper->displayBothPrices()): ?>
72
- <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
73
- <span class="price-excluding-tax">
74
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
75
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
76
- <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
77
- </span>
78
- </span>
79
- <span class="price-including-tax">
80
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
81
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
82
- <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
83
- </span>
84
- </span>
85
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
86
- <span class="price-excluding-tax">
87
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
88
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
89
- <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
90
- </span>
91
- </span>
92
- <span class="price-including-tax">
93
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
94
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
95
- <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
96
- </span>
97
- <span class="weee">(
98
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
99
- <?php echo $_weeeSeparator; ?>
100
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
101
- <?php $_weeeSeparator = ' + '; ?>
102
- <?php endforeach; ?>
103
- )</span>
104
- </span>
105
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
106
- <span class="price-excluding-tax">
107
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
108
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
109
- <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
110
- </span>
111
- </span>
112
- <span class="price-including-tax">
113
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
114
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
115
- <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
116
- </span>
117
- <span class="weee">(
118
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
119
- <?php echo $_weeeSeparator; ?>
120
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
121
- <?php $_weeeSeparator = ' + '; ?>
122
- <?php endforeach; ?>
123
- )</span>
124
- </span>
125
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
126
- <span class="price-excluding-tax">
127
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
128
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
129
- <?php echo $_coreHelper->currency($_price, true, false) ?>
130
- </span>
131
- </span>
132
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
133
- <span class="weee">
134
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
135
- </span>
136
- <?php endforeach; ?>
137
- <span class="price-including-tax">
138
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
139
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
140
- <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
141
- </span>
142
- </span>
143
- <?php else: ?>
144
- <span class="price-excluding-tax">
145
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
146
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
147
- <?php if ($_finalPrice == $_price): ?>
148
- <?php echo $_coreHelper->currency($_price, true, false) ?>
149
- <?php else: ?>
150
- <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
151
- <?php endif; ?>
152
- </span>
153
- </span>
154
- <span class="price-including-tax">
155
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
156
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
157
- <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
158
- </span>
159
- </span>
160
- <?php endif; ?>
161
- <?php else: ?>
162
- <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
163
- <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
164
- <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
165
- </span>
166
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
167
- <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
168
- <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
169
- </span>
170
- <span class="weee">(
171
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
172
- <?php echo $_weeeSeparator; ?>
173
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
174
- <?php $_weeeSeparator = ' + '; ?>
175
- <?php endforeach; ?>
176
- )</span>
177
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
178
- <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
179
- <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
180
- </span>
181
- <span class="weee">(
182
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
183
- <?php echo $_weeeSeparator; ?>
184
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
185
- <?php $_weeeSeparator = ' + '; ?>
186
- <?php endforeach; ?>
187
- )</span>
188
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
189
- <span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br />
190
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
191
- <span class="weee">
192
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
193
- </span>
194
- <?php endforeach; ?>
195
- <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
196
- <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
197
- </span>
198
- <?php else: ?>
199
- <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
200
- <?php if ($_finalPrice == $_price): ?>
201
- <?php echo $_coreHelper->currency($_price, true, true) ?>
202
- <?php else: ?>
203
- <?php echo $_coreHelper->currency($_finalPrice, true, true) ?>
204
- <?php endif; ?>
205
- </span>
206
- <?php endif; ?>
207
- <?php endif; ?>
208
- <?php else: /* if ($_finalPrice == $_price): */ ?>
209
- <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
210
-
211
- <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
212
- <p class="old-price">
213
- <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
214
- <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
215
- <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
216
- </span>
217
- </p>
218
-
219
- <?php if ($_taxHelper->displayBothPrices()): ?>
220
- <p class="special-price">
221
- <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
222
- <span class="price-excluding-tax">
223
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
224
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
225
- <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
226
- </span>
227
- </span>
228
- <span class="price-including-tax">
229
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
230
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
231
- <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
232
- </span>
233
- </span>
234
- </p>
235
- <?php else: ?>
236
- <p class="special-price">
237
- <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
238
- <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
239
- <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?>
240
- </span>
241
- </p>
242
- <?php endif; ?>
243
-
244
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
245
- <p class="old-price">
246
- <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
247
- <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
248
- <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
249
- </span>
250
- </p>
251
-
252
- <p class="special-price">
253
- <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
254
- <span class="price-excluding-tax">
255
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
256
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
257
- <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
258
- </span>
259
- </span>
260
- <span class="weee">(
261
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
262
- <?php echo $_weeeSeparator; ?>
263
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
264
- <?php $_weeeSeparator = ' + '; ?>
265
- <?php endforeach; ?>
266
- )</span>
267
- <span class="price-including-tax">
268
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
269
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
270
- <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
271
- </span>
272
- </span>
273
- </p>
274
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
275
- <p class="old-price">
276
- <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
277
- <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
278
- <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
279
- </span>
280
- </p>
281
-
282
- <p class="special-price">
283
- <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
284
- <span class="price-excluding-tax">
285
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
286
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
287
- <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
288
- </span>
289
- </span>
290
- <span class="weee">(
291
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
292
- <?php echo $_weeeSeparator; ?>
293
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
294
- <?php $_weeeSeparator = ' + '; ?>
295
- <?php endforeach; ?>
296
- )</span>
297
- <span class="price-including-tax">
298
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
299
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
300
- <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
301
- </span>
302
- </span>
303
- </p>
304
- <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
305
- <p class="old-price">
306
- <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
307
- <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
308
- <?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
309
- </span>
310
- </p>
311
-
312
- <p class="special-price">
313
- <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
314
- <span class="price-excluding-tax">
315
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
316
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
317
- <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
318
- </span>
319
- </span>
320
- <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
321
- <span class="weee">
322
- <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
323
- </span>
324
- <?php endforeach; ?>
325
- <span class="price-including-tax">
326
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
327
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
328
- <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
329
- </span>
330
- </span>
331
- </p>
332
- <?php else: // excl. ?>
333
- <p class="old-price">
334
- <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
335
- <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
336
- <?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
337
- </span>
338
- </p>
339
-
340
- <?php if ($_taxHelper->displayBothPrices()): ?>
341
- <p class="special-price">
342
- <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
343
- <span class="price-excluding-tax">
344
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
345
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
346
- <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
347
- </span>
348
- </span>
349
- <span class="price-including-tax">
350
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
351
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
352
- <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
353
- </span>
354
- </span>
355
- </p>
356
- <?php else: ?>
357
- <p class="special-price">
358
- <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
359
- <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
360
- <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
361
- </span>
362
- </p>
363
- <?php endif; ?>
364
- <?php endif; ?>
365
-
366
- <?php endif; /* if ($_finalPrice == $_price): */ ?>
367
-
368
- <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
369
-
370
- <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
371
- <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
372
- <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
373
- <?php endif; ?>
374
-
375
- <?php if ($this->getUseLinkForAsLowAs()):?>
376
- <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
377
- <?php else:?>
378
- <span class="minimal-price-link">
379
- <?php endif?>
380
- <span class="label"><?php echo $this->__('As low as:') ?></span>
381
- <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
382
- <?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?>
383
- </span>
384
- <?php if ($this->getUseLinkForAsLowAs()):?>
385
- </a>
386
- <?php else:?>
387
- </span>
388
- <?php endif?>
389
- <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
390
- </div>
391
-
392
- <?php else: /* if (!$_product->isGrouped()): */ ?>
393
- <?php
394
- $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
395
- $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
396
- ?>
397
- <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
398
- <div class="price-box">
399
- <p class="minimal-price">
400
- <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
401
- <?php if ($_taxHelper->displayBothPrices()): ?>
402
- <span class="price-excluding-tax">
403
- <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
404
- <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
405
- <?php echo $_coreHelper->currency($_exclTax, true, false) ?>
406
- </span>
407
- </span>
408
- <span class="price-including-tax">
409
- <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
410
- <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
411
- <?php echo $_coreHelper->currency($_inclTax, true, false) ?>
412
- </span>
413
- </span>
414
- <?php else: ?>
415
- <?php
416
- $_showPrice = $_inclTax;
417
- if (!$_taxHelper->displayPriceIncludingTax()) {
418
- $_showPrice = $_exclTax;
419
- }
420
- ?>
421
- <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
422
- <?php echo $_coreHelper->currency($_showPrice, true, false) ?>
423
- </span>
424
- <?php endif; ?>
425
- </p>
426
- </div>
427
- <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
428
- <?php endif; /* if (!$_product->isGrouped()): */ ?>
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
+ /**
30
+ * Template for displaying product price in different places (products grid, product view page etc)
31
+ *
32
+ * @see Mage_Catalog_Block_Product_Abstract
33
+ */
34
+ ?>
35
+ <?php
36
+ $_coreHelper = $this->helper('core');
37
+ $_weeeHelper = $this->helper('weee');
38
+ $_taxHelper = $this->helper('tax');
39
+ /* @var $_coreHelper Mage_Core_Helper_Data */
40
+ /* @var $_weeeHelper Mage_Weee_Helper_Data */
41
+ /* @var $_taxHelper Mage_Tax_Helper_Data */
42
+
43
+ $_product = $this->getProduct();
44
+ $_storeId = $_product->getStoreId();
45
+ $_id = $_product->getId();
46
+ $_weeeSeparator = '';
47
+ $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
48
+ $_minimalPriceValue = $_product->getMinimalPrice();
49
+ $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
50
+ ?>
51
+
52
+ <?php if (!$_product->isGrouped()): ?>
53
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
54
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(Mage_Weee_Model_Tax::DISPLAY_INCL_DESCR, Mage_Weee_Model_Tax::DISPLAY_EXCL_DESCR_INCL, 4))): ?>
55
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product); ?>
56
+ <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForDisplay($_product); ?>
57
+ <?php endif; ?>
58
+ <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
59
+ <?php if ($_weeeHelper->isTaxable() && !$_taxHelper->priceIncludesTax($_storeId)): ?>
60
+ <?php $_attributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
61
+ <?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_attributes); ?>
62
+ <?php endif; ?>
63
+
64
+ <div class="price-box">
65
+ <?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
66
+ <?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
67
+ <?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
68
+ <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
69
+ <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
70
+ <?php if ($_finalPrice >= $_price): ?>
71
+ <?php if ($_taxHelper->displayBothPrices()): ?>
72
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
73
+ <span class="price-excluding-tax">
74
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
75
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
76
+ <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
77
+ </span>
78
+ </span>
79
+ <span class="price-including-tax">
80
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
81
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
82
+ <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
83
+ </span>
84
+ </span>
85
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
86
+ <span class="price-excluding-tax">
87
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
88
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
89
+ <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
90
+ </span>
91
+ </span>
92
+ <span class="price-including-tax">
93
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
94
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
95
+ <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
96
+ </span>
97
+ <span class="weee">(
98
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
99
+ <?php echo $_weeeSeparator; ?>
100
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
101
+ <?php $_weeeSeparator = ' + '; ?>
102
+ <?php endforeach; ?>
103
+ )</span>
104
+ </span>
105
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
106
+ <span class="price-excluding-tax">
107
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
108
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
109
+ <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
110
+ </span>
111
+ </span>
112
+ <span class="price-including-tax">
113
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
114
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
115
+ <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
116
+ </span>
117
+ <span class="weee">(
118
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
119
+ <?php echo $_weeeSeparator; ?>
120
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
121
+ <?php $_weeeSeparator = ' + '; ?>
122
+ <?php endforeach; ?>
123
+ )</span>
124
+ </span>
125
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
126
+ <span class="price-excluding-tax">
127
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
128
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
129
+ <?php echo $_coreHelper->currency($_price, true, false) ?>
130
+ </span>
131
+ </span>
132
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
133
+ <span class="weee">
134
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
135
+ </span>
136
+ <?php endforeach; ?>
137
+ <span class="price-including-tax">
138
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
139
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
140
+ <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
141
+ </span>
142
+ </span>
143
+ <?php else: ?>
144
+ <span class="price-excluding-tax">
145
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
146
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
147
+ <?php if ($_finalPrice == $_price): ?>
148
+ <?php echo $_coreHelper->currency($_price, true, false) ?>
149
+ <?php else: ?>
150
+ <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
151
+ <?php endif; ?>
152
+ </span>
153
+ </span>
154
+ <span class="price-including-tax">
155
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
156
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
157
+ <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
158
+ </span>
159
+ </span>
160
+ <?php endif; ?>
161
+ <?php else: ?>
162
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
163
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
164
+ <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
165
+ </span>
166
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
167
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
168
+ <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
169
+ </span>
170
+ <span class="weee">(
171
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
172
+ <?php echo $_weeeSeparator; ?>
173
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
174
+ <?php $_weeeSeparator = ' + '; ?>
175
+ <?php endforeach; ?>
176
+ )</span>
177
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
178
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
179
+ <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
180
+ </span>
181
+ <span class="weee">(
182
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
183
+ <?php echo $_weeeSeparator; ?>
184
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
185
+ <?php $_weeeSeparator = ' + '; ?>
186
+ <?php endforeach; ?>
187
+ )</span>
188
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
189
+ <span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br />
190
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
191
+ <span class="weee">
192
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
193
+ </span>
194
+ <?php endforeach; ?>
195
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
196
+ <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
197
+ </span>
198
+ <?php else: ?>
199
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
200
+ <?php if ($_finalPrice == $_price): ?>
201
+ <?php echo $_coreHelper->currency($_price, true, true) ?>
202
+ <?php else: ?>
203
+ <?php echo $_coreHelper->currency($_finalPrice, true, true) ?>
204
+ <?php endif; ?>
205
+ </span>
206
+ <?php endif; ?>
207
+ <?php endif; ?>
208
+ <?php else: /* if ($_finalPrice == $_price): */ ?>
209
+ <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
210
+
211
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
212
+ <p class="old-price">
213
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
214
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
215
+ <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
216
+ </span>
217
+ </p>
218
+
219
+ <?php if ($_taxHelper->displayBothPrices()): ?>
220
+ <p class="special-price">
221
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
222
+ <span class="price-excluding-tax">
223
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
224
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
225
+ <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
226
+ </span>
227
+ </span>
228
+ <span class="price-including-tax">
229
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
230
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
231
+ <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
232
+ </span>
233
+ </span>
234
+ </p>
235
+ <?php else: ?>
236
+ <p class="special-price">
237
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
238
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
239
+ <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?>
240
+ </span>
241
+ </p>
242
+ <?php endif; ?>
243
+
244
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
245
+ <p class="old-price">
246
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
247
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
248
+ <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
249
+ </span>
250
+ </p>
251
+
252
+ <p class="special-price">
253
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
254
+ <span class="price-excluding-tax">
255
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
256
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
257
+ <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
258
+ </span>
259
+ </span>
260
+ <span class="weee">(
261
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
262
+ <?php echo $_weeeSeparator; ?>
263
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
264
+ <?php $_weeeSeparator = ' + '; ?>
265
+ <?php endforeach; ?>
266
+ )</span>
267
+ <span class="price-including-tax">
268
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
269
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
270
+ <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
271
+ </span>
272
+ </span>
273
+ </p>
274
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
275
+ <p class="old-price">
276
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
277
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
278
+ <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
279
+ </span>
280
+ </p>
281
+
282
+ <p class="special-price">
283
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
284
+ <span class="price-excluding-tax">
285
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
286
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
287
+ <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
288
+ </span>
289
+ </span>
290
+ <span class="weee">(
291
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
292
+ <?php echo $_weeeSeparator; ?>
293
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
294
+ <?php $_weeeSeparator = ' + '; ?>
295
+ <?php endforeach; ?>
296
+ )</span>
297
+ <span class="price-including-tax">
298
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
299
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
300
+ <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
301
+ </span>
302
+ </span>
303
+ </p>
304
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
305
+ <p class="old-price">
306
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
307
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
308
+ <?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
309
+ </span>
310
+ </p>
311
+
312
+ <p class="special-price">
313
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
314
+ <span class="price-excluding-tax">
315
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
316
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
317
+ <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
318
+ </span>
319
+ </span>
320
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
321
+ <span class="weee">
322
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
323
+ </span>
324
+ <?php endforeach; ?>
325
+ <span class="price-including-tax">
326
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
327
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
328
+ <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
329
+ </span>
330
+ </span>
331
+ </p>
332
+ <?php else: // excl. ?>
333
+ <p class="old-price">
334
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
335
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
336
+ <?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
337
+ </span>
338
+ </p>
339
+
340
+ <?php if ($_taxHelper->displayBothPrices()): ?>
341
+ <p class="special-price">
342
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
343
+ <span class="price-excluding-tax">
344
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
345
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
346
+ <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
347
+ </span>
348
+ </span>
349
+ <span class="price-including-tax">
350
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
351
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
352
+ <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
353
+ </span>
354
+ </span>
355
+ </p>
356
+ <?php else: ?>
357
+ <p class="special-price">
358
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
359
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
360
+ <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
361
+ </span>
362
+ </p>
363
+ <?php endif; ?>
364
+ <?php endif; ?>
365
+
366
+ <?php endif; /* if ($_finalPrice == $_price): */ ?>
367
+
368
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
369
+
370
+ <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
371
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
372
+ <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
373
+ <?php endif; ?>
374
+
375
+ <?php if ($this->getUseLinkForAsLowAs()):?>
376
+ <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
377
+ <?php else:?>
378
+ <span class="minimal-price-link">
379
+ <?php endif?>
380
+ <span class="label"><?php echo $this->__('As low as:') ?></span>
381
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
382
+ <?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?>
383
+ </span>
384
+ <?php if ($this->getUseLinkForAsLowAs()):?>
385
+ </a>
386
+ <?php else:?>
387
+ </span>
388
+ <?php endif?>
389
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
390
+ </div>
391
+
392
+ <?php else: /* if (!$_product->isGrouped()): */ ?>
393
+ <?php
394
+ $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
395
+ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
396
+ ?>
397
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
398
+ <div class="price-box">
399
+ <p class="minimal-price">
400
+ <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
401
+ <?php if ($_taxHelper->displayBothPrices()): ?>
402
+ <span class="price-excluding-tax">
403
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
404
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
405
+ <?php echo $_coreHelper->currency($_exclTax, true, false) ?>
406
+ </span>
407
+ </span>
408
+ <span class="price-including-tax">
409
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
410
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
411
+ <?php echo $_coreHelper->currency($_inclTax, true, false) ?>
412
+ </span>
413
+ </span>
414
+ <?php else: ?>
415
+ <?php
416
+ $_showPrice = $_inclTax;
417
+ if (!$_taxHelper->displayPriceIncludingTax()) {
418
+ $_showPrice = $_exclTax;
419
+ }
420
+ ?>
421
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
422
+ <?php echo $_coreHelper->currency($_showPrice, true, false) ?>
423
+ </span>
424
+ <?php endif; ?>
425
+ </p>
426
+ </div>
427
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
428
+ <?php endif; /* if (!$_product->isGrouped()): */ ?>
app/design/frontend/redstage-mobilenow/default/template/catalog/product/view.phtml CHANGED
@@ -1,254 +1,254 @@
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 magento-foundation_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
- * Product view template
29
- *
30
- * @see Mage_Catalog_Block_Product_View
31
- * @see Mage_Review_Block_Product_View
32
- */
33
- ?>
34
- <?php $_helper = $this->helper('catalog/output'); ?>
35
- <?php $_product = $this->getProduct(); ?>
36
- <?php $helperObj = $this->helper('mobilenow/theme');
37
- $layout_order = $helperObj->getThemeData('productlayoutmain');
38
- $p_show_details = $helperObj->getThemeData('showproductdeails');
39
- $p_show_cart = $helperObj->getThemeData('catalogaddtocart');
40
- $top_layouts = (array) $layout_order->ptop_layout_settings;
41
- asort($top_layouts);
42
- $bottom_layouts = (array) $layout_order->pbottom_layout_settings;
43
- asort($bottom_layouts);
44
-
45
- ?>
46
- <script type="text/javascript">
47
- var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
48
- </script>
49
- <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
50
-
51
- <div class="product-view">
52
- <div class="product-essential">
53
- <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
54
- <div class="no-display">
55
- <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
56
- <input type="hidden" name="related_product" id="related-products-field" value="" />
57
- </div>
58
- <div class="row">
59
- <div class="product-name small-12 large-12 columns">
60
- <h3><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h3>
61
- </div>
62
- </div>
63
-
64
- <div class="row">
65
- <div class="small-3 medium-3 large-3 columns">
66
- <div class="product-img-box">
67
- <?php echo $this->getChildHtml('media') ?>
68
- </div>
69
- </div>
70
- <div class="small-9 medium-9 large-9 columns">
71
-
72
- <div class="product-shop">
73
-
74
- <?php echo $this->getChildHtml('alert_urls') ?>
75
- <?php
76
-
77
- foreach ($top_layouts as $tkey => $top_layout):
78
- ?>
79
- <?php if($tkey == 'p_layout_availability' && $p_show_details->show_product_availability) :?>
80
- <?php if ($_product->isAvailable()): ?>
81
- <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
82
- <?php else: ?>
83
- <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
84
- <?php endif; ?>
85
- <?php endif; ?>
86
- <?php if($tkey == 'p_layout_pricing') :?>
87
- <?php echo $this->getChildHtml('product_type_data') ?>
88
- <?php endif; ?>
89
-
90
-
91
- <?php //echo $this->getTierPriceHtml() ?>
92
-
93
- <?php if($tkey == 'p_layout_addtocart') :?>
94
-
95
- <?php echo $this->getChildHtml('extrahint') ?>
96
-
97
- <?php if (!$this->hasOptions()):?>
98
- <div class="add-to-box">
99
- <?php if($_product->isSaleable() && $p_show_cart->show_add_to_cart ): ?>
100
- <?php echo $this->getChildHtml('addtocart') ?>
101
- <?php endif; ?>
102
-
103
- </div>
104
- <?php //echo $this->getChildHtml('extra_buttons') ?>
105
- <?php elseif (!$_product->isSaleable()): ?>
106
-
107
- <?php endif; ?>
108
-
109
- <?php echo $this->getChildHtml('other');?>
110
-
111
- <?php if ($_product->isSaleable() && $this->hasOptions()):?>
112
- <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
113
- <?php endif;?>
114
-
115
- <?php endif; ?>
116
- <?php /*if ($_product->getShortDescription()):?>
117
- <div class="short-description">
118
- <h2><?php echo $this->__('Quick Overview') ?></h2>
119
- <div class="std">
120
- <?php echo $_helper->productAttribute($_product,($_product->getShortDescription()), 'short_description') ?>
121
- </div>
122
- </div>
123
- <?php endif; */ ?>
124
- <?php if($tkey == 'p_layout_review' && $p_show_details->show_product_reviews_summary) :?>
125
- <div class="clearer small-6 medium-6 large-2 left">
126
- <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
127
- </div>
128
- <?php endif; ?>
129
- <?php if($tkey == 'p_layout_email') :?>
130
- <?php if ($this->canEmailToFriend()): ?>
131
- <p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
132
- <?php endif; ?>
133
- <?php endif; ?>
134
-
135
- <?php if($tkey == 'p_layout_wishlist' && $p_show_details->show_product_wishlist_link) :?>
136
- <div class="small-12 medium-6 large-10 left">
137
- <?php if (!$this->hasOptions()):?>
138
- <div class="add-to-box">
139
- <?php if($_product->isSaleable()): ?>
140
-
141
- <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
142
- <span class="or"><?php echo $this->__('OR') ?></span>
143
- <?php endif; ?>
144
- <?php endif; ?>
145
-
146
- <?php echo $this->getChildHtml('addto') ?>
147
- </div>
148
- <?php echo $this->getChildHtml('extra_buttons') ?>
149
- <?php else : ?>
150
- <div class="add-to-box">
151
- <?php echo $this->getChildHtml('addto') ?>
152
- </div>
153
- <?php endif; ?>
154
- </div>
155
- <?php endif; ?>
156
- <div class="clearer"></div>
157
- <?php endforeach; ?>
158
- </div>
159
- </div>
160
- </div>
161
-
162
-
163
- <div class="clearer"></div>
164
- <?php if ($_product->isSaleable() && $this->hasOptions()):?>
165
- <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
166
- <?php endif;?>
167
- </form>
168
- <script type="text/javascript">
169
- //<![CDATA[
170
- var productAddToCartForm = new VarienForm('product_addtocart_form');
171
- productAddToCartForm.submit = function(button, url) {
172
- if (this.validator.validate()) {
173
- var form = this.form;
174
- var oldUrl = form.action;
175
-
176
- if (url) {
177
- form.action = url;
178
- }
179
- var e = null;
180
- try {
181
- this.form.submit();
182
- } catch (e) {
183
- }
184
- this.form.action = oldUrl;
185
- if (e) {
186
- throw e;
187
- }
188
-
189
- if (button && button != 'undef