M
M
Maxim2018-07-07 22:10:22
Joomla
Maxim, 2018-07-07 22:10:22

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

1 answer(s)
P
Pavel Gruznykh, 2018-07-08
@Amic

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.
5b4176dd682c4662257871.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question