Author Topic: Remove "(#)" from end of links in virtuemart module (product row count)  (Read 5007 times)

jsnyde

  • Beginner
  • *
  • Posts: 37
I saw this here a while back but couldn't find it when I went looking for it.  Here's how I accomplished it.  Let me know if there is a better way.

In ps_product_category.php.

The code that builds the html for the links is here around line 654:
Code: [Select]
$html .= '
<a title="'.$catname.'" style="display:block;'.$style.'" class="'. $css_class .'" href="'. $sess->url(URL."index.php?page=shop.browse&amp;category_id=".$category_tmp[$row_list[$n]]["category_child_id"]) .'" '.$append.'>'
. str_repeat("&nbsp;&nbsp;&nbsp;",$depth_list[$n]) . $catname
. ps_product_category::products_in_category( $category_tmp[$row_list[$n]]["category_child_id"] )
.'</a>';
}
}

return $html;
}

comment out this line that adds the (#) at the end of the links:

Code: [Select]
. ps_product_category::products_in_category( $category_tmp[$row_list[$n]]["category_child_id"] )

The code is all on one line, so you can conveniently do this with a single line comment like this:

Code: [Select]
// . ps_product_category::products_in_category( $category_tmp[$row_list[$n]]["category_child_id"] )

I am now investigating the same thing for the shop.index page.  I'll post it if I find it.

Jeff

jsnyde

  • Beginner
  • *
  • Posts: 37
Here's the same thing for the shop.index.php file for the shop homepage"

Around line 60 or so (not sure how much i've hacked this, so line count may be off)

Code: [Select]
echo ps_product_category::products_in_category( $db->f("category_id") );
comment out the whole line:

Code: [Select]
  // echo ps_product_category::products_in_category( $db->f("category_id") );

Jeff

Soeren

  • Administrator
  • Sr. Member
  • *
  • Posts: 3106
  • VirtueMart Starter
    • virtuemart.net
Re: Remove "(#)" from end of links in virtuemart m
« Reply #2 on: May 02, 2006, 12:14:25 pm »
You can just turn that off in the configuration!!
Why do you "hack" that in???

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

jsnyde

  • Beginner
  • *
  • Posts: 37
Figures.  I guess I overlooked it or didnt recognize it.  Where is it?

Soeren

  • Administrator
  • Sr. Member
  • *
  • Posts: 3106
  • VirtueMart Starter
    • virtuemart.net
Re: Remove "(#)" from end of links in virtuemart m
« Reply #4 on: May 04, 2006, 16:55:22 pm »
Phew.
Configuration, tab "Site", Subtab "Display"
=> "Show the Number of Products?"

Just uncheck it.

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

jsnyde

  • Beginner
  • *
  • Posts: 37
So many settings.  So little time.

Thanks!

Jeff