News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VM Admin Products Page: Show custom fields used in each product

Started by EvanGR, January 07, 2019, 14:41:57 PM

Previous topic - Next topic

EvanGR

In the VM Products page (back-end), we want to tweak the admin template to show the custom fields used for each product.

Can you give me a starting point on how to access this data?

Thank you!

[VM3.2.15]

GJC Web Design

administrator\components\com_virtuemart\views\product\tmpl\default.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EvanGR

Thank you.

I have var_dumped the $product object, but I can't seem to find info about the custom fields in use... Have I not looked carefully, or do I find them in a different way?

GJC Web Design

I don't know -- I assume they are not there for performance reasons

you can get the customs I guess by importing the custom model etc etc -- see how its done on the invoice/email frontend pricelists etc
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

EvanGR, what is the final need?
All secondary product tables are joined using virtuemart_product_id
Check the #__virtuemart_product_customfields table with phpmyAdmin or a similar tool, if you need to code something yourself.
If you need a specific view, it is better to write a vmextend plugin that modifies the Virtuemart core code, i use this each time a need to include custom features in the virtuemart back-end

EvanGR

Hello and thanks for the replies.

My need is to be able to quickly see which products have custom fields in them, in the vm Products view (admin).

example: Currently, I am adding Manufacturer/Model custom fields to hundreds of products. I have missed some products, and it's very time consuming to find out which.

Thanks


Studio 42

I think that the only right solution is to write a new vmextended plugin to display your customfeilds.
But for a customer i have write a vmextended product tagger to search for keywords in the short desc(or other field of your choice) and  add the corresponding tag as custom fields.
Perhaps, it's the solution you need ?