News:

Support the VirtueMart project and become a member

Main Menu

Question about category "order by"

Started by naoko15, December 13, 2012, 09:49:11 AM

Previous topic - Next topic

naoko15

Hi, i'd like to know if it's possible to remove the "order by", and "show number of pages" area in one specific category only.

Thanks.

bytelord

Hello,

In your category template override tou could create an if statement when the category id equals to 2 for example do not show the orderby/page numbers. Alternative you could create a different category view override for the specific category and just comment out the order by and page number functionality.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

naoko15

Great, i created a new category default.php with the changes i need but i don't know where to put it, as i already have a template override for my categories. It is supposed to go in -->  YOUR_TEMPLATE/html/com_virtuemart/category/default.php ?

My question is: where do i put this file to override one category only?

Thanks.

bytelord

#3
Hello,

ok, you copy the file but you don't want all the changes that you will make to your override to applied to all categories, so:

1. Rename default.php to default1.php   (do not use long file names or _ or -  -//-  Filename size until 8 characters will be best option, like default1.php or default2.php)
2. - Edit your new default1.php and comment out the line 177 & 178 for orderby, like
                <?php // echo $this->orderByList['orderby']; ?>
                <?php // echo $this->orderByList['manufacturer']; ?>
     or what ever else you want
    -  Comment out the line 182 & 183 and also line 346 (all that lines are for page numbers)
3. Save your new file
4. From the backend go to Product -> Product Categories and edit the category you want to apply the specific override.
5. Inside the category configuration at the bottom go to Category Browse Page  and select your alternative default1 override
6. Save and test it on the FE.

More detailed cannot be explained :)

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

naoko15

Wonderful!!! that's exactly what i needed. THANK YOU!!! : )