Author Topic: VM Admin Products Page: Show custom fields used in each product  (Read 707 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 275
VM Admin Products Page: Show custom fields used in each product
« on: January 07, 2019, 14:41:57 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9198
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: VM Admin Products Page: Show custom fields used in each product
« Reply #1 on: January 07, 2019, 14:47:59 pm »
administrator\components\com_virtuemart\views\product\tmpl\default.php
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EvanGR

  • Jr. Member
  • **
  • Posts: 275
Re: VM Admin Products Page: Show custom fields used in each product
« Reply #2 on: January 07, 2019, 15:21:03 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9198
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: VM Admin Products Page: Show custom fields used in each product
« Reply #3 on: January 07, 2019, 19:41:47 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4047
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: VM Admin Products Page: Show custom fields used in each product
« Reply #4 on: January 08, 2019, 01:13:31 am »
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

  • Jr. Member
  • **
  • Posts: 275
Re: VM Admin Products Page: Show custom fields used in each product
« Reply #5 on: January 08, 2019, 08:50:16 am »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4047
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: VM Admin Products Page: Show custom fields used in each product
« Reply #6 on: January 08, 2019, 10:37:07 am »
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 ?