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

CustomField [P]roperty - can you explain me, please?

Started by d0ublezer0, October 03, 2017, 09:40:55 AM

Previous topic - Next topic

d0ublezer0

I want to display the characteristics of the product, such as width, height, length on the product page.
In this case, I would not want to specify them in the custom fields, because they are already specified in the properties of the product.
How do I display them?
I found something similar in the file \sublayouts\customfield.php but did not understand how to use it.
// Property
                case 'P':
                    //$customfield->display = vmText::_ ('COM_VIRTUEMART_'.strtoupper($customfield->customfield_value));
                    $attr = $customfield->customfield_value;
                    $lkey = 'COM_VIRTUEMART_' . strtoupper($customfield->customfield_value) . '_FE';
                    $trValue = vmText::_($lkey);
                    $options[] = array('value' => 'product_length', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_LENGTH'));
                    $options[] = array('value' => 'product_width', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_WIDTH'));
                    $options[] = array('value' => 'product_height', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_HEIGHT'));
                    $options[] = array('value' => 'product_weight', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_WEIGHT'));


It is possible?

Studio 42

You can add and display any value from product in your template, simply use same code as for other fields eg.
echo $product->product_length;
Of course you have to format this.