Version Notes
enable to adding downloadable products in account
Download this release
Release Info
Developer | Magento Core Team |
Extension | Amm_Product |
Version | 1.0.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.0.2 to 1.0.0.4
app/design/frontend/base/default/template/product/show.phtml
ADDED
@@ -0,0 +1,1629 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$resultRequest = $this->productList();
|
4 |
+
|
5 |
+
$productEdit = $this->getEditProduct();
|
6 |
+
|
7 |
+
$pep = split('\.',@$productEdit['price']);
|
8 |
+
$price = $pep[0];
|
9 |
+
//var_dump($productEdit);
|
10 |
+
|
11 |
+
$category_id_hidden = '';
|
12 |
+
foreach($productEdit['category_id'] as $k=>$v){
|
13 |
+
$category_id_hidden .= ','.$v;
|
14 |
+
}
|
15 |
+
|
16 |
+
?>
|
17 |
+
|
18 |
+
|
19 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/extjs/fix-defer-before.js"></script>
|
20 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/prototype/window.js"></script>
|
21 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/hash.js"></script>
|
22 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/events.js"></script>
|
23 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/loader.js"></script>
|
24 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/grid.js"></script>
|
25 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/tabs.js"></script>
|
26 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/form.js"></script>
|
27 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/accordion.js"></script>
|
28 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/tools.js"></script>
|
29 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/uploader.js"></script>
|
30 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/product.js"></script>
|
31 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/calendar/calendar.js"></script>
|
32 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/calendar/calendar-setup.js"></script>
|
33 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/extjs/ext-tree.js"></script>
|
34 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/extjs/fix-defer.js"></script>
|
35 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/extjs/ext-tree-checkbox.js"></script>
|
36 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/wysiwyg/tiny_mce/setup.js"></script>
|
37 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/variables.js"></script>
|
38 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/wysiwyg/widget.js"></script>
|
39 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/browser.js"></script>
|
40 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/extjs/fix-defer-before.js"></script>
|
41 |
+
|
42 |
+
|
43 |
+
<!--
|
44 |
+
**
|
45 |
+
** list products
|
46 |
+
**
|
47 |
+
-->
|
48 |
+
|
49 |
+
<div class="request_table">
|
50 |
+
|
51 |
+
<?php echo $this->getPagerHtml(); ?>
|
52 |
+
<div class="box-account box-recent">
|
53 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
54 |
+
<tr>
|
55 |
+
<th>Created</th>
|
56 |
+
<th>Updated</th>
|
57 |
+
<th>SKU</th>
|
58 |
+
<th>Name</th>
|
59 |
+
<th>Price [USD]</th>
|
60 |
+
<th>Status</th>
|
61 |
+
<th>Action</th>
|
62 |
+
</tr>
|
63 |
+
<?php
|
64 |
+
if($resultRequest){ foreach($resultRequest as $rt){
|
65 |
+
$dca = split(' ',$rt['created_at']);
|
66 |
+
$dua = split(' ',$rt['updated_at']);
|
67 |
+
$prc = split('\.',$rt['price']);
|
68 |
+
$sts = ($rt['status']==1?'<span style="color:green;">Enabled</span>':'Disabled');
|
69 |
+
|
70 |
+
echo '<tr class="clicktagtr">
|
71 |
+
<td>'.$dca[0].'</td>
|
72 |
+
<td>'.$dua[0].'</td>
|
73 |
+
<td>'.$rt['sku'].'</td>
|
74 |
+
<td>'.substr(strip_tags($rt['name']),0,45).'...</td>
|
75 |
+
<td>'.$prc[0].'</td>
|
76 |
+
<td>'.$sts.'</td>
|
77 |
+
<td>[<a href="/product/index/edit?ep='.$rt['entity_id'].'&limit='.$resultRequest[0]['limit'].'&p='.$resultRequest[0]['page'].'">edit</a>][<a href="javascript:void();" onclick="javascript:sureDelete('.$rt['entity_id'].')">delete</a>]</td>
|
78 |
+
</tr>';
|
79 |
+
}
|
80 |
+
}
|
81 |
+
///product/index/delete?p='.$rt['entity_id'].'
|
82 |
+
?>
|
83 |
+
</table>
|
84 |
+
</div>
|
85 |
+
<?php echo $this->getPagerHtml(); ?>
|
86 |
+
|
87 |
+
<p> </p>
|
88 |
+
</div>
|
89 |
+
|
90 |
+
<!--
|
91 |
+
**
|
92 |
+
** end list products
|
93 |
+
**
|
94 |
+
-->
|
95 |
+
|
96 |
+
|
97 |
+
<div style="clear:both;"></div>
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
<hr />
|
102 |
+
|
103 |
+
|
104 |
+
|
105 |
+
|
106 |
+
|
107 |
+
<p> </p>
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
<div class="showcase">
|
114 |
+
<h3>Add and Edit Product</h3>
|
115 |
+
<!--
|
116 |
+
**
|
117 |
+
** form
|
118 |
+
**
|
119 |
+
-->
|
120 |
+
<form action="" method="post" name="showcaseform" id="product_edit_form" enctype="multipart/form-data">
|
121 |
+
|
122 |
+
<table width="100%" border="0" cellpadding="2" cellspacing="0">
|
123 |
+
<tr>
|
124 |
+
<td width="170">
|
125 |
+
<div class="showcase_attribute">
|
126 |
+
|
127 |
+
<strong>Attribute set:</strong>
|
128 |
+
<!--
|
129 |
+
**
|
130 |
+
** set
|
131 |
+
**
|
132 |
+
-->
|
133 |
+
<div><select name="set" id="set" onchange="getSetSelectAttribute();">
|
134 |
+
<?php
|
135 |
+
|
136 |
+
$entity_type_id = 4;
|
137 |
+
|
138 |
+
$entitytype = Mage::getModel('eav/entity_type')->getCollection()->addFieldToFilter('entity_model', 'catalog/product');
|
139 |
+
foreach($entitytype as $arrenty){
|
140 |
+
$entity_type_id = $arrenty->getData('entity_type_id');
|
141 |
+
}
|
142 |
+
|
143 |
+
$attributes = Mage::getModel('eav/entity_attribute_set')->getCollection()->addFieldToFilter('entity_type_id', $entity_type_id);
|
144 |
+
|
145 |
+
foreach($attributes as $arrt){
|
146 |
+
echo '<option value="'.$arrt->getData('attribute_set_id').'" '.(@$productEdit['attribute_set_id']==$arrt->getData('attribute_set_id')?'selected="selected"':'').'> '.$arrt->getData('attribute_set_name').'</option>';
|
147 |
+
}
|
148 |
+
|
149 |
+
?>
|
150 |
+
</select>
|
151 |
+
</div>
|
152 |
+
<!--
|
153 |
+
**
|
154 |
+
** type
|
155 |
+
**
|
156 |
+
-->
|
157 |
+
<input type="hidden" name="type" value="downloadable" />
|
158 |
+
|
159 |
+
<div class="showcase_menu">
|
160 |
+
<!--
|
161 |
+
**
|
162 |
+
** Categories
|
163 |
+
**
|
164 |
+
-->
|
165 |
+
<strong>Categories:</strong>
|
166 |
+
<div>
|
167 |
+
|
168 |
+
<?php echo $this->selectTreeCategory(Mage::app()->getStore()->getRootCategoryId(), @$productEdit['category_id']); ?>
|
169 |
+
|
170 |
+
</div>
|
171 |
+
</div>
|
172 |
+
<div>
|
173 |
+
<p> </p>
|
174 |
+
<button onclick="javascript:newproduct();return false;">Clear form, add product</button>
|
175 |
+
</div>
|
176 |
+
</div>
|
177 |
+
|
178 |
+
</td><td>
|
179 |
+
|
180 |
+
<div class="block">
|
181 |
+
<!--
|
182 |
+
**
|
183 |
+
** General
|
184 |
+
**
|
185 |
+
** product[name]
|
186 |
+
** product[description]
|
187 |
+
** product[short_description]
|
188 |
+
** product[sku]
|
189 |
+
** product[status]
|
190 |
+
** product[visibility]
|
191 |
+
**
|
192 |
+
-->
|
193 |
+
<div class="block-title" id="generaltitle" onclick="showdiv('generaldiv');"><strong>General</strong></div>
|
194 |
+
<div id="generaldiv">
|
195 |
+
<p class="fieldbg"><strong>Name <span style="color:red;">*</span></strong><br />
|
196 |
+
<input type="text" name="product[name]" value="<?php echo @$productEdit['name']; ?>" /></p>
|
197 |
+
|
198 |
+
<p class="fieldbg"><strong>Description <span style="color:red;">*</span></strong><br />
|
199 |
+
<textarea name="product[description]"><?php echo @$productEdit['description']; ?></textarea>
|
200 |
+
</p>
|
201 |
+
|
202 |
+
<p class="fieldbg"><strong>Short description <span style="color:red;">*</span></strong><br />
|
203 |
+
<textarea name="product[short_description]"><?php echo @$productEdit['short_description']; ?></textarea></p>
|
204 |
+
|
205 |
+
<p class="fieldbg"><strong>SKU <span style="color:red;">*</span></strong><br />
|
206 |
+
<input type="text" name="product[sku]" value="<?php echo @$productEdit['sku']; ?>" /></p>
|
207 |
+
|
208 |
+
<p class="fieldbg"><strong>Status <span style="color:red;">*</span></strong><br />
|
209 |
+
<select name="product[status]">
|
210 |
+
<option value="1" <?=(@$productEdit['status']==1?'selected="selected"':'')?>>Enabled</option>
|
211 |
+
<option value="2" <?=(@$productEdit['status']==2?'selected="selected"':'')?>>Disabled</option>
|
212 |
+
</select></p>
|
213 |
+
|
214 |
+
<input type="hidden" name="product[visibility]" value="4" />
|
215 |
+
</div>
|
216 |
+
|
217 |
+
<!--
|
218 |
+
**
|
219 |
+
** Prices
|
220 |
+
**
|
221 |
+
** product[price]
|
222 |
+
**
|
223 |
+
-->
|
224 |
+
<div class="block-title" id="pricetitle" onclick="showdiv('pricediv');"><strong>Prices</strong></div>
|
225 |
+
<div id="pricediv">
|
226 |
+
<p class="fieldbg"><strong>Price <span style="color:red;">*</span> [USD]</strong><br />
|
227 |
+
<input type="text" name="product[price]" value="<?php echo @$price; ?>" /></p>
|
228 |
+
</div>
|
229 |
+
|
230 |
+
|
231 |
+
<!--
|
232 |
+
**
|
233 |
+
** Images
|
234 |
+
**
|
235 |
+
-->
|
236 |
+
<div class="block-title" id="imagetitle" onclick="showdiv('imagediv');"><strong>Images</strong></div>
|
237 |
+
<div id="imagediv">
|
238 |
+
|
239 |
+
<div id="media_gallery_content">
|
240 |
+
<div class="grid">
|
241 |
+
|
242 |
+
<script type="text/javascript">
|
243 |
+
var save = [];
|
244 |
+
</script>
|
245 |
+
|
246 |
+
<table cellspacing="0" width="100%">
|
247 |
+
<col width="70" />
|
248 |
+
<col />
|
249 |
+
<col width="30" />
|
250 |
+
<col width="40" />
|
251 |
+
<col width="40" />
|
252 |
+
<col width="40" />
|
253 |
+
<col width="50" />
|
254 |
+
<col width="50" />
|
255 |
+
<thead>
|
256 |
+
<tr class="headings">
|
257 |
+
<th><?php echo Mage::helper('catalog')->__('Image') ?></th>
|
258 |
+
<th><?php echo Mage::helper('catalog')->__('Label') ?></th>
|
259 |
+
<th><?php echo Mage::helper('catalog')->__('Sort') ?></th>
|
260 |
+
<th><?php echo Mage::helper('catalog')->__('Image') ?></th>
|
261 |
+
<th><?php echo Mage::helper('catalog')->__('Small') ?></th>
|
262 |
+
<th><?php echo Mage::helper('catalog')->__('Thumb') ?></th>
|
263 |
+
<th><?php echo Mage::helper('catalog')->__('Exclude') ?></th>
|
264 |
+
<th class="last"><?php echo Mage::helper('catalog')->__('Remove') ?></th>
|
265 |
+
</tr>
|
266 |
+
</thead>
|
267 |
+
|
268 |
+
|
269 |
+
<tbody id="media_gallery_content_list">
|
270 |
+
|
271 |
+
<tr id="media_gallery_content_template" class="template no-display">
|
272 |
+
<td class="cell-image"><div class="place-holder" onmouseover="media_gallery_contentJsObject.loadImage('__file__')"><span>Roll Over for preview</span></div><img src="http://testmagento.com/skin/adminhtml/default/default/images/spacer.gif" width="60" style="display:none;" alt="" /></td>
|
273 |
+
<td class="cell-label"><input type="text" class="input-text" onkeyup="media_gallery_contentJsObject.updateImage('__file__')" onchange="media_gallery_contentJsObject.updateImage('__file__')" /></td>
|
274 |
+
<td class="cell-position"><input type="text" style="width:30px;" class="input-text validate-number" onkeyup="media_gallery_contentJsObject.updateImage('__file__')" onchange="media_gallery_contentJsObject.updateImage('__file__')" /></td>
|
275 |
+
<td class="cell-image a-center"><input type="radio" name="product[image]" onclick="media_gallery_contentJsObject.setProductImages('__file__')" value="__file__" /></td>
|
276 |
+
<td class="cell-small_image a-center"><input type="radio" name="product[small_image]" onclick="media_gallery_contentJsObject.setProductImages('__file__')" value="__file__" /></td>
|
277 |
+
<td class="cell-thumbnail a-center"><input type="radio" name="product[thumbnail]" onclick="media_gallery_contentJsObject.setProductImages('__file__')" value="__file__" /></td>
|
278 |
+
<td class="cell-disable a-center"><input type="checkbox" onclick="media_gallery_contentJsObject.updateImage('__file__')" /></td>
|
279 |
+
<td class="cell-remove a-center last"><input type="checkbox" onclick="media_gallery_contentJsObject.updateImage('__file__')" /></td>
|
280 |
+
</tr>
|
281 |
+
<tr id="media_gallery_content-image-0">
|
282 |
+
<td class="cell-image">No</td>
|
283 |
+
<td class="cell-label"><input type="hidden" /> </td>
|
284 |
+
<td class="cell-position"><input type="hidden" /> </td>
|
285 |
+
<td class="cell-image a-center"><input type="radio" name="product[image]" onclick="media_gallery_contentJsObject.setProductImages('no_selection')" value="no_selection" /></td>
|
286 |
+
<td class="cell-small_image a-center"><input type="radio" name="product[small_image]" onclick="media_gallery_contentJsObject.setProductImages('no_selection')" value="no_selection" /></td>
|
287 |
+
<td class="cell-thumbnail a-center"><input type="radio" name="product[thumbnail]" onclick="media_gallery_contentJsObject.setProductImages('no_selection')" value="no_selection" /></td>
|
288 |
+
<td class="cell-disable"><input type="hidden" /> </td>
|
289 |
+
<td class="cell-remove last"><input type="hidden" /> </td>
|
290 |
+
</tr>
|
291 |
+
|
292 |
+
<?php foreach($productEdit['image'] as $kv){ ?>
|
293 |
+
|
294 |
+
<script type="text/javascript">
|
295 |
+
var save_obj = {
|
296 |
+
"value_id":"<?php echo $kv['value_id']; ?>",
|
297 |
+
"file":"<?php echo $kv['value']; ?>",
|
298 |
+
"label":"<?php echo $kv['label']; ?>",
|
299 |
+
"position":"<?php echo $kv['position']; ?>",
|
300 |
+
"disabled":"<?php echo $kv['disabled']; ?>",
|
301 |
+
"label_default":"<?php echo $kv['label']; ?>",
|
302 |
+
"position_default":"<?php echo $kv['position']; ?>",
|
303 |
+
"disabled_default":"<?php echo $kv['disabled']; ?>",
|
304 |
+
"url":"<?php echo Mage::getBaseUrl().'media/catalog/product'.$kv['value']; ?>",
|
305 |
+
"removed":"0"
|
306 |
+
}
|
307 |
+
|
308 |
+
save.push(save_obj);
|
309 |
+
|
310 |
+
</script>
|
311 |
+
|
312 |
+
<? } ?>
|
313 |
+
</tbody>
|
314 |
+
|
315 |
+
|
316 |
+
|
317 |
+
|
318 |
+
<tfoot>
|
319 |
+
<tr>
|
320 |
+
<td colspan="100" class="last" style="padding:8px">
|
321 |
+
<!--
|
322 |
+
**
|
323 |
+
** flex images
|
324 |
+
**
|
325 |
+
-->
|
326 |
+
<div id="id_2ae1264f5c19e1db1580e98f51ec3175_Uploader-flash" class="flex" style="position:relative;float:right;">
|
327 |
+
<embed quality="high" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="always" left="100" top="300" src="<?php echo Mage::getBaseUrl(); ?>skin/adminhtml/default/default/media/uploader.swf" wmode="transparent" name="flexMovieUID1" flashvars="bridgeName=flexMovieUID1bridge" allowfullscreen="true" height="20" width="230">
|
328 |
+
</div>
|
329 |
+
<div id="id_2ae1264f5c19e1db1580e98f51ec3175_Uploader" class="uploader">
|
330 |
+
<div class="buttons">
|
331 |
+
<div id="id_2ae1264f5c19e1db1580e98f51ec3175_Uploader-install-flash" style="display:none">
|
332 |
+
This content requires last version of Adobe Flash Player. <a href="http://www.adobe.com/go/getflash/">Get Flash</a> </div>
|
333 |
+
</div>
|
334 |
+
<div class="clear"></div>
|
335 |
+
<div class="no-display" id="id_2ae1264f5c19e1db1580e98f51ec3175_Uploader-template">
|
336 |
+
<div id="{{id}}" class="file-row">
|
337 |
+
<span class="file-info">{{name}} ({{size}})</span>
|
338 |
+
<span class="delete-button"><button id="{{id}}-delete" title="Remove" type="button" class="scalable delete" onclick="id_2ae1264f5c19e1db1580e98f51ec3175_UploaderJsObject.removeFile('{{fileId}}')" style=""><span><span><span>Remove</span></span></span></button></span>
|
339 |
+
<span class="progress-text"></span>
|
340 |
+
<div class="clear"></div>
|
341 |
+
</div>
|
342 |
+
</div>
|
343 |
+
<div class="no-display" id="id_2ae1264f5c19e1db1580e98f51ec3175_Uploader-template-progress">
|
344 |
+
{{percent}}% {{uploaded}} / {{total}}
|
345 |
+
</div>
|
346 |
+
|
347 |
+
|
348 |
+
</div>
|
349 |
+
|
350 |
+
|
351 |
+
|
352 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/lib/flex.js"></script>
|
353 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/mage/adminhtml/flexuploader.js"></script>
|
354 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/lib/FABridge.js"></script>
|
355 |
+
|
356 |
+
|
357 |
+
|
358 |
+
<script type="text/javascript">
|
359 |
+
//<![CDATA[
|
360 |
+
|
361 |
+
var maxUploadFileSizeInBytes = 10097152;
|
362 |
+
var maxUploadFileSize = '10M';
|
363 |
+
|
364 |
+
id_2ae1264f5c19e1db1580e98f51ec3175_UploaderJsObject = new Flex.Uploader('id_2ae1264f5c19e1db1580e98f51ec3175_Uploader', '<?php echo Mage::getBaseUrl(); ?>skin/adminhtml/default/default/media/uploader.swf', {"url":"<?php echo str_replace('/','\/', Mage::getBaseUrl()); ?>product\/index\/upload\/key\/d9c878b694d1a2785b319b0eb0cad41b\/?SID=99gb4uemdf2ihudgiqv4t3igl4","params":{"form_key":"gn0aHDfjLLxXQFGN"},"file_field":"image","filters":{"images":{"label":"Images (.gif, .jpg, .png)","files":["*.gif","*.jpg","*.jpeg","*.png"]}}});
|
365 |
+
|
366 |
+
if (varienGlobalEvents) {
|
367 |
+
varienGlobalEvents.attachEventHandler('tabChangeBefore', id_2ae1264f5c19e1db1580e98f51ec3175_UploaderJsObject.onContainerHideBefore);
|
368 |
+
}
|
369 |
+
|
370 |
+
//]]>
|
371 |
+
</script>
|
372 |
+
|
373 |
+
</td>
|
374 |
+
</tr>
|
375 |
+
</tfoot>
|
376 |
+
</table>
|
377 |
+
|
378 |
+
<!--
|
379 |
+
**
|
380 |
+
** form_key
|
381 |
+
** product[media_gallery][images] ... media_gallery_content_save
|
382 |
+
** product[media_gallery][values] ... media_gallery_content_save_image
|
383 |
+
**
|
384 |
+
-->
|
385 |
+
<input type="hidden" name="form_key" value="gn0aHDfjLLxXQFGN" />
|
386 |
+
<input type="hidden" name="product[media_gallery][images]" id="media_gallery_content_save" value="" />
|
387 |
+
<input type="hidden" name="product[media_gallery][values]" id="media_gallery_content_save_image" value="" />
|
388 |
+
|
389 |
+
</div>
|
390 |
+
</div>
|
391 |
+
|
392 |
+
</div>
|
393 |
+
|
394 |
+
|
395 |
+
<div id="addnewfields">
|
396 |
+
<!--additional fields-->
|
397 |
+
</div>
|
398 |
+
|
399 |
+
<!--
|
400 |
+
**
|
401 |
+
** Downloadable Information
|
402 |
+
**
|
403 |
+
-->
|
404 |
+
<div class="block-title" id="downlodabletitle" onclick="showdiv('downlodablediv');"><strong>Downloadable Information</strong></div>
|
405 |
+
<div id="downlodablediv">
|
406 |
+
|
407 |
+
<!-- downloadable -->
|
408 |
+
<div id="product_info_tabs_downloadable_items_content">
|
409 |
+
<script type="text/javascript">
|
410 |
+
//<![CDATA[>
|
411 |
+
|
412 |
+
var uploaderTemplate = '<div class="no-display" id="[[idName]]-template">' +
|
413 |
+
'<div id="{{id}}" class="file-row file-row-narrow">' +
|
414 |
+
'<span class="file-info">' +
|
415 |
+
'<span class="file-info-name">{{name}}</span>' +
|
416 |
+
' ' +
|
417 |
+
'<span class="file-info-size">({{size}})</span>' +
|
418 |
+
'</span>' +
|
419 |
+
'<span class="progress-text"></span>' +
|
420 |
+
'<div class="clear"></div>' +
|
421 |
+
'</div>' +
|
422 |
+
'</div>' +
|
423 |
+
'<div class="no-display" id="[[idName]]-template-progress">' +
|
424 |
+
'{{percent}}% {{uploaded}} / {{total}}' +
|
425 |
+
'</div>';
|
426 |
+
|
427 |
+
var fileListTemplate = '<span class="file-info">' +
|
428 |
+
'<span class="file-info-name">{{name}}</span>' +
|
429 |
+
' ' +
|
430 |
+
'<span class="file-info-size">({{size}})</span>' +
|
431 |
+
'</span>';
|
432 |
+
|
433 |
+
var Downloadable = {
|
434 |
+
uploaderObj : $H({}),
|
435 |
+
objCount : 0,
|
436 |
+
setUploaderObj : function(type, key, obj){
|
437 |
+
if (!this.uploaderObj.get(type)) {
|
438 |
+
this.uploaderObj.set(type, $H({}));
|
439 |
+
}
|
440 |
+
this.uploaderObj.get(type).set(key, obj);
|
441 |
+
},
|
442 |
+
getUploaderObj : function(type, key){
|
443 |
+
try {
|
444 |
+
return this.uploaderObj.get(type).get(key);
|
445 |
+
} catch (e) {
|
446 |
+
try {
|
447 |
+
console.log(e);
|
448 |
+
} catch (e2) {
|
449 |
+
alert(e.name + '\n' + e.message);
|
450 |
+
}
|
451 |
+
}
|
452 |
+
},
|
453 |
+
unsetUploaderObj : function(type, key){
|
454 |
+
try {
|
455 |
+
this.uploaderObj.get(type).unset(key);
|
456 |
+
} catch (e) {
|
457 |
+
try {
|
458 |
+
console.log(e);
|
459 |
+
} catch (e2) {
|
460 |
+
alert(e.name + '\n' + e.message);
|
461 |
+
}
|
462 |
+
}
|
463 |
+
},
|
464 |
+
massUploadByType : function(type){
|
465 |
+
try {
|
466 |
+
this.uploaderObj.get(type).each(function(item){
|
467 |
+
container = item.value.container.up('tr');
|
468 |
+
if (container.visible() && !container.hasClassName('no-display')) {
|
469 |
+
item.value.upload();
|
470 |
+
} else {
|
471 |
+
Downloadable.unsetUploaderObj(type, item.key);
|
472 |
+
}
|
473 |
+
});
|
474 |
+
} catch (e) {
|
475 |
+
try {
|
476 |
+
console.log(e);
|
477 |
+
} catch (e2) {
|
478 |
+
alert(e.name + '\n' + e.message);
|
479 |
+
}
|
480 |
+
}
|
481 |
+
}
|
482 |
+
};
|
483 |
+
|
484 |
+
Downloadable.FileUploader = Class.create();
|
485 |
+
Downloadable.FileUploader.prototype = {
|
486 |
+
type : null,
|
487 |
+
key : null, //key, identifier of uploader obj
|
488 |
+
elmContainer : null, //insert Flex object and templates to elmContainer
|
489 |
+
fileValueName : null, //name of field of JSON data of saved file
|
490 |
+
fileValue : null,
|
491 |
+
idName : null, //id name of elements for unique uploader
|
492 |
+
uploaderText: uploaderTemplate,
|
493 |
+
uploaderSyntax : /(^|.|\r|\n)(\[\[(\w+)\]\])/,
|
494 |
+
uploaderObj : $H({}),
|
495 |
+
config : null,
|
496 |
+
initialize: function (type, key, elmContainer, fileValueName, fileValue ,idName, config) {
|
497 |
+
this.type = type;
|
498 |
+
this.key = key;
|
499 |
+
this.elmContainer = elmContainer;
|
500 |
+
this.fileValueName = fileValueName;
|
501 |
+
this.fileValue = fileValue;
|
502 |
+
this.idName = idName;
|
503 |
+
this.config = config;
|
504 |
+
uploaderTemplate = new Template(this.uploaderText, this.uploaderSyntax);
|
505 |
+
Element.insert(
|
506 |
+
elmContainer,
|
507 |
+
{'top' : uploaderTemplate.evaluate({
|
508 |
+
'idName' : this.idName,
|
509 |
+
'fileValueName' : this.fileValueName,
|
510 |
+
'uploaderObj' : 'Downloadable.getUploaderObj(\''+this.type+'\', \''+this.key+'\')'
|
511 |
+
})
|
512 |
+
}
|
513 |
+
);
|
514 |
+
if ($(this.idName+'_save')) {
|
515 |
+
$(this.idName+'_save').value = this.fileValue.toJSON
|
516 |
+
? this.fileValue.toJSON()
|
517 |
+
: Object.toJSON(this.fileValue);
|
518 |
+
}
|
519 |
+
Downloadable.setUploaderObj(
|
520 |
+
this.type,
|
521 |
+
this.key,
|
522 |
+
new Flex.Uploader(this.idName, 'http://testmagento.com/skin/adminhtml/default/default/media/uploaderSingle.swf', this.config)
|
523 |
+
);
|
524 |
+
if (varienGlobalEvents) {
|
525 |
+
varienGlobalEvents.attachEventHandler('tabChangeBefore', Downloadable.getUploaderObj(type, key).onContainerHideBefore);
|
526 |
+
}
|
527 |
+
new Downloadable.FileList(this.idName, Downloadable.getUploaderObj(type, key));
|
528 |
+
}
|
529 |
+
}
|
530 |
+
|
531 |
+
Downloadable.FileList = Class.create();
|
532 |
+
Downloadable.FileList.prototype = {
|
533 |
+
file: [],
|
534 |
+
containerId: '',
|
535 |
+
container: null,
|
536 |
+
uploader: null,
|
537 |
+
fileListTemplate: fileListTemplate,
|
538 |
+
templatePattern : /(^|.|\r|\n)({{(\w+)}})/,
|
539 |
+
listTemplate : null,
|
540 |
+
initialize: function (containerId, uploader) {
|
541 |
+
this.containerId = containerId,
|
542 |
+
this.container = $(this.containerId);
|
543 |
+
this.uploader = uploader;
|
544 |
+
this.uploader.onFilesComplete = this.handleUploadComplete.bind(this);
|
545 |
+
this.file = this.getElement('save').value.evalJSON();
|
546 |
+
this.listTemplate = new Template(this.fileListTemplate, this.templatePattern);
|
547 |
+
this.updateFiles();
|
548 |
+
this.uploader.onFileRemoveAll = this.handleFileRemoveAll.bind(this);
|
549 |
+
this.uploader.onFileSelect = this.handleFileSelect.bind(this);
|
550 |
+
},
|
551 |
+
handleFileRemoveAll: function(fileId) {
|
552 |
+
$(this.containerId+'-new').hide();
|
553 |
+
$(this.containerId+'-old').show();
|
554 |
+
},
|
555 |
+
handleFileSelect: function() {
|
556 |
+
$(this.containerId+'_type').checked = true;
|
557 |
+
},
|
558 |
+
getElement: function (name) {
|
559 |
+
return $(this.containerId + '_' + name);
|
560 |
+
},
|
561 |
+
handleUploadComplete: function (files) {
|
562 |
+
files.each(function(item) {
|
563 |
+
if (!item.response.isJSON()) {
|
564 |
+
try {
|
565 |
+
console.log(item.response);
|
566 |
+
} catch (e2) {
|
567 |
+
alert(item.response);
|
568 |
+
}
|
569 |
+
return;
|
570 |
+
}
|
571 |
+
var response = item.response.evalJSON();
|
572 |
+
if (response.error) {
|
573 |
+
return;
|
574 |
+
}
|
575 |
+
var newFile = {};
|
576 |
+
newFile.file = response.file;
|
577 |
+
newFile.name = response.name;
|
578 |
+
newFile.size = response.size;
|
579 |
+
newFile.status = 'new';
|
580 |
+
this.file[0] = newFile;
|
581 |
+
this.uploader.removeFile(item.id);
|
582 |
+
}.bind(this));
|
583 |
+
this.updateFiles();
|
584 |
+
},
|
585 |
+
updateFiles: function() {
|
586 |
+
this.getElement('save').value = this.file.toJSON
|
587 |
+
? this.file.toJSON()
|
588 |
+
: Object.toJSON(this.file);
|
589 |
+
this.file.each(function(row){
|
590 |
+
row.size = this.uploader.formatSize(row.size);
|
591 |
+
$(this.containerId + '-old').innerHTML = this.listTemplate.evaluate(row);
|
592 |
+
$(this.containerId + '-new').hide();
|
593 |
+
$(this.containerId + '-old').show();
|
594 |
+
}.bind(this));
|
595 |
+
}
|
596 |
+
}
|
597 |
+
|
598 |
+
var alertAlreadyDisplayed = false;
|
599 |
+
|
600 |
+
Validation.addAllThese([
|
601 |
+
['validate-downloadable-file', 'Please upload a file.', function(v,element) {
|
602 |
+
linkType = element.up(0).down('input[value="file"]');
|
603 |
+
if (linkType.checked && (v == '' || v == '[]')) {
|
604 |
+
newFileContainer = element.up(0).down('div.new-file');
|
605 |
+
if (!alertAlreadyDisplayed && (newFileContainer.empty() || newFileContainer.style.display != 'none')) {
|
606 |
+
alertAlreadyDisplayed = true;
|
607 |
+
alert('There are files that were selected but not uploaded yet. Please upload or remove them first');
|
608 |
+
}
|
609 |
+
return false;
|
610 |
+
}
|
611 |
+
return true;
|
612 |
+
}]
|
613 |
+
]);
|
614 |
+
|
615 |
+
Validation.addAllThese([
|
616 |
+
['validate-downloadable-url', 'Please specify Url.', function(v,element) {
|
617 |
+
linkType = element.up(0).down('input[value="url"]');
|
618 |
+
if (linkType.checked && v == '') {
|
619 |
+
return false;
|
620 |
+
}
|
621 |
+
return true;
|
622 |
+
}]
|
623 |
+
]);
|
624 |
+
//]]>
|
625 |
+
</script>
|
626 |
+
|
627 |
+
<div class="entry-edit">
|
628 |
+
<dl id="tab_content_downloadableInfo" name="tab_content_downloadableInfo" class="accordion">
|
629 |
+
|
630 |
+
<!--
|
631 |
+
**
|
632 |
+
** Samples
|
633 |
+
**
|
634 |
+
-->
|
635 |
+
<dt id="dt-samples" class=""><strong>Samples</strong></dt>
|
636 |
+
<dd id="dd-samples" class="">
|
637 |
+
<div class="fieldset" style="margin:0px; padding:3px;">
|
638 |
+
<table cellspacing="0" class="form-list">
|
639 |
+
<tbody>
|
640 |
+
<tr class="headings">
|
641 |
+
<td class="label"><label for="name">Title</label>
|
642 |
+
</td>
|
643 |
+
<td class="value">
|
644 |
+
<input type="text" class="input-text" name="product[samples_title]" value="<?php echo @$productEdit['samples_title']; ?>" />
|
645 |
+
</td>
|
646 |
+
</tr>
|
647 |
+
</tbody>
|
648 |
+
</table>
|
649 |
+
<br />
|
650 |
+
<div class="grid">
|
651 |
+
<div class="hor-scroll">
|
652 |
+
<table cellspacing="0" class="data border">
|
653 |
+
<col />
|
654 |
+
<col width="1" />
|
655 |
+
<col width="1" />
|
656 |
+
<col width="1" />
|
657 |
+
<thead>
|
658 |
+
<tr class="headings">
|
659 |
+
<th>Title <span class="required">*</span></th>
|
660 |
+
<th><span class="nobr">Sort Order</span></th>
|
661 |
+
<th> </th>
|
662 |
+
</tr>
|
663 |
+
</thead>
|
664 |
+
<tfoot>
|
665 |
+
<tr>
|
666 |
+
<td colspan="4" class="a-right"><button id="add_sample_item" title="Add New Row" type="button" class="scalable add" onclick="" style=""><span><span><span>Add New Row</span></span></span></button> <button title="Upload Files" type="button" class="scalable " onclick="Downloadable.massUploadByType('samples')" style=""><span><span><span>Upload Files</span></span></span></button></td>
|
667 |
+
</tr>
|
668 |
+
</tfoot>
|
669 |
+
<tbody id="sample_items_body">
|
670 |
+
</tbody>
|
671 |
+
</table>
|
672 |
+
</div>
|
673 |
+
</div>
|
674 |
+
</div>
|
675 |
+
<script type="text/javascript">
|
676 |
+
|
677 |
+
function hidesampletr(id){
|
678 |
+
document.getElementById('sampletr1'+id).style.display='none';
|
679 |
+
document.getElementById('sampletr2'+id).style.display='none';
|
680 |
+
}
|
681 |
+
|
682 |
+
//<![CDATA[>
|
683 |
+
var sampleTemplate = '<tr id="sampletr1{{sample_id}}">'+
|
684 |
+
'<td>'+
|
685 |
+
'<input type="hidden" class="__delete__" name="downloadable[sample][{{id}}][is_delete]" value="" />'+
|
686 |
+
'<input type="hidden" name="downloadable[sample][{{id}}][sample_id]" value="{{sample_id}}" />'+
|
687 |
+
'<input type="text" class="required-entry input-text" name="downloadable[sample][{{id}}][title]" value="{{title}}" style="width:380px;" />'+
|
688 |
+
''+
|
689 |
+
'</td>'+
|
690 |
+
'<td class="a-center"><input type="text" name="downloadable[sample][{{id}}][sort_order]" value="{{sort_order}}" class="input-text sort" style="width:50px;" /></td>'+
|
691 |
+
'<td>'+
|
692 |
+
'<button type="button" class="scalable delete icon-btn delete-sample-item" onclick="hidesampletr({{sample_id}});"><span><span><span>Delete</span></span></span></button>'+
|
693 |
+
'</td>'+
|
694 |
+
'</tr><tr id="sampletr2{{sample_id}}">'+
|
695 |
+
'<td colspan="3">'+
|
696 |
+
'<div class="files-wide">'+
|
697 |
+
'<div class="row">'+
|
698 |
+
'<label for="downloadable_sample_{{id}}_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_{{id}}_file_type" name="downloadable[sample][{{id}}][type]" value="file"{{file_checked}} /> File:</label>'+
|
699 |
+
'<input type="hidden" class="validate-downloadable-file" id="downloadable_sample_{{id}}_file_save" name="downloadable[sample][{{id}}][file]" value="{{file_save}}" />'+
|
700 |
+
'<div id="downloadable_sample_{{id}}_file" class="uploader">'+
|
701 |
+
'<div id="downloadable_sample_{{id}}_file-old" class="file-row-info"></div>'+
|
702 |
+
'<div id="downloadable_sample_{{id}}_file-new" class="file-row-info new-file"></div>'+
|
703 |
+
'<div class="buttons">'+
|
704 |
+
'<div id="downloadable_sample_{{id}}_file-install-flash" style="display:none">'+
|
705 |
+
'This content requires last version of Adobe Flash Player. <a href="http://www.adobe.com/go/getflash/">Get Flash</a>'+
|
706 |
+
'</div>'+
|
707 |
+
'</div>'+
|
708 |
+
'<div class="clear"></div>'+
|
709 |
+
'</div>'+
|
710 |
+
'</div>'+
|
711 |
+
'<div class="row">'+
|
712 |
+
'<label for="downloadable_sample_{{id}}_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_{{id}}_url_type" name="downloadable[sample][{{id}}][type]" value="url"{{url_checked}} /> URL:</label> <input type="text" class="validate-downloadable-url input-text" name="downloadable[sample][{{id}}][sample_url]" value="{{sample_url}}" style="width:450px;" />'+
|
713 |
+
'</div>'+
|
714 |
+
'<div>'+
|
715 |
+
'<span id="downloadable_sample_{{id}}_container"></span>'+
|
716 |
+
'</div>'+
|
717 |
+
'</div>'+
|
718 |
+
'<br /><hr style="border:1px dashed #999999;" /><br /></td>'+
|
719 |
+
'</tr>';
|
720 |
+
var sampleItems = {
|
721 |
+
tbody : $('sample_items_body'),
|
722 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
723 |
+
templateText : sampleTemplate,
|
724 |
+
itemCount : 0,
|
725 |
+
add : function(data) {
|
726 |
+
alertAlreadyDisplayed = false;
|
727 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
728 |
+
|
729 |
+
if(!data.sample_id){
|
730 |
+
data = {};
|
731 |
+
data.sample_type = 'file';
|
732 |
+
data.sample_id = 0;
|
733 |
+
}
|
734 |
+
|
735 |
+
data.id = this.itemCount;
|
736 |
+
|
737 |
+
if (data.sample_type == 'url') {
|
738 |
+
data.url_checked = ' checked="checked"';
|
739 |
+
} else if (data.sample_type == 'file') {
|
740 |
+
data.file_checked = ' checked="checked"';
|
741 |
+
}
|
742 |
+
|
743 |
+
Element.insert(this.tbody, {'bottom':this.template.evaluate(data)});
|
744 |
+
|
745 |
+
scopeTitle = $('downloadable_sample_'+data.id+'_title');
|
746 |
+
if (scopeTitle) {
|
747 |
+
Event.observe(scopeTitle, 'click', function(event){
|
748 |
+
scopeElm = $(Event.findElement(event, 'input'));
|
749 |
+
titleField = scopeElm.up(0).down('input[type="text"]');
|
750 |
+
if (scopeElm.checked == true) {
|
751 |
+
titleField.disabled = true;
|
752 |
+
} else {
|
753 |
+
titleField.disabled = false;
|
754 |
+
}
|
755 |
+
});
|
756 |
+
}
|
757 |
+
if (!data.store_title && scopeTitle) {
|
758 |
+
scopeTitle.up(0).down('input[type="text"]').disabled = true;
|
759 |
+
scopeTitle.checked = true;
|
760 |
+
}
|
761 |
+
|
762 |
+
sampleUrl = $('downloadable_sample_'+data.id+'_url_type');
|
763 |
+
|
764 |
+
if (!data.file_save) {
|
765 |
+
data.file_save = [];
|
766 |
+
}
|
767 |
+
new Downloadable.FileUploader(
|
768 |
+
'samples',
|
769 |
+
data.id,
|
770 |
+
sampleUrl.up('td').down('div.uploader'),
|
771 |
+
'downloadable[sample]['+data.id+']',
|
772 |
+
data.file_save,
|
773 |
+
'downloadable_sample_'+data.id+'_file',
|
774 |
+
{"url":"<?php echo str_replace('/','\/',Mage::getBaseUrl()); ?>product\/index\/downloadableupload\/type\/samples\/key\/5f1c87fd0cea69563a4e829ba06b9616\/?SID=16bblj105lu5ir7p2v6arkd3s4","params":{"form_key":"gn0aHDfjLLxXQFGN"},"file_field":"samples","filters":{"all":{"label":"All Files","files":["*.*"]}},"replace_browse_with_remove":true,"width":"32","hide_upload_button":true} );
|
775 |
+
sampleUrl.advaiceContainer = 'downloadable_sample_'+data.id+'_container';
|
776 |
+
sampleFile = $('downloadable_sample_'+data.id+'_file_type');
|
777 |
+
sampleFile.advaiceContainer = 'downloadable_sample_'+data.id+'_container';
|
778 |
+
$('downloadable_sample_'+data.id+'_file_save').advaiceContainer = 'downloadable_sample_'+data.id+'_container';
|
779 |
+
|
780 |
+
this.itemCount++;
|
781 |
+
this.bindRemoveButtons();
|
782 |
+
},
|
783 |
+
remove : function(event){
|
784 |
+
var element = $(Event.findElement(event, 'tr'));
|
785 |
+
alertAlreadyDisplayed = false;
|
786 |
+
if(element){
|
787 |
+
element.down('input[type="hidden"].__delete__').value = '1';
|
788 |
+
element.down('div.flex').remove();
|
789 |
+
element.addClassName('no-display');
|
790 |
+
element.addClassName('ignore-validate');
|
791 |
+
element.hide();
|
792 |
+
}
|
793 |
+
},
|
794 |
+
bindRemoveButtons : function(){
|
795 |
+
var buttons = $$('tbody#sample_items_body .delete-sample-item');
|
796 |
+
for(var i=0;i<buttons.length;i++){
|
797 |
+
if(!$(buttons[i]).binded){
|
798 |
+
$(buttons[i]).binded = true;
|
799 |
+
Event.observe(buttons[i], 'click', this.remove.bind(this));
|
800 |
+
}
|
801 |
+
}
|
802 |
+
}
|
803 |
+
}
|
804 |
+
|
805 |
+
sampleItems.bindRemoveButtons();
|
806 |
+
|
807 |
+
if($('add_sample_item')){
|
808 |
+
Event.observe('add_sample_item', 'click', sampleItems.add.bind(sampleItems));
|
809 |
+
}
|
810 |
+
|
811 |
+
<? if(@$productEdit['sample']){ foreach($productEdit['sample'] as $psl){ ?>
|
812 |
+
|
813 |
+
sampleItems.add({"sample_id":"<?php echo $psl['sample_id']; ?>","title":"<?php echo $psl['title']; ?>","sample_url":<?php echo (isset($psl['sample_url'])?'"'.str_replace('/','\/',$psl['sample_url']).'"':'null'); ?>,"sample_type":"<?php echo $psl['sample_type']; ?>","sort_order":"<?php echo $psl['sort_order']; ?>","file_save":[{"file":"<?php echo str_replace('/','\/',$psl['sample_file']); ?>","name":"<?php echo str_replace('/a/l/','',$psl['sample_file']); ?>","size":<?php echo filesize(Mage_Downloadable_Model_Sample::getBasePath().$psl['sample_file']); ?>,"status":"old"}],"store_title":"<?php echo $psl['title']; ?>"});
|
814 |
+
|
815 |
+
<? }} ?>
|
816 |
+
|
817 |
+
//]]>
|
818 |
+
</script>
|
819 |
+
</dd>
|
820 |
+
|
821 |
+
<!--
|
822 |
+
**
|
823 |
+
** Links
|
824 |
+
**
|
825 |
+
-->
|
826 |
+
<dt id="dt-links" class=" open"><br /><strong>Links</strong></dt><dd id="dd-links" class=" open"><div class="fieldset" style="margin:0px; padding:3px;">
|
827 |
+
<table cellspacing="0" class="form-list">
|
828 |
+
<tbody>
|
829 |
+
<tr class="headings">
|
830 |
+
<td class="label"><label for="name">Title</label>
|
831 |
+
</td>
|
832 |
+
<td class="value">
|
833 |
+
<input type="text" class="input-text" id="downloadable_links_title" name="product[links_title]" value="<?php echo @$productEdit['links_title']; ?>" />
|
834 |
+
</td>
|
835 |
+
</tr>
|
836 |
+
</tbody>
|
837 |
+
</table>
|
838 |
+
|
839 |
+
<input type="hidden" name="product[links_purchased_separately]" id="downloadable_link_purchase_type" value="1" />
|
840 |
+
<br />
|
841 |
+
|
842 |
+
<div class="grid">
|
843 |
+
<div class="hor-scroll">
|
844 |
+
<table cellspacing="0" class="data border">
|
845 |
+
<col width="33%" />
|
846 |
+
<col />
|
847 |
+
<col />
|
848 |
+
<col />
|
849 |
+
<col width="1" />
|
850 |
+
<col width="1" />
|
851 |
+
<col width="1" />
|
852 |
+
<col width="1" />
|
853 |
+
<thead>
|
854 |
+
<tr class="headings">
|
855 |
+
<th>Title <span class="required">*</span></th>
|
856 |
+
<th>Shareable</th>
|
857 |
+
<th><span class="nobr">Downloads</span></th>
|
858 |
+
<th><span class="nobr">Sort</span></th>
|
859 |
+
<th> </th>
|
860 |
+
</tr>
|
861 |
+
</thead>
|
862 |
+
<tfoot>
|
863 |
+
<tr>
|
864 |
+
<td colspan="8" class="a-right"><button id="add_link_item" title="Add New Row" type="button" class="scalable add" onclick="" style=""><span><span><span>Add New Row</span></span></span></button> <button title="Upload Files" type="button" class="scalable " onclick="Downloadable.massUploadByType('links');Downloadable.massUploadByType('linkssample')" style=""><span><span><span>Upload Files</span></span></span></button></td>
|
865 |
+
</tr>
|
866 |
+
</tfoot>
|
867 |
+
<tbody id="link_items_body">
|
868 |
+
</tbody>
|
869 |
+
</table>
|
870 |
+
</div>
|
871 |
+
</div>
|
872 |
+
</div>
|
873 |
+
|
874 |
+
<script type="text/javascript">
|
875 |
+
|
876 |
+
|
877 |
+
function hidelinkstr(id){
|
878 |
+
document.getElementById('linkstr1'+id).style.display='none';
|
879 |
+
document.getElementById('linkstr2'+id).style.display='none';
|
880 |
+
document.getElementById('linkstr3'+id).style.display='none';
|
881 |
+
}
|
882 |
+
|
883 |
+
//<![CDATA[
|
884 |
+
var linkTemplate = '<tr id="linkstr1{{link_id}}">'+
|
885 |
+
'<td>'+
|
886 |
+
'<input type="hidden" class="__delete__" name="downloadable[link][{{id}}][is_delete]" value="" />'+
|
887 |
+
'<input type="hidden" name="downloadable[link][{{id}}][link_id]" value="{{link_id}}" />'+
|
888 |
+
'<input type="text" class="required-entry input-text" name="downloadable[link][{{id}}][title]" value="{{title}}" style="width:250px;" />'+
|
889 |
+
''+
|
890 |
+
'</td>'+
|
891 |
+
'<td class="a-center">'+
|
892 |
+
'<select id="downloadable_link _{{id}}_shareable" name="downloadable[link][{{id}}][is_shareable]">'+
|
893 |
+
'<option value="1">Yes</option>'+
|
894 |
+
'<option value="0">No</option>'+
|
895 |
+
'<option value="2" selected="selected">Use config</option>'+
|
896 |
+
'</select>'+
|
897 |
+
'</td>'+
|
898 |
+
'<input type="hidden" id="downloadable_link_{{id}}_price_value" class="input-text validate-number link-prices" name="downloadable[link][{{id}}][price]" value="0.00" /> ' +
|
899 |
+
'<td><input type="text" id="downloadable_link_{{id}}_downloads" name="downloadable[link][{{id}}][number_of_downloads]" class="input-text downloads" value="{{number_of_downloads}}" style="width:70px;" />'+
|
900 |
+
'<p><input type="checkbox" class="checkbox" id="downloadable_link_{{id}}_is_unlimited" name="downloadable[link][{{id}}][is_unlimited]" value="1" {{is_unlimited}} /> <label>Unlimited</label></p></td>'+
|
901 |
+
'<td class="a-center"><input type="text" name="downloadable[link][{{id}}][sort_order]" value="{{sort_order}}" class="input-text sort" style="width:30px;" /></td>'+
|
902 |
+
'<td>'+
|
903 |
+
'<button id="downloadable_link_{{id}}_delete_button" type="button" class="scalable delete icon-btn delete-link-item" onclick="hidelinkstr({{link_id}});"><span><span><span>Delete</span></span></span></button>'+
|
904 |
+
'</td>'+
|
905 |
+
'</tr><tr id="linkstr2{{link_id}}">'+
|
906 |
+
'<td colspan="6">'+
|
907 |
+
'<div><strong>Sample:</strong></div>'+
|
908 |
+
'<div class="files">'+
|
909 |
+
'<div class="row">'+
|
910 |
+
'<label for="downloadable_link_{{id}}_sample_file_type"><input type="radio" class="radio" id="downloadable_link_{{id}}_sample_file_type" name="downloadable[link][{{id}}][sample][type]" value="file"{{sample_file_checked}} /> File:</label>'+
|
911 |
+
'<input type="hidden" id="downloadable_link_{{id}}_sample_file_save" name="downloadable[link][{{id}}][sample][file]" value="{{sample_file_save}}" />'+
|
912 |
+
'<div id="downloadable_link_{{id}}_sample_file" class="uploader">'+
|
913 |
+
'<div id="downloadable_link_{{id}}_sample_file-old" class="file-row-info"></div>'+
|
914 |
+
'<div id="downloadable_link_{{id}}_sample_file-new" class="file-row-info"></div>'+
|
915 |
+
'<div class="buttons">'+
|
916 |
+
'<div id="downloadable_link_{{id}}_sample_file-install-flash" style="display:none">'+
|
917 |
+
'This content requires last version of Adobe Flash Player. <a href="http://www.adobe.com/go/getflash/">Get Flash</a>'+
|
918 |
+
'</div>'+
|
919 |
+
'</div>'+
|
920 |
+
'<div class="clear"></div>'+
|
921 |
+
'</div>'+
|
922 |
+
'</div>'+
|
923 |
+
'<div class="row">'+
|
924 |
+
'<label for="downloadable_link_{{id}}_sample_url_type"><input type="radio" class="radio" id="downloadable_link_{{id}}_sample_url_type" name="downloadable[link][{{id}}][sample][type]" value="url"{{sample_url_checked}} /> URL:</label><input type="text" class="input-text" name="downloadable[link][{{id}}][sample][url]" value="{{sample_url}}" style="width:450px;" />'+
|
925 |
+
'</div>'+
|
926 |
+
'<div>'+
|
927 |
+
'<span id="downloadable_link_{{id}}_sample_container"></span>'+
|
928 |
+
'</div>'+
|
929 |
+
'</div><br />'+
|
930 |
+
'</td>'+
|
931 |
+
'</tr><tr id="linkstr3{{link_id}}">'+
|
932 |
+
'<td colspan="6">'+
|
933 |
+
'<div><strong>File:</strong></div>'+
|
934 |
+
'<div class="files">'+
|
935 |
+
'<div class="row">'+
|
936 |
+
'<label for="downloadable_link_{{id}}_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_{{id}}_file_type" name="downloadable[link][{{id}}][type]" value="file"{{file_checked}} /> File:</label>'+
|
937 |
+
'<input type="hidden" class="validate-downloadable-file" id="downloadable_link_{{id}}_file_save" name="downloadable[link][{{id}}][file]" value="{{file_save}}" />'+
|
938 |
+
'<div id="downloadable_link_{{id}}_file" class="uploader">'+
|
939 |
+
'<div id="downloadable_link_{{id}}_file-old" class="file-row-info"></div>'+
|
940 |
+
'<div id="downloadable_link_{{id}}_file-new" class="file-row-info new-file"></div>'+
|
941 |
+
'<div class="buttons">'+
|
942 |
+
'<div id="downloadable_link_{{id}}_file-install-flash" style="display:none">'+
|
943 |
+
'This content requires last version of Adobe Flash Player. <a href="http://www.adobe.com/go/getflash/">Get Flash</a>'+
|
944 |
+
'</div>'+
|
945 |
+
'</div>'+
|
946 |
+
'<div class="clear"></div>'+
|
947 |
+
'</div>'+
|
948 |
+
'</div>'+
|
949 |
+
'<div class="row">'+
|
950 |
+
'<label for="downloadable_link_{{id}}_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_{{id}}_url_type" name="downloadable[link][{{id}}][type]" value="url"{{url_checked}} /> URL:</label><input type="text" class="validate-downloadable-url input-text" name="downloadable[link][{{id}}][link_url]" value="{{link_url}}" style="width:450px;" />'+
|
951 |
+
'</div>'+
|
952 |
+
'<div>'+
|
953 |
+
'<span id="downloadable_link_{{id}}_link_container"></span>'+
|
954 |
+
'</div>'+
|
955 |
+
'</div><br /><hr style="border:1px dashed #999999;" /><br />'+
|
956 |
+
'</td>'+
|
957 |
+
'</tr>';
|
958 |
+
|
959 |
+
var linkItems = {
|
960 |
+
tbody : $('link_items_body'),
|
961 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
962 |
+
templateText : linkTemplate,
|
963 |
+
itemCount : 0,
|
964 |
+
add : function(data) {
|
965 |
+
alertAlreadyDisplayed = false;
|
966 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
967 |
+
|
968 |
+
if(!data.link_id){
|
969 |
+
data = {};
|
970 |
+
data.link_id = 0;
|
971 |
+
data.link_type = 'file';
|
972 |
+
data.sample_type = 'none';
|
973 |
+
data.number_of_downloads = '0';
|
974 |
+
}
|
975 |
+
|
976 |
+
data.id = this.itemCount;
|
977 |
+
|
978 |
+
if (data.link_type == 'url') {
|
979 |
+
data.url_checked = ' checked="checked"';
|
980 |
+
} else if (data.link_type == 'file') {
|
981 |
+
data.file_checked = ' checked="checked"';
|
982 |
+
}
|
983 |
+
if (data.sample_type == 'url') {
|
984 |
+
data.sample_url_checked = ' checked="checked"';
|
985 |
+
} else if (data.sample_type == 'file') {
|
986 |
+
data.sample_file_checked = ' checked="checked"';
|
987 |
+
}
|
988 |
+
|
989 |
+
Element.insert(this.tbody, {'bottom':this.template.evaluate(data)});
|
990 |
+
|
991 |
+
scopeTitle = $('downloadable_link_'+data.id+'_title');
|
992 |
+
if (scopeTitle) {
|
993 |
+
Event.observe(scopeTitle, 'click', function(event){
|
994 |
+
scopeElm = $(Event.findElement(event, 'input'));
|
995 |
+
titleField = scopeElm.up(0).down('input[type="text"]');
|
996 |
+
if (scopeElm.checked == true) {
|
997 |
+
titleField.disabled = true;
|
998 |
+
} else {
|
999 |
+
titleField.disabled = false;
|
1000 |
+
}
|
1001 |
+
});
|
1002 |
+
}
|
1003 |
+
if (!data.store_title && scopeTitle) {
|
1004 |
+
scopeTitle.up(0).down('input[type="text"]').disabled = true;
|
1005 |
+
scopeTitle.checked = true;
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
scopePrice = $('downloadable_link_'+data.id+'_price');
|
1009 |
+
if (scopePrice) {
|
1010 |
+
Event.observe(scopePrice, 'click', function(event){
|
1011 |
+
scopeElm = $(Event.findElement(event, 'input'));
|
1012 |
+
priceField = scopeElm.up(0).down('input[type="text"]');
|
1013 |
+
if (scopeElm.checked == true) {
|
1014 |
+
priceField.disabled = true;
|
1015 |
+
} else {
|
1016 |
+
priceField.disabled = false;
|
1017 |
+
}
|
1018 |
+
});
|
1019 |
+
}
|
1020 |
+
if (!data.website_price && scopePrice) {
|
1021 |
+
scopePrice.up(0).down('input[type="text"]').disabled = true;
|
1022 |
+
scopePrice.checked = true;
|
1023 |
+
}
|
1024 |
+
downloadsElm = $('downloadable_link_'+data.id+'_downloads');
|
1025 |
+
isUnlimitedElm = $('downloadable_link_'+data.id+'_is_unlimited');
|
1026 |
+
if (data.is_unlimited) {
|
1027 |
+
downloadsElm.disabled = true;
|
1028 |
+
}
|
1029 |
+
Event.observe(isUnlimitedElm, 'click', function(event){
|
1030 |
+
elm = Event.element(event);
|
1031 |
+
elm.up('td').down('input[type="text"].downloads').disabled = elm.checked;
|
1032 |
+
});
|
1033 |
+
|
1034 |
+
if (data.is_shareable) {
|
1035 |
+
options = $('downloadable_link _'+data.id+'_shareable').options;
|
1036 |
+
for (var i=0; i < options.length; i++) {
|
1037 |
+
if (options[i].value == data.is_shareable) {
|
1038 |
+
options[i].selected = true;
|
1039 |
+
}
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
sampleUrl = $('downloadable_link_'+data.id+'_sample_url_type');
|
1044 |
+
linkUrl = $('downloadable_link_'+data.id+'_url_type');
|
1045 |
+
|
1046 |
+
if (!data.file_save) {
|
1047 |
+
data.file_save = [];
|
1048 |
+
}
|
1049 |
+
if (!data.sample_file_save) {
|
1050 |
+
data.sample_file_save = [];
|
1051 |
+
}
|
1052 |
+
|
1053 |
+
// link sample file
|
1054 |
+
new Downloadable.FileUploader(
|
1055 |
+
'linkssample',
|
1056 |
+
'linkssample_'+data.id,
|
1057 |
+
sampleUrl.up('td'),
|
1058 |
+
'downloadable[link]['+data.id+'][sample]',
|
1059 |
+
data.sample_file_save,
|
1060 |
+
'downloadable_link_'+data.id+'_sample_file',
|
1061 |
+
{"url":"<?php echo str_replace('/','\/',Mage::getBaseUrl()); ?>product\/index\/downloadableupload\/type\/link_samples\/key\/5f1c87fd0cea69563a4e829ba06b9616\/?SID=16bblj105lu5ir7p2v6arkd3s4","params":{"form_key":"gn0aHDfjLLxXQFGN"},"file_field":"link_samples","filters":{"all":{"label":"All Files","files":["*.*"]}},"replace_browse_with_remove":true,"width":"32","hide_upload_button":true} );
|
1062 |
+
// link file
|
1063 |
+
new Downloadable.FileUploader(
|
1064 |
+
'links',
|
1065 |
+
'links_'+data.id,
|
1066 |
+
linkUrl.up('td'),
|
1067 |
+
'downloadable[link]['+data.id+']',
|
1068 |
+
data.file_save,
|
1069 |
+
'downloadable_link_'+data.id+'_file',
|
1070 |
+
{"url":"<?php echo str_replace('/','\/',Mage::getBaseUrl()); ?>product\/index\/downloadableupload\/type\/links\/key\/5f1c87fd0cea69563a4e829ba06b9616\/?SID=16bblj105lu5ir7p2v6arkd3s4","params":{"form_key":"gn0aHDfjLLxXQFGN"},"file_field":"links","filters":{"all":{"label":"All Files","files":["*.*"]}},"replace_browse_with_remove":true,"width":"32","hide_upload_button":true} );
|
1071 |
+
|
1072 |
+
linkFile = $('downloadable_link_'+data.id+'_file_type');
|
1073 |
+
linkFile.advaiceContainer = 'downloadable_link_'+data.id+'_link_container';
|
1074 |
+
linkUrl.advaiceContainer = 'downloadable_link_'+data.id+'_link_container';
|
1075 |
+
$('downloadable_link_'+data.id+'_file_save').advaiceContainer = 'downloadable_link_'+data.id+'_link_container';
|
1076 |
+
|
1077 |
+
sampleFile = $('downloadable_link_'+data.id+'_sample_file_type');
|
1078 |
+
|
1079 |
+
this.itemCount++;
|
1080 |
+
this.togglePriceFields();
|
1081 |
+
this.bindRemoveButtons();
|
1082 |
+
},
|
1083 |
+
remove : function(event){
|
1084 |
+
var element = $(Event.findElement(event, 'tr'));
|
1085 |
+
alertAlreadyDisplayed = false;
|
1086 |
+
if(element){
|
1087 |
+
element.down('input[type="hidden"].__delete__').value = '1';
|
1088 |
+
Element.select(element, 'div.flex').each(function(elm){
|
1089 |
+
elm.remove();
|
1090 |
+
});
|
1091 |
+
element.addClassName('no-display');
|
1092 |
+
element.addClassName('ignore-validate');
|
1093 |
+
element.hide();
|
1094 |
+
}
|
1095 |
+
},
|
1096 |
+
bindRemoveButtons : function(){
|
1097 |
+
var buttons = $$('tbody#link_items_body .delete-link-item');
|
1098 |
+
for(var i=0;i<buttons.length;i++){
|
1099 |
+
if(!$(buttons[i]).binded && !$(buttons[i]).hasClassName('disabled')){
|
1100 |
+
$(buttons[i]).binded = true;
|
1101 |
+
Event.observe(buttons[i], 'click', this.remove.bind(this));
|
1102 |
+
}
|
1103 |
+
}
|
1104 |
+
},
|
1105 |
+
togglePriceFields : function(){
|
1106 |
+
var toogleTo = $('downloadable_link_purchase_type').value;
|
1107 |
+
var disableFlag = true;
|
1108 |
+
if (toogleTo == '1') {
|
1109 |
+
disableFlag = false;
|
1110 |
+
}
|
1111 |
+
$$('.link-prices[type="text"]').each(function(elm){
|
1112 |
+
var flag = disableFlag;
|
1113 |
+
if (elm.hasClassName('disabled')) {
|
1114 |
+
flag = true;
|
1115 |
+
}
|
1116 |
+
elm.disabled = flag;
|
1117 |
+
});
|
1118 |
+
}
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
linkItems.bindRemoveButtons();
|
1122 |
+
|
1123 |
+
if ($('downloadable_link_purchase_type')) {
|
1124 |
+
Event.observe('downloadable_link_purchase_type', 'change', linkItems.togglePriceFields.bind());
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
if($('add_link_item')) {
|
1128 |
+
Event.observe('add_link_item', 'click', linkItems.add.bind(linkItems));
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
|
1132 |
+
<? if(@$productEdit['links']){ foreach($productEdit['links'] as $pls){ ?>
|
1133 |
+
|
1134 |
+
linkItems.add({"link_id":"<?php echo $pls['link_id']; ?>","title":"<?php echo $pls['title']; ?>","price":"0.00","number_of_downloads":"<?php echo $pls['number_of_downloads']; ?>","is_shareable":"<?php echo $pls['is_shareable']; ?>","link_url":<?php echo (isset($pls['link_url'])?'"'.str_replace('/','\/',$pls['link_url']).'"':'null'); ?>,"link_type":"<?php echo $pls['link_type']; ?>","sample_file":<?php echo (isset($pls['sample_file'])?'"'.str_replace('/','\/',$pls['sample_file']).'"':'null'); ?>,"sample_url":<?php echo (isset($pls['sample_url'])?'"'.str_replace('/','\/',$pls['sample_url']).'"':'null'); ?>,"sample_type":<?php echo (isset($pls['sample_type'])?'"'.$pls['sample_type'].'"':'null'); ?>,"sort_order":"<?php echo $pls['sort_order']; ?>","file_save":[{"file":"<?php echo str_replace('/','\/',$pls['link_file']); ?>","name":"<a href=\"http:\/\/testmagento.com\/product\/index\/link\/id\/<?php echo $pls['link_id']; ?>\/key\/4d47168280e41d1930f20275b43842dc\/\"><?php echo str_replace('/a/l/','',$pls['link_file']); ?><\/a>","size":<?php echo filesize(Mage_Downloadable_Model_Link::getBasePath().$pls['link_file']); ?>,"status":"old"}],"sample_file_save":[{"file":"<?php echo str_replace('/','\/',$pls['sample_file']); ?>","name":"<?php echo str_replace('/a/l/','',$pls['sample_file']); ?>","size":<?php echo filesize(Mage_Downloadable_Model_Link::getBaseSamplePath().$pls['sample_file']); ?>,"status":"old"}],"is_unlimited":" checked=\"checked\""});
|
1135 |
+
|
1136 |
+
<? }} ?>
|
1137 |
+
|
1138 |
+
Validation.addAllThese([
|
1139 |
+
['validate-downloadable-link-sample-file', 'Please specify File.', function(v,element) {
|
1140 |
+
fileSaveElm = element.up('div').next('input[type="hidden"]');
|
1141 |
+
if (element.checked && (fileSaveElm.value == '' || fileSaveElm.value == '[]')) {
|
1142 |
+
return false;
|
1143 |
+
}
|
1144 |
+
return true;
|
1145 |
+
}]
|
1146 |
+
]);
|
1147 |
+
Validation.addAllThese([
|
1148 |
+
['validate-downloadable-link-sample-url', 'Please specify Sample URL.', function(v,element) {
|
1149 |
+
if (element.checked && element.up('p').down('input[type="text"]').value == '') {
|
1150 |
+
return false;
|
1151 |
+
}
|
1152 |
+
return true;
|
1153 |
+
}]
|
1154 |
+
]);
|
1155 |
+
//]]>
|
1156 |
+
</script>
|
1157 |
+
</dd></dl>
|
1158 |
+
<script type="text/javascript">
|
1159 |
+
tab_content_downloadableInfoAccordionJs = new varienAccordion('tab_content_downloadableInfo', '');
|
1160 |
+
</script>
|
1161 |
+
</div>
|
1162 |
+
<div style="display:none">
|
1163 |
+
<div id="custom-advice-container"></div>
|
1164 |
+
</div>
|
1165 |
+
<!--
|
1166 |
+
<div><input type="hidden" name="affect_downloadable_information" value="1" /></div>
|
1167 |
+
-->
|
1168 |
+
</div>
|
1169 |
+
<!-- downloadable -->
|
1170 |
+
|
1171 |
+
</div>
|
1172 |
+
|
1173 |
+
|
1174 |
+
<p> </p>
|
1175 |
+
|
1176 |
+
|
1177 |
+
|
1178 |
+
<!--
|
1179 |
+
**
|
1180 |
+
** hidden
|
1181 |
+
**
|
1182 |
+
-->
|
1183 |
+
<input type="hidden" name="product[tax_class_id]" value="0" />
|
1184 |
+
<input type="hidden" name="product[custom_design]" value="" />
|
1185 |
+
<input type="hidden" name="product[page_layout]" value="one_column" />
|
1186 |
+
<input type="hidden" name="product[options_container]" value="container2" />
|
1187 |
+
|
1188 |
+
<input type="hidden" name="product[use_config_gift_message_available]" value="1" />
|
1189 |
+
<input type="hidden" name="product[stock_data][use_config_min_sale_qty]" value="1" />
|
1190 |
+
<input type="hidden" name="product[stock_data][use_config_manage_stock]" value="1" />
|
1191 |
+
<input type="hidden" name="product[stock_data][use_config_max_sale_qty]" value="1" />
|
1192 |
+
<input type="hidden" name="product[stock_data][use_config_notify_stock_qty]" value="1" />
|
1193 |
+
<input type="hidden" name="product[stock_data][use_config_enable_qty_increments]" value="1" />
|
1194 |
+
<input type="hidden" name="product[website_ids][]" value="1" />
|
1195 |
+
|
1196 |
+
|
1197 |
+
<input type="hidden" value="<?php echo @$category_id_hidden; ?>" name="category_ids" id="category_ids">
|
1198 |
+
|
1199 |
+
<?php if($productEdit){ ?>
|
1200 |
+
<input type="hidden" value="<?php echo @$productEdit['entity_id']; ?>" name="id">
|
1201 |
+
<?php } ?>
|
1202 |
+
|
1203 |
+
<p align="center">
|
1204 |
+
<button class="button" onclick="showcaseform.submit()" type="button" title="Save"><span>Save</span></button>
|
1205 |
+
</p>
|
1206 |
+
|
1207 |
+
</div>
|
1208 |
+
|
1209 |
+
</td></tr></table>
|
1210 |
+
</form>
|
1211 |
+
|
1212 |
+
</div>
|
1213 |
+
|
1214 |
+
|
1215 |
+
|
1216 |
+
<!--
|
1217 |
+
**
|
1218 |
+
** Javascript
|
1219 |
+
**
|
1220 |
+
-->
|
1221 |
+
<script type="text/javascript">
|
1222 |
+
|
1223 |
+
/*
|
1224 |
+
**
|
1225 |
+
** for my additional attributes ... Ajax
|
1226 |
+
**
|
1227 |
+
*/
|
1228 |
+
|
1229 |
+
function getSetSelectAttribute(){
|
1230 |
+
var FORM_KEY = 'gn0aHDfjLLxXQFGN';
|
1231 |
+
var mydiv = document.getElementById('addnewfields');
|
1232 |
+
mydiv.innerHTML = "";
|
1233 |
+
|
1234 |
+
new Ajax.Request('/product/index/additionalfields', {
|
1235 |
+
method:'get',
|
1236 |
+
parameters: {setp: document.getElementById("set").value, entid: <?php echo (@$productEdit['entity_id']>0?@$productEdit['entity_id']:0); ?>, form_key: FORM_KEY},
|
1237 |
+
onSuccess: function(transport) {
|
1238 |
+
var response = transport.responseText || "no response text";
|
1239 |
+
//alert("Success! \n\n" + response);
|
1240 |
+
var obja = JSON.parse(response);
|
1241 |
+
for(var jr=0; jr<obja.attributes.length; jr++){
|
1242 |
+
if(obja.attributes[jr].attribute_id.length>0){
|
1243 |
+
var newdiv = document.createElement('div');
|
1244 |
+
newdiv.setAttribute('class','block-title');
|
1245 |
+
newdiv.setAttribute('id','af-title'+obja.attributes[jr].group_id);
|
1246 |
+
newdiv.setAttribute('onclick',"showdiv('af-div"+obja.attributes[jr].group_id+"');");
|
1247 |
+
var newstrong = document.createElement('strong');
|
1248 |
+
var newtext=document.createTextNode(obja.attributes[jr].group_name);
|
1249 |
+
mydiv.appendChild(newdiv);
|
1250 |
+
newdiv.appendChild(newstrong);
|
1251 |
+
newstrong.appendChild(newtext);
|
1252 |
+
|
1253 |
+
var newdiv2 = document.createElement('div');
|
1254 |
+
newdiv2.setAttribute('id','af-div'+obja.attributes[jr].group_id);
|
1255 |
+
mydiv.appendChild(newdiv2);
|
1256 |
+
for(var rt=0; rt<obja.attributes[jr].attribute_id.length;rt++){
|
1257 |
+
var newp = document.createElement('p');
|
1258 |
+
var newstrong2 = document.createElement('strong');
|
1259 |
+
newdiv2.appendChild(newp);
|
1260 |
+
newp.appendChild(newstrong2);
|
1261 |
+
var newtext2=document.createTextNode(obja.attributes[jr].attribute_id[rt].label);
|
1262 |
+
newstrong2.appendChild(newtext2);
|
1263 |
+
if(obja.attributes[jr].attribute_id[rt].type=="text" && obja.attributes[jr].attribute_id[rt].input=="textarea"){
|
1264 |
+
var newstextarea = document.createElement('textarea');
|
1265 |
+
newstextarea.setAttribute('name','product['+obja.attributes[jr].attribute_id[rt].code+']');
|
1266 |
+
newdiv2.appendChild(newstextarea);
|
1267 |
+
var newtext3=document.createTextNode(obja.attributes[jr].attribute_id[rt].value);
|
1268 |
+
newstextarea.appendChild(newtext3);
|
1269 |
+
}
|
1270 |
+
if(obja.attributes[jr].attribute_id[rt].type=="varchar" && obja.attributes[jr].attribute_id[rt].input=="text"){
|
1271 |
+
var newstextarea = document.createElement('input');
|
1272 |
+
newstextarea.setAttribute('type','text');
|
1273 |
+
newstextarea.setAttribute('name','product['+obja.attributes[jr].attribute_id[rt].code+']');
|
1274 |
+
newstextarea.setAttribute('value',obja.attributes[jr].attribute_id[rt].value);
|
1275 |
+
newdiv2.appendChild(newstextarea);
|
1276 |
+
}
|
1277 |
+
if(obja.attributes[jr].attribute_id[rt].type=="int" && obja.attributes[jr].attribute_id[rt].input=="boolean"){
|
1278 |
+
var newsboolean = document.createElement('select');
|
1279 |
+
newsboolean.setAttribute('id',obja.attributes[jr].attribute_id[rt].code);
|
1280 |
+
newsboolean.setAttribute('name','product['+obja.attributes[jr].attribute_id[rt].code+']');
|
1281 |
+
newdiv2.appendChild(newsboolean);
|
1282 |
+
for(var ib=0; ib<2; ib++){
|
1283 |
+
var newsoption = document.createElement('option');
|
1284 |
+
newsoption.setAttribute('value',ib);
|
1285 |
+
if(obja.attributes[jr].attribute_id[rt].value==ib){
|
1286 |
+
newsoption.setAttribute('selected','selected');
|
1287 |
+
}
|
1288 |
+
newsboolean.appendChild(newsoption);
|
1289 |
+
if(ib==0){
|
1290 |
+
var newsoptiontext=document.createTextNode("No");
|
1291 |
+
}else{
|
1292 |
+
var newsoptiontext=document.createTextNode("Yes");
|
1293 |
+
}
|
1294 |
+
newsoption.appendChild(newsoptiontext);
|
1295 |
+
}
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
}
|
1299 |
+
|
1300 |
+
var newstyle = document.createElement('style');
|
1301 |
+
var newtextstyle=document.createTextNode("#af-div"+obja.attributes[jr].group_id+" { display:none; } #af-div"+obja.attributes[jr].group_id+" p{ margin:0px; } #af-div"+obja.attributes[jr].group_id+" textarea, #af-div"+obja.attributes[jr].group_id+" input{ width:98%; }");
|
1302 |
+
mydiv.appendChild(newstyle);
|
1303 |
+
newstyle.appendChild(newtextstyle);
|
1304 |
+
}
|
1305 |
+
}
|
1306 |
+
},
|
1307 |
+
onFailure: function() { alert('Something went wrong...'); }
|
1308 |
+
});
|
1309 |
+
|
1310 |
+
//alert(document.getElementById("set").value);
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
getSetSelectAttribute();
|
1314 |
+
|
1315 |
+
/*
|
1316 |
+
**
|
1317 |
+
** for blocks ... show/hide
|
1318 |
+
**
|
1319 |
+
*/
|
1320 |
+
|
1321 |
+
function showdiv(id){
|
1322 |
+
var dform = document.getElementById(id).style.display;
|
1323 |
+
if(dform){
|
1324 |
+
if(dform=='none'){
|
1325 |
+
document.getElementById(id).style.display='block';
|
1326 |
+
}else{
|
1327 |
+
document.getElementById(id).style.display='none';
|
1328 |
+
}
|
1329 |
+
}else{
|
1330 |
+
document.getElementById(id).style.display='block';
|
1331 |
+
}
|
1332 |
+
}
|
1333 |
+
|
1334 |
+
|
1335 |
+
/*
|
1336 |
+
**
|
1337 |
+
** for set json images block
|
1338 |
+
**
|
1339 |
+
*/
|
1340 |
+
|
1341 |
+
function setArrSave(){
|
1342 |
+
//alert(save.length + ' --- ' + save[1].url);
|
1343 |
+
var arr_save = '[';
|
1344 |
+
|
1345 |
+
for(var i=0; i<save.length; i++){
|
1346 |
+
save[i].toString = function() {
|
1347 |
+
return '{"value_id":"' + this.value_id + '", "file":"' + this.file + '", "label":"' + this.label + '", "position":"' + this.position + '", "disabled":"' + this.disabled + '", "label_default":"' + this.label_default + '", "position_default":"' + this.position_default + '", "disabled_default":"' + this.disabled_default + '", "url":"' + this.url + '", "removed":"' + this.removed + '"}';
|
1348 |
+
}
|
1349 |
+
|
1350 |
+
if(i>0){
|
1351 |
+
arr_save += ',' + save[i].toString();
|
1352 |
+
}else{
|
1353 |
+
arr_save += save[i].toString();
|
1354 |
+
}
|
1355 |
+
}
|
1356 |
+
|
1357 |
+
arr_save += ']';
|
1358 |
+
|
1359 |
+
return arr_save;
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
document.getElementById('media_gallery_content_save').value = setArrSave();
|
1363 |
+
|
1364 |
+
|
1365 |
+
/*
|
1366 |
+
**
|
1367 |
+
** for Exclude
|
1368 |
+
**
|
1369 |
+
*/
|
1370 |
+
function changeExclude(value_id){
|
1371 |
+
|
1372 |
+
for(var i=0; i<save.length; i++){
|
1373 |
+
|
1374 |
+
if(save[i].value_id==value_id){
|
1375 |
+
if(save[i].disabled=="0"){
|
1376 |
+
save[i].disabled="1";
|
1377 |
+
}else{
|
1378 |
+
save[i].disabled="0";
|
1379 |
+
}
|
1380 |
+
}
|
1381 |
+
|
1382 |
+
}
|
1383 |
+
|
1384 |
+
document.getElementById('media_gallery_content_save').value = setArrSave();
|
1385 |
+
|
1386 |
+
}
|
1387 |
+
|
1388 |
+
/*
|
1389 |
+
**
|
1390 |
+
** for Remove
|
1391 |
+
**
|
1392 |
+
*/
|
1393 |
+
function changeRemove(value_id){
|
1394 |
+
|
1395 |
+
for(var i=0; i<save.length; i++){
|
1396 |
+
|
1397 |
+
if(save[i].value_id==value_id){
|
1398 |
+
if(save[i].removed=="0"){
|
1399 |
+
save[i].removed="1";
|
1400 |
+
}else{
|
1401 |
+
save[i].removed="0";
|
1402 |
+
}
|
1403 |
+
}
|
1404 |
+
|
1405 |
+
}
|
1406 |
+
|
1407 |
+
document.getElementById('media_gallery_content_save').value = setArrSave();
|
1408 |
+
|
1409 |
+
}
|
1410 |
+
|
1411 |
+
/*
|
1412 |
+
**
|
1413 |
+
** for Position
|
1414 |
+
**
|
1415 |
+
*/
|
1416 |
+
function changePosition(value_id){
|
1417 |
+
|
1418 |
+
for(var i=0; i<save.length; i++){
|
1419 |
+
|
1420 |
+
if(save[i].value_id==value_id){
|
1421 |
+
save[i].position=document.getElementById('position_' + value_id).value;
|
1422 |
+
}
|
1423 |
+
|
1424 |
+
}
|
1425 |
+
|
1426 |
+
document.getElementById('media_gallery_content_save').value = setArrSave();
|
1427 |
+
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
/*
|
1431 |
+
**
|
1432 |
+
** for Label
|
1433 |
+
**
|
1434 |
+
*/
|
1435 |
+
function changeLabel(value_id){
|
1436 |
+
|
1437 |
+
for(var i=0; i<save.length; i++){
|
1438 |
+
|
1439 |
+
if(save[i].value_id==value_id){
|
1440 |
+
save[i].label=document.getElementById('label_' + value_id).value;
|
1441 |
+
}
|
1442 |
+
|
1443 |
+
}
|
1444 |
+
|
1445 |
+
document.getElementById('media_gallery_content_save').value = setArrSave();
|
1446 |
+
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
|
1450 |
+
|
1451 |
+
/*
|
1452 |
+
**
|
1453 |
+
** for json images
|
1454 |
+
**
|
1455 |
+
*/
|
1456 |
+
|
1457 |
+
var save_image = {
|
1458 |
+
"image":"<?php echo $productEdit['image_radio']; ?>",
|
1459 |
+
"small_image":"<?php echo $productEdit['small_image_radio']; ?>",
|
1460 |
+
"thumbnail":"<?php echo $productEdit['thumb_image_radio']; ?>"
|
1461 |
+
};
|
1462 |
+
|
1463 |
+
save_image.toString = function() {
|
1464 |
+
return '{"image":"' + this.image.replace(/\//g,"\\\/") + '", "small_image":"' + this.small_image.replace(/\//g,"\\\/") + '", "thumbnail":"' + this.thumbnail.replace(/\//g,"\\\/") + '"}';
|
1465 |
+
}
|
1466 |
+
|
1467 |
+
document.getElementById('media_gallery_content_save_image').value = save_image.toString();
|
1468 |
+
|
1469 |
+
function setImageProduct(alias){
|
1470 |
+
//alert(alias);
|
1471 |
+
save_image.image = alias;
|
1472 |
+
document.getElementById('media_gallery_content_save_image').value = save_image.toString();
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
function setSmallImageProduct(alias){
|
1476 |
+
//alert(alias);
|
1477 |
+
save_image.small_image = alias;
|
1478 |
+
document.getElementById('media_gallery_content_save_image').value = save_image.toString();
|
1479 |
+
}
|
1480 |
+
|
1481 |
+
function setThumbnailProduct(alias){
|
1482 |
+
//alert(alias);
|
1483 |
+
save_image.thumbnail = alias;
|
1484 |
+
document.getElementById('media_gallery_content_save_image').value = save_image.toString();
|
1485 |
+
}
|
1486 |
+
|
1487 |
+
|
1488 |
+
|
1489 |
+
|
1490 |
+
/*
|
1491 |
+
**
|
1492 |
+
** for category check
|
1493 |
+
**
|
1494 |
+
*/
|
1495 |
+
function categorytree(id){
|
1496 |
+
var t = ","+id;
|
1497 |
+
var c = document.getElementById("category_ids").value;
|
1498 |
+
var pos = c.indexOf(t);
|
1499 |
+
if(document.getElementById("checkcat"+id).checked==true){
|
1500 |
+
if( pos == -1 ){
|
1501 |
+
c += t;
|
1502 |
+
}
|
1503 |
+
}else{
|
1504 |
+
c = c.replace(t,"");
|
1505 |
+
}
|
1506 |
+
document.getElementById("category_ids").value = c;
|
1507 |
+
}
|
1508 |
+
|
1509 |
+
/*
|
1510 |
+
**
|
1511 |
+
** for confirm delete
|
1512 |
+
**
|
1513 |
+
*/
|
1514 |
+
function sureDelete(id){
|
1515 |
+
if (confirm("The record will be deleted. Are you sure?")) {
|
1516 |
+
location = "/product/index/delete?p=" + id;
|
1517 |
+
}
|
1518 |
+
}
|
1519 |
+
|
1520 |
+
/*
|
1521 |
+
**
|
1522 |
+
** for new product
|
1523 |
+
**
|
1524 |
+
*/
|
1525 |
+
function newproduct(){
|
1526 |
+
location.href='/product';
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
</script>
|
1530 |
+
|
1531 |
+
<!--
|
1532 |
+
**
|
1533 |
+
** for block images ... read gallery
|
1534 |
+
**
|
1535 |
+
-->
|
1536 |
+
<script type="text/javascript">
|
1537 |
+
//<![CDATA[
|
1538 |
+
var media_gallery_contentJsObject = new Product.Gallery('media_gallery_content', id_2ae1264f5c19e1db1580e98f51ec3175_UploaderJsObject, {"image":{"label":"Base Image ","field":"product[image]"},"small_image":{"label":"Small Image ","field":"product[small_image]"},"thumbnail":{"label":"Thumbnail ","field":"product[thumbnail]"}});
|
1539 |
+
|
1540 |
+
//setInterval(function(){
|
1541 |
+
// console.log("JSON : %1", media_gallery_contentJsObject.images.url);
|
1542 |
+
//}, 5000);
|
1543 |
+
//]]>
|
1544 |
+
</script>
|
1545 |
+
|
1546 |
+
|
1547 |
+
<style type="text/css">
|
1548 |
+
.total{
|
1549 |
+
font-size:18px;
|
1550 |
+
}
|
1551 |
+
|
1552 |
+
#generaldiv, #pricediv, #imagediv, #additionalfieldsdiv, #downlodablediv{
|
1553 |
+
display:none;
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
.headings th{
|
1557 |
+
border:1px solid #dddddd;
|
1558 |
+
padding:2px;
|
1559 |
+
font-weight:bold;
|
1560 |
+
}
|
1561 |
+
.headings td{
|
1562 |
+
border:1px solid #dddddd;
|
1563 |
+
padding:2px;
|
1564 |
+
}
|
1565 |
+
.showcase_attribute{
|
1566 |
+
width:160px;
|
1567 |
+
float:left;
|
1568 |
+
border:1px solid #dddddd;
|
1569 |
+
padding:5px;
|
1570 |
+
background-color:#ffffff;
|
1571 |
+
}
|
1572 |
+
.showcase_menu{
|
1573 |
+
width:150px;
|
1574 |
+
position:relative;
|
1575 |
+
float:right;
|
1576 |
+
padding:5px;
|
1577 |
+
overflow-x:scroll;
|
1578 |
+
background-color:#ffffff;
|
1579 |
+
margin:10px 0 0 0;
|
1580 |
+
}
|
1581 |
+
.showcase_menu ul{
|
1582 |
+
width:250px;
|
1583 |
+
}
|
1584 |
+
.showcase_menu ul li ul, .showcase_menu ul li ul li ul, .showcase_menu ul li ul li ul li ul{
|
1585 |
+
padding-left:10px;
|
1586 |
+
}
|
1587 |
+
.generalblock{
|
1588 |
+
border:1px solid #dddddd;
|
1589 |
+
}
|
1590 |
+
.titlebg{
|
1591 |
+
background-color:#E26703;
|
1592 |
+
color:#ffffff;
|
1593 |
+
margin:0px;
|
1594 |
+
padding:0px 0px 0px 5px;
|
1595 |
+
border:1px solid #fff;
|
1596 |
+
cursor:pointer;
|
1597 |
+
}
|
1598 |
+
.block-title{
|
1599 |
+
cursor:pointer;
|
1600 |
+
}
|
1601 |
+
.fieldbg{
|
1602 |
+
padding:0px 0px 10px 5px;
|
1603 |
+
margin:0px;
|
1604 |
+
}
|
1605 |
+
.fieldbg input, .fieldbg textarea{
|
1606 |
+
width:98%;
|
1607 |
+
}
|
1608 |
+
|
1609 |
+
|
1610 |
+
.request_table td, .request_table th{
|
1611 |
+
padding:3px;
|
1612 |
+
}
|
1613 |
+
.request_table th{
|
1614 |
+
font-weight:bold;
|
1615 |
+
border-bottom:1px solid #dddddd;
|
1616 |
+
}
|
1617 |
+
.request_table td{
|
1618 |
+
border-bottom:1px solid #dddddd;
|
1619 |
+
}
|
1620 |
+
.request_table table{
|
1621 |
+
width:100%;
|
1622 |
+
}
|
1623 |
+
.request_new{
|
1624 |
+
color:#ff0000;
|
1625 |
+
}
|
1626 |
+
.clicktagtr{
|
1627 |
+
cursor:pointer;
|
1628 |
+
}
|
1629 |
+
</style>
|
app/design/frontend/base/default/template/product/statistica.phtml
ADDED
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
9 |
+
?>
|
10 |
+
|
11 |
+
<p> </p>
|
12 |
+
<form action="" method="post" name="filterdateform" id="filter_form">
|
13 |
+
<div class="field">
|
14 |
+
<div class="input-box">
|
15 |
+
<table border="0"><tr>
|
16 |
+
<td width="100" colspan="2">
|
17 |
+
|
18 |
+
<label for="dob"><strong><?php echo Mage::helper('contacts')->__('Date filter') ?></strong></label>
|
19 |
+
|
20 |
+
</td>
|
21 |
+
</tr>
|
22 |
+
<tr>
|
23 |
+
<td style="text-align:right;">
|
24 |
+
From:
|
25 |
+
</td>
|
26 |
+
<td width="250">
|
27 |
+
<input name="_dob" id="_dob" value="<?php echo $resultRequest[0]['filter_from']?>" type="text">
|
28 |
+
<img title="Select date" id="_dob_trig" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'adminhtml/default/default/images/grid-cal.gif'; ?>" class="v-middle">
|
29 |
+
|
30 |
+
</td>
|
31 |
+
</tr>
|
32 |
+
<tr>
|
33 |
+
<td style="text-align:right;">
|
34 |
+
To:
|
35 |
+
</td>
|
36 |
+
<td width="250">
|
37 |
+
<input name="_dobto" id="_dobto" value="<?php echo $resultRequest[0]['filter_to']?>" type="text">
|
38 |
+
<img title="Select date" id="_dobto_trig" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'adminhtml/default/default/images/grid-cal.gif'; ?>" class="v-middle">
|
39 |
+
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td>
|
44 |
+
|
45 |
+
<input type="submit" name="filtergo" value="filter">
|
46 |
+
|
47 |
+
</td>
|
48 |
+
</tr></table>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
</form><br />
|
52 |
+
|
53 |
+
|
54 |
+
<div class="request_table">
|
55 |
+
|
56 |
+
<?php echo $this->getPagerHtml(); ?>
|
57 |
+
<div class="box-account box-recent">
|
58 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
59 |
+
<tr>
|
60 |
+
<th>SKU</th>
|
61 |
+
<th>Name</th>
|
62 |
+
<th>Price [USD]</th>
|
63 |
+
<th>Purchased</th>
|
64 |
+
<th>Sum [USD]</th>
|
65 |
+
</tr>
|
66 |
+
<?php
|
67 |
+
if($resultRequest){
|
68 |
+
$total = 0;
|
69 |
+
foreach($resultRequest as $rt){
|
70 |
+
$prc = split('\.',$rt['price']);
|
71 |
+
$sum = $prc[0]*$rt['count'];
|
72 |
+
$total += $sum;
|
73 |
+
echo '<tr class="clicktagtr">
|
74 |
+
<td>'.$rt['sku'].'</td>
|
75 |
+
<td>'.substr(strip_tags($rt['name']),0,45).'...</td>
|
76 |
+
<td>'.$prc[0].'</td>
|
77 |
+
<td>'.$rt['count'].'</td>
|
78 |
+
<td>'.$sum.'</td>
|
79 |
+
</tr>';
|
80 |
+
}
|
81 |
+
}
|
82 |
+
///product/index/delete?p='.$rt['entity_id'].'
|
83 |
+
?>
|
84 |
+
</table>
|
85 |
+
</div>
|
86 |
+
<?php echo $this->getPagerHtml(); ?>
|
87 |
+
|
88 |
+
<p> </p>
|
89 |
+
<p align="right" class="total">Total: <strong><?php echo $total; ?></strong> [USD]</p>
|
90 |
+
|
91 |
+
</div>
|
92 |
+
|
93 |
+
|
94 |
+
<script type="text/javascript">
|
95 |
+
//<![CDATA[
|
96 |
+
enUS = {"m":{"wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}}; // en_US locale reference
|
97 |
+
Calendar._DN = ["\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","\u0432\u0442\u043e\u0440\u043d\u0438\u043a","\u0441\u0440\u0435\u0434\u0430","\u0447\u0435\u0442\u0432\u0435\u0440\u0433","\u043f\u044f\u0442\u043d\u0438\u0446\u0430","\u0441\u0443\u0431\u0431\u043e\u0442\u0430"]; // full day names
|
98 |
+
Calendar._SDN = ["\u0412\u0441","\u041f\u043d","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041f\u0442","\u0421\u0431"]; // short day names
|
99 |
+
Calendar._FD = 1; // First day of the week. "0" means display Sunday first, "1" means display Monday first, etc.
|
100 |
+
Calendar._MN = ["\u044f\u043d\u0432\u0430\u0440\u044f","\u0444\u0435\u0432\u0440\u0430\u043b\u044f","\u043c\u0430\u0440\u0442\u0430","\u0430\u043f\u0440\u0435\u043b\u044f","\u043c\u0430\u044f","\u0438\u044e\u043d\u044f","\u0438\u044e\u043b\u044f","\u0430\u0432\u0433\u0443\u0441\u0442\u0430","\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f","\u043e\u043a\u0442\u044f\u0431\u0440\u044f","\u043d\u043e\u044f\u0431\u0440\u044f","\u0434\u0435\u043a\u0430\u0431\u0440\u044f"]; // full month names
|
101 |
+
Calendar._SMN = ["\u044f\u043d\u0432.","\u0444\u0435\u0432\u0440.","\u043c\u0430\u0440\u0442\u0430","\u0430\u043f\u0440.","\u043c\u0430\u044f","\u0438\u044e\u043d\u044f","\u0438\u044e\u043b\u044f","\u0430\u0432\u0433.","\u0441\u0435\u043d\u0442.","\u043e\u043a\u0442.","\u043d\u043e\u044f\u0431.","\u0434\u0435\u043a."]; // short month names
|
102 |
+
Calendar._am = "AM"; // am/pm
|
103 |
+
Calendar._pm = "PM";
|
104 |
+
|
105 |
+
// tooltips
|
106 |
+
Calendar._TT = {};
|
107 |
+
Calendar._TT["INFO"] = "About the calendar";
|
108 |
+
|
109 |
+
Calendar._TT["ABOUT"] =
|
110 |
+
"DHTML Date/Time Selector\n" +
|
111 |
+
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
|
112 |
+
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
113 |
+
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
114 |
+
"\n\n" +
|
115 |
+
"Date selection:\n" +
|
116 |
+
"- Use the \xab, \xbb buttons to select year\n" +
|
117 |
+
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
118 |
+
"- Hold mouse button on any of the above buttons for faster selection.";
|
119 |
+
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
120 |
+
"Time selection:\n" +
|
121 |
+
"- Click on any of the time parts to increase it\n" +
|
122 |
+
"- or Shift-click to decrease it\n" +
|
123 |
+
"- or click and drag for faster selection.";
|
124 |
+
|
125 |
+
Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
|
126 |
+
Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
|
127 |
+
Calendar._TT["GO_TODAY"] = "Go Today";
|
128 |
+
Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
|
129 |
+
Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
|
130 |
+
Calendar._TT["SEL_DATE"] = "Select date";
|
131 |
+
Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
|
132 |
+
Calendar._TT["PART_TODAY"] = ' (' + "\u0421\u0435\u0433\u043e\u0434\u043d\u044f" + ')';
|
133 |
+
|
134 |
+
// the following is to inform that "%s" is to be the first day of week
|
135 |
+
Calendar._TT["DAY_FIRST"] = "Display %s first";
|
136 |
+
|
137 |
+
// This may be locale-dependent. It specifies the week-end days, as an array
|
138 |
+
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
139 |
+
// means Monday, etc.
|
140 |
+
Calendar._TT["WEEKEND"] = "0,6";
|
141 |
+
|
142 |
+
Calendar._TT["CLOSE"] = "Close";
|
143 |
+
Calendar._TT["TODAY"] = "\u0421\u0435\u0433\u043e\u0434\u043d\u044f";
|
144 |
+
Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
|
145 |
+
|
146 |
+
// date formats
|
147 |
+
Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y";
|
148 |
+
Calendar._TT["TT_DATE_FORMAT"] = "%e %B %Y '\u0433'.";
|
149 |
+
|
150 |
+
Calendar._TT["WK"] = "\u041d\u0435\u0434\u0435\u043b\u044f";
|
151 |
+
Calendar._TT["TIME"] = "Time:";
|
152 |
+
|
153 |
+
CalendarDateObject._LOCAL_TIMZEONE_OFFSET_SECONDS = 10800;
|
154 |
+
CalendarDateObject._SERVER_TIMZEONE_SECONDS = 1364818509;
|
155 |
+
|
156 |
+
//]]>
|
157 |
+
</script>
|
158 |
+
|
159 |
+
|
160 |
+
<script type="text/javascript">
|
161 |
+
//<![CDATA[
|
162 |
+
Calendar.setup({
|
163 |
+
inputField : '_dob',
|
164 |
+
ifFormat : '%d.%m.%Y',
|
165 |
+
button : '_dob_trig',
|
166 |
+
align : 'Bl',
|
167 |
+
singleClick : true
|
168 |
+
});
|
169 |
+
|
170 |
+
Calendar.setup({
|
171 |
+
inputField : '_dobto',
|
172 |
+
ifFormat : '%d.%m.%Y',
|
173 |
+
button : '_dobto_trig',
|
174 |
+
align : 'Bl',
|
175 |
+
singleClick : true
|
176 |
+
});
|
177 |
+
//]]>
|
178 |
+
</script>
|
179 |
+
|
180 |
+
<style type="text/css">
|
181 |
+
.total{
|
182 |
+
font-size:18px;
|
183 |
+
}
|
184 |
+
|
185 |
+
#generaldiv, #pricediv, #imagediv, #additionalfieldsdiv, #downlodablediv{
|
186 |
+
display:none;
|
187 |
+
}
|
188 |
+
|
189 |
+
.headings th{
|
190 |
+
border:1px solid #dddddd;
|
191 |
+
padding:2px;
|
192 |
+
font-weight:bold;
|
193 |
+
}
|
194 |
+
.headings td{
|
195 |
+
border:1px solid #dddddd;
|
196 |
+
padding:2px;
|
197 |
+
}
|
198 |
+
.showcase_attribute{
|
199 |
+
width:160px;
|
200 |
+
float:left;
|
201 |
+
border:1px solid #dddddd;
|
202 |
+
padding:5px;
|
203 |
+
background-color:#ffffff;
|
204 |
+
}
|
205 |
+
.showcase_menu{
|
206 |
+
width:150px;
|
207 |
+
position:relative;
|
208 |
+
float:right;
|
209 |
+
padding:5px;
|
210 |
+
overflow-x:scroll;
|
211 |
+
background-color:#ffffff;
|
212 |
+
margin:10px 0 0 0;
|
213 |
+
}
|
214 |
+
.showcase_menu ul{
|
215 |
+
width:250px;
|
216 |
+
}
|
217 |
+
.showcase_menu ul li ul, .showcase_menu ul li ul li ul, .showcase_menu ul li ul li ul li ul{
|
218 |
+
padding-left:10px;
|
219 |
+
}
|
220 |
+
.generalblock{
|
221 |
+
border:1px solid #dddddd;
|
222 |
+
}
|
223 |
+
.titlebg{
|
224 |
+
background-color:#E26703;
|
225 |
+
color:#ffffff;
|
226 |
+
margin:0px;
|
227 |
+
padding:0px 0px 0px 5px;
|
228 |
+
border:1px solid #fff;
|
229 |
+
cursor:pointer;
|
230 |
+
}
|
231 |
+
.fieldbg{
|
232 |
+
padding:0px 0px 10px 5px;
|
233 |
+
margin:0px;
|
234 |
+
}
|
235 |
+
.fieldbg input, .fieldbg textarea{
|
236 |
+
width:98%;
|
237 |
+
}
|
238 |
+
|
239 |
+
|
240 |
+
.request_table td, .request_table th{
|
241 |
+
padding:3px;
|
242 |
+
}
|
243 |
+
.request_table th{
|
244 |
+
font-weight:bold;
|
245 |
+
border-bottom:1px solid #dddddd;
|
246 |
+
}
|
247 |
+
.request_table td{
|
248 |
+
border-bottom:1px solid #dddddd;
|
249 |
+
}
|
250 |
+
.request_table table{
|
251 |
+
width:100%;
|
252 |
+
}
|
253 |
+
.request_new{
|
254 |
+
color:#ff0000;
|
255 |
+
}
|
256 |
+
.clicktagtr{
|
257 |
+
cursor:pointer;
|
258 |
+
}
|
259 |
+
</style>
|
package.xml
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Amm_Product</name>
|
4 |
-
<version>1.0.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Enables clients in account to add products in the category of the directory store.</summary>
|
10 |
-
<description>Enables clients in account to add products in the category of the directory store. 
|
11 |
Type products - Downloadable.</description>
|
12 |
<notes>enable to adding downloadable products in account</notes>
|
13 |
<authors><author><name>Alexey</name><user>auto-converted</user><email>softaliancecom@gmail.com</email></author></authors>
|
14 |
-
<date>2013-05-
|
15 |
-
<time>11:
|
16 |
-
<contents><target name="magecommunity"><dir name="Amm"><dir name="Product"><dir name="Block"><dir name="Adminhtml"><dir name="Product"><file name="Grid.php" hash="b4661fe5f4f754cdb0c91abe6b01f14f"/></dir><file name="Grid.php" hash="f93b4d141b863e2ec71feb169f440240"/></dir><file name="Monblock.php" hash="59f97b2e53b27e223f5d6e650ab7b5c4"/></dir><dir name="Helper"><file name="Data.php" hash="9b4fba746e0acdffc418696f0ab08b37"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="a57cf43fb3989a3a865c23ca7fa9ff1a"/></dir><file name="Product.php" hash="15b7fea36193f2e377bd009d52c23121"/><file name="Setup.php" hash="92ed515cd2cb4963f9d363612cabdfca"/></dir><file name="Product.php" hash="afd9cd60318217520ee85b7c0e9f9e7c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="9b01987b5765f788341173d0b86259ab"/></dir><file name="IndexController.php" hash="1403f6278b45d46aa252be5763f1e660"/><file name="StatisticaController.php" hash="65b01ef7adc9dfeff32791ec672a011f"/></dir><dir name="etc"><file name="config.xml" hash="613627e7d6bca7865232ca786a18e551"/></dir><dir name="sql"><dir name="product_setup"><file name="mysql4-install-0.0.1.php" hash="070155ac1b2191b9f4b2c2210e89ad4f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amm_Product.xml" hash="e239211fb553bb940071c95391a955e3"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="product.xml" hash="9cb80194a83716c2201d3782b8e497b2"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="product.xml" hash="71c6a8638e1a92986355ee8ee85d9a8b"/></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Amm_Product</name>
|
4 |
+
<version>1.0.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Enables clients in account to add products in the category of the directory store.</summary>
|
10 |
+
<description>Enables clients in account to add products in the category of the directory store. 

|
11 |
Type products - Downloadable.</description>
|
12 |
<notes>enable to adding downloadable products in account</notes>
|
13 |
<authors><author><name>Alexey</name><user>auto-converted</user><email>softaliancecom@gmail.com</email></author></authors>
|
14 |
+
<date>2013-05-24</date>
|
15 |
+
<time>11:58:02</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Amm"><dir name="Product"><dir name="Block"><dir name="Adminhtml"><dir name="Product"><file name="Grid.php" hash="b4661fe5f4f754cdb0c91abe6b01f14f"/></dir><file name="Grid.php" hash="f93b4d141b863e2ec71feb169f440240"/></dir><file name="Monblock.php" hash="59f97b2e53b27e223f5d6e650ab7b5c4"/></dir><dir name="Helper"><file name="Data.php" hash="9b4fba746e0acdffc418696f0ab08b37"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Product"><file name="Collection.php" hash="a57cf43fb3989a3a865c23ca7fa9ff1a"/></dir><file name="Product.php" hash="15b7fea36193f2e377bd009d52c23121"/><file name="Setup.php" hash="92ed515cd2cb4963f9d363612cabdfca"/></dir><file name="Product.php" hash="afd9cd60318217520ee85b7c0e9f9e7c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="9b01987b5765f788341173d0b86259ab"/></dir><file name="IndexController.php" hash="1403f6278b45d46aa252be5763f1e660"/><file name="StatisticaController.php" hash="65b01ef7adc9dfeff32791ec672a011f"/></dir><dir name="etc"><file name="config.xml" hash="613627e7d6bca7865232ca786a18e551"/></dir><dir name="sql"><dir name="product_setup"><file name="mysql4-install-0.0.1.php" hash="070155ac1b2191b9f4b2c2210e89ad4f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amm_Product.xml" hash="e239211fb553bb940071c95391a955e3"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="product.xml" hash="9cb80194a83716c2201d3782b8e497b2"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="product.xml" hash="71c6a8638e1a92986355ee8ee85d9a8b"/></dir><dir name="template"><dir name="product"><file name="show.phtml" hash="1b72ec3424b480a6398b3db9ea85ae8d"/><file name="statistica.phtml" hash="6d199bb5c00f07e9ff998755bc1f9efa"/></dir></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|