invodo_video - Version 0.1.1

Version Notes

Support inline and overlay video for product detail pages and widgets for cms pages.

Download this release

Release Info

Developer Eric Burleson
Extension invodo_video
Version 0.1.1
Comparing to
See all releases


Version 0.1.1

Files changed (63) hide show
  1. app/code/community/Invodo/Video/Block/Adminhtml/Cms/Wysiwyg/Images/Content.php +45 -0
  2. app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form.php +64 -0
  3. app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form/Field/Autoplay.php +56 -0
  4. app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form/Field/Export.php +57 -0
  5. app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form/Field/Overlayactionsource.php +51 -0
  6. app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form/Field/Videoresolution.php +56 -0
  7. app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Autoplay.php +53 -0
  8. app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Overlayactionsource.php +57 -0
  9. app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Sourcetype.php +63 -0
  10. app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Sourcevalue.php +49 -0
  11. app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Videoresolution.php +60 -0
  12. app/code/community/Invodo/Video/Block/Conversion/Abstract.php +111 -0
  13. app/code/community/Invodo/Video/Block/Conversion/Register.php +43 -0
  14. app/code/community/Invodo/Video/Block/Conversion/Session.php +45 -0
  15. app/code/community/Invodo/Video/Block/Init.php +99 -0
  16. app/code/community/Invodo/Video/Block/Product/Video/Abstract.php +117 -0
  17. app/code/community/Invodo/Video/Block/Product/Video/Inline.php +74 -0
  18. app/code/community/Invodo/Video/Block/Product/Video/Overlay.php +88 -0
  19. app/code/community/Invodo/Video/Block/Product/Video/Overlay/Default.php +67 -0
  20. app/code/community/Invodo/Video/Block/Widget.php +153 -0
  21. app/code/community/Invodo/Video/Helper/Data.php +183 -0
  22. app/code/community/Invodo/Video/Helper/Wysiwyg/Images.php +51 -0
  23. app/code/community/Invodo/Video/Invodo - Magento Connect - EULA - V1.0 11-20-13.pdf +0 -0
  24. app/code/community/Invodo/Video/Model/Config.php +62 -0
  25. app/code/community/Invodo/Video/Model/Observer.php +123 -0
  26. app/code/community/Invodo/Video/Model/Observer/Adminhtml.php +114 -0
  27. app/code/community/Invodo/Video/Model/Product/Export.php +91 -0
  28. app/code/community/Invodo/Video/Model/Product/Export/Adapter.php +56 -0
  29. app/code/community/Invodo/Video/Model/Product/Export/Entity.php +263 -0
  30. app/code/community/Invodo/Video/Model/Session.php +73 -0
  31. app/code/community/Invodo/Video/Model/Widget/Source/Autoplay.php +56 -0
  32. app/code/community/Invodo/Video/Model/Widget/Source/Overlayaction.php +60 -0
  33. app/code/community/Invodo/Video/Model/Widget/Source/Sourcetype.php +56 -0
  34. app/code/community/Invodo/Video/Model/Widget/Source/Videotype.php +56 -0
  35. app/code/community/Invodo/Video/controllers/Adminhtml/Cms/Wysiwyg/ImagesController.php +52 -0
  36. app/code/community/Invodo/Video/controllers/Adminhtml/ExportController.php +66 -0
  37. app/code/community/Invodo/Video/data/invodo_video_setup/data-upgrade-0.1.0-0.1.1.php +44 -0
  38. app/code/community/Invodo/Video/etc/adminhtml.xml +49 -0
  39. app/code/community/Invodo/Video/etc/config.xml +140 -0
  40. app/code/community/Invodo/Video/etc/system.xml +151 -0
  41. app/code/community/Invodo/Video/etc/widget.xml +128 -0
  42. app/code/community/Invodo/Video/media/Video_Call_To_Actions/CTA_watchvideo_gray_56x56.png +0 -0
  43. app/code/community/Invodo/Video/media/Video_Call_To_Actions/CTA_watchvideo_grayfill_56x56.png +0 -0
  44. app/code/community/Invodo/Video/media/Video_Call_To_Actions/CTA_watchvideo_red_56x56.png +0 -0
  45. app/code/community/Invodo/Video/readme.md +6 -0
  46. app/code/community/Invodo/Video/sql/invodo_video_setup/install-0.1.0.php +67 -0
  47. app/design/adminhtml/default/default/template/invodo/video/system/config/form/renderer/overlayactionsource.phtml +36 -0
  48. app/design/adminhtml/default/default/template/invodo/video/system/config/form/renderer/videoresolution.phtml +70 -0
  49. app/design/adminhtml/default/default/template/invodo/video/widget/form/renderer/autoplay.phtml +47 -0
  50. app/design/adminhtml/default/default/template/invodo/video/widget/form/renderer/overlayactionsource.phtml +49 -0
  51. app/design/adminhtml/default/default/template/invodo/video/widget/form/renderer/sourcetype.phtml +50 -0
  52. app/design/adminhtml/default/default/template/invodo/video/widget/form/renderer/videoresolution.phtml +76 -0
  53. app/design/frontend/base/default/layout/invodo_video.xml +54 -0
  54. app/design/frontend/base/default/template/invodo/video/conversion.phtml +39 -0
  55. app/design/frontend/base/default/template/invodo/video/init.phtml +38 -0
  56. app/design/frontend/base/default/template/invodo/video/product/view/inline/community.phtml +59 -0
  57. app/design/frontend/base/default/template/invodo/video/product/view/inline/enterprise.phtml +61 -0
  58. app/design/frontend/base/default/template/invodo/video/product/view/overlay.phtml +66 -0
  59. app/design/frontend/base/default/template/invodo/video/product/view/overlay/default.phtml +56 -0
  60. app/design/frontend/base/default/template/invodo/video/widget.phtml +73 -0
  61. app/design/frontend/enterprise/default/layout/invodo_video.xml +54 -0
  62. app/etc/modules/Invodo_Video.xml +9 -0
  63. package.xml +18 -0
app/code/community/Invodo/Video/Block/Adminhtml/Cms/Wysiwyg/Images/Content.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Replaces default insert url
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_Cms_Wysiwyg_Images_Content extends Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content
35
+ {
36
+ /**
37
+ * New directory action target URL
38
+ *
39
+ * @return string
40
+ */
41
+ public function getOnInsertUrl()
42
+ {
43
+ return $this->getUrl('invodo_video/adminhtml_cms_wysiwyg_images/onInsert');
44
+ }
45
+ }
app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_System_Config_Form extends Mage_Adminhtml_Block_System_Config_Form
35
+ {
36
+ /**
37
+ * Adds specific field types
38
+ *
39
+ * @return array
40
+ */
41
+ protected function _getAdditionalElementTypes()
42
+ {
43
+ $types = parent::_getAdditionalElementTypes();
44
+ $types['autoplay'] = $this->_getClassName('autoplay');
45
+ $types['videoresolution'] = $this->_getClassName('videoresolution');
46
+ $types['overlayactionsource'] = $this->_getClassName('overlayactionsource');
47
+ $types['export'] = $this->_getClassName('export');
48
+
49
+ return $types;
50
+ }
51
+
52
+ /**
53
+ * Gets class name
54
+ *
55
+ * @param string $class
56
+ * @return string
57
+ */
58
+ protected function _getClassName($class)
59
+ {
60
+ $class = 'invodo_video/adminhtml_system_config_form_field_' . $class;
61
+
62
+ return Mage::getConfig()->getBlockClassName($class);
63
+ }
64
+ }
app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form/Field/Autoplay.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_System_Config_Form_Field_Autoplay extends Varien_Data_Form_Element_Radios
35
+ {
36
+ /**
37
+ * Retrieves element html
38
+ *
39
+ * @return string
40
+ */
41
+ public function getElementHtml()
42
+ {
43
+ $disabled = $this->getDisabled();
44
+ $html = sprintf('<div id="%s">%s</div>', $this->getHtmlId(), parent::getElementHtml());
45
+
46
+ if ($disabled) {
47
+ $html = str_replace('type="radio"', 'disabled type="radio"', $html);
48
+
49
+ foreach ($this->getValues() as $option) {
50
+ $html .= sprintf('<input type="hidden" id="%s" checked="checked">', $this->getHtmlId() . $option['value'] . '_inherit');
51
+ }
52
+ }
53
+
54
+ return $html;
55
+ }
56
+ }
app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form/Field/Export.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_System_Config_Form_Field_Export extends Varien_Data_Form_Element_Abstract
35
+ {
36
+ /**
37
+ * Retrieves element html
38
+ *
39
+ * @return string
40
+ */
41
+ public function getElementHtml()
42
+ {
43
+ $buttonBlock = $this->getForm()->getParent()->getLayout()->createBlock('adminhtml/widget_button');
44
+ $params = array(
45
+ 'website' => $buttonBlock->getRequest()->getParam('website')
46
+ );
47
+
48
+ $url = Mage::helper('adminhtml')->getUrl('invodo_video/adminhtml_export/export', $params);
49
+ $data = array(
50
+ 'label' => Mage::helper('invodo_video')->__('Export'),
51
+ 'onclick' => "setLocation('$url')",
52
+ 'class' => '',
53
+ );
54
+
55
+ return $buttonBlock->setData($data)->toHtml();
56
+ }
57
+ }
app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form/Field/Overlayactionsource.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_System_Config_Form_Field_Overlayactionsource extends Varien_Data_Form_Element_Text
35
+ {
36
+ /**
37
+ * Retrieves element html
38
+ *
39
+ * @return string
40
+ */
41
+ public function getElementHtml()
42
+ {
43
+ /** @var Mage_Core_Block_Template $block */
44
+ $block = Mage::app()->getLayout()->createBlock('core/template');
45
+ $block->setTemplate('invodo/video/system/config/form/renderer/overlayactionsource.phtml');
46
+ $block->setElement($this);
47
+ $block->setHeightElementId(str_replace('width', 'height', $this->getHtmlId()));
48
+
49
+ return $block->toHtml();
50
+ }
51
+ }
app/code/community/Invodo/Video/Block/Adminhtml/System/Config/Form/Field/Videoresolution.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_System_Config_Form_Field_Videoresolution extends Varien_Data_Form_Element_Text
35
+ {
36
+ /**
37
+ * Retrieves element html
38
+ *
39
+ * @return string
40
+ */
41
+ public function getElementHtml()
42
+ {
43
+ /** @var Mage_Core_Block_Template $block */
44
+ $block = Mage::app()->getLayout()->createBlock('core/template');
45
+ $block->setTemplate('invodo/video/system/config/form/renderer/videoresolution.phtml');
46
+ $block->setElement($this);
47
+
48
+ /** @var Invodo_Video_Helper_Data $helper */
49
+ $helper = Mage::helper('invodo_video');
50
+ $resolution = $helper->splitResolution($this->getValue());
51
+ $block->addData($resolution);
52
+ $this->setValue(implode('x', $resolution));
53
+
54
+ return $block->toHtml();
55
+ }
56
+ }
app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Autoplay.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_Widget_Renderer_Autoplay extends Mage_Core_Block_Abstract
35
+ {
36
+ /**
37
+ *
38
+ * @param Varien_Data_Form_Element_Abstract $element Form Element
39
+ * @return Varien_Data_Form_Element_Abstract
40
+ */
41
+ public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
42
+ {
43
+ $renderer = $element->getRenderer();
44
+
45
+ if ($renderer instanceof Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element) {
46
+ $newRenderer = clone $renderer;
47
+ $newRenderer->setTemplate('invodo/video/widget/form/renderer/autoplay.phtml');
48
+ $element->setRenderer($newRenderer);
49
+ }
50
+
51
+ return $element;
52
+ }
53
+ }
app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Overlayactionsource.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_Widget_Renderer_Overlayactionsource extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
35
+ {
36
+ /**
37
+ * Sets template
38
+ */
39
+ protected function _construct()
40
+ {
41
+ $this->setTemplate('invodo/video/widget/form/renderer/overlayactionsource.phtml');
42
+ }
43
+
44
+ /**
45
+ * Add special behavior to form element
46
+ *
47
+ * @param Varien_Data_Form_Element_Abstract $element
48
+ * @return string
49
+ */
50
+ public function render(Varien_Data_Form_Element_Abstract $element)
51
+ {
52
+ $this->_element = $element;
53
+ $element->unsetData('label');
54
+
55
+ return $this->toHtml();
56
+ }
57
+ }
app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Sourcetype.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_Widget_Renderer_Sourcetype extends Mage_Core_Block_Abstract
35
+ {
36
+ /**
37
+ * Prepares element
38
+ *
39
+ * @param Varien_Data_Form_Element_Abstract $element Form Element
40
+ * @return Varien_Data_Form_Element_Abstract
41
+ */
42
+ public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
43
+ {
44
+ $element->setData('separator', '<br />');
45
+ $element->setRequired(false);
46
+ $element->setClass($element->getClass() . ' validate-one-required-by-name');
47
+
48
+ if ($element->getValue() === null) {
49
+ $element->setValue(Invodo_Video_Helper_Data::SOURCE_TYPE_REF);
50
+ }
51
+
52
+ /** @var Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element $renderer */
53
+ $renderer = $element->getRenderer();
54
+
55
+ if ($renderer instanceof Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element) {
56
+ $newRenderer = clone $renderer;
57
+ $newRenderer->setTemplate('invodo/video/widget/form/renderer/sourcetype.phtml');
58
+ $element->setRenderer($newRenderer);
59
+ }
60
+
61
+ return $element;
62
+ }
63
+ }
app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Sourcevalue.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_Widget_Renderer_Sourcevalue extends Mage_Core_Block_Abstract
35
+ {
36
+ /**
37
+ * Prepares element
38
+ *
39
+ * @param Varien_Data_Form_Element_Abstract $element Form Element
40
+ * @return Varien_Data_Form_Element_Abstract
41
+ */
42
+ public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
43
+ {
44
+ $element->unsetData('label');
45
+ $element->setData('maxlength', 500);
46
+
47
+ return $element;
48
+ }
49
+ }
app/code/community/Invodo/Video/Block/Adminhtml/Widget/Renderer/Videoresolution.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders form element
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Adminhtml_Widget_Renderer_Videoresolution extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
35
+ {
36
+ /**
37
+ * Sets template
38
+ */
39
+ protected function _construct()
40
+ {
41
+ $this->setTemplate('invodo/video/widget/form/renderer/videoresolution.phtml');
42
+ }
43
+
44
+ /**
45
+ * Renders element
46
+ *
47
+ * @param Varien_Data_Form_Element_Abstract $element
48
+ * @return string
49
+ */
50
+ public function render(Varien_Data_Form_Element_Abstract $element)
51
+ {
52
+ /** @var Invodo_Video_Helper_Data $helper */
53
+ $helper = Mage::helper('invodo_video');
54
+ $resolution = $helper->splitResolution($element->getValue());
55
+ $this->addData($resolution);
56
+ $element->setValue(implode('x', $resolution));
57
+
58
+ return parent::render($element);
59
+ }
60
+ }
app/code/community/Invodo/Video/Block/Conversion/Abstract.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders conversion section
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ abstract class Invodo_Video_Block_Conversion_Abstract extends Mage_Core_Block_Template
35
+ {
36
+ /**
37
+ * All events
38
+ *
39
+ * @var array
40
+ */
41
+ protected $_events = array();
42
+
43
+ /**
44
+ * Set events property, checks ability to render
45
+ *
46
+ * @return Mage_Core_Block_Abstract
47
+ */
48
+ protected function _toHtml()
49
+ {
50
+ /** @var Invodo_Video_Helper_Data $helper */
51
+ $helper = Mage::helper('invodo_video');
52
+
53
+ if (!$helper->isEnabled()) {
54
+ return '';
55
+ }
56
+
57
+ /** @var Invodo_Video_Model_Config $config */
58
+ $config = Mage::getSingleton('invodo_video/config');
59
+
60
+ if (!$config->getGeneralConfig('enable_conversion_tracking')) {
61
+ return '';
62
+ }
63
+
64
+ $this->_initEvents();
65
+
66
+ if (!count($this->_events)) {
67
+ return '';
68
+ }
69
+
70
+ return parent::_toHtml();
71
+ }
72
+
73
+ /**
74
+ * Initializes events property
75
+ *
76
+ * @return void
77
+ */
78
+ protected abstract function _initEvents();
79
+
80
+ /**
81
+ * Retrieves events
82
+ *
83
+ * @return array
84
+ */
85
+ public function getEvents()
86
+ {
87
+ return $this->_events;
88
+ }
89
+
90
+ /**
91
+ * Retrieves event name
92
+ *
93
+ * @param array $event
94
+ * @return bool
95
+ */
96
+ public function getEventName(array $event)
97
+ {
98
+ return isset($event['name']) ? $event['name'] : false;
99
+ }
100
+
101
+ /**
102
+ * Retrieves event params
103
+ *
104
+ * @param array $event
105
+ * @return bool|string
106
+ */
107
+ public function getEventParams(array $event)
108
+ {
109
+ return isset($event['params']) ? json_encode($event['params']) : false;
110
+ }
111
+ }
app/code/community/Invodo/Video/Block/Conversion/Register.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders conversion section from registry
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Conversion_Register extends Invodo_Video_Block_Conversion_Abstract
35
+ {
36
+ /**
37
+ * @see Invodo_Video_Block_Conversion_Abstract::_initEvents
38
+ */
39
+ protected function _initEvents()
40
+ {
41
+ $this->_events = (array)Mage::registry(Invodo_Video_Helper_Data::EVENTS_REGISTRY_NAME);
42
+ }
43
+ }
app/code/community/Invodo/Video/Block/Conversion/Session.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders conversion section from session
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Conversion_Session extends Invodo_Video_Block_Conversion_Abstract
35
+ {
36
+ /**
37
+ * @see Invodo_Video_Block_Conversion_Abstract::_initEvents
38
+ */
39
+ protected function _initEvents()
40
+ {
41
+ /** @var Invodo_Video_Model_Session $session */
42
+ $session = Mage::getSingleton('invodo_video/session');
43
+ $this->_events = $session->getEvents(true);
44
+ }
45
+ }
app/code/community/Invodo/Video/Block/Init.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Initializes js library
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Init extends Mage_Core_Block_Template
35
+ {
36
+ /**
37
+ * Retrieves page name (title)
38
+ *
39
+ * @return string
40
+ */
41
+ public function getPageName()
42
+ {
43
+ /** @var Mage_Page_Block_Html_Head $head */
44
+ $head = $this->getLayout()->getBlock('head');
45
+
46
+ if ($head) {
47
+ return $head->getTitle();
48
+ }
49
+
50
+ return Mage::getStoreConfig('design/head/default_title');
51
+ }
52
+
53
+ /**
54
+ * Retrieves page type
55
+ *
56
+ * @return string
57
+ */
58
+ public function getPageType()
59
+ {
60
+ $request = Mage::app()->getFrontController()->getRequest();
61
+
62
+ if ($request->getModuleName() == 'catalog') {
63
+ switch ($request->getControllerName()) {
64
+ case 'product':
65
+ $pageType = 'Product';
66
+ break;
67
+
68
+ case 'category':
69
+ $pageType = 'Category';
70
+ break;
71
+
72
+ default:
73
+ $pageType = 'Other';
74
+ }
75
+
76
+ } else {
77
+ $pageType = 'Other';
78
+ }
79
+
80
+ return $pageType;
81
+ }
82
+
83
+ /**
84
+ * Checks module enabled correctly
85
+ *
86
+ * @return string
87
+ */
88
+ protected function _toHtml()
89
+ {
90
+ /** @var Invodo_Video_Helper_Data $helper */
91
+ $helper = Mage::helper('invodo_video');
92
+
93
+ if (!$helper->isEnabled()) {
94
+ return '';
95
+ }
96
+
97
+ return parent::_toHtml();
98
+ }
99
+ }
app/code/community/Invodo/Video/Block/Product/Video/Abstract.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Abstract renderer for product page
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ abstract class Invodo_Video_Block_Product_Video_Abstract extends Mage_Catalog_Block_Product_View_Abstract
35
+ {
36
+ /**
37
+ * Config
38
+ *
39
+ * @var Invodo_Video_Model_Config
40
+ */
41
+ protected $_config;
42
+
43
+ /**
44
+ * Initializes config
45
+ */
46
+ protected function _construct()
47
+ {
48
+ $this->_config = Mage::getSingleton('invodo_video/config');
49
+
50
+ return parent::_construct();
51
+ }
52
+
53
+ /**
54
+ * Retrieves video type
55
+ *
56
+ * @return int
57
+ */
58
+ public abstract function getVideoType();
59
+
60
+ /**
61
+ * Check if we can render
62
+ *
63
+ * @return string
64
+ */
65
+ protected function _toHtml()
66
+ {
67
+ /** @var Invodo_Video_Helper_Data $helper */
68
+ $helper = Mage::helper('invodo_video');
69
+
70
+ if (!$helper->isEnabled()) {
71
+ return '';
72
+ }
73
+
74
+ // enabled or not on PDP
75
+ if (!$this->_config->getGeneralConfig('enabled_on_pdp')) {
76
+ return '';
77
+ }
78
+
79
+ // can render according to PDP type configuration
80
+ if ($this->getVideoType() != $this->_config->getGeneralConfig('pdp_video_type')) {
81
+ return '';
82
+ }
83
+
84
+ // check if product video disabled for current product
85
+ if ($this->getProduct()->getData('invodo_video_enabled') !== null
86
+ && !$this->getProduct()->getData('invodo_video_enabled')
87
+ ) {
88
+ return '';
89
+ }
90
+
91
+ if (!$this->_canShow()) {
92
+ return '';
93
+ }
94
+
95
+ return parent::_toHtml();
96
+ }
97
+
98
+ /**
99
+ * Checks if we can show our block
100
+ *
101
+ * @return bool
102
+ */
103
+ protected function _canShow()
104
+ {
105
+ return true;
106
+ }
107
+
108
+ /**
109
+ * Retrieves video source value
110
+ *
111
+ * @return string
112
+ */
113
+ public function getSourceValue()
114
+ {
115
+ return addslashes($this->getProduct()->getSku());
116
+ }
117
+ }
app/code/community/Invodo/Video/Block/Product/Video/Inline.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders inline type of video on PDP
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ *
34
+ * Retrieves video width
35
+ * @method int getWidth()
36
+ *
37
+ * Retrieves video height
38
+ * @method int getHeight()
39
+ */
40
+ class Invodo_Video_Block_Product_Video_Inline extends Invodo_Video_Block_Product_Video_Abstract
41
+ {
42
+ /**
43
+ * Sets width and height
44
+ */
45
+ protected function _construct()
46
+ {
47
+ parent::_construct();
48
+
49
+ /** @var Invodo_Video_Helper_Data $helper */
50
+ $helper = Mage::helper('invodo_video');
51
+ $resolution = $helper->splitResolution($this->_config->getGeneralConfig('pdp_video_resolution'));
52
+ $this->addData($resolution);
53
+
54
+ return $this;
55
+ }
56
+
57
+ /**
58
+ * @see Invodo_Video_Block_Product_Video_Abstract::getVideoType
59
+ */
60
+ public function getVideoType()
61
+ {
62
+ return Invodo_Video_Helper_Data::VIDEO_TYPE_INLINE;
63
+ }
64
+
65
+ /**
66
+ * Retrieves auto-play flag
67
+ *
68
+ * @return int
69
+ */
70
+ public function getAutoPlay()
71
+ {
72
+ return $this->_config->getGeneralConfig('pdp_video_auto_play');
73
+ }
74
+ }
app/code/community/Invodo/Video/Block/Product/Video/Overlay.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders overlay type of video on PDP
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Product_Video_Overlay extends Invodo_Video_Block_Product_Video_Overlay_Default
35
+ {
36
+ /**
37
+ * Media block
38
+ *
39
+ * @var Mage_Catalog_Block_Product_View_Media
40
+ */
41
+ protected $_media = null;
42
+
43
+ /**
44
+ * Initializes media variable
45
+ *
46
+ * @return Mage_Core_Block_Abstract|void
47
+ */
48
+ protected function _beforeToHtml()
49
+ {
50
+ parent::_construct();
51
+
52
+ $this->_media = $this->getLayout()->getBlock('product.info.media');
53
+ }
54
+
55
+ /**
56
+ * Checks if gallery images already exists
57
+ *
58
+ * @return bool
59
+ */
60
+ public function isGalleryImagesExists()
61
+ {
62
+ if (!$this->_media) {
63
+ return false;
64
+ }
65
+
66
+ return count($this->_media->getGalleryImages()) ? true : false;
67
+ }
68
+
69
+ /**
70
+ * Checks if we can show our block
71
+ *
72
+ * @return bool
73
+ */
74
+ protected function _canShow()
75
+ {
76
+ if (!$this->_media) {
77
+ return false;
78
+ }
79
+
80
+ $images = $this->_media->getGalleryImages();
81
+
82
+ if (is_array($images) && !count($images)) {
83
+ return false;
84
+ }
85
+
86
+ return true;
87
+ }
88
+ }
app/code/community/Invodo/Video/Block/Product/Video/Overlay/Default.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Default renderer for overlay type
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Block_Product_Video_Overlay_Default extends Invodo_Video_Block_Product_Video_Abstract
35
+ {
36
+ /**
37
+ * @see Invodo_Video_Block_Product_Video_Abstract::getVideoType
38
+ */
39
+ public function getVideoType()
40
+ {
41
+ return Invodo_Video_Helper_Data::VIDEO_TYPE_OVERLAY;
42
+ }
43
+
44
+ /**
45
+ * Retrieves path to image for CTA
46
+ *
47
+ * @return string
48
+ */
49
+ public function getOverlayActionSource()
50
+ {
51
+ switch ($this->_config->getGeneralConfig('pdp_overlay_action')) {
52
+ case Invodo_Video_Helper_Data::OVERLAY_ACTION_CUSTOM_IMAGE:
53
+ $source = "'" . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . $this->_config->getGeneralConfig('pdp_overlay_action_source') . "'";
54
+ break;
55
+
56
+ case Invodo_Video_Helper_Data::OVERLAY_ACTION_INVODO_THUMBNAIL:
57
+ $source = sprintf('Invodo.Pod.getThumbnailByMpd("%s")', $this->getSourceValue());
58
+ break;
59
+
60
+ case Invodo_Video_Helper_Data::OVERLAY_ACTION_INVODO_PREVIEW:
61
+ $source = sprintf('Invodo.Pod.getPosterByMpd("%s")', $this->getSourceValue());
62
+ break;
63
+ }
64
+
65
+ return $source;
66
+ }
67
+ }
app/code/community/Invodo/Video/Block/Widget.php ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Renders widget
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ *
34
+ * Retrieves source type
35
+ * @method string getSourceType()
36
+ *
37
+ * Retrieves auto-play option
38
+ * @method bool getAutoPlay()
39
+ *
40
+ * Retrieves overlay action type
41
+ * @method bool getOverlayAction()
42
+ *
43
+ * Retrieves video width
44
+ * @method int getWidth()
45
+ *
46
+ * Retrieves video height
47
+ * @method int getHeight()
48
+ */
49
+ class Invodo_Video_Block_Widget extends Mage_Core_Block_Template
50
+ implements Mage_Widget_Block_Interface
51
+ {
52
+ /**
53
+ * Sets video size
54
+ *
55
+ * @return Mage_Core_Block_Abstract
56
+ */
57
+ protected function _beforeToHtml()
58
+ {
59
+ /** @var Invodo_Video_Helper_Data $helper */
60
+ $helper = Mage::helper('invodo_video');
61
+ $resolution = $helper->splitResolution($this->getData('video_resolution'));
62
+ $this->addData($resolution);
63
+
64
+ return parent::_beforeToHtml();
65
+ }
66
+
67
+ /**
68
+ * Checks module enabled correctly
69
+ *
70
+ * @return string
71
+ */
72
+ protected function _toHtml()
73
+ {
74
+ /** @var Invodo_Video_Helper_Data $helper */
75
+ $helper = Mage::helper('invodo_video');
76
+
77
+ if (!$helper->isEnabled()) {
78
+ return '';
79
+ }
80
+
81
+ return parent::_toHtml();
82
+ }
83
+
84
+ /**
85
+ * Widget type is inline
86
+ *
87
+ * @return bool
88
+ */
89
+ public function isInlineType()
90
+ {
91
+ return $this->getData('video_type') == Invodo_Video_Helper_Data::VIDEO_TYPE_INLINE;
92
+ }
93
+
94
+ /**
95
+ * Widget type is overlay
96
+ *
97
+ * @return bool
98
+ */
99
+ public function isOverlayType()
100
+ {
101
+ return $this->getData('video_type') == Invodo_Video_Helper_Data::VIDEO_TYPE_OVERLAY;
102
+ }
103
+
104
+ /**
105
+ * Retrieves source type as api param name
106
+ *
107
+ * @return string
108
+ */
109
+ public function getSourceTypeName()
110
+ {
111
+ if ($this->getSourceType() == Invodo_Video_Helper_Data::SOURCE_TYPE_MPD) {
112
+ return 'mpd';
113
+ } else {
114
+ return 'refId';
115
+ }
116
+ }
117
+
118
+ /**
119
+ * Retrieves source value
120
+ *
121
+ * @return string
122
+ */
123
+ public function getSourceValue()
124
+ {
125
+ $value = $this->getData('source_value');
126
+
127
+ return addslashes($value);
128
+ }
129
+
130
+ /**
131
+ * Retrieves path to image for CTA
132
+ *
133
+ * @return string
134
+ */
135
+ public function getOverlayActionSource()
136
+ {
137
+ switch ($this->getOverlayAction()) {
138
+ case Invodo_Video_Helper_Data::OVERLAY_ACTION_CUSTOM_IMAGE:
139
+ $source = "'" . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . $this->getData('overlay_action_source') . "'";
140
+ break;
141
+
142
+ case Invodo_Video_Helper_Data::OVERLAY_ACTION_INVODO_THUMBNAIL:
143
+ $source = sprintf('Invodo.Pod.getThumbnailByMpd("%s")', $this->getSourceValue());
144
+ break;
145
+
146
+ case Invodo_Video_Helper_Data::OVERLAY_ACTION_INVODO_PREVIEW:
147
+ $source = sprintf('Invodo.Pod.getPosterByMpd("%s")', $this->getSourceValue());
148
+ break;
149
+ }
150
+
151
+ return $source;
152
+ }
153
+ }
app/code/community/Invodo/Video/Helper/Data.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Module helper
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Helper_Data extends Mage_Core_Helper_Abstract
35
+ {
36
+ /**
37
+ * Video type: inline
38
+ *
39
+ * @var int
40
+ */
41
+ const VIDEO_TYPE_INLINE = 1;
42
+
43
+ /**
44
+ * Video type: overlay
45
+ *
46
+ * @var int
47
+ */
48
+ const VIDEO_TYPE_OVERLAY = 2;
49
+
50
+ /**
51
+ * Source type: POD ID
52
+ *
53
+ * @var int
54
+ */
55
+ const SOURCE_TYPE_POD = 1;
56
+
57
+ /**
58
+ * Source type: MPD ID
59
+ *
60
+ * @var int
61
+ */
62
+ const SOURCE_TYPE_MPD = 2;
63
+
64
+ /**
65
+ * Source type: REF ID
66
+ *
67
+ * @var int
68
+ */
69
+ const SOURCE_TYPE_REF = 3;
70
+
71
+ /**
72
+ * Default video width
73
+ *
74
+ * @var string
75
+ */
76
+ const DEFAULT_VIDEO_WIDTH = 480;
77
+
78
+ /**
79
+ * Default video width
80
+ *
81
+ * @var string
82
+ */
83
+ const DEFAULT_VIDEO_HEIGHT = 270;
84
+
85
+ /**
86
+ * Overlay call-to-action: custom image
87
+ * @var int
88
+ */
89
+ const OVERLAY_ACTION_CUSTOM_IMAGE = 1;
90
+
91
+ /**
92
+ * Overlay call-to-action: invodo thumbnail
93
+ *
94
+ * @var int
95
+ */
96
+ const OVERLAY_ACTION_INVODO_THUMBNAIL = 2;
97
+
98
+ /**
99
+ * Overlay call-to-action: invodo previw
100
+ *
101
+ * @var int
102
+ */
103
+ const OVERLAY_ACTION_INVODO_PREVIEW = 3;
104
+
105
+ /**
106
+ * Events name in registry
107
+ *
108
+ * @var string
109
+ */
110
+ const EVENTS_REGISTRY_NAME = 'invodo_video_events';
111
+
112
+ /**
113
+ * Increment id
114
+ *
115
+ * @var int
116
+ */
117
+ protected static $_incrementId = 0;
118
+
119
+ /**
120
+ * Retrieves Video script tag
121
+ *
122
+ * @return string
123
+ */
124
+ public function getScriptTag()
125
+ {
126
+ /** @var Invodo_Video_Model_Config $config */
127
+ $config = Mage::getSingleton('invodo_video/config');
128
+ $siteKey = $config->getGeneralConfig('site_key');
129
+
130
+ if ($siteKey) {
131
+ return sprintf('<script type="text/javascript" src="//e.invodo.com/4.0/s/%s.js"></script>' . "\n", $siteKey);
132
+ }
133
+ }
134
+
135
+ /**
136
+ * Checks if module enabled
137
+ *
138
+ * @return bool
139
+ */
140
+ public function isEnabled()
141
+ {
142
+ /** @var Invodo_Video_Model_Config $config */
143
+ $config = Mage::getSingleton('invodo_video/config');
144
+ $siteKey = $config->getGeneralConfig('site_key');
145
+
146
+ return $siteKey ? true : false;
147
+ }
148
+
149
+ /**
150
+ * Retrieves new increment id
151
+ *
152
+ * @return int
153
+ */
154
+ public static function getIncrementId()
155
+ {
156
+ return ++self::$_incrementId;
157
+ }
158
+
159
+ /**
160
+ * Splits resolution to width and height
161
+ *
162
+ * @param $resolution
163
+ * @return array
164
+ */
165
+ public function splitResolution($resolution)
166
+ {
167
+ preg_match('/^([1-9]\d{2,3})x([1-9]\d{2,3})$/', $resolution, $matches);
168
+
169
+ if ($matches) {
170
+ $result = array(
171
+ 'width' => $matches[1],
172
+ 'height' => $matches[2],
173
+ );
174
+ } else {
175
+ $result = array(
176
+ 'width' => self::DEFAULT_VIDEO_WIDTH,
177
+ 'height' => self::DEFAULT_VIDEO_HEIGHT,
178
+ );
179
+ }
180
+
181
+ return $result;
182
+ }
183
+ }
app/code/community/Invodo/Video/Helper/Wysiwyg/Images.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Works with wysiwyg redactor
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Helper_Wysiwyg_Images extends Mage_Cms_Helper_Wysiwyg_Images
35
+ {
36
+ /**
37
+ * Prepare Image insertion declaration for Wysiwyg or textarea
38
+ *
39
+ * @param string $filename Filename transferred via Ajax
40
+ * @param bool $renderAsTag Leave image HTML as is or transform it to controller directive
41
+ * @return string
42
+ */
43
+ public function getImageHtmlDeclaration($filename, $renderAsTag = false)
44
+ {
45
+ $fileUrl = $this->getCurrentUrl() . $filename;
46
+ $html = str_replace(realpath(Mage::getConfig()->getOptions()->getMediaDir() . DS), '', $fileUrl);
47
+ $html = str_replace(Mage::getBaseUrl('media'), '', $html);
48
+
49
+ return addslashes($html);
50
+ }
51
+ }
app/code/community/Invodo/Video/Invodo - Magento Connect - EULA - V1.0 11-20-13.pdf ADDED
Binary file
app/code/community/Invodo/Video/Model/Config.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Works with module configuration
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Config
35
+ {
36
+ /**
37
+ * Retrieves config for log group field
38
+ *
39
+ * @param string $field
40
+ * @param null $store
41
+ * @return mixed
42
+ */
43
+ public function getGeneralConfig($field = '', $store = null)
44
+ {
45
+ return $this->getConfig('general', $field, $store);
46
+ }
47
+
48
+ /**
49
+ * Retrieves config by group and field
50
+ *
51
+ * @param string $group
52
+ * @param string $field
53
+ * @param null $store
54
+ * @return mixed
55
+ */
56
+ public function getConfig($group, $field, $store = null)
57
+ {
58
+ $path = rtrim("invodo_video/{$group}/$field", '/');
59
+
60
+ return Mage::getStoreConfig($path, $store);
61
+ }
62
+ }
app/code/community/Invodo/Video/Model/Observer.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Module frontend observer
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Observer
35
+ {
36
+ /**
37
+ * Adds event on product was added to cart
38
+ *
39
+ * @param Varien_Event_Observer $observer
40
+ */
41
+ public function checkoutCartAddProductComplete($observer)
42
+ {
43
+ /** @var Invodo_Video_Model_Config $config */
44
+ $config = Mage::getSingleton('invodo_video/config');
45
+
46
+ if (!$config->getGeneralConfig('enable_conversion_tracking')) {
47
+ return;
48
+ }
49
+
50
+ /** @var Invodo_Video_Model_Session $session */
51
+ $session = Mage::getSingleton('invodo_video/session');
52
+ /** @var Mage_Catalog_Model_Product $product */
53
+ $product = $observer->getProduct();
54
+ /** @var Mage_Core_Controller_Request_Http $request */
55
+ $request = $observer->getRequest();
56
+
57
+ if (!$product instanceof Mage_Catalog_Model_Product || !$product->getId()) {
58
+ return;
59
+ }
60
+
61
+ $qty = $request->getParam('qty');
62
+
63
+ if ($qty) {
64
+ $filter = new Zend_Filter_LocalizedToNormalized(
65
+ array('locale' => Mage::app()->getLocale()->getLocaleCode())
66
+ );
67
+ $qty = $filter->filter($qty);
68
+ } else {
69
+ $qty = (int)$qty;
70
+ }
71
+
72
+ $session->addEvent('cartAdd', array(
73
+ 'mpd' => $product->getSku(),
74
+ 'quantity' => $qty,
75
+ 'price' => $product->getFinalPrice($qty)
76
+ ));
77
+ }
78
+
79
+ /**
80
+ * Adds event on order was placed
81
+ *
82
+ * @param Varien_Event_Observer $observer
83
+ */
84
+ public function checkoutOnepageControllerSuccessAction($observer)
85
+ {
86
+ /** @var Invodo_Video_Model_Config $config */
87
+ $config = Mage::getSingleton('invodo_video/config');
88
+
89
+ if (!$config->getGeneralConfig('enable_conversion_tracking')) {
90
+ return;
91
+ }
92
+
93
+ $orderIds = (array)$observer->getData('order_ids');
94
+
95
+ if (!$orderIds) {
96
+ return;
97
+ }
98
+
99
+ $orderId = array_shift($orderIds);
100
+ /** @var Mage_Sales_Model_Order $order */
101
+ $order = Mage::getModel('sales/order')->load($orderId);
102
+
103
+ if (!$order->getId()) {
104
+ return;
105
+ }
106
+
107
+ $events = array();
108
+
109
+ /** @var $item Mage_Sales_Model_Order_Item */
110
+ foreach ($order->getAllVisibleItems() as $item) {
111
+ $events[] = array(
112
+ 'name' => 'itemPurchase',
113
+ 'params' => array(
114
+ 'mpd' => $item->getSku(),
115
+ 'quantity' => $item->getQtyOrdered(),
116
+ 'price' => $item->getBaseRowTotal()
117
+ )
118
+ );
119
+ }
120
+
121
+ Mage::register(Invodo_Video_Helper_Data::EVENTS_REGISTRY_NAME, $events);
122
+ }
123
+ }
app/code/community/Invodo/Video/Model/Observer/Adminhtml.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Observer for adminhtml events
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Observer_Adminhtml
35
+ {
36
+ /**
37
+ * Sets video enabled if it was not set before
38
+ * (this is for viewing 'Yes' by default in select for products without this value)
39
+ *
40
+ * @param Varien_Event_Observer $observer
41
+ */
42
+ public function setInvodoVideoEnabled($observer)
43
+ {
44
+ /** @var Mage_Catalog_Model_Product $product */
45
+ $product = $observer->getProduct();
46
+
47
+ if (!$product || !$product->getId()) {
48
+ return;
49
+ }
50
+
51
+ if ($product->getData('invodo_video_enabled') === null) {
52
+ $product->setData('invodo_video_enabled', 1);
53
+ }
54
+ }
55
+
56
+ /**
57
+ * Adds editor handle for configuration section
58
+ *
59
+ * @param Varien_Event_Observer $observer $observer
60
+ */
61
+ public function controllerActionLayoutLoadBefore($observer)
62
+ {
63
+ /** @var Mage_Adminhtml_System_ConfigController $action */
64
+ $action = $observer->getAction();
65
+ /** @var Mage_Core_Model_Layout $layout */
66
+ $layout = $observer->getLayout();
67
+ $acceptedActions = array(
68
+ 'adminhtml_system_config_edit',
69
+ 'adminhtml_widget_instance_edit'
70
+ );
71
+ $actionName = $action->getFullActionName();
72
+
73
+ if (!in_array($actionName, $acceptedActions)) {
74
+ return;
75
+ }
76
+
77
+ if ($actionName == 'adminhtml_system_config_edit'
78
+ && $action->getRequest()->getParam('section') != 'invodo_video'
79
+ ) {
80
+ return;
81
+ }
82
+
83
+ $layout->getUpdate()->addHandle('editor');
84
+ }
85
+
86
+ /**
87
+ * Replaces block
88
+ *
89
+ * @param Varien_Event_Observer $observer
90
+ */
91
+ public function adminhtmlCmsWysiwygImagesIndexRenderBefore($observer)
92
+ {
93
+ if (!Mage::app()->getRequest()->getParam('invodo_video')) {
94
+ return;
95
+ }
96
+
97
+ $layout = Mage::app()->getLayout();
98
+ $name = 'wysiwyg_images.js';
99
+ $previous = $layout->getBlock($name);
100
+
101
+ if (!$previous) {
102
+ return;
103
+ }
104
+
105
+ $parent = $previous->getParentBlock();
106
+ $parent->unsetChild($name);
107
+ $parent->insert($layout
108
+ ->createBlock(
109
+ 'invodo_video/adminhtml_cms_wysiwyg_images_content',
110
+ $name
111
+ )->setTemplate('cms/browser/js.phtml')
112
+ );
113
+ }
114
+ }
app/code/community/Invodo/Video/Model/Product/Export.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Exports products
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Product_Export extends Mage_ImportExport_Model_Export
35
+ {
36
+ /**
37
+ * Create instance of entity adapter and returns it.
38
+ *
39
+ * @throws Exception
40
+ * @return Mage_ImportExport_Model_Export_Entity_Abstract
41
+ */
42
+ protected function _getEntityAdapter()
43
+ {
44
+ if (!$this->_entityAdapter) {
45
+ try {
46
+ $this->_entityAdapter = Mage::getModel('invodo_video/product_export_entity');
47
+ } catch (Exception $e) {
48
+ Mage::logException($e);
49
+ Mage::throwException(
50
+ Mage::helper('importexport')->__('Invalid entity model')
51
+ );
52
+ }
53
+ if (! $this->_entityAdapter instanceof Mage_ImportExport_Model_Export_Entity_Abstract) {
54
+ Mage::throwException(
55
+ Mage::helper('importexport')->__('Entity adapter obejct must be an instance of Mage_ImportExport_Model_Export_Entity_Abstract')
56
+ );
57
+ }
58
+
59
+ $this->_entityAdapter->setParameters($this->getData());
60
+ }
61
+
62
+ return $this->_entityAdapter;
63
+ }
64
+
65
+ /**
66
+ * Get writer object.
67
+ *
68
+ * @throws Mage_Core_Exception
69
+ * @return Mage_ImportExport_Model_Export_Adapter_Abstract
70
+ */
71
+ protected function _getWriter()
72
+ {
73
+ if (!$this->_writer) {
74
+ try {
75
+ $this->_writer = Mage::getModel('invodo_video/product_export_adapter');
76
+ } catch (Exception $e) {
77
+ Mage::logException($e);
78
+ Mage::throwException(
79
+ Mage::helper('importexport')->__('Invalid adapter model')
80
+ );
81
+ }
82
+ if (! $this->_writer instanceof Mage_ImportExport_Model_Export_Adapter_Abstract) {
83
+ Mage::throwException(
84
+ Mage::helper('importexport')->__('Adapter object must be an instance of %s', 'Mage_ImportExport_Model_Export_Adapter_Abstract')
85
+ );
86
+ }
87
+ }
88
+
89
+ return $this->_writer;
90
+ }
91
+ }
app/code/community/Invodo/Video/Model/Product/Export/Adapter.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Export adapter
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Product_Export_Adapter extends Mage_ImportExport_Model_Export_Adapter_Csv
35
+ {
36
+ /**
37
+ * Set column names.
38
+ *
39
+ * @param array $headerCols
40
+ * @throws Exception
41
+ * @return Mage_ImportExport_Model_Export_Adapter_Abstract
42
+ */
43
+ public function setHeaderCols(array $headerCols)
44
+ {
45
+ if (null !== $this->_headerCols) {
46
+ Mage::throwException(Mage::helper('importexport')->__('Header column names already set'));
47
+ }
48
+ if ($headerCols) {
49
+ foreach ($headerCols as $colName => $colTitle) {
50
+ $this->_headerCols[$colName] = false;
51
+ }
52
+ fputcsv($this->_fileHandler, array_values($headerCols), $this->_delimiter, $this->_enclosure);
53
+ }
54
+ return $this;
55
+ }
56
+ }
app/code/community/Invodo/Video/Model/Product/Export/Entity.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Export entity
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Product_Export_Entity extends Mage_ImportExport_Model_Export_Entity_Product
35
+ {
36
+ /**
37
+ * Max length for fields
38
+ *
39
+ * @var array
40
+ */
41
+ protected $_maxLength = array(
42
+ 'name' => 100,
43
+ 'short_description' => 2048,
44
+ 'sku' => 64,
45
+ 'manufacturer' => 120
46
+ );
47
+
48
+ /**
49
+ * Default values for row
50
+ *
51
+ * @var array
52
+ */
53
+ protected $_rowTemplate = array(
54
+ 'name' => 'NONE',
55
+ 'short_description' => 'NONE',
56
+ 'sku' => 'NONE',
57
+ 'manufacturer' => 'NONE'
58
+ );
59
+
60
+ /**
61
+ * Get attributes codes which are appropriate for export.
62
+ *
63
+ * @return array
64
+ */
65
+ protected function _getExportAttrCodes()
66
+ {
67
+ if (null === self::$attrCodes) {
68
+ self::$attrCodes = array('sku', 'short_description', 'name', 'manufacturer');
69
+ }
70
+
71
+ return self::$attrCodes;
72
+ }
73
+
74
+ public function export()
75
+ {
76
+ //Execution time may be very long
77
+ set_time_limit(0);
78
+
79
+ /** @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */
80
+ $validAttrCodes = $this->_getExportAttrCodes();
81
+ $writer = $this->getWriter();
82
+ $defaultStoreId = Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID;
83
+
84
+ $memoryLimit = trim(ini_get('memory_limit'));
85
+ $lastMemoryLimitLetter = strtolower($memoryLimit[strlen($memoryLimit)-1]);
86
+ switch($lastMemoryLimitLetter) {
87
+ case 'g':
88
+ $memoryLimit *= 1024;
89
+ case 'm':
90
+ $memoryLimit *= 1024;
91
+ case 'k':
92
+ $memoryLimit *= 1024;
93
+ break;
94
+ default:
95
+ // minimum memory required by Magento
96
+ $memoryLimit = 250000000;
97
+ }
98
+
99
+ // Tested one product to have up to such size
100
+ $memoryPerProduct = 100000;
101
+ // Decrease memory limit to have supply
102
+ $memoryUsagePercent = 0.8;
103
+ // Minimum Products limit
104
+ $minProductsLimit = 500;
105
+
106
+ $limitProducts = intval(($memoryLimit * $memoryUsagePercent - memory_get_usage(true)) / $memoryPerProduct);
107
+ if ($limitProducts < $minProductsLimit) {
108
+ $limitProducts = $minProductsLimit;
109
+ }
110
+ $offsetProducts = 0;
111
+
112
+ while (true) {
113
+ ++$offsetProducts;
114
+
115
+ $dataRows = array();
116
+ $rowMultiselects = array();
117
+
118
+ // prepare multi-store values and system columns values
119
+ foreach ($this->_storeIdToCode as $storeId => &$storeCode) { // go through all stores
120
+ $collection = $this->_prepareEntityCollection(Mage::getResourceModel('catalog/product_collection'));
121
+ $collection
122
+ ->setStoreId($storeId)
123
+ ->setPage($offsetProducts, $limitProducts);
124
+ if ($collection->getCurPage() < $offsetProducts) {
125
+ break;
126
+ }
127
+ $collection->load();
128
+
129
+ if ($collection->count() == 0) {
130
+ break;
131
+ }
132
+
133
+ foreach ($collection as $itemId => $item) { // go through all products
134
+ $rowIsEmpty = true; // row is empty by default
135
+
136
+ foreach ($validAttrCodes as &$attrCode) { // go through all valid attribute codes
137
+ $attrValue = $item->getData($attrCode);
138
+
139
+ if (!empty($this->_attributeValues[$attrCode])) {
140
+ if ($this->_attributeTypes[$attrCode] == 'multiselect') {
141
+ $attrValue = explode(',', $attrValue);
142
+ $attrValue = array_intersect_key(
143
+ $this->_attributeValues[$attrCode],
144
+ array_flip($attrValue)
145
+ );
146
+ $rowMultiselects[$itemId][$attrCode] = $attrValue;
147
+ } else if (isset($this->_attributeValues[$attrCode][$attrValue])) {
148
+ $attrValue = $this->_attributeValues[$attrCode][$attrValue];
149
+ } else {
150
+ $attrValue = null;
151
+ }
152
+ }
153
+ // do not save value same as default or not existent
154
+ if ($storeId != $defaultStoreId
155
+ && isset($dataRows[$itemId][$defaultStoreId][$attrCode])
156
+ && $dataRows[$itemId][$defaultStoreId][$attrCode] == $attrValue
157
+ ) {
158
+ $attrValue = null;
159
+ }
160
+ if (is_scalar($attrValue)) {
161
+ $dataRows[$itemId][$storeId][$attrCode] = $attrValue;
162
+ $rowIsEmpty = false; // mark row as not empty
163
+ }
164
+ }
165
+ if ($rowIsEmpty) { // remove empty rows
166
+ unset($dataRows[$itemId][$storeId]);
167
+ }
168
+
169
+ $item = null;
170
+ }
171
+ $collection->clear();
172
+ }
173
+
174
+ if ($collection->getCurPage() < $offsetProducts) {
175
+ break;
176
+ }
177
+
178
+ if ($offsetProducts == 1) {
179
+ // create export file
180
+ $headerCols = array(
181
+ 'name' => 'title',
182
+ 'short_description' => 'description',
183
+ 'sku' => 'id',
184
+ 'manufacturer' => 'brand'
185
+ );
186
+ $writer->setHeaderCols($headerCols);
187
+ }
188
+
189
+ foreach ($dataRows as $productId => &$productData) {
190
+ foreach ($productData as &$dataRow) {
191
+ if (!empty($rowMultiselects[$productId])) {
192
+ foreach ($rowMultiselects[$productId] as $attrKey => $attrVal) {
193
+ if (!empty($rowMultiselects[$productId][$attrKey])) {
194
+ $dataRow[$attrKey] = array_shift($rowMultiselects[$productId][$attrKey]);
195
+ }
196
+ }
197
+ }
198
+
199
+ $dataRow = $this->_trimDataRow($dataRow);
200
+ $dataRow = $this->_fillEmptyRow($dataRow);
201
+ $writer->writeRow($dataRow);
202
+ }
203
+ }
204
+ }
205
+
206
+ return $writer->getContents();
207
+ }
208
+
209
+ /**
210
+ * Apply filter to collection
211
+ *
212
+ * @param Mage_Eav_Model_Entity_Collection_Abstract $collection
213
+ * @return Mage_Eav_Model_Entity_Collection_Abstract
214
+ */
215
+ protected function _prepareEntityCollection(Mage_Eav_Model_Entity_Collection_Abstract $collection)
216
+ {
217
+ parent::_prepareEntityCollection($collection);
218
+
219
+ if (isset($this->_parameters['website'])) {
220
+ try {
221
+ $website = Mage::app()->getWebsite($this->_parameters['website']);
222
+ $collection->addWebsiteFilter(array($website->getId()));
223
+ } catch (Exception $e) {
224
+ Mage::log('Website is not exist');
225
+ }
226
+ }
227
+
228
+ return $collection;
229
+ }
230
+
231
+ /**
232
+ * Trims fields
233
+ *
234
+ * @param array $dataRow
235
+ * @return array
236
+ */
237
+ protected function _trimDataRow(array $dataRow)
238
+ {
239
+ /** @var Mage_Core_Helper_String $helper */
240
+ $helper = Mage::helper('core/string');
241
+
242
+ foreach ($this->_maxLength as $field => $length) {
243
+ if (!isset($dataRow[$field]) || $helper->strlen($dataRow[$field]) <= $length) {
244
+ continue;
245
+ }
246
+
247
+ $dataRow[$field] = $helper->substr($dataRow[$field], 0, $length);
248
+ }
249
+
250
+ return $dataRow;
251
+ }
252
+
253
+ /**
254
+ * Fills empty values
255
+ *
256
+ * @param array $dataRow
257
+ * @return array
258
+ */
259
+ protected function _fillEmptyRow(array $dataRow)
260
+ {
261
+ return array_merge($this->_rowTemplate, $dataRow);
262
+ }
263
+ }
app/code/community/Invodo/Video/Model/Session.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Session for tracking events
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Session extends Mage_Core_Model_Session_Abstract
35
+ {
36
+ /**
37
+ * Initializes session namespace
38
+ */
39
+ public function __construct()
40
+ {
41
+ $this->init('invodo_video');
42
+ }
43
+
44
+ /**
45
+ * Adds new event
46
+ *
47
+ * @param $name
48
+ * @param array $params
49
+ * @return $this
50
+ */
51
+ public function addEvent($name, array $params = array())
52
+ {
53
+ $events = $this->getEvents();
54
+ $events[] = array(
55
+ 'name' => $name,
56
+ 'params' => $params
57
+ );
58
+ $this->setData('events', $events);
59
+
60
+ return $this;
61
+ }
62
+
63
+ /**
64
+ * Retrieves events
65
+ *
66
+ * @param bool $clear
67
+ * @return array
68
+ */
69
+ public function getEvents($clear = false)
70
+ {
71
+ return (array)$this->getData('events', $clear);
72
+ }
73
+ }
app/code/community/Invodo/Video/Model/Widget/Source/Autoplay.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Source model
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Widget_Source_Autoplay
35
+ {
36
+ /**
37
+ * Get types as a source model result
38
+ *
39
+ * @return array
40
+ */
41
+ public function toOptionArray()
42
+ {
43
+ $options = array(
44
+ array(
45
+ 'value' => 0,
46
+ 'label' => Mage::helper('invodo_video')->__('Off')
47
+ ),
48
+ array(
49
+ 'value' => 1,
50
+ 'label' => Mage::helper('invodo_video')->__('On')
51
+ )
52
+ );
53
+
54
+ return $options;
55
+ }
56
+ }
app/code/community/Invodo/Video/Model/Widget/Source/Overlayaction.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Source model
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Widget_Source_Overlayaction
35
+ {
36
+ /**
37
+ * Get types as a source model result
38
+ *
39
+ * @return array
40
+ */
41
+ public function toOptionArray()
42
+ {
43
+ $options = array(
44
+ array(
45
+ 'value' => Invodo_Video_Helper_Data::OVERLAY_ACTION_CUSTOM_IMAGE,
46
+ 'label' => Mage::helper('invodo_video')->__('Custom image')
47
+ ),
48
+ array(
49
+ 'value' => Invodo_Video_Helper_Data::OVERLAY_ACTION_INVODO_THUMBNAIL,
50
+ 'label' => Mage::helper('invodo_video')->__('Invodo Thumbnail Image')
51
+ ),
52
+ array(
53
+ 'value' => Invodo_Video_Helper_Data::OVERLAY_ACTION_INVODO_PREVIEW,
54
+ 'label' => Mage::helper('invodo_video')->__('Invodo Preview Image')
55
+ )
56
+ );
57
+
58
+ return $options;
59
+ }
60
+ }
app/code/community/Invodo/Video/Model/Widget/Source/Sourcetype.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Source model
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Widget_Source_Sourcetype
35
+ {
36
+ /**
37
+ * Get source types
38
+ *
39
+ * @return array
40
+ */
41
+ public function toOptionArray()
42
+ {
43
+ $options = array(
44
+ array(
45
+ 'value' => Invodo_Video_Helper_Data::SOURCE_TYPE_REF,
46
+ 'label' => Mage::helper('invodo_video')->__('Reference ID')
47
+ ),
48
+ array(
49
+ 'value' => Invodo_Video_Helper_Data::SOURCE_TYPE_MPD,
50
+ 'label' => Mage::helper('invodo_video')->__('Product ID')
51
+ )
52
+ );
53
+
54
+ return $options;
55
+ }
56
+ }
app/code/community/Invodo/Video/Model/Widget/Source/Videotype.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Source model
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Model_Widget_Source_Videotype
35
+ {
36
+ /**
37
+ * Get types as a source model result
38
+ *
39
+ * @return array
40
+ */
41
+ public function toOptionArray()
42
+ {
43
+ $options = array(
44
+ array(
45
+ 'value' => Invodo_Video_Helper_Data::VIDEO_TYPE_INLINE,
46
+ 'label' => Mage::helper('invodo_video')->__('Inline')
47
+ ),
48
+ array(
49
+ 'value' => Invodo_Video_Helper_Data::VIDEO_TYPE_OVERLAY,
50
+ 'label' => Mage::helper('invodo_video')->__('Overlay')
51
+ )
52
+ );
53
+
54
+ return $options;
55
+ }
56
+ }
app/code/community/Invodo/Video/controllers/Adminhtml/Cms/Wysiwyg/ImagesController.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Returns name for wysiwyg image
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Adminhtml_Cms_Wysiwyg_ImagesController extends Mage_Adminhtml_Controller_Action
35
+ {
36
+ /**
37
+ * Fire when select image
38
+ */
39
+ public function onInsertAction()
40
+ {
41
+ /** @var Invodo_Video_Helper_Wysiwyg_Images $helper */
42
+ $storeId = $this->getRequest()->getParam('store');
43
+ $helper = Mage::helper('invodo_video/wysiwyg_images');
44
+ $helper->setStoreId($storeId);
45
+
46
+ $filename = $this->getRequest()->getParam('filename');
47
+ $filename = $helper->idDecode($filename);
48
+
49
+ $image = $helper->getImageHtmlDeclaration($filename);
50
+ $this->getResponse()->setBody($image);
51
+ }
52
+ }
app/code/community/Invodo/Video/controllers/Adminhtml/ExportController.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /**
29
+ * Exports products from admin configuration screen
30
+ *
31
+ * @category Invodo
32
+ * @package Invodo_Video
33
+ */
34
+ class Invodo_Video_Adminhtml_ExportController extends Mage_Adminhtml_Controller_Action
35
+ {
36
+ /**
37
+ * Load data and create file for download.
38
+ *
39
+ * @return this
40
+ */
41
+ public function exportAction()
42
+ {
43
+ try {
44
+ /** @var $model Invodo_Video_Model_Product_Export */
45
+ $model = Mage::getModel('invodo_video/product_export');
46
+ $model->setData($this->getRequest()->getParams());
47
+ $model->setData('entity', 'catalog_product');
48
+ $model->setData('export_filter', array(
49
+ 'visibility' => Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH
50
+ ));
51
+
52
+ return $this->_prepareDownloadResponse(
53
+ $model->getFileName(),
54
+ $model->export(),
55
+ $model->getContentType()
56
+ );
57
+ } catch (Mage_Core_Exception $e) {
58
+ $this->_getSession()->addError($e->getMessage());
59
+ } catch (Exception $e) {
60
+ Mage::logException($e);
61
+ $this->_getSession()->addError($this->__('No valid data sent'));
62
+ }
63
+
64
+ return $this->_redirect('*/*/index');
65
+ }
66
+ }
app/code/community/Invodo/Video/data/invodo_video_setup/data-upgrade-0.1.0-0.1.1.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /* @var $installer Mage_Core_Model_Resource_Setup */
29
+ $installer = $this;
30
+ $installer->startSetup();
31
+
32
+ // copies images to media folder
33
+ $images = array('CTA_watchvideo_gray_56x56.png', 'CTA_watchvideo_grayfill_56x56.png', 'CTA_watchvideo_red_56x56.png');
34
+
35
+ $sourceDir = Mage::getModuleDir('', 'Invodo_Video') . DS. 'media' . DS . 'Video_Call_To_Actions' . DS;
36
+ $destinationDir = Mage::getBaseDir('media') . DS . 'wysiwyg' . DS . 'Video_Call_To_Actions' . DS;
37
+ $mediaFile = new Varien_Io_File();
38
+ $mediaFile->mkdir($destinationDir);
39
+
40
+ foreach ($images as $image) {
41
+ $mediaFile->cp($sourceDir . $image, $destinationDir . $image);
42
+ }
43
+
44
+ $installer->endSetup();
app/code/community/Invodo/Video/etc/adminhtml.xml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * Subject to the terms, conditions and limitations of this EULA,
7
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
8
+ * non-assignable license, without rights to sublicense, to install or have installed,
9
+ * display and use the Software (in object code only) only on the computers
10
+ * to which the Software is downloaded. The terms and conditions of this EULA
11
+ * will govern any upgrades, updates, patches, hotfixes and/or
12
+ * additional versions of the Software provided by Company, at Company’s sole
13
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
14
+ * unless such Update is accompanied by or references a separate license
15
+ * agreement in which case the terms and conditions of that agreement will
16
+ * govern. If this EULA governs your use of an Update, such Update shall be
17
+ * considered Software for purposes of this EULA. Unless earlier terminated
18
+ * as provided herein, the term of each individual license granted under this
19
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
20
+ * as otherwise set forth herein.Each party recognizes that
21
+ * Company grants no licenses except for the license expressly set forth.
22
+ *
23
+ * @category Invodo
24
+ * @package Invodo_Video
25
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
26
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
27
+ */
28
+ -->
29
+ <config>
30
+ <acl>
31
+ <resources>
32
+ <admin>
33
+ <children>
34
+ <system>
35
+ <children>
36
+ <config>
37
+ <children>
38
+ <invodo_video>
39
+ <title>Invodo: Setup and Options</title>
40
+ </invodo_video>
41
+ </children>
42
+ </config>
43
+ </children>
44
+ </system>
45
+ </children>
46
+ </admin>
47
+ </resources>
48
+ </acl>
49
+ </config>
app/code/community/Invodo/Video/etc/config.xml ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * Subject to the terms, conditions and limitations of this EULA,
7
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
8
+ * non-assignable license, without rights to sublicense, to install or have installed,
9
+ * display and use the Software (in object code only) only on the computers
10
+ * to which the Software is downloaded. The terms and conditions of this EULA
11
+ * will govern any upgrades, updates, patches, hotfixes and/or
12
+ * additional versions of the Software provided by Company, at Company’s sole
13
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
14
+ * unless such Update is accompanied by or references a separate license
15
+ * agreement in which case the terms and conditions of that agreement will
16
+ * govern. If this EULA governs your use of an Update, such Update shall be
17
+ * considered Software for purposes of this EULA. Unless earlier terminated
18
+ * as provided herein, the term of each individual license granted under this
19
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
20
+ * as otherwise set forth herein.Each party recognizes that
21
+ * Company grants no licenses except for the license expressly set forth.
22
+ *
23
+ * @category Invodo
24
+ * @package Invodo_Video
25
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
26
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
27
+ */
28
+ -->
29
+ <config>
30
+ <modules>
31
+ <Invodo_Video>
32
+ <version>0.1.1</version>
33
+ </Invodo_Video>
34
+ </modules>
35
+ <global>
36
+ <blocks>
37
+ <invodo_video>
38
+ <class>Invodo_Video_Block</class>
39
+ </invodo_video>
40
+ </blocks>
41
+ <helpers>
42
+ <invodo_video>
43
+ <class>Invodo_Video_Helper</class>
44
+ </invodo_video>
45
+ </helpers>
46
+ <models>
47
+ <invodo_video>
48
+ <class>Invodo_Video_Model</class>
49
+ </invodo_video>
50
+ </models>
51
+ <resources>
52
+ <invodo_video_setup>
53
+ <setup>
54
+ <module>Invodo_Video</module>
55
+ <class>Mage_Core_Model_Resource_Setup</class>
56
+ </setup>
57
+ </invodo_video_setup>
58
+ </resources>
59
+ </global>
60
+ <frontend>
61
+ <layout>
62
+ <updates>
63
+ <invodo_video>
64
+ <file>invodo_video.xml</file>
65
+ </invodo_video>
66
+ </updates>
67
+ </layout>
68
+ <events>
69
+ <checkout_cart_add_product_complete>
70
+ <observers>
71
+ <invodo_video>
72
+ <class>invodo_video/observer</class>
73
+ <method>checkoutCartAddProductComplete</method>
74
+ </invodo_video>
75
+ </observers>
76
+ </checkout_cart_add_product_complete>
77
+ <checkout_onepage_controller_success_action>
78
+ <observers>
79
+ <invodo_video>
80
+ <class>invodo_video/observer</class>
81
+ <method>checkoutOnepageControllerSuccessAction</method>
82
+ </invodo_video>
83
+ </observers>
84
+ </checkout_onepage_controller_success_action>
85
+ </events>
86
+ </frontend>
87
+ <admin>
88
+ <routers>
89
+ <invodo_video>
90
+ <use>admin</use>
91
+ <args>
92
+ <module>Invodo_Video</module>
93
+ <frontName>invodo_video</frontName>
94
+ </args>
95
+ </invodo_video>
96
+ </routers>
97
+ </admin>
98
+ <adminhtml>
99
+ <events>
100
+ <catalog_product_load_after>
101
+ <observers>
102
+ <invodo_video>
103
+ <type>singleton</type>
104
+ <class>invodo_video/observer_adminhtml</class>
105
+ <method>setInvodoVideoEnabled</method>
106
+ </invodo_video>
107
+ </observers>
108
+ </catalog_product_load_after>
109
+ <controller_action_layout_load_before>
110
+ <observers>
111
+ <invodo_video>
112
+ <type>singleton</type>
113
+ <class>invodo_video/observer_adminhtml</class>
114
+ <method>controllerActionLayoutLoadBefore</method>
115
+ </invodo_video>
116
+ </observers>
117
+ </controller_action_layout_load_before>
118
+ <controller_action_layout_render_before_adminhtml_cms_wysiwyg_images_index>
119
+ <observers>
120
+ <invodo_video>
121
+ <type>singleton</type>
122
+ <class>invodo_video/observer_adminhtml</class>
123
+ <method>adminhtmlCmsWysiwygImagesIndexRenderBefore</method>
124
+ </invodo_video>
125
+ </observers>
126
+ </controller_action_layout_render_before_adminhtml_cms_wysiwyg_images_index>
127
+ </events>
128
+ </adminhtml>
129
+ <default>
130
+ <invodo_video>
131
+ <general>
132
+ <enabled_on_pdp>1</enabled_on_pdp>
133
+ <pdp_video_type>1</pdp_video_type>
134
+ <pdp_video_resolution>480x270</pdp_video_resolution>
135
+ <pdp_video_auto_play>0</pdp_video_auto_play>
136
+ <enable_conversion_tracking>1</enable_conversion_tracking>
137
+ </general>
138
+ </invodo_video>
139
+ </default>
140
+ </config>
app/code/community/Invodo/Video/etc/system.xml ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * Subject to the terms, conditions and limitations of this EULA,
7
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
8
+ * non-assignable license, without rights to sublicense, to install or have installed,
9
+ * display and use the Software (in object code only) only on the computers
10
+ * to which the Software is downloaded. The terms and conditions of this EULA
11
+ * will govern any upgrades, updates, patches, hotfixes and/or
12
+ * additional versions of the Software provided by Company, at Company’s sole
13
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
14
+ * unless such Update is accompanied by or references a separate license
15
+ * agreement in which case the terms and conditions of that agreement will
16
+ * govern. If this EULA governs your use of an Update, such Update shall be
17
+ * considered Software for purposes of this EULA. Unless earlier terminated
18
+ * as provided herein, the term of each individual license granted under this
19
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
20
+ * as otherwise set forth herein.Each party recognizes that
21
+ * Company grants no licenses except for the license expressly set forth.
22
+ *
23
+ * @category Invodo
24
+ * @package Invodo_Video
25
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
26
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
27
+ */
28
+ -->
29
+ <config>
30
+ <tabs>
31
+ <invodo translate="label">
32
+ <label>Invodo</label>
33
+ </invodo>
34
+ </tabs>
35
+ <sections>
36
+ <invodo_video translate="label">
37
+ <label>Setup and Options</label>
38
+ <tab>invodo</tab>
39
+ <frontend_type>text</frontend_type>
40
+ <frontend_model>invodo_video/adminhtml_system_config_form</frontend_model>
41
+ <sort_order>1000</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ <groups>
46
+ <general>
47
+ <label>General settings</label>
48
+ <frontend_type>text</frontend_type>
49
+ <sort_order>10</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ <fields>
54
+ <site_key>
55
+ <label>Site KEY</label>
56
+ <frontend_type>text</frontend_type>
57
+ <sort_order>10</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>1</show_in_store>
61
+ </site_key>
62
+ <enabled_on_pdp>
63
+ <label>Enabled on Product Details Page</label>
64
+ <frontend_type>select</frontend_type>
65
+ <sort_order>20</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>1</show_in_website>
68
+ <show_in_store>1</show_in_store>
69
+ <source_model>adminhtml/system_config_source_yesno</source_model>
70
+ <comment><![CDATA[Enable video support on product view page]]></comment>
71
+ </enabled_on_pdp>
72
+ <pdp_video_type>
73
+ <label><![CDATA[Product Details Page<br/> Video Display Type]]></label>
74
+ <frontend_type>select</frontend_type>
75
+ <sort_order>30</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ <source_model>invodo_video/widget_source_videotype</source_model>
80
+ <comment><![CDATA[<nobr>Overlay: Overlay Call-To-Action will be added to the "More Views" section of the Product Details Page.</nobr><nobr><br/>Inline: Inline Video will be appended above "Description" of the Product Details Page.</nobr>]]></comment>
81
+ </pdp_video_type>
82
+ <pdp_video_resolution>
83
+ <label>Player Container Size</label>
84
+ <frontend_type>videoresolution</frontend_type>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>1</show_in_website>
87
+ <show_in_store>1</show_in_store>
88
+ <sort_order>32</sort_order>
89
+ <depends>
90
+ <pdp_video_type>1</pdp_video_type>
91
+ </depends>
92
+ </pdp_video_resolution>
93
+ <pdp_video_auto_play>
94
+ <label>Auto play</label>
95
+ <frontend_type>autoplay</frontend_type>
96
+ <source_model>invodo_video/widget_source_autoplay</source_model>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>1</show_in_store>
100
+ <sort_order>33</sort_order>
101
+ <depends>
102
+ <pdp_video_type>1</pdp_video_type>
103
+ </depends>
104
+ </pdp_video_auto_play>
105
+ <pdp_overlay_action>
106
+ <label>Overlay Call-to-Action</label>
107
+ <frontend_type>select</frontend_type>
108
+ <source_model>invodo_video/widget_source_overlayaction</source_model>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>1</show_in_store>
112
+ <sort_order>31</sort_order>
113
+ <depends>
114
+ <pdp_video_type>2</pdp_video_type>
115
+ </depends>
116
+ </pdp_overlay_action>
117
+ <pdp_overlay_action_source>
118
+ <frontend_type>overlayactionsource</frontend_type>
119
+ <show_in_default>1</show_in_default>
120
+ <show_in_website>1</show_in_website>
121
+ <show_in_store>1</show_in_store>
122
+ <sort_order>32</sort_order>
123
+ <depends>
124
+ <pdp_video_type>2</pdp_video_type>
125
+ <pdp_overlay_action>1</pdp_overlay_action>
126
+ </depends>
127
+ </pdp_overlay_action_source>
128
+ <enable_conversion_tracking>
129
+ <label>Enable conversion tracking</label>
130
+ <frontend_type>select</frontend_type>
131
+ <sort_order>40</sort_order>
132
+ <show_in_default>1</show_in_default>
133
+ <show_in_website>1</show_in_website>
134
+ <show_in_store>1</show_in_store>
135
+ <source_model>adminhtml/system_config_source_yesno</source_model>
136
+ <comment><![CDATA[Enable conversion tracking for add to cart and purchase events]]></comment>
137
+ </enable_conversion_tracking>
138
+ <export>
139
+ <label>Export products</label>
140
+ <frontend_type>export</frontend_type>
141
+ <sort_order>50</sort_order>
142
+ <show_in_default>1</show_in_default>
143
+ <show_in_website>1</show_in_website>
144
+ <show_in_store>0</show_in_store>
145
+ </export>
146
+ </fields>
147
+ </general>
148
+ </groups>
149
+ </invodo_video>
150
+ </sections>
151
+ </config>
app/code/community/Invodo/Video/etc/widget.xml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * Subject to the terms, conditions and limitations of this EULA,
7
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
8
+ * non-assignable license, without rights to sublicense, to install or have installed,
9
+ * display and use the Software (in object code only) only on the computers
10
+ * to which the Software is downloaded. The terms and conditions of this EULA
11
+ * will govern any upgrades, updates, patches, hotfixes and/or
12
+ * additional versions of the Software provided by Company, at Company’s sole
13
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
14
+ * unless such Update is accompanied by or references a separate license
15
+ * agreement in which case the terms and conditions of that agreement will
16
+ * govern. If this EULA governs your use of an Update, such Update shall be
17
+ * considered Software for purposes of this EULA. Unless earlier terminated
18
+ * as provided herein, the term of each individual license granted under this
19
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
20
+ * as otherwise set forth herein.Each party recognizes that
21
+ * Company grants no licenses except for the license expressly set forth.
22
+ *
23
+ * @category Invodo
24
+ * @package Invodo_Video
25
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
26
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
27
+ */
28
+ -->
29
+ <widgets>
30
+ <invodo_video_widget type="invodo_video/widget" translate="name description" module="invodo_video">
31
+ <name>Invodo Video</name>
32
+ <description>Displays Invodo-Hosted Video</description>
33
+ <parameters>
34
+ <video_type translate="label">
35
+ <visible>1</visible>
36
+ <required>1</required>
37
+ <label>Display type</label>
38
+ <type>select</type>
39
+ <source_model>invodo_video/widget_source_videotype</source_model>
40
+ </video_type>
41
+ <video_resolution>
42
+ <visible>1</visible>
43
+ <required>1</required>
44
+ <label>Player Container Size</label>
45
+ <type>invodo_video/adminhtml_widget_renderer_videoresolution</type>
46
+ <depends>
47
+ <video_type>
48
+ <values>
49
+ <one>1</one>
50
+ </values>
51
+ </video_type>
52
+ </depends>
53
+ </video_resolution>
54
+ <auto_play translate="label">
55
+ <visible>1</visible>
56
+ <required>0</required>
57
+ <label>Auto play</label>
58
+ <type>radios</type>
59
+ <source_model>invodo_video/widget_source_autoplay</source_model>
60
+ <depends>
61
+ <video_type>
62
+ <values>
63
+ <one>1</one>
64
+ </values>
65
+ </video_type>
66
+ </depends>
67
+ <helper_block>
68
+ <type>invodo_video/adminhtml_widget_renderer_autoplay</type>
69
+ </helper_block>
70
+ </auto_play>
71
+ <overlay_action translate="label">
72
+ <visible>1</visible>
73
+ <required>1</required>
74
+ <label>Overlay Call-to-Action</label>
75
+ <type>select</type>
76
+ <source_model>invodo_video/widget_source_overlayaction</source_model>
77
+ <depends>
78
+ <video_type>
79
+ <values>
80
+ <one>2</one>
81
+ </values>
82
+ </video_type>
83
+ </depends>
84
+ </overlay_action>
85
+ <overlay_action_source translate="label">
86
+ <visible>1</visible>
87
+ <required>1</required>
88
+ <label></label>
89
+ <type>invodo_video/adminhtml_widget_renderer_overlayactionsource</type>
90
+ <depends>
91
+ <video_type>
92
+ <values>
93
+ <one>2</one>
94
+ </values>
95
+ </video_type>
96
+ <overlay_action>
97
+ <values>
98
+ <one>1</one>
99
+ </values>
100
+ </overlay_action>
101
+ </depends>
102
+ </overlay_action_source>
103
+ <source_type translate="label">
104
+ <visible>1</visible>
105
+ <required>0</required>
106
+ <label>Video Lookup Identifier</label>
107
+ <type>radios</type>
108
+ <helper_block>
109
+ <type>invodo_video/adminhtml_widget_renderer_sourcetype</type>
110
+ </helper_block>
111
+ <source_model>invodo_video/widget_source_sourcetype</source_model>
112
+ </source_type>
113
+ <source_value translate="label">
114
+ <visible>1</visible>
115
+ <required>1</required>
116
+ <type>text</type>
117
+ <helper_block>
118
+ <type>invodo_video/adminhtml_widget_renderer_sourcevalue</type>
119
+ </helper_block>
120
+ <description>Limit 500 characters</description>
121
+ </source_value>
122
+ <template>
123
+ <required>1</required>
124
+ <value>invodo/video/widget.phtml</value>
125
+ </template>
126
+ </parameters>
127
+ </invodo_video_widget>
128
+ </widgets>
app/code/community/Invodo/Video/media/Video_Call_To_Actions/CTA_watchvideo_gray_56x56.png ADDED
Binary file
app/code/community/Invodo/Video/media/Video_Call_To_Actions/CTA_watchvideo_grayfill_56x56.png ADDED
Binary file
app/code/community/Invodo/Video/media/Video_Call_To_Actions/CTA_watchvideo_red_56x56.png ADDED
Binary file
app/code/community/Invodo/Video/readme.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ ##### External module files
2
+ - app/etc/modules/Invodo_Video.xml
3
+ - app/design/adminhtml/default/default/template/invodo/video/*
4
+ - app/design/frontend/base/default/layout/invodo_video.xml
5
+ - app/design/frontend/enterprise/default/layout/invodo_video.xml
6
+ - app/design/frontend/base/default/template/invodo/video/*
app/code/community/Invodo/Video/sql/invodo_video_setup/install-0.1.0.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+
28
+ /* @var $installer Mage_Catalog_Model_Resource_Setup */
29
+ $installer = Mage::getModel('catalog/resource_setup', 'invodo_video_setup');
30
+ $installer->startSetup();
31
+
32
+ //adds new attribute
33
+ $installer->addAttribute(
34
+ Mage_Catalog_Model_Product::ENTITY,
35
+ 'invodo_video_enabled',
36
+ array(
37
+ 'type' => 'int',
38
+ 'group' => 'General',
39
+ 'label' => 'Enable Invodo Videos',
40
+ 'input' => 'select',
41
+ 'source' => 'eav/entity_attribute_source_boolean',
42
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
43
+ 'visible' => true,
44
+ 'required' => false,
45
+ 'user_defined' => true,
46
+ 'default' => 1,
47
+ 'visible' => true,
48
+ 'searchable' => false,
49
+ 'filterable' => false,
50
+ 'filterable_in_search' => false,
51
+ 'visible_in_advanced_search' => false,
52
+ 'comparable' => false,
53
+ 'visible_on_front' => false,
54
+ 'unique' => false,
55
+ 'is_configurable' => 0,
56
+ 'used_for_sort_by' => false,
57
+ 'used_in_product_listing' => false
58
+ )
59
+ );
60
+
61
+ //add attribute to group
62
+ $attributeId = Mage::getSingleton('eav/config')
63
+ ->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'invodo_video_enabled')
64
+ ->getId();
65
+
66
+ $installer->addAttributeToGroup(Mage_Catalog_Model_Product::ENTITY, 'Default', 'General', $attributeId, 50);
67
+ $installer->endSetup();
app/design/adminhtml/default/default/template/invodo/video/system/config/form/renderer/overlayactionsource.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php
29
+ /** @var Mage_Core_Block_Template $this */
30
+ /** @var Varien_Data_Form_Element_Abstract $_element */
31
+ $_element = $this->getElement();
32
+ $_mediaUrl = Mage::getUrl('adminhtml/cms_wysiwyg_images', array('target_element_id' => trim($_element->getHtmlId()), 'invodo_video' => true));
33
+ $_disabled = $_element->getDisabled();
34
+ ?>
35
+ <input onclick="javascript: MediabrowserUtility.openDialog('<?php echo $_mediaUrl; ?>');" name="<?php echo trim($_element->getName()) ?>" type="text" id="<?php echo trim($_element->getHtmlId()) ?>" value="<?php echo trim($_element->getEscapedValue()) ?>" style="width: 260px;" class="required-entry" <?php if ($_disabled): ?>disabled<?php endif; ?> readonly />
36
+ <img src="<?php echo $this->getSkinUrl('images/application_view_tile.gif') ?>" onclick="javascript: MediabrowserUtility.openDialog('<?php echo $_mediaUrl; ?>');" style="cursor: pointer; vertical-align: middle; <?php if ($_disabled): ?>display: none; <?php endif; ?>" />
app/design/adminhtml/default/default/template/invodo/video/system/config/form/renderer/videoresolution.phtml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php
29
+ /** @var Invodo_Video_Block_Adminhtml_System_Config_Form_Field_Videoresolution $_element */
30
+ $_element = $this->getElement();
31
+ $_disabled = $_element->getDisabled();
32
+ $_width = $this->getWidth();
33
+ $_height = $this->getHeight();
34
+ ?>
35
+
36
+ <input type="hidden" id="<?php echo $_element->getHtmlId(); ?>" name="<?php echo trim($_element->getName()) ?>" value="<?php echo trim($_element->getValue()); ?>">
37
+ <?php if ($_disabled): ?>
38
+ <input type="hidden" id="invodo_video_config_width_inherit" checked="checked">
39
+ <input type="hidden" id="invodo_video_config_height_inherit" checked="checked">
40
+ <?php endif; ?>
41
+ <div>
42
+ <div style="width: 50px; float: left">
43
+ <input type="text" id="invodo_video_config_width" value="<?php echo $_width; ?>" style="width: 45px" class="required-entry validate-digits validate-digits-range digits-range-100-2000" <?php if ($_disabled): ?>disabled<?php endif; ?>>
44
+ <span><?php echo $this->helper('invodo_video')->__('Width'); ?></span>
45
+ </div>
46
+ <div style="float: left;">&nbsp;x&nbsp;</div>
47
+ <div style="width: 50px; float: left; margin-right: 10px">
48
+ <input type="text" id="invodo_video_config_height" style="width: 45px" value="<?php echo $_height; ?>" class="required-entry validate-digits validate-digits-range digits-range-100-2000" <?php if ($_disabled): ?>disabled<?php endif; ?>>
49
+ <span><?php echo $this->helper('invodo_video')->__('Height'); ?></span>
50
+ </div>
51
+ <div><?php echo $this->helper('invodo_video')->__('Note: match your container size to the aspect ratio of your video'); ?></div>
52
+ </div>
53
+ <script type="text/javascript">
54
+ //<![CDATA[
55
+ (function() {
56
+ $('invodo_video_config_width').observe('change', function() {
57
+ var width = parseInt(this.value);
58
+ var height = width ? parseInt(width / 16 * 9) : 0;
59
+ $('invodo_video_config_height').value = height;
60
+ $('<?php echo $_element->getHtmlId(); ?>').value = width + 'x' + height;
61
+ });
62
+
63
+ $('invodo_video_config_height').observe('change', function() {
64
+ var height = parseInt(this.value);
65
+ var width = $('invodo_video_config_width').value;
66
+ $('<?php echo $_element->getHtmlId(); ?>').value = width + 'x' + height;
67
+ });
68
+ })();
69
+ //]]>
70
+ </script>
app/design/adminhtml/default/default/template/invodo/video/widget/form/renderer/autoplay.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php
29
+ /** @var Varien_Data_Form_Element_Abstract $_element */
30
+ $_element = $this->getElement();
31
+ $_note = $_element->getNote();
32
+ $_trId = $_element->getHtmlContainerId();
33
+ $_class = $_element->getFieldsetHtmlClass();
34
+ ?>
35
+ <?php if (!$_element->getNoDisplay()): ?>
36
+ <tr<?php if($_trId): ?> id="<?php echo $_trId ?>"<?php endif; ?>>
37
+ <td class="label<?php echo $_class ? " {$_class}-label" : ''?>"><?php echo trim($_element->getLabelHtml()) ?></td>
38
+ <td class="<?php echo $_element->hasValueClass() ? $_element->getValueClass() : 'value' ?><?php echo $_class ? " {$_class}-value" : ''?>">
39
+ <div id="<?php echo trim($_element->getHtmlId()) ?>">
40
+ <?php echo trim($_element->getElementHtml()) ?>
41
+ <?php if ($_note): ?>
42
+ <p class="note<?php echo $_class ? " {$_class}-note" : ''?>" id="note_<?php echo $_element->getId()?>"><span><?php echo $_note ?></span></p>
43
+ <?php endif ?>
44
+ </div>
45
+ </td>
46
+ </tr>
47
+ <?php endif; ?>
app/design/adminhtml/default/default/template/invodo/video/widget/form/renderer/overlayactionsource.phtml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php
29
+ /** @var Invodo_Video_Block_Adminhtml_Widget_Renderer_Overlayactionsource $this */
30
+ /** @var Varien_Data_Form_Element_Abstract $_element */
31
+ $_element = $this->getElement();
32
+ $_note = $_element->getNote();
33
+ $_trId = $_element->getHtmlContainerId();
34
+ $_class = $_element->getFieldsetHtmlClass();
35
+ $_height = $_element->getEscapedValue() ? $_element->getEscapedValue() : Invodo_Video_Helper_Data::DEFAULT_VIDEO_HEIGHT;
36
+ $_mediaUrl = Mage::getUrl('adminhtml/cms_wysiwyg_images', array('target_element_id' => trim($_element->getHtmlId()), 'invodo_video' => true));
37
+ ?>
38
+ <?php if (!$_element->getNoDisplay()): ?>
39
+ <tr<?php if($_trId): ?> id="<?php echo $_trId ?>"<?php endif; ?>>
40
+ <td class="label<?php echo $_class ? " {$_class}-label" : ''?>"><?php echo trim($_element->getLabelHtml()) ?></td>
41
+ <td class="<?php echo $_element->hasValueClass() ? $_element->getValueClass() : 'value' ?><?php echo $_class ? " {$_class}-value" : ''?>">
42
+ <input onclick="javascript: MediabrowserUtility.openDialog('<?php echo $_mediaUrl; ?>');" name="<?php echo trim($_element->getName()) ?>" type="text" id="<?php echo trim($_element->getHtmlId()) ?>" value="<?php echo trim($_element->getEscapedValue()) ?>" style="width: 260px;" class="required-entry" disabled readonly />
43
+ <img src="<?php echo $this->getSkinUrl('images/application_view_tile.gif') ?>" onclick="javascript: MediabrowserUtility.openDialog('<?php echo $_mediaUrl; ?>');" style="cursor: pointer; vertical-align: middle;" />
44
+ <?php if ($_note): ?>
45
+ <p class="note<?php echo $_class ? " {$_class}-note" : ''?>" id="note_<?php echo $_element->getId()?>"><span><?php echo $_note ?></span></p>
46
+ <?php endif ?>
47
+ </td>
48
+ </tr>
49
+ <?php endif; ?>
app/design/adminhtml/default/default/template/invodo/video/widget/form/renderer/sourcetype.phtml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php
29
+ /** @var Varien_Data_Form_Element_Abstract $_element */
30
+ /** @var Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element $this */
31
+ $_element = $this->getElement();
32
+ $_note = $_element->getNote();
33
+ $_trId = $_element->getHtmlContainerId();
34
+ $_class = $_element->getFieldsetHtmlClass();
35
+ ?>
36
+ <?php if (!$_element->getNoDisplay()): ?>
37
+ <tr<?php if($_trId): ?> id="<?php echo $_trId ?>"<?php endif; ?>>
38
+ <?php if ($_element->getType()=='hidden'): ?>
39
+ <td colspan="2" class="hidden"><?php echo trim($_element->getElementHtml()) ?></td>
40
+ <?php else: ?>
41
+ <td class="label<?php echo $_class ? " {$_class}-label" : ''?>"><label for="<?php echo $this->escapeHtml($_element->getHtmlId()); ?>"><?php echo $this->escapeHtml($_element->getLabel()); ?><span class="required">*</span></label><a href="https://my.invodo.com/home/shelby.html" target="_blank"><?php echo $this->__('Lookup in MyInvodo'); ?></a></td>
42
+ <td class="<?php echo $_element->hasValueClass() ? $_element->getValueClass() : 'value' ?><?php echo $_class ? " {$_class}-value" : ''?>">
43
+ <?php echo trim($_element->getElementHtml()) ?>
44
+ <?php if ($_note): ?>
45
+ <p class="note<?php echo $_class ? " {$_class}-note" : ''?>" id="note_<?php echo $_element->getId()?>"><span><?php echo $_note ?></span></p>
46
+ <?php endif ?>
47
+ </td>
48
+ <?php endif; ?>
49
+ </tr>
50
+ <?php endif; ?>
app/design/adminhtml/default/default/template/invodo/video/widget/form/renderer/videoresolution.phtml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php
29
+ /** @var $this Invodo_Video_Block_Adminhtml_Widget_Renderer_Videoresolution */
30
+ /** @var Varien_Data_Form_Element_Abstract $_element */
31
+ $_element = $this->getElement();
32
+ $_note = $_element->getNote();
33
+ $_trId = $_element->getHtmlContainerId();
34
+ $_class = $_element->getFieldsetHtmlClass();
35
+ $_width = $this->getWidth();
36
+ $_height = $this->getHeight();
37
+ ?>
38
+ <?php if (!$_element->getNoDisplay()): ?>
39
+ <tr<?php if($_trId): ?> id="<?php echo $_trId ?>"<?php endif; ?>>
40
+ <td class="label<?php echo $_class ? " {$_class}-label" : ''?>"><?php echo trim($_element->getLabelHtml()) ?></td>
41
+ <td class="<?php echo $_element->hasValueClass() ? $_element->getValueClass() : 'value' ?><?php echo $_class ? " {$_class}-value" : ''?>">
42
+ <input type="hidden" id="<?php echo $_element->getHtmlId(); ?>" name="<?php echo trim($_element->getName()); ?>" value="<?php echo trim($_element->getValue()); ?>">
43
+ <div style="width: 50px; float: left">
44
+ <input type="text" id="invodo_video_widget_width" style="width: 45px" value="<?php echo $_width; ?>" class="required-entry validate-digits validate-digits-range digits-range-100-2000">
45
+ <span><?php echo $this->helper('invodo_video')->__('Width'); ?></span>
46
+ </div>
47
+ <div style="float: left;">&nbsp;x&nbsp;</div>
48
+ <div style="width: 50px; float: left; margin-right: 10px">
49
+ <input type="text" id="invodo_video_widget_height" value="<?php echo $_height; ?>" style="width: 45px" class="required-entry validate-digits validate-digits-range digits-range-100-2000">
50
+ <span><?php echo $this->helper('invodo_video')->__('Height'); ?></span>
51
+ </div>
52
+ <div><?php echo $this->helper('invodo_video')->__('Note: match your container size to the aspect ratio of your video'); ?></div>
53
+ <?php if ($_note): ?>
54
+ <p class="note<?php echo $_class ? " {$_class}-note" : ''?>" id="note_<?php echo $_element->getId()?>"><span><?php echo $_note ?></span></p>
55
+ <?php endif ?>
56
+ </td>
57
+ </tr>
58
+ <script type="text/javascript">
59
+ //<![CDATA[
60
+ (function() {
61
+ $('invodo_video_widget_width').observe('change', function() {
62
+ var width = parseInt(this.value);
63
+ var height = width ? parseInt(width / 16 * 9) : 0;
64
+ $('invodo_video_widget_height').value = height;
65
+ $('<?php echo $_element->getHtmlId(); ?>').value = width + 'x' + height;
66
+ });
67
+
68
+ $('invodo_video_widget_height').observe('change', function() {
69
+ var height = parseInt(this.value);
70
+ var width = $('invodo_video_widget_width').value;
71
+ $('<?php echo $_element->getHtmlId(); ?>').value = width + 'x' + height;
72
+ });
73
+ })();
74
+ //]]>
75
+ </script>
76
+ <?php endif; ?>
app/design/frontend/base/default/layout/invodo_video.xml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * Subject to the terms, conditions and limitations of this EULA,
7
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
8
+ * non-assignable license, without rights to sublicense, to install or have installed,
9
+ * display and use the Software (in object code only) only on the computers
10
+ * to which the Software is downloaded. The terms and conditions of this EULA
11
+ * will govern any upgrades, updates, patches, hotfixes and/or
12
+ * additional versions of the Software provided by Company, at Company’s sole
13
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
14
+ * unless such Update is accompanied by or references a separate license
15
+ * agreement in which case the terms and conditions of that agreement will
16
+ * govern. If this EULA governs your use of an Update, such Update shall be
17
+ * considered Software for purposes of this EULA. Unless earlier terminated
18
+ * as provided herein, the term of each individual license granted under this
19
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
20
+ * as otherwise set forth herein.Each party recognizes that
21
+ * Company grants no licenses except for the license expressly set forth.
22
+ *
23
+ * @category Invodo
24
+ * @package Invodo_Video
25
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
26
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
27
+ */
28
+ -->
29
+ <layout>
30
+ <default>
31
+ <reference name="head">
32
+ <block type="core/text" name="invodo.video.script">
33
+ <action method="setText"><text helper="invodo_video/data/getScriptTag"/></action>
34
+ </block>
35
+ </reference>
36
+ <reference name="after_body_start">
37
+ <block type="invodo_video/init" name="invodo.video.init" template="invodo/video/init.phtml" />
38
+ <block type="invodo_video/conversion_register" name="invodo.video.conversion.register" template="invodo/video/conversion.phtml" />
39
+ <block type="invodo_video/conversion_session" name="invodo.video.conversion.session" template="invodo/video/conversion.phtml" />
40
+ </reference>
41
+ </default>
42
+
43
+ <catalog_product_view>
44
+ <reference name="product.info.additional">
45
+ <block type="invodo_video/product_video_overlay" name="invodo.product.video.overlay" template="invodo/video/product/view/overlay.phtml"/>
46
+ </reference>
47
+ <reference name="product.info">
48
+ <block type="invodo_video/product_video_inline" name="invodo.product.video.inline" as="invodo_product_video" before="product.description" template="invodo/video/product/view/inline/community.phtml">
49
+ <action method="addToParentGroup"><group>detailed_info</group></action>
50
+ <action method="setTitle"><title>Videos</title></action>
51
+ </block>
52
+ </reference>
53
+ </catalog_product_view>
54
+ </layout>
app/design/frontend/base/default/template/invodo/video/conversion.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php /** @var $this Invodo_Video_Block_Conversion_Abstract */ ?>
29
+ <script type="text/javascript">
30
+ //<![CDATA[
31
+ if (typeof(Invodo) !== "undefined") {
32
+ <?php foreach ($this->getEvents() as $event): ?>
33
+ <?php if (($name = $this->getEventName($event)) && ($params = $this->getEventParams($event))): ?>
34
+ Invodo.Conversion.send("<?php echo $name; ?>", <?php echo $params; ?>);
35
+ <?php endif; ?>
36
+ <?php endforeach; ?>
37
+ }
38
+ //]]>
39
+ </script>
app/design/frontend/base/default/template/invodo/video/init.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php /** @var $this Invodo_Video_Block_Init */ ?>
29
+ <script type="text/javascript">
30
+ //<![CDATA[
31
+ if (typeof(Invodo) !== "undefined") {
32
+ Invodo.init({
33
+ pageName: "<?php echo $this->getPageName(); ?>",
34
+ pageType: "<?php echo $this->getPageType(); ?>"
35
+ });
36
+ }
37
+ //]]>
38
+ </script>
app/design/frontend/base/default/template/invodo/video/product/view/inline/community.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php /** @var $this Invodo_Video_Block_Product_Video_Inline */ ?>
29
+ <?php $_widgetId = Invodo_Video_Helper_Data::getIncrementId(); ?>
30
+ <div class="std">
31
+ <div id="invodoVideoContainer<?php echo $_widgetId; ?>" style="width: <?php echo $this->getWidth(); ?>px; height: <?php echo $this->getHeight(); ?>px;"></div>
32
+ <script type="text/javascript">
33
+ //<![CDATA[
34
+ (function(){
35
+ var container = $('invodoVideoContainer<?php echo $_widgetId; ?>').up('.box-collateral');
36
+
37
+ if (!container) {
38
+ return;
39
+ }
40
+
41
+ container.hide();
42
+
43
+ if (typeof(Invodo) !== "undefined") {
44
+ Invodo.Widget.add({
45
+ type: "inplayer",
46
+ mode: "embedded",
47
+ widgetId: "invodoVideoPlayer<?php echo $_widgetId; ?>",
48
+ mpd: "<?php echo $this->getSourceValue(); ?>",
49
+ parentDomId: "invodoVideoContainer<?php echo $_widgetId; ?>",
50
+ autoplay: <?php echo $this->getAutoPlay() ? 'true' : 'false'; ?>,
51
+ onpodload: function() {
52
+ container.show();
53
+ }
54
+ });
55
+ }
56
+ })();
57
+ //]]>
58
+ </script>
59
+ </div>
app/design/frontend/base/default/template/invodo/video/product/view/inline/enterprise.phtml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php /** @var $this Invodo_Video_Block_Product_Video_Inline */ ?>
29
+ <?php $_widgetId = Invodo_Video_Helper_Data::getIncrementId(); ?>
30
+ <div class="std">
31
+ <div id="invodoVideoContainer<?php echo $_widgetId; ?>" style="width: <?php echo $this->getWidth(); ?>px; height: <?php echo $this->getHeight(); ?>px;"></div>
32
+ <script type="text/javascript">
33
+ //<![CDATA[
34
+ (function(){
35
+ var container = $('invodoVideoContainer<?php echo $_widgetId; ?>').up('.tab-container');
36
+ var tab = container.previous();
37
+
38
+ if (!container || !tab) {
39
+ return;
40
+ }
41
+
42
+ container.hide();
43
+ tab.hide();
44
+
45
+ if (typeof(Invodo) !== "undefined") {
46
+ Invodo.Widget.add({
47
+ type: "inplayer",
48
+ mode: "embedded",
49
+ widgetId: "invodoVideoPlayer<?php echo $_widgetId; ?>",
50
+ mpd: "<?php echo $this->getSourceValue(); ?>",
51
+ parentDomId: "invodoVideoContainer<?php echo $_widgetId; ?>",
52
+ autoplay: <?php echo $this->getAutoPlay() ? 'true' : 'false'; ?>,
53
+ onpodload: function() {
54
+ tab.show();
55
+ }
56
+ });
57
+ }
58
+ })();
59
+ //]]>
60
+ </script>
61
+ </div>
app/design/frontend/base/default/template/invodo/video/product/view/overlay.phtml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php /** @var $this Invodo_Video_Block_Product_Video_Overlay */ ?>
29
+ <?php $_widgetId = Invodo_Video_Helper_Data::getIncrementId(); ?>
30
+ <script type="text/javascript">
31
+ //<![CDATA[
32
+ (function(){
33
+ <?php if (!$this->isGalleryImagesExists()): ?>
34
+ $$('.product-view .product-img-box').first().insert('<div class="more-views" style="display: none;"><h2><?php echo $this->helper('catalog')->__('More Views') ?></h2><ul></ul></div>');
35
+ <?php endif; ?>
36
+ if (typeof(Invodo) !== "undefined") {
37
+ var galleryList = $$('.product-view .more-views ul').first();
38
+
39
+ if (!galleryList) {
40
+ return;
41
+ }
42
+
43
+ galleryList.insert('<li><span id="invodoVideoCta<?php echo $_widgetId; ?>" style="display:none; cursor: pointer;" /></li>')
44
+ Invodo.Widget.add({
45
+ type: "inplayer",
46
+ mode: "overlay",
47
+ widgetId: "invodoVideoPlayer<?php echo $_widgetId; ?>",
48
+ mpd: "<?php echo $this->getSourceValue(); ?>",
49
+ listensTo: "invodoVideoCta<?php echo $_widgetId; ?>",
50
+ onpodload: function() {
51
+ var podThumb = <?php echo $this->getOverlayActionSource(); ?>;
52
+ $$('.product-view .product-img-box .more-views').first().show();
53
+ Invodo.Widget.add({
54
+ type: "cta",
55
+ widgetId: "invodoVideoCta<?php echo $_widgetId; ?>",
56
+ mpd: "<?php echo $this->getSourceValue(); ?>",
57
+ parentDomId: "invodoVideoCta<?php echo $_widgetId; ?>",
58
+ data: podThumb
59
+ });
60
+ $("invodoVideoCta<?php echo $_widgetId; ?>").show();
61
+ }
62
+ });
63
+ }
64
+ })();
65
+ //]]>
66
+ </script>
app/design/frontend/base/default/template/invodo/video/product/view/overlay/default.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php /** @var $this Invodo_Video_Block_Product_Video_Overlay_Default */ ?>
29
+ <?php $_widgetId = Invodo_Video_Helper_Data::getIncrementId(); ?>
30
+ <span id="invodoVideoCta<?php echo $_widgetId; ?>" style="display:none; cursor: pointer;" />
31
+ <script type="text/javascript">
32
+ //<![CDATA[
33
+ (function(){
34
+ if (typeof(Invodo) !== "undefined") {
35
+ Invodo.Widget.add({
36
+ type: "inplayer",
37
+ mode: "overlay",
38
+ widgetId: "invodoVideoPlayer<?php echo $_widgetId; ?>",
39
+ mpd: "<?php echo $this->getSourceValue(); ?>",
40
+ listensTo: "invodoVideoCta<?php echo $_widgetId; ?>",
41
+ onpodload: function() {
42
+ var podThumb = <?php echo $this->getOverlayActionSource(); ?>;
43
+ Invodo.Widget.add({
44
+ type: "cta",
45
+ widgetId: "invodoVideoCta<?php echo $_widgetId; ?>",
46
+ mpd: "<?php echo $this->getSourceValue(); ?>",
47
+ parentDomId: "invodoVideoCta<?php echo $_widgetId; ?>",
48
+ data: podThumb
49
+ });
50
+ $("invodoVideoCta<?php echo $_widgetId; ?>").show();
51
+ }
52
+ });
53
+ }
54
+ })();
55
+ //]]>
56
+ </script>
app/design/frontend/base/default/template/invodo/video/widget.phtml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * Subject to the terms, conditions and limitations of this EULA,
6
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
7
+ * non-assignable license, without rights to sublicense, to install or have installed,
8
+ * display and use the Software (in object code only) only on the computers
9
+ * to which the Software is downloaded. The terms and conditions of this EULA
10
+ * will govern any upgrades, updates, patches, hotfixes and/or
11
+ * additional versions of the Software provided by Company, at Company’s sole
12
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
13
+ * unless such Update is accompanied by or references a separate license
14
+ * agreement in which case the terms and conditions of that agreement will
15
+ * govern. If this EULA governs your use of an Update, such Update shall be
16
+ * considered Software for purposes of this EULA. Unless earlier terminated
17
+ * as provided herein, the term of each individual license granted under this
18
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
19
+ * as otherwise set forth herein.Each party recognizes that
20
+ * Company grants no licenses except for the license expressly set forth.
21
+ *
22
+ * @category Invodo
23
+ * @package Invodo_Video
24
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
25
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
26
+ */
27
+ ?>
28
+ <?php /** @var $this Invodo_Video_Block_Widget*/ ?>
29
+ <?php $_widgetId = Invodo_Video_Helper_Data::getIncrementId(); ?>
30
+ <?php if ($this->isInlineType()): ?>
31
+ <div id="invodoVideoContainer<?php echo $_widgetId; ?>" style="display: none; width: <?php echo $this->getWidth(); ?>px; height: <?php echo $this->getHeight(); ?>px"></div>
32
+ <?php else: ?>
33
+ <span id="invodoVideoCta<?php echo $_widgetId; ?>" style="display: none; cursor: pointer;"></span>
34
+ <?php endif; ?>
35
+ <script type="text/javascript">
36
+ if (typeof(Invodo) !== "undefined") {
37
+ <?php if ($this->isInlineType()): ?>
38
+ Invodo.Widget.add({
39
+ type: "inplayer",
40
+ mode: "embedded",
41
+ widgetId: "invodoVideoWidget<?php echo $_widgetId; ?>",
42
+ parentDomId: "invodoVideoContainer<?php echo $_widgetId; ?>",
43
+ autoplay: <?php echo $this->getAutoPlay() ? 'true' : 'false'; ?>,
44
+ onpodload: function() {
45
+ var container = $('invodoVideoContainer<?php echo $_widgetId; ?>');
46
+ if (container) {
47
+ container.show();
48
+ }
49
+ },
50
+ <?php echo $this->getSourceTypeName(); ?>: "<?php echo $this->getSourceValue(); ?>"
51
+ });
52
+ <?php else: ?>
53
+ Invodo.Widget.add({
54
+ type: "inplayer",
55
+ mode: "overlay",
56
+ widgetId: "invodoVideoPlayer<?php echo $_widgetId; ?>",
57
+ listensTo: "invodoVideoCta<?php echo $_widgetId; ?>",
58
+ <?php echo $this->getSourceTypeName(); ?>: "<?php echo $this->getSourceValue(); ?>",
59
+ onpodload: function() {
60
+ var podThumb = <?php echo $this->getOverlayActionSource(); ?>;
61
+ Invodo.Widget.add({
62
+ widgetId: "invodoVideoCta<?php echo $_widgetId; ?>",
63
+ type: "cta",
64
+ mpd: "<?php echo $this->getSourceValue(); ?>",
65
+ parentDomId: "invodoVideoCta<?php echo $_widgetId; ?>",
66
+ data: podThumb
67
+ });
68
+ $("invodoVideoCta<?php echo $_widgetId; ?>").show();
69
+ }
70
+ });
71
+ <?php endif; ?>
72
+ }
73
+ </script>
app/design/frontend/enterprise/default/layout/invodo_video.xml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * Subject to the terms, conditions and limitations of this EULA,
7
+ * Company hereby grants you a limited, nonexclusive, nontransferable,
8
+ * non-assignable license, without rights to sublicense, to install or have installed,
9
+ * display and use the Software (in object code only) only on the computers
10
+ * to which the Software is downloaded. The terms and conditions of this EULA
11
+ * will govern any upgrades, updates, patches, hotfixes and/or
12
+ * additional versions of the Software provided by Company, at Company’s sole
13
+ * discretion, that replace and/or supplement the original Software (collectively, “Update”),
14
+ * unless such Update is accompanied by or references a separate license
15
+ * agreement in which case the terms and conditions of that agreement will
16
+ * govern. If this EULA governs your use of an Update, such Update shall be
17
+ * considered Software for purposes of this EULA. Unless earlier terminated
18
+ * as provided herein, the term of each individual license granted under this
19
+ * EULA begins on the date of acceptance of this EULA and shall terminate only
20
+ * as otherwise set forth herein.Each party recognizes that
21
+ * Company grants no licenses except for the license expressly set forth.
22
+ *
23
+ * @category Invodo
24
+ * @package Invodo_Video
25
+ * @copyright Copyright (c) 2013 INVODO (http://www.invodo.com/)
26
+ * @license http://opensource.org/licenses/OSL-3.0 Open Source Software
27
+ */
28
+ -->
29
+ <layout>
30
+ <default>
31
+ <reference name="head">
32
+ <block type="core/text" name="invodo.video.script">
33
+ <action method="setText"><text helper="invodo_video/data/getScriptTag"/></action>
34
+ </block>
35
+ </reference>
36
+ <reference name="after_body_start">
37
+ <block type="invodo_video/init" name="invodo.video.init" template="invodo/video/init.phtml" />
38
+ <block type="invodo_video/conversion_register" name="invodo.video.conversion.register" template="invodo/video/conversion.phtml" />
39
+ <block type="invodo_video/conversion_session" name="invodo.video.conversion.session" template="invodo/video/conversion.phtml" />
40
+ </reference>
41
+ </default>
42
+
43
+ <catalog_product_view>
44
+ <reference name="product.info.additional">
45
+ <block type="invodo_video/product_video_overlay" name="invodo.product.video.overlay" template="invodo/video/product/view/overlay.phtml"/>
46
+ </reference>
47
+ <reference name="product.info">
48
+ <block type="invodo_video/product_video_inline" name="invodo.product.video.inline" as="invodo_product_video" after="product.description" template="invodo/video/product/view/inline/enterprise.phtml">
49
+ <action method="addToParentGroup"><group>detailed_info</group></action>
50
+ <action method="setTitle"><title>Videos</title></action>
51
+ </block>
52
+ </reference>
53
+ </catalog_product_view>
54
+ </layout>
app/etc/modules/Invodo_Video.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Invodo_Video>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Invodo_Video>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>invodo_video</name>
4
+ <version>0.1.1</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/OSL-3.0">Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>The features you need to increase video views, encourage sharing, cross-merchandise, upsell, and prompt a purchase decision.</summary>
10
+ <description>The features you need to increase video views, encourage sharing, cross-merchandise, upsell, and prompt a purchase decision.</description>
11
+ <notes>Support inline and overlay video for product detail pages and widgets for cms pages.</notes>
12
+ <authors><author><name>Invodo</name><user>Invodo</user><email>info@invodo.com</email></author></authors>
13
+ <date>2014-02-24</date>
14
+ <time>17:00:51</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Invodo_Video.xml" hash="9f556907528dde12c46bc6ae5a97acc8"/></dir></target><target name="magecommunity"><dir name="Invodo"><dir name="Video"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Wysiwyg"><dir name="Images"><file name="Content.php" hash="1a7a194cd058c6e5c578e09079301a37"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Autoplay.php" hash="f453438b110a8c34f60a6ac41030f097"/><file name="Export.php" hash="8e027560fbaafa99dfc1e014d9ef56a9"/><file name="Overlayactionsource.php" hash="84da345aa0a5f7ec12f83a7ae7f02fd5"/><file name="Videoresolution.php" hash="8f42cd1eac9c42c16f39ddfc4fef1f35"/></dir></dir><file name="Form.php" hash="6a44657f36732c324140801f3b5304d6"/></dir></dir><dir name="Widget"><dir name="Renderer"><file name="Autoplay.php" hash="d7e39ad04f3f3e025a76de64eda93430"/><file name="Overlayactionsource.php" hash="a63b04f731efc0b0dc5d2ed6f3679526"/><file name="Sourcetype.php" hash="1213b6938989a3de34ec1c569f4c4494"/><file name="Sourcevalue.php" hash="73c474d6f6cc4ebd4251f881f21b3f0e"/><file name="Videoresolution.php" hash="1ae4df3ce560cbe4ade2d20364e91e23"/></dir></dir></dir><dir name="Conversion"><file name="Abstract.php" hash="745b1d9c18c530746b6e7d4fd430f9ce"/><file name="Register.php" hash="cb01b0d2c224dffdf9cdca221969217a"/><file name="Session.php" hash="c7ca4efc4e5c8f51a21d30ccb6b68582"/></dir><file name="Init.php" hash="82ddcfe403200724832c2789e8f1379e"/><dir name="Product"><dir name="Video"><file name="Abstract.php" hash="9fd0ebdafadedea250bbb7508ec353b1"/><file name="Inline.php" hash="fb8377ce3ec105e7957997cfa3b037de"/><dir name="Overlay"><file name="Default.php" hash="717daa92b05f53b871d45ef8a8fec2cc"/></dir><file name="Overlay.php" hash="5b4855507b26f62435fe64e95cb2afd4"/></dir></dir><file name="Widget.php" hash="963bd451e9c23b04e2c31a1b30129a11"/></dir><dir name="Helper"><file name="Data.php" hash="f88d2d27e48e379f88064eaa12bd080f"/><dir name="Wysiwyg"><file name="Images.php" hash="ee418c20943711d7e5598c7a9f312ef2"/></dir></dir><file name="Invodo - Magento Connect - EULA - V1.0 11-20-13.pdf" hash="37b1a9eb720c5d196c2b88cdfc156c1a"/><dir name="Model"><file name="Config.php" hash="1c65be396141b645365397e40973ae4e"/><dir name="Observer"><file name="Adminhtml.php" hash="8a3c7489fcc6d5ca0db866078cdd2aab"/></dir><file name="Observer.php" hash="d04f793701d5a13b095ec2d2819984eb"/><dir name="Product"><dir name="Export"><file name="Adapter.php" hash="a1dcbcc6f5098a97b44fabbf2dd18ad2"/><file name="Entity.php" hash="ab6c7c86a447bb9f02a09d7ef0809595"/></dir><file name="Export.php" hash="9ac0aa0c87a2cc94471c3b42cfc1a810"/></dir><file name="Session.php" hash="14590a9674789e101229cfc39ea4d5d2"/><dir name="Widget"><dir name="Source"><file name="Autoplay.php" hash="bdd3b3d65bdb4c32a68083a84c04141c"/><file name="Overlayaction.php" hash="353d0baf203ab65c6be002588c0ea991"/><file name="Sourcetype.php" hash="0eacb7d4e1411078e4761a1518572634"/><file name="Videotype.php" hash="a8ebae41015f51ece0b5ac32a505abbc"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Cms"><dir name="Wysiwyg"><file name="ImagesController.php" hash="b8c6a9338e7c1cb9fdf74f4ee4f9af71"/></dir></dir><file name="ExportController.php" hash="f2df19e77cc85528834c96bcf496e820"/></dir></dir><dir name="data"><dir name="invodo_video_setup"><file name="data-upgrade-0.1.0-0.1.1.php" hash="bff2f5af964fd85c8b3f3188a00ccf58"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4d5471c5dd07c7ac7f4340a861193764"/><file name="config.xml" hash="7e2670f50a8eafd45dde3caf59e21261"/><file name="system.xml" hash="00c17407e6a2bab5a865dcdf41a797f1"/><file name="widget.xml" hash="648220e9be81848c3397d9153f1e119d"/></dir><dir name="media"><dir name="Video_Call_To_Actions"><file name="CTA_watchvideo_gray_56x56.png" hash="eb0068c1c00ef49e492310351a9a49ed"/><file name="CTA_watchvideo_grayfill_56x56.png" hash="8c21510b5c0b3d33f18f9d8320f9edfe"/><file name="CTA_watchvideo_red_56x56.png" hash="ba4478833df3b890d50355aa397e8841"/></dir></dir><file name="readme.md" hash="a77dc14c8f752383cec88465d8acd74a"/><dir name="sql"><dir name="invodo_video_setup"><file name="install-0.1.0.php" hash="eaeb092a28e858735a8d5b6f8aed2f0e"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="invodo_video.xml" hash="8338b467df95ff8cbda42ab48df9a894"/></dir><dir name="template"><dir name="invodo"><dir name="video"><file name="conversion.phtml" hash="0188b8b59bdf717b1218ccaa01bb8dcc"/><file name="init.phtml" hash="a81d67ee176e54cd087ed7535405a3ac"/><dir name="product"><dir name="view"><dir name="inline"><file name="community.phtml" hash="76bfc4a41bc14ae4ea4e2ada508583d1"/><file name="enterprise.phtml" hash="0547769cec2eb1a06c80aa369bb2c70c"/></dir><dir name="overlay"><file name="default.phtml" hash="4c99a27763b4e909dd43ed6b4392b39c"/></dir><file name="overlay.phtml" hash="289ef31377e982dde14342d9f870e867"/></dir></dir><file name="widget.phtml" hash="9fb08ceeb387a054f1fd06977ce89042"/></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="layout"><file name="invodo_video.xml" hash="9e8b8b2fc6d6faba21e0b5b201b125c6"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="invodo"><dir name="video"><dir name="system"><dir name="config"><dir name="form"><dir name="renderer"><file name="overlayactionsource.phtml" hash="56578beb477fe748c70ccc006e0ca0d9"/><file name="videoresolution.phtml" hash="7e927cb5dcaa56df12b430c9043afeda"/></dir></dir></dir></dir><dir name="widget"><dir name="form"><dir name="renderer"><file name="autoplay.phtml" hash="4b0f71fa9165fb74de4bbf5fdff40f42"/><file name="overlayactionsource.phtml" hash="52c443257e7276ea349853d85d5de3ae"/><file name="sourcetype.phtml" hash="7439387f9c6aee6bb589e3731101e0ff"/><file name="videoresolution.phtml" hash="b21a9a1e87f8d3bd1d7ea4e352753601"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>