// Show a link to the cart and show the mini cart
// Check to see if minicart module is published, if it is prevent the minicart displaying in the VM module
$q = "SELECT published FROM #__modules WHERE module='mod_virtuemart_cart'";
$db->query($q);
if (USE_AS_CATALOGUE != '1' && $show_minicart == 'yes' && !$db->f("published")) {
    $_SESSION['vmMiniCart'] = true;
    ?>
    <tr>
        <td colspan="2">
        	<?php 
    $class_att = 'class="' . $class_mainlevel . '"';
    $href = $sess->url($mm_action_url . "index.php?page=shop.cart");
    $href2 = $sess->url($mm_action_url . "index2.php?page=shop.cart", true);
    $text = $VM_LANG->_('PHPSHOP_CART_SHOW');
    if ($useGreyBox_cartlink) {
        echo vmCommonHTML::getGreyboxPopUpLink($href2, $text, '', $text, $class_att, 500, 600, $href);
    } else {
        echo vmCommonHTML::hyperlink($href, $text, '', $text, $class_att);
    }
    ?>
		</td>
    </tr>
    <tr>
        <td colspan="2" class="vmCartModule">
        	<?php 
    //				^ Do not change this class name!! It is used to update this cell after a cart action
    // This is the 'mini cart' file
    include PAGEPATH . 'shop.basket_short.php';
    ?>
        </td>
    </tr>
Example #2
0
    $total_price = $CURRENCY_DISPLAY->getFullValue($total);
}
// Display clear cart
$delete_cart = '';
if (@$_SESSION['vmEnableEmptyCart'] && !@$_SESSION['vmMiniCart']) {
    // Output the empty cart button
    //echo vmCommonHTML::scriptTag( $mosConfig_live_site.'/components/'.$option.'/js/wz_tooltip.js' );
    $delete_cart = "<a href=\"" . $_SERVER['SCRIPT_NAME'] . "?page=shop.cart_reset&amp;option=com_virtuemart&amp;option2={$option}&amp;product_id={$prodid}&amp;category_id={$catid}&amp;return={$page}&amp;flypage={$flypage}&amp;Itemid={$Itemid}\" title=\"" . $VM_LANG->_('PHPSHOP_EMPTY_YOUR_CART') . " \">\r\n\t\t\t\t\t<img src=\"" . $mosConfig_live_site . "/images/cancel_f2.png\" width=\"12\" border=\"0\" style=\"float: right;vertical-align: middle;\" alt=\"" . $VM_LANG->_('PHPSHOP_EMPTY_YOUR_CART') . " \" />\r\n      </a>";
    $html1 = vmToolTip($VM_LANG->_('VM_EMPTY_YOUR_CART_TIP'), $VM_LANG->_('PHPSHOP_EMPTY_YOUR_CART'), '', '', $delete_cart, true);
    $delete_cart = $html1;
}
$href = $sess->url($mm_action_url . "index.php?page=shop.cart");
$href2 = $sess->url($mm_action_url . "index2.php?page=shop.cart", true);
$text = $VM_LANG->_('PHPSHOP_CART_SHOW');
if (@$_SESSION['vmUseGreyBox']) {
    $show_cart = vmCommonHTML::getGreyboxPopUpLink($href2, $text, '', $text, '', 500, 600, $href);
} else {
    $show_cart = vmCommonHTML::hyperlink($href, $text, '', $text, '');
}
$tpl->set('minicart', $minicart);
$tpl->set('empty_cart', $empty_cart);
$tpl->set('delete_cart', $delete_cart);
$tpl->set('vmMinicart', @$_SESSION['vmMiniCart']);
$tpl->set('total_products', @$total_products);
$tpl->set('total_price', @$total_price);
$tpl->set('show_cart', @$show_cart);
$saved_cart_text = "";
if ($saved_cart['idx'] != 0) {
    $saved_cart_text = "<br style=\"clear:both;\"/><a href=\"" . str_replace("Itemid=26", "Itemid=34", $sess->url($mm_action_url . "index.php?page=shop.savedcart")) . "\" class=\"savedCart\">" . $VM_LANG->_('VM_RECOVER_CART') . "</a>";
}
$tpl->set('saved_cart', $saved_cart_text);