Author Topic: String custom field not displayed in one line  (Read 4551 times)

mehdi09

  • Beginner
  • *
  • Posts: 15
String custom field not displayed in one line
« on: November 02, 2012, 15:22:51 pm »
Hello everybody,

I'm a new french user of this wonderful component Virtuemart. I'm using the latest version2.0.12f
I have a little problem with the string custom fields. The rabio buttons are displayed in the same line, and not one above the other like in the demo.
You can see my problem alive here:
http://tamel.fr/v3/index.php/component/virtuemart/creation-de-site-internet/site-presence-detail?Itemid=0
I just want the string attributes to be displayed in separate lines.
I hope you'll understand my issue and help me to solve it.
Thanks a lot

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10337
  • VirtueMart Version: 3+
Re: String custom field not displayed in one line
« Reply #1 on: November 02, 2012, 17:31:05 pm »
which one is the string?

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

mehdi09

  • Beginner
  • *
  • Posts: 15
Re: String custom field not displayed in one line
« Reply #2 on: November 02, 2012, 18:56:21 pm »
The string example are: Facebook or Memory
It's test for the moment.
Thanks to help me.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10337
  • VirtueMart Version: 3+
Re: String custom field not displayed in one line
« Reply #3 on: November 02, 2012, 19:14:08 pm »


do a template override

views/productdetails/default_attocart.php

change

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

to this
<br/><span class="product-field-display"><?php echo $field->display ?></span>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

mehdi09

  • Beginner
  • *
  • Posts: 15
Re: String custom field not displayed in one line
« Reply #4 on: November 02, 2012, 19:35:33 pm »
Hello PRO,
I made the changes you told me. But, the radio buttons are still displayed on the same line.
I would like it like the Memory field on the demo version.
I just want to separate the radiobuttons on the string field to display each on a different line.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10337
  • VirtueMart Version: 3+
Re: String custom field not displayed in one line
« Reply #5 on: November 02, 2012, 20:40:43 pm »
try it with css
.product-field product-field-type-S .product-field-display{width:100%;float:left;}
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

mehdi09

  • Beginner
  • *
  • Posts: 15
Re: String custom field not displayed in one line
« Reply #6 on: November 03, 2012, 09:37:57 am »
Hi again Pro,

I tried to modify the template.css file of my own template made with artisteer as you told me.
I add
.product-field product-field-type-S .product-field-display{width:100%;float:left;}
at the beginning of my template.css file.
Unfortunately, this changes made nothing on the frontend product.
Maybe, is it an another css file to modify ?
To explain you again, I would like to get the same VM template as we can see on the demo version here:
http://demo.virtuemart.net/index.php/2012-01-13-09-33-20/product-details-layout


Also, I would like to delete all the: "Prix sans surcoƻt" means "No extra cost" on any custom fields that doesn't modify the final price.


Thanks a lot for your help PRO


PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10337
  • VirtueMart Version: 3+
Re: String custom field not displayed in one line
« Reply #7 on: November 03, 2012, 15:50:30 pm »
you are going to just have to play with the css until you get it

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

mehdi09

  • Beginner
  • *
  • Posts: 15
Re: String custom field not displayed in one line
« Reply #8 on: November 04, 2012, 09:40:24 am »
OK.
And if purchase the commercial template http://extensions.virtuemart.net/extensions-virtuemart-2/theme-shoplicious-detail , will this solve my problem ?

Thanks

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10337
  • VirtueMart Version: 3+
Re: String custom field not displayed in one line
« Reply #9 on: November 04, 2012, 14:52:21 pm »
I dont know

try

changing this
.product-fields .product-field input[type="radio"] {
    left: 33px;
    position: relative;
}

to this
.product-fields .product-field input[type="radio"] {
    float:left;width:30%;
}

and in default_addtocart.php

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

to this

<?php if ($field->field_type=='S')[echo '<br/>';]?>
<span class="product-field-display"><?php echo $field->display ?></span>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

mehdi09

  • Beginner
  • *
  • Posts: 15
Re: String custom field not displayed in one line
« Reply #10 on: November 05, 2012, 08:59:38 am »
Hi PRO,

Thanks again for your help.
I have some problem to try your tips:
-Which css file do I have to modify ? vmsite-ltr.css that I can find here /components/com_virtuemart/assets/css ?

-When I hack default_addtocart.php, they told me that I have an error on line 35. I replace as you told me.

Thanks to help me again.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10337
  • VirtueMart Version: 3+
Re: String custom field not displayed in one line
« Reply #11 on: November 05, 2012, 13:06:58 pm »
sorry  its this

<?php if ($field->field_type=='S'){echo '<br/>';}?>


and do a template override
http://forum.virtuemart.net/index.php?topic=90935.0

for the file,

and he thread also says how to override the css
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

mehdi09

  • Beginner
  • *
  • Posts: 15
Re: String custom field not displayed in one line
« Reply #12 on: November 06, 2012, 11:33:47 am »
Hello PRO,
Thanks a lot for your help. I decided to purchase the SHOPLICOUS commercial VM2 theme.
I have one issue :
-How can I display the description of a custom fields after the name, and the values ?
You can see it alive here http://tamel.fr/v3/index.php/sites-internet/site-presence-detail
or you can see the screenshot I made
I know that I have to edit the default_addtocart.php, but I don't know how and what.

Thanks a lot to help me.

[attachment cleanup by admin]

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10337
  • VirtueMart Version: 3+
Re: String custom field not displayed in one line
« Reply #13 on: November 06, 2012, 14:59:59 pm »
I do not know, the template will be different.

Does the template creator have a forum?
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

Eugen S.

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 255
  • Hire me for individual customization work => info
    • Virtuemart Themes
Re: String custom field not displayed in one line
« Reply #14 on: December 06, 2012, 13:42:06 pm »
I`m the owner of shoplicious theme.

Feel free to contact us on our site: http://www.developing-and-design.com/
Send me a pm ;-)