hello,
how to show the value of a custom field in the product details page?
I guess I have to modify (overide) the file default.php in /components/com_virtuemart/views/productdetails/tmpl
but how? The name of my custom field is prix_de_vente
many thanks for your help!
Raphael
[attachment cleanup by admin]
I don't think that you need anything else.
If you are using the default Virtuemart layouts normally you should get it.
Also try to enter some layout positions (e.g. ontop)
Quote from: balai on August 13, 2014, 12:12:39 PM
If you are using the default Virtuemart layouts normally you should get it.
How can I know that? :-\
hello balai,
I tried to enter a layout position "ontop" but it doesn't seem to run.
[attachment cleanup by admin]
I assume you've "attached" this custom field to your product?
Quote from: GJC Web Design on August 13, 2014, 13:22:56 PM
I assume you've "attached" this custom field to your product?
I am not sure I understand what you mean with "attached".
I created an new custom file.
Raphael
and then go to the products and add that custom field... on the (surprisingly named ;) ) custom field tab
you mean that?
I already did that before but it doesn't work.
[attachment cleanup by admin]
can only be your template then - have you tried with a std Beez etc?
Quote from: GJC Web Design on August 13, 2014, 19:08:41 PM
can only be your template then - have you tried with a std Beez etc?
I gues that's the problem. And I don't know what I have to change in the php code to show this value.
compare the std template to what you have
Quote from: GJC Web Design on August 13, 2014, 19:42:35 PM
compare the std template to what you have
you mean the beez template ?
no - the standard product detail templates that comes with VM
Quote from: GJC Web Design on August 13, 2014, 20:53:56 PM
no - the standard product detail templates that comes with VM
I was in it. That's my problem. I don't know how to change the code.
If you want I can give you an access to my website. Maybe you'll find the problem. It's just a test website
If you pay my normal rate no prob - email me if you need me..
Learn how todo layout overriding http://docs.virtuemart.net/tutorials/templating-layouts/78-introduction-template-system.html
open the default.php, search for
if (!empty($this->product->customfieldsSorted['normal'])) {
$this->position = 'normal';
echo $this->loadTemplate('customfields');
}
Place that somewhere in your layout. Change the word normal to something like "mypos", or what you want. Give your customfield the position mypos and thats it mainly.
Or ask GJC, or ask me, or jenkinhill