I have a problem i hope one of you could help me with, as the topic says:
How is the default product view changed from grid to list in 2.0?
Tried searching the category.tpl for a place to change it, but no luck.
Thanks in advance!
Anders
Just change 'grid' from
Code: Select all
localStorage.setItem('display', 'grid');
Code: Select all
localStorage.setItem('display', 'list');
Do not forget to 'super' refresh your browser by hitting CTRL + F5 or CTRL + Shift + R.
Let me know if it doesn't works.
Hope helps.
Blog Manager 2 - The Only Advanced Blog Extension for OpenCart 2.0 has coming!!!
Blog Manager - The Only Advanced Blog Extension for OpenCart
OpenCart Tips and Tutorials
St. Clare Audio Still in it's newborn stage, a major work in progress..
St. Clare Heirloom Seeds Our original business, our current "bread and butter". Learned HTML, CSS, and a little PHP to develop it from scratch ourselves, having never done coding before. Then we discovered the awesomeness of Shopping Carts. :-)
You can use my extension Custom JavaScript and add the code below:stclare wrote:How would one make this change in a way that it would not get overwritten during a upgrade?
Code: Select all
<script>
if (!localStorage.getItem('display')) {
localStorage.setItem('display', 'list');
}
</script>
See it in action here: http://demo.viethemes.com/opencart2/ind ... ry&path=20
http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme
Extra Positions PRO, Custom JavaScript, Custom CSS and others
Users browsing this forum: No registered users and 107 guests