Reputation: 95
We tried to find a module/plugin or something like that that shows a cart summary in the page header (instead of in the sidebar as we currently have it) of our OpenCart webshop.
But it is difficult to search for this because we do not have matching search parameters (e.g. the keyword "cart" gives many results but all of them are not what we are searching for).
Does anybody have an idea how such a module would be named so that we will be able to search for it?
Does anybody already used such an module for OpenCart and could give us a recommendation/link to a good module?
We think that there must already exist ready to use plugins like that - so we do not want to invent the wheel again by coding an own one.
Upvotes: 1
Views: 170
Reputation: 1194
As you have (instead of in the sidebar as we currently have it) you want to show module in header
you can call any module in header as well.
eg i have passed category
module to header which is by default can be assigned to sidebar , top and bottom onlly. In /catalog/controller/common/header.php
here you can load required module.
$this->children = array(
'module/language',
'module/currency',
'module/cart',
'module/category'
);
Now echo
it on /catalog/view/theme/default/template/common/header.tpl
file where you want it to appear.
<?php echo $category; ?>
In this way you can use any module to header and footer as well.
Good Luck
Upvotes: 1
Reputation: 826
I've always hated the limitations on module positioning in OC. Take the code from the cart summary module itself and implement it directly into the /common/header.tpl or wherever would be appropriate for this level of customization.
Upvotes: 0