Author Topic: modify search plugin for VM  (Read 4177 times)

marvays

  • Jr. Member
  • **
  • Posts: 456
    • richta.cz
  • Skype Name: marvays
modify search plugin for VM
« 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 :)

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10443
  • VirtueMart Version: 3+
Re: modify search plugin for VM
« Reply #1 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;

marvays

  • Jr. Member
  • **
  • Posts: 456
    • richta.cz
  • Skype Name: marvays
Re: modify search plugin for VM
« Reply #2 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 :(

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4728
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: modify search plugin for VM
« Reply #3 on: July 18, 2021, 23:04:37 PM »
Hi marvays, contact me if you need someone for this change.