News:

Support the VirtueMart project and become a member

Main Menu

String custom field not displayed in one line

Started by mehdi09, November 02, 2012, 15:22:51 PM

Previous topic - Next topic

mehdi09

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


mehdi09

The string example are: Facebook or Memory
It's test for the moment.
Thanks to help me.

PRO



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>

mehdi09

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

try it with css
.product-field product-field-type-S .product-field-display{width:100%;float:left;}

mehdi09

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

you are going to just have to play with the css until you get it


mehdi09


PRO

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>

mehdi09

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

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

mehdi09

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

I do not know, the template will be different.

Does the template creator have a forum?

Eugen S.

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