Author Topic: Hide Custom Field Title  (Read 4155 times)

DaggaTora

  • Jr. Member
  • **
  • Posts: 253
Hide Custom Field Title
« 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?
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

DaggaTora

  • Jr. Member
  • **
  • Posts: 253
Re: Hide Custom Field Title
« Reply #1 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.
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

jpreskitt

  • Beginner
  • *
  • Posts: 40
Re: Hide Custom Field Title
« Reply #2 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

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10352
  • VirtueMart Version: 3+
Re: Hide Custom Field Title
« Reply #3 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>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

jpreskitt

  • Beginner
  • *
  • Posts: 40
Re: Hide Custom Field Title
« Reply #4 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

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1374
Re: Hide Custom Field Title
« Reply #5 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


jpreskitt

  • Beginner
  • *
  • Posts: 40
Re: Hide Custom Field Title
« Reply #6 on: March 14, 2012, 07:38:00 am »
Quote
For 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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1374
Re: Hide Custom Field Title
« Reply #7 on: March 14, 2012, 09:32:16 am »
It is a file contained in the VM2.0.2 standard package

jpreskitt

  • Beginner
  • *
  • Posts: 40
Re: Hide Custom Field Title
« Reply #8 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]

corymp

  • Jr. Member
  • **
  • Posts: 149
Re: Hide Custom Field Title
« Reply #9 on: March 20, 2012, 17:42:35 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?

Code: [Select]
<?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

  • Beginner
  • *
  • Posts: 47
  • Amit Vaid
    • Gap Solution
Re: Hide Custom Field Title
« Reply #10 on: January 19, 2013, 20:21:45 pm »
if i want to change only lable in image string

regards
Amit Vaid

Gap Solution
Web Development

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10352
  • VirtueMart Version: 3+
Re: Hide Custom Field Title
« Reply #11 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
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)