| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Subcategory Mods on 4.2.0 | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
Thanks, still working on it. Pretty confusing for a new programmer.
__________________
Gold 4.2.0 CDSEOPRO v.1.3.1 Advanced MiniCart ezUpsell One Page Checkout Drug Test Kits |
|||||||
#12
|
|||||||||
|
|||||||||
Re: Subcategory Mods on 4.2.0
Three different results can be achieved by following this mod.
What model you are trying to implement? Real working horse for this mod is the .tpl and .php files modification CSS is required to specify additional lookout So if you don't see subcats try to execute cleanup.php on your store or clear templates cache in admin If it won't improve situation you should revise changes you made to php and tpl one more time
__________________
Regards, Victor Dubiniuk X-Cart Skins Store - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#13
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
Hello there.
First of all I would like to thank Victor D and artmatt for their excellent work and support. I could use some help right now, since I don't have knowledge of html or css. I want to use the first model that artmatt used in post #1. So I want my Categories panel to show a category's subcategories only when a customer clicks on that category and browses its products. (it's simple, don't you get it?) I want to go a little bit further and move the subcategory's text and front icon a bit to the right. That way, it will be easier to distinguish the categories from subcategories. I even want to change the icon in front of subcategories. So I used the following... In file "include/categories.php" look for the following line: (taken from post #1) Code:
and just before it add the following block of code: (taken from post #1) Code:
Open file "skin1/customer/categories.tpl" Add {* at the start of the file and *} at the end of the file. You should have something like this: Code:
Now, in the end of the file, after *} you must add: (taken from post #5) Code:
And finally, at the end of file "skin1/main.css" add this: Code:
Now I have a problem. I have one category : Name (Position) Category 1 (Pos. 10) with four subcategories: Name (Position) Alpha (Pos. 10) Gamma (Pos. 20) Delta (Pos. 30) Omega (Pos. 40) When I click on Category 1 the subcategories appear in correct position order: Alpha Gamma Delta Omega When I click on any subcategory the order changes, the subcategories appear in WRONG position order (the new order is alphabetical): Alpha Delta Gamma Omega One way of bypassing this it is to assign position to subcategories alphabetically. But I don't like this way. Any idea how to fix this? Best regards, Andrew |
|||||||
#14
|
|||||||||
|
|||||||||
Re: Subcategory Mods on 4.2.0
try to replace
Code:
with Code:
__________________
Regards, Victor Dubiniuk X-Cart Skins Store - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#15
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
Quote:
Thank you for your answer. Still, I get the same result with this change. I cleaned up the templates' cache but same result. You can see the problem in my shop. Best regards, Andrew |
|||||||
#16
|
|||||||||
|
|||||||||
Re: Subcategory Mods on 4.2.0
finally find some time and get it( Sorting conditions implemented in x-cart by default is strange a bit so I have added resorting).
Code:
__________________
Regards, Victor Dubiniuk X-Cart Skins Store - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
|
#17
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
Quote:
Excellent. Thank you very much. To help newbies (like me) a little: the above code goes in "include/categories.php" in the position described in post#13. at the end of file "skin1/main.css" I added this: Code:
"margin-left: 11px;" means that I move the subcategories beneath the category 11 pixels to the right. Change the number to move it left or right. "background: transparent url(images/category_bullet_invert.gif) no-repeat 8px 5px;" with this line I changed the image (bold letters) in front of subcategories. To put your own image, put your image in folder "images" and change the image name above. Thanks goes to everyone that helped. Best regards, Andrew |
|||||||
#18
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
To fix the order issue, can you not just change the line from:
PHP Code:
PHP Code:
Or does this no longer work in 4.2
__________________
Version 4.1.8 Version 4.1.11 |
|||||||
#19
|
|||||||||
|
|||||||||
Re: Subcategory Mods on 4.2.0
There is no such flag in include/func/func_categories.php
I doesn't catch why sorting differs for the root and subcategory. When you browse to subcategory sorting order is changed from order_by to category_path for the same flag.
__________________
Regards, Victor Dubiniuk X-Cart Skins Store - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#20
|
|||||||
|
|||||||
Re: Subcategory Mods on 4.2.0
Apologies all, I'd forgotten that I added that flag myself ages ago.
In categories.php around line 68 you can make the following change. (WARNING - only tested in Xcart 4.1.11) PHP Code:
In Xcart4.1.11 you can also pass any non-null $flag string to this function call and it will do the same thing without this mod thanks to the last else clause, eg if you call $raj =func_get_categories_list("", true,"lorumipsum"); it still works thanks to the last else clause - the bug in the original is that it doesn't work if you leave out the flag parameter.
__________________
Version 4.1.8 Version 4.1.11 |
|||||||
|
|||
X-Cart forums © 2001-2020
|