This add-on has a small glitch that was easy to fix

Merchant
Şundan Canada
Mar 2025 tarihinden beri üye

This add on works nice, but I had to fix one small glitch.

When going to a category page that doesn't have any products, this error shows at the top of the page...

Warning: Undefined variable $remainProds in ~/vmods/.cache/pages-category.inc.php (Line 153)

I made a slight change to the vMod.

For the "pages/category.inc.php" modification, I added a definition for $remainProds before the if statement, like so...

$remainProds = 0;
if (database::num_rows($products_query)) {
  $remainProds = 0;
  while ($listing_product = database::fetch($products_query)) {

I'm not an expert in php. I've always worked with Perl, but that fixed it. The errors stopped and the price filtering still works properly.

Thanks for this add on. I'm getting the hang of vMods, and have done a couple simple ones for myself.

Merchant
Şundan Canada
Mar 2025 tarihinden beri üye

You're welcome

Siz
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.