function get_cart_data() { // retrieve all cart data if (!is_cart_filled()) { return array(); } $in = array(); foreach ($_SESSION[CART_KEY]['products'] as $key => $value) { $key = intval($key); $in[$key] = $key; } $sql = 'SELECT * FROM ' . DB_PREPEND . 'phpwcms_shop_products WHERE shopprod_status=1 AND '; $sql .= 'shopprod_id IN (' . implode(',', $in) . ')'; $data = _dbQuery($sql); if (isset($data[0])) { foreach ($data as $key => $value) { $data[$key]['shopprod_quantity'] = $_SESSION[CART_KEY]['products'][$value['shopprod_id']]; } } return $data; }
} // initialize Lightbox effect if ($_tmpl['config']['init_lightbox']) { initSlimbox(); } $entries = implode($_tmpl['list_space'], $entry); } else { $entries = $_tmpl['list_none']; } if ($shop_detail_id) { $entries = $_tmpl['config']['shop_wrap']['prefix'] . $entries . $_tmpl['config']['shop_wrap']['suffix']; } else { $entries = $_tmpl['config']['shop_wrap']['prefix'] . $_tmpl['list_header'] . LF . $entries . LF . $_tmpl['list_footer'] . $_tmpl['config']['shop_wrap']['suffix']; } $entries = str_replace('{CATEGORY}', html($shop_cat_name), $entries); $entries = render_cnt_template($entries, 'CART_LINK', is_cart_filled() ? rel_url(array('shop_cart' => 'show'), array('shop_detail'), $_tmpl['config']['cart_url']) : ''); $entries = parse_cnt_urlencode($entries); $content['all'] = str_replace('{SHOP_PRODUCTLIST}', $entries, $content['all']); if (preg_match('/<!--\\s{0,}RENDER_SHOP_PAGETITLE:(BEFORE|AFTER)\\s{0,}-->/', $content['all'], $match)) { if (empty($GLOBALS['pagelayout']['layout_title_spacer'])) { $title_spacer = ' | '; $GLOBALS['pagelayout']['layout_title_spacer'] = $title_spacer; } else { $title_spacer = $GLOBALS['pagelayout']['layout_title_spacer']; } if ($shop_pagetitle) { $shop_pagetitle .= $title_spacer; } $shop_pagetitle .= $shop_cat_name; if (empty($content['pagetitle'])) { $content['pagetitle'] = html($shop_pagetitle);