| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Category menu expand OnClick..possible ? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() It's possible to expand category menu OnClick through some piece of Javascript code ?
I have a long list of root categories so this small modification is needed very badly. Any one can help me please? ![]()
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
#2
|
|||||||||
|
|||||||||
![]() If I am understanding what you want to do, then this should work for you:
http://jsfiddle.net/jbabey/kSQfy/1/
__________________
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
|
|||||||
|
|||||||
![]() Thanks Mike for providing the solution. Can you please tell me exactly what code & in which template while & where to use this code to achieve the results?
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
#4
|
|||||||||
|
|||||||||
![]() That is going to depend on your skin. You are using ideal_comfort so I would make all the changes in that skin directory. You should be a able to copy the code below, and simply paste it into a new template file that you create.
In this case I created: /ideal_responsive/customer/categories.tpl You would likely create: /ideal_comfort/customer/categories.tpl I took some time and tested this out, for now you can see it working at my test site: http://trainingpen.com/ I've modified the script to show and hide the div, clicking the link will expand and collapse. I also commented out the unnecessary part that hid other divs. Code:
If you feel I have earned it, you can thank me with a PayPal payment to mike@babymonkeystudios.com
__________________
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. |
|||||||||
|
#5
|
|||||||
|
|||||||
![]() Hi Mike,
Thanks a lot for the code. This is the solution I was looking for. How ever there are small issues. 1)Since the "categories" menu is replaced by link "expand categories" it does not look good & it will tough for the customers to find out that link. The ideal solution would be it should display category menu with 5 categories link & then it should display link "expand categories" or "See More". 2) Also there is one small issue exists. Just click on "expand categories" now click on any category link so you be taken to that particular category page. Now again click to "expand categories" & you will see it will take you to the home page ! Note: This issue does not exists at your demo site. I am not sure what is the correct way to implement this code but I have done following steps to integrate the code. I am using ideal comfort template. 1) I saved your code at as \skin\common_files\customer\categories_new.tpl 2) I opened skin\ideal_comfort\customer\left_bar.tpl & replaced the code {include file="customer/categories.tpl"} with {include file="customer/categories_new.tpl"} I hope it's correct.
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Anandat,
You're welcome. This could certainly be done, but would require more effort. The changes you made sound correct, I don't know why it is not behaving the same for you. Perhaps try to save categories.tpl as a .bak file, and them place the changes in that file directly? Perhaps there is some Javascript Conflict in the console? I cannot support you further on this, I think I have taken it far enough for free advice. I think you will need to hire a developer to complete this work for you.
__________________
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. |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|