Hey All,
I'm looking to create a custom page for Opencart that can show search results for products, but without the top Menu that Opencart usually comes with. This mustn't affect the rest of my store, only this page must be different.
Basically I want to be able to have it show a list of products matching a search result, but without the rest of the fluff that shows on Opencart normally.
How would I go about accomplishing this?
I have attached an image of what ideally I'd like to do.
I'm looking to create a custom page for Opencart that can show search results for products, but without the top Menu that Opencart usually comes with. This mustn't affect the rest of my store, only this page must be different.
Basically I want to be able to have it show a list of products matching a search result, but without the rest of the fluff that shows on Opencart normally.
How would I go about accomplishing this?
I have attached an image of what ideally I'd like to do.
Attachments
Untitled.png (278.4 KiB) Viewed 2950 times
Sounds easy enough.... but sadly its quite a bit more complicated. Look for a tutorial on making a custom page in opencart.
then you`ll need to make a copy of your header.tpl and its controller & make your new page point to this header instead of the original one.
Your new header.tpl should include all the workable code, but not anything that is output to the screen.
the header.tpl has a lot more going on than just the visuals you see, so you cant just remove it.
hope that helps,
If in doubt ask a developer to do it
then you`ll need to make a copy of your header.tpl and its controller & make your new page point to this header instead of the original one.
Your new header.tpl should include all the workable code, but not anything that is output to the screen.
the header.tpl has a lot more going on than just the visuals you see, so you cant just remove it.
hope that helps,
If in doubt ask a developer to do it
Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk
Wat would the code be to point to the new header be called?
Assume I'm calling the header 'customheader' - for example.
I know that most Opencart pages call the header in the template file with <?php echo $header; ?>, but what would I use to instead load the custom header?
I've been reading up on how to make a custom page and have made one successfully, but using a different header is something I have been struggling with.
Assume I'm calling the header 'customheader' - for example.
I know that most Opencart pages call the header in the template file with <?php echo $header; ?>, but what would I use to instead load the custom header?
I've been reading up on how to make a custom page and have made one successfully, but using a different header is something I have been struggling with.
near the bottom of your custom page, you`ll see something like the below code, this loads the controller for the header amongst other things, which in turn loads the header.tpl and places it in a variable called data['header'] which in your view file will be accessible from $header so make a copy of these two files, the controller and the view called say customHeader and change that in your custompage code to point to that controllerinovateqsa wrote:Wat would the code be to point to the new header be called?
Assume I'm calling the header 'customheader' - for example.
I know that most Opencart pages call the header in the template file with <?php echo $header; ?>, but what would I use to instead load the custom header?
I've been reading up on how to make a custom page and have made one successfully, but using a different header is something I have been struggling with.
Code: Select all
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
Paul
Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk
All right, I've now got the custom page setup with it's own header and templates, so it's just a matter of time to tweak it to my liking.
Thanks for everything guys!
*Well Technically, Thanks for everything "Kenberne1965".
Thanks for everything guys!
*Well Technically, Thanks for everything "Kenberne1965".
inovateqsa wrote: Thanks for everything guys!
haha i`ll let you offinovateqsa wrote: *Well Technically, Thanks for everything "Kenberne1965".
No problem, glad you got it working
Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk
Would anyone know how to remove the search criteria box "after a search is done"?
It's a bit of an eyesore at the moment.
An alternative is to remove the search bar entirely and place a link in the admin menu for the search (which sounds a little bit more complicated to me and may be beyond my current skills at least).
I should probably explain why I want such a simple page - I plan to use an iFrame to link the content to a forum I am setting up. I want the users to think that the product list is still part of the forum, and the Menu and other such clutter would break the illusion of being a part of the same page.
I can edit the styling to match that of the forum once the layout is as I want it.
It's a bit of an eyesore at the moment.
An alternative is to remove the search bar entirely and place a link in the admin menu for the search (which sounds a little bit more complicated to me and may be beyond my current skills at least).
I should probably explain why I want such a simple page - I plan to use an iFrame to link the content to a forum I am setting up. I want the users to think that the product list is still part of the forum, and the Menu and other such clutter would break the illusion of being a part of the same page.
I can edit the styling to match that of the forum once the layout is as I want it.
Attachments
Untitled.jpg (98.05 KiB) Viewed 2915 times
Since they dont search on this page ie (there is no search box) i think you can either remove the relevant code by commenting it all out or wrap this content in a <div> with an id such as #hideMe
and then use jquery to hide that div on page load
because this is a custom one off page, you don't really need to bother yourself with VQMod for the above changes
although this would be the way to do it if it was a normal opencart page.
Paul
Code: Select all
<div id="hideMe"></div>
Code: Select all
<script type="text/javascript">
$(document).ready(function(){
$('#hideMe').hide();
});
</script>
although this would be the way to do it if it was a normal opencart page.
Paul
Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk
Thanks, I'll try that when I get the chance to.
In the meantime I've simply removed the search, and just manually type in the address myself.
In the meantime I've simply removed the search, and just manually type in the address myself.
Who is online
Users browsing this forum: No registered users and 149 guests