Bottom_Pop_Ads - Version 1.0.0

Version Notes

Not test in magento version 1.4

Download this release

Release Info

Developer Vsmart Extensions
Extension Bottom_Pop_Ads
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/Ve/BRPopup/Block/List.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ # BRPopup - Bottom Right Popup Module
4
+ # ------------------------------------------------------------------------
5
+ # author Vsmart Extensions
6
+ # copyright Copyright (C) 2010 www.vsmart-extensions.com. All Rights Reserved.
7
+ # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8
+ # Websites: http://www.vsmart-extensions.com
9
+ # Technical Support: Forum - http://www.vsmart-extensions.com
10
+ -------------------------------------------------------------------------*/
11
+ class Ve_BRPopup_Block_List extends Mage_Catalog_Block_Product_List
12
+ {
13
+ var $_config = array();
14
+
15
+ public function __construct($attributes = array()){
16
+ $helper = Mage::helper('ve_brpopup/data');
17
+
18
+ $this->_config['show'] = $helper->get('show', $attributes);
19
+ if(!$this->_config['show']) return;
20
+
21
+ parent::__construct();
22
+
23
+ $this->_config['listid'] = $helper->get('listid', $attributes);
24
+
25
+ $this->_config['title'] = $helper->get('title', $attributes);
26
+ $this->_config['height'] = $helper->get('height', $attributes);
27
+ $this->_config['width'] = $helper->get('width', $attributes);
28
+ $this->_config['mwidth'] = $helper->get('mwidth', $attributes);
29
+ $this->_config['mheight'] = $helper->get('mheight', $attributes);
30
+ $this->_config['type'] = $helper->get('type', $attributes);
31
+ $this->_config['sblock'] = $helper->get('sblock', $attributes);
32
+
33
+ $this->_config['number_items'] = $helper->get('number_items', $attributes);
34
+ $this->_config['number_items'] = $this->_config['number_items']>0?$this->_config['number_items']:4;
35
+
36
+ $this->_config['delaytime'] = $helper->get('delaytime', $attributes);
37
+ if(!$this->_config['delaytime']) $this->_config['autorun'] =0;
38
+
39
+ $this->setProductCollection($this->getCategory());
40
+ }
41
+
42
+ function _toHtml() {
43
+ if(!$this->_config['show']) return;
44
+
45
+ $listall = $this->getListProducts();
46
+
47
+ $this->assign('listall', $listall);
48
+ $this->assign('configs', $this->_config);
49
+
50
+ if(!isset($this->_config['template']) || $this->_config['template']==''){
51
+ $this->_config['template'] = 've/brpopup/list.phtml';
52
+ }
53
+
54
+ $this->setTemplate($this->_config['template']);
55
+
56
+ return parent::_toHtml();
57
+ }
58
+ function getListProducts($fieldorder='entity_id', $order='asc', $product_ids='', $perPage=NULL, $currentPage=1){
59
+ $product_ids = $this->_config['listid'];
60
+ $list = null;
61
+
62
+ $storeId = Mage::app()->getStore()->getId();
63
+ $products = Mage::getResourceModel('catalog/product_collection')
64
+ ->setStoreId($storeId)
65
+ ->addAttributeToSelect('*')
66
+ ->addStoreFilter($storeId)
67
+ ->setOrder($fieldorder, $order);
68
+
69
+ if ($product_ids) {
70
+ $products->getSelect()->where("e.entity_id in ($product_ids)");
71
+
72
+ }
73
+
74
+ /*
75
+ Filter list of product showing only the active and
76
+ visible product
77
+ */
78
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
79
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
80
+
81
+ $products->setPageSize($perPage)->setCurPage($currentPage);
82
+
83
+ $this->setProductCollection($products);
84
+
85
+ if (($_products = $this->getProductCollection()) && $_products->getSize()){
86
+ $list = $_products;
87
+ }
88
+ return $list;
89
+ }
90
+ }
app/code/local/Ve/BRPopup/Helper/Data.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ # BRPopup - Bottom Right Popup Module
4
+ # ------------------------------------------------------------------------
5
+ # author Vsmart Extensions
6
+ # copyright Copyright (C) 2010 www.vsmart-extensions.com. All Rights Reserved.
7
+ # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8
+ # Websites: http://www.vsmart-extensions.com
9
+ # Technical Support: Forum - http://www.vsmart-extensions.com
10
+ -------------------------------------------------------------------------*/
11
+ class Ve_BRPopup_Helper_Data extends Mage_Core_Helper_Abstract {
12
+ function get($var, $attributes){
13
+ if(isset($attributes[$var])){
14
+ return $attributes[$var];
15
+ }
16
+ return Mage::getStoreConfig("ve_brpopup/ve_brpopup/$var");
17
+ }
18
+ }
19
+ ?>
app/code/local/Ve/BRPopup/Model/System/Config/Backend/BRPopup/checkMode.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ # BRPopup - Bottom Right Popup Module
4
+ # ------------------------------------------------------------------------
5
+ # author Vsmart Extensions
6
+ # copyright Copyright (C) 2010 www.vsmart-extensions.com. All Rights Reserved.
7
+ # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8
+ # Websites: http://www.vsmart-extensions.com
9
+ # Technical Support: Forum - http://www.vsmart-extensions.com
10
+ -------------------------------------------------------------------------*/
11
+
12
+
13
+ class Ve_BRPopup_Model_System_Config_Backend_BRPopup_checkMode extends Mage_Core_Model_Config_Data
14
+ {
15
+
16
+ protected function _beforeSave(){
17
+ $groups = $this->getData('groups');
18
+ $datas = $groups['ve_brpopup'];
19
+ if($datas['fields']['mode']['value']=='category' && $datas['fields']['catsid']['value']==''){
20
+ throw new Exception(Mage::helper('ve_brpopup')->__('Please enter list of Categories ID.'));
21
+ }
22
+ elseif($datas['fields']['mode']['value']=='category' && $datas['fields']['leading_product']['value']=='' && $datas['fields']['intro_product']['value']=='' ){
23
+ throw new Exception(Mage::helper('ve_brpopup')->__('Please enter Leading or Intro number.'));
24
+ }
25
+ return $this;
26
+ }
27
+
28
+ }
app/code/local/Ve/BRPopup/Model/System/Config/Source/ListDirection.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ # BRPopup - Bottom Right Popup Module
4
+ # ------------------------------------------------------------------------
5
+ # author Vsmart Extensions
6
+ # copyright Copyright (C) 2010 www.vsmart-extensions.com. All Rights Reserved.
7
+ # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8
+ # Websites: http://www.vsmart-extensions.com
9
+ # Technical Support: Forum - http://www.vsmart-extensions.com
10
+ -------------------------------------------------------------------------*/
11
+ class Ve_BRPopup_Model_System_Config_Source_ListDirection{
12
+ public function toOptionArray()
13
+ {
14
+ return array(
15
+ array('value'=>'left', 'label'=>Mage::helper('ve_brpopup')->__('Left')),
16
+ array('value'=>'right', 'label'=>Mage::helper('ve_brpopup')->__('Right')),
17
+ );
18
+ }
19
+ }
app/code/local/Ve/BRPopup/Model/System/Config/Source/ListType.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*------------------------------------------------------------------------
3
+ # BRPopup - Bottom Right Popup Module
4
+ # ------------------------------------------------------------------------
5
+ # author Vsmart Extensions
6
+ # copyright Copyright (C) 2010 www.vsmart-extensions.com. All Rights Reserved.
7
+ # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8
+ # Websites: http://www.vsmart-extensions.com
9
+ # Technical Support: Forum - http://www.vsmart-extensions.com
10
+ -------------------------------------------------------------------------*/
11
+ class Ve_BRPopup_Model_System_Config_Source_ListType
12
+ {
13
+ public function toOptionArray()
14
+ {
15
+ return array(
16
+ array('value'=>'', 'label'=>Mage::helper('ve_brpopup')->__('-- Please select --')),
17
+ //array('value'=>'latest', 'label'=>Mage::helper('ve_brpopup')->__('Latest')),
18
+ array('value'=>'best_buy', 'label'=>Mage::helper('ve_brpopup')->__('Best Buy')),
19
+ //array('value'=>'most_viewed', 'label'=>Mage::helper('ve_brpopup')->__('Most Viewed')),
20
+ //array('value'=>'most_reviewed', 'label'=>Mage::helper('ve_brpopup')->__('Most Reviewed')),
21
+ //array('value'=>'top_rated', 'label'=>Mage::helper('ve_brpopup')->__('Top Rated')),
22
+ //array('value'=>'attribute', 'label'=>Mage::helper('ve_brpopup')->__('Featured Product')),
23
+ );
24
+ }
25
+ }
app/code/local/Ve/BRPopup/etc/config.xml ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ve_BRPopup>
5
+ <version>0.1.0</version>
6
+ </Ve_BRPopup>
7
+ </modules>
8
+ <frontend>
9
+ <translate>
10
+ <modules>
11
+ <Ve_BRPopup>
12
+ <files>
13
+ <default>Ve_BRPopup.csv</default>
14
+ </files>
15
+ </Ve_BRPopup>
16
+ </modules>
17
+ </translate>
18
+ <layout>
19
+ <updates>
20
+ <brpopup>
21
+ <file>brpopup.xml</file>
22
+ </brpopup>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <blocks>
28
+ <ve_brpopup>
29
+ <class>Ve_BRPopup_Block</class>
30
+ </ve_brpopup>
31
+ </blocks>
32
+ <models>
33
+ <ve_brpopup>
34
+ <class>Ve_BRPopup_Model</class>
35
+ </ve_brpopup>
36
+ </models>
37
+ <helpers>
38
+ <ve_brpopup>
39
+ <class>Ve_BRPopup_Helper</class>
40
+ </ve_brpopup>
41
+ </helpers>
42
+ </global>
43
+ <adminhtml>
44
+ <acl>
45
+ <resources>
46
+ <admin>
47
+ <children>
48
+ <system>
49
+ <children>
50
+ <config>
51
+ <children>
52
+ <ve_brpopup>
53
+ <title>Bottom Right Popup</title>
54
+ </ve_brpopup>
55
+ </children>
56
+ </config>
57
+ </children>
58
+ </system>
59
+ </children>
60
+ </admin>
61
+ </resources>
62
+ </acl>
63
+ <translate>
64
+ <modules>
65
+ <Ve_BRPopup>
66
+ <files>
67
+ <default>Ve_BRPopup.csv</default>
68
+ </files>
69
+ </Ve_BRPopup>
70
+ </modules>
71
+ </translate>
72
+ </adminhtml>
73
+
74
+ <default>
75
+ <ve_brpopup>
76
+ <ve_brpopup>
77
+ <show>1</show>
78
+ <title>Bottom Right Popup</title>
79
+ <mwidth>218</mwidth>
80
+ <mheight>150</mheight>
81
+ <type>1</type>
82
+ <listid>162,163,164,165,166</listid>
83
+ <height>120</height>
84
+ <width>218</width>
85
+ <!--<mode>latest</mode>-->
86
+ <!--<catid>0</catid> -->
87
+ <!--<quanlity>8</quanlity> -->
88
+ <number_items>10</number_items>
89
+ <!-- <show_price>1</show_price>
90
+ <show_cart>0</show_cart>
91
+ <autorun>1</autorun>
92
+ <direction>left</direction> -->
93
+ <delaytime>3000</delaytime>
94
+ <!-- <animationtime>2000</animationtime> -->
95
+ </ve_brpopup>
96
+ </ve_brpopup>
97
+ </default>
98
+ </config>
app/code/local/Ve/BRPopup/etc/system.xml ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <ve_brpopup>
5
+ <label>Bottom Right Popup</label>
6
+ <tab>catalog</tab>
7
+ <frontend_type>text</frontend_type>
8
+ <sort_order>10</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>1</show_in_store>
12
+ <groups>
13
+ <ve_brpopup translate="label">
14
+ <label>Bottom Right Popup: Config General</label>
15
+ <frontend_type>text</frontend_type>
16
+ <sort_order>2000</sort_order>
17
+ <show_in_default>1</show_in_default>
18
+ <show_in_website>1</show_in_website>
19
+ <show_in_store>1</show_in_store>
20
+ <fields>
21
+ <show translate="label" module="core">
22
+ <label>Enabled</label>
23
+ <sort_order>10</sort_order>
24
+ <frontend_type>select</frontend_type>
25
+ <source_model>adminhtml/system_config_source_yesno</source_model>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <show_in_store>1</show_in_store>
29
+ </show>
30
+ <title translate="label">
31
+ <label>Module Title </label>
32
+ <frontend_type>text</frontend_type>
33
+ <sort_order>10</sort_order>
34
+ <show_in_default>1</show_in_default>
35
+ <show_in_website>1</show_in_website>
36
+ <show_in_store>1</show_in_store>
37
+ </title>
38
+ <mwidth translate="label">
39
+ <label>Width of Module </label>
40
+ <frontend_type>text</frontend_type>
41
+ <sort_order>20</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
+ </mwidth>
46
+ <mheight translate="label">
47
+ <label>Height of Module </label>
48
+ <frontend_type>text</frontend_type>
49
+ <sort_order>20</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
+ </mheight>
54
+ <sblock translate="label">
55
+ <label>Static Block (Block id)</label>
56
+ <frontend_type>text</frontend_type>
57
+ <sort_order>20</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
+ </sblock>
62
+ <type translate="label">
63
+ <label>Show Product</label>
64
+ <frontend_type>select</frontend_type>
65
+ <source_model>adminhtml/system_config_source_yesno</source_model>
66
+ <sort_order>20</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>1</show_in_store>
70
+ </type>
71
+ <listid translate="label">
72
+ <label>List id </label>
73
+ <frontend_type>text</frontend_type>
74
+ <sort_order>30</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <show_in_store>1</show_in_store>
78
+ </listid>
79
+ <height translate="label">
80
+ <label>Height of Thumbnail </label>
81
+ <frontend_type>text</frontend_type>
82
+ <sort_order>30</sort_order>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>1</show_in_website>
85
+ <show_in_store>1</show_in_store>
86
+ </height>
87
+ <width translate="label">
88
+ <label>Width of Thumbnail </label>
89
+ <frontend_type>text</frontend_type>
90
+ <sort_order>40</sort_order>
91
+ <show_in_default>1</show_in_default>
92
+ <show_in_website>1</show_in_website>
93
+ <show_in_store>1</show_in_store>
94
+ </width>
95
+ <!--
96
+ <mode translate="label">
97
+ <label>Type of product display </label>
98
+ <frontend_type>select</frontend_type>
99
+ <source_model>vst_vproductsshow/system_config_source_listType</source_model>
100
+ <sort_order>50</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>1</show_in_website>
103
+ <show_in_store>1</show_in_store>
104
+ </mode>
105
+ -->
106
+ <!--
107
+ <quanlity translate="label">
108
+ <label># Qty of Products</label>
109
+ <sort_order>70</sort_order>
110
+ <frontend_type>text</frontend_type>
111
+ <show_in_default>1</show_in_default>
112
+ <show_in_website>1</show_in_website>
113
+ <show_in_store>1</show_in_store>
114
+ </quanlity>
115
+ -->
116
+ <number_items translate="label">
117
+ <label>Number Item</label>
118
+ <sort_order>75</sort_order>
119
+ <frontend_type>text</frontend_type>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ </number_items>
124
+ <!--
125
+ <show_price translate="label">
126
+ <label>Show Product Price? </label>
127
+ <frontend_type>select</frontend_type>
128
+ <source_model>adminhtml/system_config_source_yesno</source_model>
129
+ <sort_order>80</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>1</show_in_website>
132
+ <show_in_store>1</show_in_store>
133
+ </show_price>
134
+ <show_cart translate="label">
135
+ <label>Show Add to cart? </label>
136
+ <frontend_type>select</frontend_type>
137
+ <source_model>adminhtml/system_config_source_yesno</source_model>
138
+ <sort_order>98</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>1</show_in_website>
141
+ <show_in_store>1</show_in_store>
142
+ </show_cart>
143
+ <autorun translate="label">
144
+ <label>Auto run slide </label>
145
+ <frontend_type>select</frontend_type>
146
+ <source_model>adminhtml/system_config_source_yesno</source_model>
147
+ <sort_order>100</sort_order>
148
+ <show_in_default>1</show_in_default>
149
+ <show_in_website>1</show_in_website>
150
+ <show_in_store>1</show_in_store>
151
+ </autorun>
152
+ <direction translate="label">
153
+ <label>Direction </label>
154
+ <frontend_type>select</frontend_type>
155
+ <source_model>vst_vproductsshow/system_config_source_listDirection</source_model>
156
+ <sort_order>110</sort_order>
157
+ <show_in_default>1</show_in_default>
158
+ <show_in_website>1</show_in_website>
159
+ <show_in_store>1</show_in_store>
160
+ </direction> -->
161
+ <delaytime translate="label">
162
+ <label>Rolling delay time</label>
163
+ <frontend_type>text</frontend_type>
164
+ <sort_order>130</sort_order>
165
+ <show_in_default>1</show_in_default>
166
+ <show_in_website>1</show_in_website>
167
+ <show_in_store>1</show_in_store>
168
+ </delaytime>
169
+ <!--
170
+ <animationtime translate="label">
171
+ <label>Animation time</label>
172
+ <frontend_type>text</frontend_type>
173
+ <sort_order>140</sort_order>
174
+ <show_in_default>1</show_in_default>
175
+ <show_in_website>1</show_in_website>
176
+ <show_in_store>1</show_in_store>
177
+ </animationtime>
178
+ -->
179
+ </fields>
180
+ </ve_brpopup>
181
+ </groups>
182
+ </ve_brpopup>
183
+ </sections>
184
+ </config>
app/design/frontend/default/default/layout/brpopup.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss"><stylesheet>ve/brpopup/css/style.css</stylesheet></action>
6
+ </reference>
7
+ </default>
8
+ </layout>
app/design/frontend/default/default/template/ve/brpopup/list.phtml ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript">
2
+ var timer = 0
3
+ </script>
4
+ <?php if($configs['type'] == 1){ ?>
5
+ <script type="text/javascript">
6
+ var slidespeed=<?php echo $configs['delaytime']?>;
7
+ var slideimages=new Array();
8
+ //specify corresponding links
9
+ var slidelinks=new Array();
10
+ //specify images
11
+ <?php
12
+ $i = 0;
13
+ $isrc = '';
14
+ foreach ($listall->getItems() as $_product){
15
+ if($i ==0){
16
+ $isrc = $this->helper('catalog/image')->init($_product, 'thumbnail')->resize($configs['width'], $configs['height'])->setWatermarkSize('30x10');
17
+ }
18
+ ?>
19
+ slideimages[<?php echo $i; ?>] = '<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize($configs['width'], $configs['height'])->setWatermarkSize('30x10'); ?>';
20
+ slidelinks[<?php echo $i; ?>] = '<?php echo $_product->getProductUrl(); ?>';
21
+ <?php
22
+ $i++;
23
+ }
24
+ ?>
25
+ var imageholder=new Array()
26
+ var ie55=window.createPopup
27
+ for (i=0;i<slideimages.length;i++){
28
+ imageholder[i]=new Image()
29
+ imageholder[i].src=slideimages[i]
30
+ }
31
+
32
+ function gotoshow(){
33
+ window.location=slidelinks[whichlink]
34
+ }
35
+ </script>
36
+ <?php } ?>
37
+ <div id="ve_popup" style="width:<?php echo $configs['mwidth']; ?>px;height:<?php echo $configs['mheight']; ?>">
38
+ <div id="ve_popup_right" style="width:<?php echo $configs['mwidth']-11; ?>px">
39
+ <div id="ve_popup_left" style="height:<?php echo $configs['mheight']; ?>px">
40
+ <div id="ve_popup_header" style="width:<?php echo $configs['mwidth'] - 18; ?>px">
41
+ <ul id="ve_popup_toolbar">
42
+ <li id="ve_popup_hide"><a class="min" href="javascript:clickhide();">Hide</a></li>
43
+ <li id="ve_popup_show" style="display: none;"><a class="max" href="javascript:clickshow();">Show</a></li>
44
+ <li id="ve_popup_close"><a href="javascript:clickclose();" class="close">Close</a></li>
45
+ </ul>
46
+ <a href="javascript:void(0);"><?php echo $configs['title']?></a>
47
+ </div>
48
+
49
+ <div id="ve_popup_content" style="height:<?php echo $configs['mheight']; ?>px">
50
+ <?php if($configs['type'] != 1){ ?>
51
+ <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId($configs['sblock'])->toHtml() ?>
52
+ <?php }else{ ?>
53
+
54
+ <a href="javascript:gotoshow()" onMouseOver="stoper()" onMouseOut="out()"><img height="<?php echo $configs['height']; ?>" border="0" width="<?php echo $configs['width']; ?>" src="<?php echo $isrc;?>" name="slide" style="filter:progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,Duration=1)"></a>
55
+ <script type="text/javascript">
56
+ <!--
57
+ var whichlink=0
58
+ var whichimage=0
59
+ var pixeldelay=(ie55)? document.images.slide.filters[0].duration*1000 : 0
60
+ function slideit(){
61
+ if (!document.images) return
62
+ if (ie55) document.images.slide.filters[0].apply()
63
+ document.images.slide.src=imageholder[whichimage].src
64
+ if (ie55) document.images.slide.filters[0].play()
65
+ whichlink=whichimage
66
+ whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
67
+ timer = setTimeout("slideit()",slidespeed+pixeldelay)
68
+ }
69
+ function stoper() {
70
+ clearTimeout(timer);
71
+ }
72
+ function out(){
73
+ slideit();
74
+ }
75
+ slideit();
76
+ //-->
77
+ </script>
78
+ <?php } ?>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <div id="vepowered" style="display:none;">Powerd by <a href="http://vsmart-extensions.com">Vsmart Extensions</a></div>
83
+ </div>
84
+ <!--/sidebar -->
85
+ <!--/footer -->
86
+ <script>
87
+ bottomLayer = document.getElementById('ve_popup');
88
+ var intervalId = 0;
89
+ var maxHeight = <?php echo $configs['mheight'] - 2; ?> ;
90
+ var minHeight = 20;
91
+ var curHeight = 0;
92
+ function brpopupshow( ){
93
+ curHeight += 2;
94
+ if (curHeight > maxHeight){
95
+ clearInterval ( intervalId );
96
+ }
97
+ bottomLayer.style.height = curHeight+'px';
98
+ }
99
+ function brpopuphide( ){
100
+ curHeight -= 3;
101
+ if (curHeight < minHeight){
102
+ clearInterval ( intervalId );
103
+ }
104
+ bottomLayer.style.height = curHeight+'px';
105
+ }
106
+ intervalId = setInterval ( 'brpopupshow()', 5 );
107
+ function clickhide(){
108
+ document.getElementById('ve_popup_hide').style.display='none';
109
+ document.getElementById('ve_popup_show').style.display='inline';
110
+ intervalId = setInterval ( 'brpopuphide()', 5 );
111
+ clearTimeout(timer);
112
+ }
113
+ function clickshow(){
114
+ document.getElementById('ve_popup_hide').style.display='inline';
115
+ document.getElementById('ve_popup_show').style.display='none';
116
+ intervalId = setInterval ( 'brpopupshow()', 5 );
117
+ <?php if($configs['type'] == 1){ ?>
118
+ slideit();
119
+ <?php } ?>
120
+ }
121
+ function clickclose(){
122
+ document.body.style.marginBottom = '0px';
123
+ bottomLayer.style.display = 'none';
124
+ }
125
+ </script>
126
+
127
+
app/etc/modules/Ve_BRPopup.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ve_BRPopup>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <depends>
8
+ <Mage_Catalog />
9
+ </depends>
10
+ <version>0.1.0</version>
11
+ </Ve_BRPopup>
12
+ </modules>
13
+ </config>
14
+
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Bottom_Pop_Ads</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">Extension license name (OSL v3.0)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Bottom Pop Ads is magento extension that show html popup at bottom of site. With this extension, you can show products or static block.</summary>
10
+ <description>Bottom Pop Ads is magento extension that show html popup at bottom of site. With this extension, you can show products or static block.</description>
11
+ <notes>Not test in magento version 1.4</notes>
12
+ <authors><author><name>Vsmart Extensions</name><user>vsmartexts</user><email>info@vsmarttech.com</email></author></authors>
13
+ <date>2011-05-30</date>
14
+ <time>17:05:39</time>
15
+ <contents><target name="magelocal"><dir name="Ve"><dir name="BRPopup"><dir name="Block"><file name="List.php" hash="ae8c7dbc273a76d4e7a3a75e58c561fb"/></dir><dir name="Helper"><file name="Data.php" hash="688df2ecf1832229bc4490353810a20e"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="BRPopup"><file name="checkMode.php" hash="1ea0466dbc60ee6cdd8579ac5d3c2922"/></dir></dir><dir name="Source"><file name="ListDirection.php" hash="41ccb55031e195fc423a77da9e45a485"/><file name="ListType.php" hash="846502c5f509d91618a673cf2d649960"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="e3927c9bb1bb09337bab92648dfbb329"/><file name="system.xml" hash="50d94cf6b39d382f22e83966a9270ad3"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ve_BRPopup.xml" hash="4ccb8702ca7ed4fc56e1ec4597c3a9d3"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="brpopup.xml" hash="8ec9e6fb67bbd8d1113331e9217876bf"/></dir><dir name="template"><dir name="ve"><dir name="brpopup"><file name="list.phtml" hash="e5683b9437f24c870a3b20295df8861a"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="ve"><dir name="brpopup"><dir name="css"><file name="style.css" hash="9557cc204d835ced6f196b4da4df3aae"/></dir><dir name="images"><file name="button.gif" hash="09c6a62fae54f3812fed1239fe838116"/><file name="left.gif" hash="d4b9eaaf46bd3bbb88b70849e684aa28"/><file name="right.gif" hash="3240536833a48a5b6487f66f7cfdecd5"/></dir></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/frontend/default/default/ve/brpopup/css/style.css ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ * html div#ve_popup {
2
+ position: absolute;
3
+ overflow:hidden;
4
+ top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop + (documentElement.clientHeight-this.clientHeight): document.body.scrollTop +(document.body.clientHeight-this.clientHeight));
5
+ }
6
+ #ve_popup{font-size: 12px; color:#666; position:fixed;_position: absolute; right:0; bottom:0; height:130px; }
7
+ #ve_popup_right{ padding-right:7px; background:url(../images/right.gif) no-repeat right top;}
8
+ #ve_popup_left{background:url(../images/left.gif) no-repeat left top;padding-left:7px;}
9
+ #ve_popup_header{color:#690;display:block; height:20px; line-height:20px; font-size:11px;}
10
+ #ve_popup_header a{color:#690;text-decoration:none;}
11
+ #ve_popup_toolbar{float:right; padding:0; margin:0; list-style:none; overflow:hidden; height:15px;}
12
+ #ve_popup_toolbar li{display:inline;}
13
+ #ve_popup_toolbar li a{background-image:url(../images/button.gif); background-repeat:no-repeat; width:30px; height:0; padding-top:15px; overflow:hidden; float:left;}
14
+ #ve_popup_toolbar li a.close{background-position: 0 0;}
15
+ #ve_popup_toolbar li a.close:hover{background-position: 0 -15px;}
16
+ #ve_popup_toolbar li a.min{background-position: -30px 0;}
17
+ #ve_popup_toolbar li a.min:hover{background-position: -30px -15px;}
18
+ #ve_popup_toolbar li a.max{background-position: -60px 0;}
19
+ #ve_popup_toolbar li a.max:hover{background-position: -60px -15px;}
20
+ #ve_popup_content{display:block; margin:0; padding:0;line-height:1.6em; overflow:hidden;}
21
+ #ve_popup_content img{
22
+ border:0px;
23
+ }
skin/frontend/default/default/ve/brpopup/images/button.gif ADDED
Binary file
skin/frontend/default/default/ve/brpopup/images/left.gif ADDED
Binary file
skin/frontend/default/default/ve/brpopup/images/right.gif ADDED
Binary file