Answer the question
In order to leave comments, you need to log in
How to show cart button in Joomla VirtueMart 3?
Tell me how to make the shopping cart button in Joomla VirtueMart 3 visible to all users? Currently only visible to registered users.
Here is the output code for the button:
<?php
function cartlink_3() {
$view = JFactory::getDocument()->view;
$modulesContains = $view->containsModules('cart');
$isPreview = $GLOBALS['theme_settings']['is_preview'];
if (isset($GLOBALS['isModuleContentExists']) && false == $GLOBALS['isModuleContentExists'])
$GLOBALS['isModuleContentExists'] = $view->containsModules('cart') ? true : false;
?>
<?php if ($isPreview || $modulesContains) : ?>
<div class=" bd-cartlink-3">
<?php if ($modulesContains) : ?>
<?php echo $view->position('cart', '', '3', 'cart'); ?>
<?php else: ?>
Please add a cart module in the 'cart' position
<?php endif; ?>
</div>
<?php endif; ?>
<?php
}
Answer the question
In order to leave comments, you need to log in
In the Joomla admin panel, go to the module manager, find the cart module in the cart position and check the access settings (in the right column). If you want all users to have access to the module, set the value to Public. See screenshot.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question