| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
A mod is born...Categories_For_Selected_Product | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
A mod is born...Categories_For_Selected_Product
Categories_For_Selected_Product displays a clickable list of all the categories assigned to
a product in a nested(indented) side menu, with the product's main cat-subcats shown first - followed by others as sorted by Pos. in admin or alphabet. The pixel amount to indent, down to no indenting, can be set in a product.php variable. With indenting on, if a product is assigned to a subcategory but not its parent(s), then the parent(s) will appear above it as non-hyperlinked place holders. Also in product.php there is a variable for hiding or showing root (first level) categories. To do something different with a category depending on whether or not it is available, test the "avail" element value passed to smarty - see comments in the added template "customer/categories_for_selected_product". On a technical note: I am very pleased with the php code here since it is elegantly optimized with arrays. To see it action, check out the right side menu entitled "Copaiba Categories/Conditions" in this page. To install open product.php and around line 143 insert the following: Code:
this is just a modified "categories.tpl" file from the same directory. Give it the following code: Code:
Please keep in mind that with the indent values passed to smarty(pants) it shouldn't be too difficult to create an unordered list css drop menu instead of a side menu. Thanks goes to jamesc for inspiring me to create this mod.
__________________
Version 4.1.3 |
|||||||
#2
|
|||||||
|
|||||||
Thanks for your PM, Hunabku!
Your example url looks good and I surely will give it a try, one of these days. When I find the time... A pity that a day only has 24 hours, isn't it? Thanks for the hard work and for sharing!
__________________
X-Cart 4.0.12 Heavy modified with paid, free and forum mods. PHP 5.2.5 | MYSQL 5.0.51a |
|||||||
#3
|
|||||||
|
|||||||
Great work!
Implemented on mine already - fantastic.
__________________
... v 4.0.18; 4.1 |
|||||||
#4
|
|||||||
|
|||||||
Re: A mod is born...Categories_For_Selected_Product
I just wanted to thank you for this mod and let you know how useful it is for me. this is something I've been wanting for a while. Great job.
__________________
4.1.9 (Linux) Live Store www.thecrackedbook.com Find used books and out of print books. |
|||||||
#5
|
|||||||
|
|||||||
Re: A mod is born...Categories_For_Selected_Product
Thanks for the thanks : )
Just wanted everyone to know that after upgrading from 4.0.18 to 4.1.3 Categories_For_Selected_Product works just fine.
__________________
Version 4.1.3 |
|||||||
|
|||
X-Cart forums © 2001-2020
|