forked from e107inc/vstore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvstore_cat_menu.php
More file actions
39 lines (29 loc) · 928 Bytes
/
vstore_cat_menu.php
File metadata and controls
39 lines (29 loc) · 928 Bytes
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
<?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/shortcodes/batch/vstore_shortcodes.php');
require_once(e_PLUGIN . 'vstore/e_sitelink.php');
$tp = e107::getParser();
$sc = new plugin_vstore_vstore_shortcodes;
$vst = new vstore_sitelink;
$caption = "Vstore Categories";
$items = $vst->storeCategories();
$template = e107::getTemplate('vstore', 'vstore_menu', 'categories');
$text = $tp->parseTemplate($template['start'], true, $sc);
foreach($items as $item) {
$sc->setVars($item);
$text .= $tp->parseTemplate($template['item'], true, $sc);
}
$text .= $tp->parseTemplate($template['end'], true, $sc);
e107::getRender()->tablerender($caption, $text);