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

Merchant
Tól től Canada
Tagság márc. 2025 óta

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
Tól től Canada
Tagság márc. 2025 óta

You're welcome

Te
Ez a weboldal nem használ cookie-kat és nem használ harmadik féltől származó nyomkövetési technológiát. Úgy gondoljuk, hogy jobban tudjuk csinálni, mint mások, és tényleg gondolunk az Ön magánéletére.