VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: maxkomarov on December 19, 2015, 20:21:58 PM

Title: How to display custom field of "custom group" type on product details form?
Post by: maxkomarov on December 19, 2015, 20:21:58 PM
Hi all,

Plase help with subject.
Thank you

JML 3.4.5
VM 3.0.12
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: PRO on December 19, 2015, 23:42:42 PM
be more specific
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: maxkomarov on December 20, 2015, 13:27:27 PM
Quote from: PRO on December 19, 2015, 23:42:42 PM
be more specific

Quote from: PRO on December 19, 2015, 23:42:42 PM
be more specific

Oh... English is not my native lang so excuse me.

For example:

I have custom group custom filed "Dimensions" and string custom fileds "Lenght", "Width" and "Height" - and they are childs of "Dimensions"
I would like to display it as follow:

Dimensions
   Lenght
   Width
   Height
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: PRO on December 22, 2015, 13:33:57 PM
what position is it set to?
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: maxkomarov on December 22, 2015, 23:08:31 PM
Quote from: PRO on December 22, 2015, 13:33:57 PM
what position is it set to?
"Normal" position
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: PRO on December 28, 2015, 21:57:52 PM
do you have the "normal" position in your template?


also, why not just use the length,width etc fields?
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: maxkomarov on December 29, 2015, 17:06:36 PM
Quote from: PRO on December 28, 2015, 21:57:52 PM
do you have the "normal" position in your template?


also, why not just use the length,width etc fields?

Yes, I have.

It's for example only. In a real it's a group of electrical parameters of generator as part of genset.
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: PRO on December 29, 2015, 17:14:08 PM
nothing displays at all?

Title: Re: How to display custom field of "custom group" type on product details form?
Post by: maxkomarov on December 29, 2015, 23:32:02 PM
Quote from: PRO on December 29, 2015, 17:14:08 PM
nothing displays at all?
Nothing...
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: PRO on January 01, 2016, 23:15:17 PM
what have you done so far?

can you send a screenshot of the custom field configuration?

and have you applied it to the product?
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: maxkomarov on January 04, 2016, 16:19:12 PM
Quote from: PRO on January 01, 2016, 23:15:17 PM
what have you done so far?

can you send a screenshot of the custom field configuration?

and have you applied it to the product?
Title: Re: How to display custom field of "custom group" type on product details form?
Post by: balai on January 04, 2016, 17:26:15 PM
You cannot display a custom field of type "custom group"
This is used for internal classification and not for display.

You can do what you want by adding a header (e.g. Dimensions) above the custom field position that used to display these custom fields.
Ideally you have to create a unique position used only for the dimensions.
This has to be done to the product layout (components/com_virtuemart/views/productdetails/tmpl/default.php) or it's equivalent override in the template if exists.
The positions are declared in a code like: shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'ontop'));