News:

Looking for documentation? Take a look on our wiki

Main Menu

(SOLVED)Customfields to Category (or browse) page - VirtueMart 3.

Started by tehribo, April 24, 2016, 13:30:57 PM

Previous topic - Next topic

tehribo

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

GJC Web Design

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?
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


tehribo

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!


Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Ghost

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'));

tehribo

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:



Attached you will find also my products.php file.


Jörgen

Hello

Replace "Customfields" with the text You prefer.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

tehribo

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.

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

tehribo

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 :(

Ghost

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.

tehribo

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!