VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: DaggaTora on March 07, 2012, 14:02:26 PM

Title: Hide Custom Field Title
Post by: DaggaTora on March 07, 2012, 14:02:26 PM
When you create a Custom Field in the BE you have to assign at least 2 letters. Is there a way to hide that title in an specific Custom field? or... if I set a new position in product details, how can i set that position not to show the titles of the custom fields i layout there?
Title: Re: Hide Custom Field Title
Post by: DaggaTora on March 09, 2012, 13:24:56 PM
any idea? for example i have three colors but i dont want the word "Color" to appear.
Title: Re: Hide Custom Field Title
Post by: jpreskitt on March 12, 2012, 21:52:43 PM
I'm also looking for a solution. I have title and description i'm trying to remove:
http://65.60.49.130/~johnpre1/unbiasedclothing_j2-5/index.php/mens/mens-tees/typeface-monkeyvetica-detail

John

=====
j2.5, vm2.0.2
Title: Re: Hide Custom Field Title
Post by: PRO on March 13, 2012, 03:48:17 AM
default_customfields.php

/components/com_virtuemart/views/productdetails/tmpl/default_customfields.php

<span class="product-fields-title" ><?php echo JText::_($field->custom_title); ?></span>
Title: Re: Hide Custom Field Title
Post by: jpreskitt on March 13, 2012, 07:26:25 AM
actually mine are related products. that's why i saw no changes  ::)
cant seem to find that title code for related products, hmm.
Can this be done in an override?
john
Title: Re: Hide Custom Field Title
Post by: balai on March 13, 2012, 09:52:33 AM
For the related products the file that generates them is:
components\com_virtuemart\views\productdetails\tmpl\default_relatedproducts.php

Title: Re: Hide Custom Field Title
Post by: jpreskitt on March 14, 2012, 07:38:00 AM
QuoteFor the related products the file that generates them is:
components\com_virtuemart\views\productdetails\tmpl\default_relatedproducts.php

Is this an override? because it doesn't exsist in the normal VM2 file structure?
Nor can i find a file anywhere called default_relatedproducts.php
Is your file from an earlier version?
Thanks for helping,
John
Title: Re: Hide Custom Field Title
Post by: balai on March 14, 2012, 09:32:16 AM
It is a file contained in the VM2.0.2 standard package
Title: Re: Hide Custom Field Title
Post by: jpreskitt on March 20, 2012, 15:57:35 PM
Banquet,
Could you or someone else verify the location of the related products php page?
attached is my folder structure in my vm 2.0.2 site. I dug around in both the top level component folder and the administrator component folder.
No where to be found.
thanks in advance!
John

[attachment cleanup by admin]
Title: Re: Hide Custom Field Title
Post by: corymp on March 20, 2012, 17:42:35 PM
Quote from: DaggaTora on March 07, 2012, 14:02:26 PM
When you create a Custom Field in the BE you have to assign at least 2 letters. Is there a way to hide that title in an specific Custom field? or... if I set a new position in product details, how can i set that position not to show the titles of the custom fields i layout there?

Will this help?


<?php
if (!empty(
$this->product->customfieldsSorted['your_position'])) { 
  --> 
$custom_title null; <--
       foreach (
$this->product->customfieldsSorted['Product'] as $field) {
if ($field->display) {
if ($field->custom_title != $custom_title) { 
echo $field->display;
}

}
?>

Title: Re: Hide Custom Field Title
Post by: amet123 on January 19, 2013, 20:21:45 PM
if i want to change only lable in image string

regards
Title: Re: Hide Custom Field Title
Post by: PRO on January 20, 2013, 17:12:55 PM
TO NOT show with image
wrap it like this


<?php if ($field->field_type != M){ ?>
<span class="product-fields-title" ><?php echo JText::_($field->custom_title); ?></span>
<?php } ?>


http://forum.virtuemart.net/index.php?topic=99225.0