Author Topic: how to add custom fields values in URL  (Read 2265 times)

forprobe

  • Beginner
  • *
  • Posts: 42
how to add custom fields values in URL
« on: August 12, 2019, 14:39:08 pm »
Hi
the following link
index.php?option=com_virtuemart&keyword=&lang=en&limitstart=0&view=category&virtuemart_category_id=277&virtuemart_manufacturer_id=23
shows all products from both a category and a manufacturer

also in left will appear some custom fields
let's say that I have a custom field with the id=40, and inside it 3 values: red, white, black

how can I modify the above link to have also the resulted items (selected by category & manufacturer) filtered also by color, let's say white?
I imagined something like
index.php?option=com_virtuemart&keyword=&lang=en&limitstart=0&view=category&virtuemart_category_id=277&virtuemart_custom_fields[40]=1 - the red part is not working
also, in the filter where the custom field is present, the white color should be checked

Is this possible?

I'm using VirtueMart 3.4.2
Regards

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10352
  • VirtueMart Version: 3+
Re: how to add custom fields values in URL
« Reply #1 on: August 12, 2019, 18:17:23 pm »
yes all this is possible,
This is doable for a developer, but it sounds like you are not advanced enough.

why not use an existing filter solution?

https://breakdesigns.net/extensions/joomla/custom-filters


J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)