Hello,
After 5 years I installed VirtueMart again. Everything is fine but I gone crazy trying to display the "customfields" in my Product list (category view).
I am selling electric motors and each of them have 2 basic parameters - Power and Speed.
I want to have them in a column in the Product lists.
It is a second day I am trying to do it, reading all the previous topics, but the things seems to be changed with VirtueMart 3.
Thank you in advance!
Best regards
hmmm...
http://forum.virtuemart.net/index.php?topic=79799.0
http://forum.virtuemart.net/index.php?topic=104795.0
standard template or some hacky old VM2 one?
set this in admin? -> Show product customfields in browse views
looked at the demo?
tried with the std. template?
Add customfields sublayout inside products sublayout http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html
Quote from: GJC Web Design on April 24, 2016, 13:44:28 PM
hmmm...
http://forum.virtuemart.net/index.php?topic=79799.0
http://forum.virtuemart.net/index.php?topic=104795.0
standard template or some hacky old VM2 one?
set this in admin? -> Show product customfields in browse views
looked at the demo?
tried with the std. template?
Thank you for your answer:
- Joomla version, 3.5.1.
- VirtueMart 3.0.16
- PHP 5.3
I have not installed any Virtuemart templates. Just downloaded the VM and installed it in my website.
The Joomla template which I am using is the free Joomlart - Purity III
"Show product customfields in browse views" is checked.
@Ghost, I tried also the example mentioned here: http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html
<?php echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$this->product,'currency'=>$this->currency)); ?>
Can you please give me the exact syntax of including the customfields, instead of prices?
Thank you in advance!
There are no more Virtuemart templates. The Joomla template has to include the neccessary overrides for VM3. Try with the Protostar template as a starter.
regards
Jörgen @ Kreativ Fotografi
1. Copy /components/com_virtuemart/sublayouts/products.php to /templates/purity_iii/html/com_virtuemart/sublayouts/products.php.
2. Add this inside the copied file, inside product loop:
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$product,'position'=>'normal'));
Quote from: Ghost on April 25, 2016, 13:13:14 PM
1. Copy /components/com_virtuemart/sublayouts/products.php to /templates/purity_iii/html/com_virtuemart/sublayouts/products.php.
2. Add this inside the copied file, inside product loop:
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$product,'position'=>'normal'));
Hello,
I did it like this:
<?php echo "Customfields".shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$product,'position'=>'normal'));
?>
Unfortunatelly this is the output:
(https://forum.virtuemart.net/index.php?action=dlattach;topic=134006.0;attach=64326;image)
Attached you will find also my
products.php file.
Hello
Replace "Customfields" with the text You prefer.
Jörgen @ Kreativ Fotografi
What do you mean?
The "Customfields" word, which you see on the picture is just echo-ed in the php line (<?php echo "Customfields"...), to show you where I was expecting to see the custom fields?
Thank you again for the patience!
Attached you will find the way I set them up.
Soory, but this was not so clear, You circled the Customfield and we do not speak russian.
Are Your customfields asigned the position 'normal' ?
Jörgen @ Kreativ Fotografi
Actually I have not assigned them any position?
Maybe this is the problem?
But why I can see them on the Product page?
Edited:
I tried to setup Layout position "normal" , still did not fix it :(
Normal is the default position. If no position is set, normal is used.
Make sure "Show product customfields in browse views" is enabled in VM Configuration -> Shopfront.
This fixed it! I am sure it was checked yesterday!
Maybe in all my attempts I removed the check mark.
THANK YOU VERY MUCH YOU ALL!
After 5 years VM is even better.
Regards from Plovdiv!