VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: marvays on July 16, 2021, 11:39:02 AM

Title: modify search plugin for VM
Post by: marvays on July 16, 2021, 11:39:02 AM
Can anyone modify my search plugin so that it doesn't show ID1 products or "discontinued" products in my search results?

In the plugin settings I see "IDs of Custom Fields" for searching some or all custom fields. I would like to add a field to omit a certain category.
Or just edit the php file to ftp.

Because I need an adjustment to the client's website, where I don't want to search in the category with discontinued products, it doesn't have to be made for free :)
Title: Re: modify search plugin for VM
Post by: PRO on July 16, 2021, 21:35:19 PM
So, you would do this easier in the products.php template

do you code at all?   for example, i skip products that have a price set to ZERO
When my products are out of stock, I set the price to ZERO

You can check for "keyword" in the url, then do a continue on the discontinued etc

   foreach ($products as $product ) {

   if ($product->prices['product_price'] <=0) continue;
Title: Re: modify search plugin for VM
Post by: marvays on July 18, 2021, 11:53:51 AM
Can I order a paid adjustment from you? I'd rather pay you half an hour to work than spend the whole day trying something I don't understand :(
Title: Re: modify search plugin for VM
Post by: Studio 42 on July 18, 2021, 23:04:37 PM
Hi marvays, contact me if you need someone for this change.