VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: mehdi09 on November 02, 2012, 15:22:51 PM

Title: String custom field not displayed in one line
Post by: mehdi09 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
Title: Re: String custom field not displayed in one line
Post by: PRO on November 02, 2012, 17:31:05 PM
which one is the string?

Title: Re: String custom field not displayed in one line
Post by: mehdi09 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.
Title: Re: String custom field not displayed in one line
Post by: PRO 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>
Title: Re: String custom field not displayed in one line
Post by: mehdi09 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.
Title: Re: String custom field not displayed in one line
Post by: PRO 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;}
Title: Re: String custom field not displayed in one line
Post by: mehdi09 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

Title: Re: String custom field not displayed in one line
Post by: PRO on November 03, 2012, 15:50:30 PM
you are going to just have to play with the css until you get it

Title: Re: String custom field not displayed in one line
Post by: mehdi09 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
Title: Re: String custom field not displayed in one line
Post by: PRO 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>
Title: Re: String custom field not displayed in one line
Post by: mehdi09 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.
Title: Re: String custom field not displayed in one line
Post by: PRO 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
Title: Re: String custom field not displayed in one line
Post by: mehdi09 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]
Title: Re: String custom field not displayed in one line
Post by: PRO on November 06, 2012, 14:59:59 PM
I do not know, the template will be different.

Does the template creator have a forum?
Title: Re: String custom field not displayed in one line
Post by: Eugen S. 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/ (http://www.developing-and-design.com/)