Commit 22bf4e07 authored by Mario's avatar Mario Committed by Mario

do not show \"shop\" channel app if the cart addon is not enabled at channel level


(cherry picked from commit f27da515)
parent 54b13491
......@@ -1267,14 +1267,19 @@ function cart_plugin_admin(&$a,&$s) {
}
function cart_channel_apps(&$hookdata) {
$hookdata['tabs'][] = [
'label' => t('Shop'),
'url' => z_root() . '/cart/' . $hookdata['nickname'] . '/catalog',
'sel' => ((argv(0) == 'cart') ? 'active' : ''),
'title' => t('Shop'),
'id' => 'cart-tab',
'icon' => 'shopping-cart'
];
$channelid = App::$profile['uid'];
$enablecart = get_pconfig ($channelid,'cart','enable');
if($enablecart) {
$hookdata['tabs'][] = [
'label' => t('Shop'),
'url' => z_root() . '/cart/' . $hookdata['nickname'] . '/catalog',
'sel' => ((argv(0) == 'cart') ? 'active' : ''),
'title' => t('Shop'),
'id' => 'cart-tab',
'icon' => 'shopping-cart'
];
}
}
function cart_getnick () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment