-
Notifications
You must be signed in to change notification settings - Fork 12
/
vstore_menu.php
60 lines (46 loc) · 1.57 KB
/
vstore_menu.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* e107 Plugin - Vstore Menu
*
*/
if (!defined('e107_INIT')) {
exit;
}
require_once(e_PLUGIN . 'vstore/vstore.class.php');
$vst = new vstore;
/// Moved to e_header.php issue #146 ///
// Loads e_PLUGIN."vstore/languages/English/English_front.php (if English is the current language)
// e107::lan('vstore', false, true);
// e107::js('vstore', 'js/vstore.js');
// $vstore_prefs = e107::pref('vstore');
// e107::js('settings', array(
// 'vstore' => array(
// 'url' => e107::url('vstore', 'index'),
// 'cart' => array(
// 'url' => e107::url('vstore', 'cart'),
// 'addtocart' => 'Add to cart',
// 'outofstock' => empty($vstore_prefs['caption_outofstock'][e_LANGUAGE])
// ? 'Out of stock'
// : $vstore_prefs['caption_outofstock'][e_LANGUAGE],
// 'available' => 'In stock',
// ),
// 'ImageZoom' => array('url' => '')
// )
// ));
// if (!empty($vstore_prefs['custom_css'])) {
// // Add any custom css to the page
// e107::css('inline', "
// /* vstore custom css */
// " . $vstore_prefs['custom_css']);
// }
$category = vartrue($vstore_prefs['menu_cat'], 1);
$num_items = vartrue($vstore_prefs['menu_item_count'], 2);
$caption = "Products";
$text = $vst->productList($category, false, 'menu', $num_items);
e107::getRender()->tablerender($caption, $text);