VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: OriyanJ on June 21, 2017, 11:15:33 AM

Title: Adding new fields to product + changing SQL queries to retrieve a product
Post by: OriyanJ on June 21, 2017, 11:15:33 AM
What am I trying to achieve?




I don't ask for code, or specifics, I only need to know what are my best options. I will figure the rest.
If i can't find a solution, I'll have to keep hacking core files (which is so hard to maintain) or simply keep using the same VirtueMart version.



PHP Version 5.6.30
Joomla Version 3.7.0
VirtueMart Version 3.0.16 (I'm about to update to the latest)
Title: Re: Adding new fields to product + changing SQL queries to retrieve a product
Post by: K&K media production on June 21, 2017, 14:44:45 PM
Quoteshow certain custom fields without having to select them from a list, every time I create a product

You mean the dropdown on custom fields tab to add the fields to the product? Why is this to complicated? If you have a lot of fields you can add all this fields to a group and the only thing you need to do on new products is to choose this group on the dropdown and all fields are added to your product with one click.
Title: Re: Adding new fields to product + changing SQL queries to retrieve a product
Post by: Milbo on June 22, 2017, 10:55:18 AM
better is to use a product pattern, so you can easily change all products at once.
Title: Re: Adding new fields to product + changing SQL queries to retrieve a product
Post by: OriyanJ on June 22, 2017, 14:01:25 PM
K&K media production, can I tweak with the search results to show me products by certain custom fields? Order by these fields? I really need make some major changes in the SQL.

Milbo, I'm not sure I get it.
Title: Re: Adding new fields to product + changing SQL queries to retrieve a product
Post by: GJC Web Design on June 22, 2017, 14:47:20 PM
Quoteproduct pattern

install somewhere the demo VM package with products and study how the various custom fields are configured
Title: Re: Adding new fields to product + changing SQL queries to retrieve a product
Post by: PRO on June 27, 2017, 01:37:19 AM
OriyanJ,

what are the variables?

You can do a lot with custom fields. You can also do a lot with product plugins.


You can also add a custom

"Sort by Container" with your own links in it

then in your sublayout/products grab the parameter from the url, and sort by it.