| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Category images on front page | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Category images on front page
Hello, ive been searching for a long time on this and I can't believe its not a standard thing in xcart.
Ive looked at older post which give me some code but not of them work. All I want to do is show a list (which would be blocks, divs etc) of all my main categories. I need it to show the category image and it to link to the category when clicked on...like this basically: http://www.knight-air.co.uk/ I know this bit of code display the subcategories, but how can I change it to use on the home page to display the root categories Code:
It would be a great idea if there was a knowledge base of snippets of code then people could use it as a reference. Thanks in advance.
__________________
------------------------------------------------ Darren |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Category images on front page
Hi mekon. This is where we keep our code snippets! Agreed it would be nice if they were organized...
Well I mocked up some code for you. Try adding this to /common_files/customer/main/welcome.tpl PHP Code:
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
#3
|
|||||||
|
|||||||
Re: Category images on front page
Brilliant Mike, what a star you are.
Before I moved to xcart I used Actinic (now sellerdeck) and they have a knowledge base of tricks etc: http://community.sellerdeck.com/forumdisplay.php?f=27 Which proved really useful for developers. Maybe they will do something similar in the future. Thanks again. M
__________________
------------------------------------------------ Darren |
|||||||
|
#4
|
|||||||
|
|||||||
Re: Category images on front page
Mike, sorry to bother you
For some reason when I move from the home page to another, then come back the categories are gone. If I run cleanup.php they appear again....until I goto another page and back etc. Any idea what this could be? M
__________________
------------------------------------------------ Darren |
|||||||
#5
|
|||||||
|
|||||||
Re: Category images on front page
Ok, ive tested this in the default templates in 4.5.2, and it does the same.
I also tried it in a 4.4.2 site (same server etc) and it retains them...so something about the code that 4.5.2 doesn't like?
__________________
------------------------------------------------ Darren |
|||||||
#6
|
|||||||
|
|||||||
Re: Category images on front page
__________________
------------------------------------------------ Darren |
|||||||
#7
|
|||||||
|
|||||||
Re: Category images on front page
Quote:
This is a superstar piece of code and I also do not know why it is not standard in x-cart... I was able to simple drop this code into a static page and voila - there is my category listing!
__________________
X-Cart Gold 4.1.10, 4.1.18, 4.4.4, 4.4.5 |
|||||||
#9
|
|||||||
|
|||||||
Re: Category images on front page
Quote:
How did you drop this into a static page ? All it shows is code ? |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Category images on front page
You are to enable Smarty tags in static pages first:
http://help.x-cart.com/index.php?title=X-Cart:Static_Pages
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|