Author Topic: Editing product-field-display output in overrides  (Read 3766 times)

ciar4n

  • Beginner
  • *
  • Posts: 6
Editing product-field-display output in overrides
« on: December 07, 2011, 16:23:37 pm »
Just wondering is there any way of putting a line break in between custom field items in the profuctdetails overrides..

<span class="product-field-display"><?php echo $field->display ?></span> ...

At the moment they just appear as <input><label><input><label><input><label><input><label> etc.. which leaves them on top of each other and quite difficult to style

Be great if I could output them as <input><label><br><input><label><br><input><label><br> whcih would at least give them their own line.

Any help would be appreciated.

Thanks in advance

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: Editing product-field-display output in overrides
« Reply #1 on: December 07, 2011, 17:18:47 pm »
.product-field-display{width:100%}

ALSO, MINE ARE on top of eachother.


see image

OR, do you mean the Title then </br> ?

[attachment cleanup by admin]
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

ciar4n

  • Beginner
  • *
  • Posts: 6
Re: Editing product-field-display output in overrides
« Reply #2 on: December 07, 2011, 18:12:04 pm »
Thank you BT..

This is what I have so far... I've marked in red the items i'd like to split with a <br> (the radio buttons)

Idealy if I could break them up into divs or list items it would be great but even a <br> would get me by.

[attachment cleanup by admin]

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: Editing product-field-display output in overrides
« Reply #3 on: December 07, 2011, 18:58:49 pm »
this thread will help a little.
http://forum.virtuemart.net/index.php?topic=92777.0

ITS not exactly it, but will show you some ways.

You can do it all with css,
or if you have to you can do a strip and replace with php.

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

ciar4n

  • Beginner
  • *
  • Posts: 6
Re: Editing product-field-display output in overrides
« Reply #4 on: December 07, 2011, 19:34:10 pm »
Perfect BT... thank you!!!

Got by using CSS alone as you described in that thread.

I was able to get the attached layout with the following CSS

.product-field label {width: 38%; float: left; line-height:10px;}
.product-field input {width: 6%; float: left; margin:5px;}

[attachment cleanup by admin]