I created an overlay window for search - click a search icon and an overlay window shows the search input and drops the user on the advanced search page with their results.
I'm trying to use the same approach for a shopping cart overlay window.
The problem is when the window opens, it doesn't load the language constants or pull any database data.
Is it possible this approach just won't work because it is bypassing the database pulls that happens within Zen-Cart when a page loads?
Code in includes/templates/responsive_classic/common/tpl_header.php looks like this:
Code:
<li>
<div id="shoppingcartOverlay" class="overlay">
<span class="closebtn" onclick="closeShoppingCart()" title="Close Overlay"><i class="fas fa-check"></i></span>
<div class="overlay-content">
<?php require($template->get_template_dir('tpl_shopping_cart.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_shopping_cart.php'); ?>
</div>
</div>
<div id="openShoppingCart" onclick="openShoppingCart()"><i class="fa fa-check"></i></div>
</li>
Code in includes/templates/responsive_classic/jscript/jscript_header.js loooks like this:
Code:
//BOF Shopping Cart Overlay
function openShoppingCart() {
document.getElementById("shoppingcartOverlay").style.display = "block";
}
function closeShoppingCart() {
document.getElementById("shoppingcartOverlay").style.display = "none";
}
//EOF Shopping Cart Overlay
Bookmarks