News:

Support the VirtueMart project and become a member

Main Menu

Hide Custom Field Title

Started by DaggaTora, March 07, 2012, 14:02:26 PM

Previous topic - Next topic

DaggaTora

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?
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

DaggaTora

any idea? for example i have three colors but i dont want the word "Color" to appear.
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

jpreskitt

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

PRO

default_customfields.php

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

<span class="product-fields-title" ><?php echo JText::_($field->custom_title); ?></span>

jpreskitt

#4
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

balai

For the related products the file that generates them is:
components\com_virtuemart\views\productdetails\tmpl\default_relatedproducts.php


jpreskitt

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

balai

It is a file contained in the VM2.0.2 standard package

jpreskitt

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]

corymp

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;
}

}
?>

VM 2.0.4 Stable
J2.5.4

amet123

if i want to change only lable in image string

regards
Amit Vaid

Gap Solution
Web Development

PRO

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