Post by shadoblix » Sat Mar 06, 2010 2:30 pm

Is there a way for me to have the category info show, even if there are no products in that category?

Thx for any hep

DJ
Last edited by i2Paq on Sun Mar 07, 2010 4:01 pm, edited 1 time in total.
Reason: Topic moved

New member

Posts

Joined
Mon Dec 14, 2009 1:49 am

Post by rph » Sat Mar 06, 2010 2:40 pm

/catalog/view/theme/[theme name]/template/product/category.tpl

Code: Select all

    <?php if ($description) { ?>
    <div style="margin-bottom: 15px;"><?php echo $description; ?></div>
    <?php } ?>
to

Code: Select all

    <div style="margin-bottom: 15px;"><?php echo $description; ?></div>

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by shadoblix » Sun Mar 07, 2010 11:48 am

Thanks Ryan, but I followed those instructions and nothing happens.... the category description shows in the admin area but not on the live site UNTIL I add products... I would like to not have to add products, only have the sub categories description showing when a customer clicks on it.
What I basically want to do is have the following category structure:
Under Categories -
Fresh on the Farm (parent category)
- eggs (sub category 1 with description only)
- Whats Growing (sub category 2 with description only)
- Fresh Sheet (subcategory 3 with description only)

Any other suggestions?

New member

Posts

Joined
Mon Dec 14, 2009 1:49 am

Post by shadoblix » Sun Mar 07, 2010 11:58 am

Upon more searching I found this thread in the forums..... tried the suggested fix and it works fine now......
codecreator wrote:I upgraded to 1.3.2 and applied this modification and discovered a typo in the code from my previous post. So, here is a copy/paste version of the corrected code for v1.3.2:

On or about line 93 of {your_store_directory}/catalog/controller/product/category.php:

Code: Select all

 if ($category_total || $product_total) { 
Modify this line to read:

Code: Select all

 if ($category_total || $product_total || (!empty($this->data['description']))) { 
Hope someone finds this helpful.

New member

Posts

Joined
Mon Dec 14, 2009 1:49 am

Post by rph » Sun Mar 07, 2010 12:40 pm

Yeah, I'm not sure what I was thinking. The code I posted definitely wasn't going to get the job done.

Glad you found the solution and shared it.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska
Who is online

Users browsing this forum: No registered users and 5 guests