| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
adding custom sql | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi
i wanted to add a list of my categories in a x cart page (.tpl file), i wanted to pull the categories out of the xcart_categories table, i tried using a PHP/MySQL connect, but that did not work, does anyone if x cart has it's own "special" code to connect to the database or some code to query the database? thanks
__________________
Using x cart 4.0.19 |
|||||||
#2
|
|||||||
|
|||||||
![]() Hi
doesnt anyone know how to do this???/ please help!
__________________
Using x cart 4.0.19 |
|||||||
#3
|
|||||||||
|
|||||||||
![]() You need an example of how to connect to database "X-CART and the list of categories?
Or would you prefer that the "X-CART" is not appealed to the database to select categories? |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Quote:
The categories array should be available to you throughout the cart - just loop through that instead of trying to add yet one more array to what is in memory. |
|||||||||
#5
|
|||||||
|
|||||||
![]() Hi
how would i list the categories array? and also i need the categories to be link their respective detail page. thanks for the help.
__________________
Using x cart 4.0.19 |
|||||||
#6
|
|||||||
|
|||||||
![]() Quote:
basically i want to list my categories on a page and have them linked to their respective page, i want to achieve this the most efficient way. i just thought a database connect and select statement would work for me, if there another easier way, then please let me know! thanks
__________________
Using x cart 4.0.19 |
|||||||
#7
|
|||||||||
|
|||||||||
![]() Quote:
A simple way, open file "skin1/customer/categories.tpl" find line: {capture name=menu} and after insert next code (for link to url test.php, test1.php, test2.php): PHP Code:
If you need more additional links (in categories list) add similar. |
|||||||||
#8
|
|||||||
|
|||||||
![]() Hi
thanks for your reply. i think you may have misunderstood me, i dont want to add more categories, i want to display my existing categories on another static page, not in my categories page. please tell me if i have misunderstood you. can you help me with that? thanks
__________________
Using x cart 4.0.19 |
|||||||
#9
|
|||||||||
|
|||||||||
![]() skin1/customer/categories.tpl still has the answer to your question. You will see a {section} section that loops through the categories array and displays the name and the link. This will show you exactly how to do it.
|
|||||||||
#10
|
|||||||
|
|||||||
![]() thanks, i shall have a look at the file and have a go at it.
thanks
__________________
Using x cart 4.0.19 |
|||||||
|
|||
X-Cart forums © 2001-2020
|