News:

Support the VirtueMart project and become a member

Main Menu

Custom Field layout position for cart

Started by ryanmccoy, May 05, 2012, 23:48:06 PM

Previous topic - Next topic

ryanmccoy

Is it possible to control the layout of the custom fields in the cart?  All my fields are in one line.  I need a line break inbetween fields otherwise it all runs together. 

jenkinhill

Use Firebug to examine the elements on the page. That should indicate the css & code being used and allow you to test some style edits.

http://forum.virtuemart.net/index.php?topic=73348.0

Alternatively use Firebug Lite with Developer Tools in Chrome. https://developers.google.com/chrome-developer-tools/docs/overview
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

cristina

Hi there,
I'm developing a site using VM 2.0.6 and I have a simple question (I hope it's simple)

I have configured a VM Custom stockable variant and it works fine.
The only thing I would like to change is the way the field is displayed in the cart.

If I look at the product details I correctly see the variant "Option Name" and the select list of available options (see the attached Product Detail), while in the cart it shows the "Title" of the variant instead of the "Option name" (see Cart.png).

I would like first to change the Title with the Option Name and then change the position of the elements in the cart.

Unfortunately the Custom filed is surrounded with many <div> and <span> without a class or id, so it seems that I need to modify some view or, worse, some other part.

Can someone tell me what I need to modify to obtain the result I want?

I already spent a day looking into the various files, but I did non figure out which one is responsible of formatting the custom field in the cart view.

Thanks a lot

Cristina

[attachment cleanup by admin]
VM 4.0.22 10864 - Joomla! 4.3.2 - php 8.0.27

Ziggo

I've the same problem. Does anyone fount a solution?

Greetings

ryanmccoy

#4
I added this to vmsite-ltr.css


div.vm-customfield-mod span.product-field-type-V {
   display: inline-block;
   position: relative;
   clear: left;
}

div.vm-customfield-cart span.product-field-type-V {
   display: inline-block;
   position: relative;
   float: left;
   clear: left;
}

monkeybutt

I'm having a somewhat similar problem. My custom field labels were on one line and my custom field values were on a separate line (in both the cart and mod). I used the above CSS but only my custom field labels ended up on separate lines. The user-input data was still below and on one line. Looking at the code, it appears the data is in a completely separate div. Anyone have any idea how to remedy (using Joomla 2.5 and VM 2.0.6)

[attachment cleanup by admin]