Tags/topics: 
6
Answers
Vote up!
0
Vote down!

Possible to add non input fields into custom line items ?

Hello,

My question is related to a previous one here (http://www.drupalcommerce.org/questions/7066/how-display-image-between-c...)

I post it again because now it turns to be more abstract. I mean I asked first about just how to insert a 'displaying' image in the middle of others input fields inside some customized line items, but this question could be more usefull if asking more shortly 'how to add non input fields in custom line items?'

As far as I understand 'custom line item' it seems to be exclusively about grouping 'input' fields inside the, for example, 'Shopping cart form'.

I hope I'm wrong! But cannot find a way of doing this.

How helpful beign able to add between input fields embeded inside custom line items, some images, texts or php codes....

Thank you for any comments on this.

Regards
Clasie

Asked by: clasie
on February 24, 2013

6 Answers

Vote up!
1
Vote down!

Hi,

If you want to customize your shopping cart then this can help you:
http://www.drupalcommerce.org/user-guide/modifying-shopping-cart-using-v...
But sometimes you want to create a subtheme or modify .tpl files
(as explained here: http://www.drupalcommerce.org/discussions/7081/theme-changes)
Your questions are related to theming so maybe you should read the links that I
added in my last post. That would help you to understand the idea.
But if you have more questions, just let us know.
Maybe a picture showing what you want to achieve can give us a better idea.

Thanks

Answer by: realskorpion
Posted: Feb 24, 2013
Vote up!
1
Vote down!

Hi,

You question is related to drupal theming and change templates (.tpl.php files).
Maybe you want to check this (druapl theming): http://drupal.org/documentation/theme
If you want to add php, the drupal theming snippets section will give you a lot
of ideas: http://drupal.org/node/45471
To change templates you need to know what do you want to change,
for example, if you want to change drupal commerce product display
you'll do something similar to this:
http://www.drupalcommerce.org/discussions/566/styling-product-display-node
But if you want to change something else you need to tell us first what do
you want to change to modify the corresponding .tpl file.
Maybe you want to start investigating about drupal theming.

Thanks

Answer by: realskorpion
Posted: Feb 24, 2013
Vote up!
1
Vote down!

Ok, shame on me!

When you add a field in a custom line item you have the opportunity to add a 'help to the user text' that accept HTML!

Then I probably will have to simply add in that box all the html I want to dosplay to the customer all the help he'll need to make the correct choices.

A help in the form of an image, a table etc...

This solve my issue, was just under my nose :)

Big thanks for your support on this.

I'll still investigate subthemes and layout modifs.

Kind regards.
Clasie

Answer by: clasie
Posted: Feb 28, 2013
Vote up!
0
Vote down!

Thank you realskorpion I'll read all of this doc and report here.

Regards
Clasie

Answer by: clasie
Posted: Feb 27, 2013
Vote up!
0
Vote down!

Mean while there is a picture with the prob exposed:

http://www.virgox.net/dru_1.png

Explanation:

I'd like to insert exactly on the top of the field surronded by a black circle an array of pictures (table or div or li etc...) as a help to the customer to choose the exact color he wants.

Thoses colors are not input fields for the form but simply display information.

Regards.
Clasie

Answer by: clasie
Posted: Feb 27, 2013
Vote up!
-1
Vote down!

Thanks for the aswer.

The fact is that the only thing I want to do is simply be able to add a non input fields (eg: image display, label display, ...) inside 'custom line items' input fields when displaying a shopping cart form. (as explained here http://www.drupalcommerce.org/questions/7066/how-display-image-between-c...)

I'm not sure to be well understood :( , perhaps haven't I been obvious enough in my explanations.

For example, if I want to add an image inside one custom line item, the field added will always display as an upload file input bu never as a display of an image (already provided by me, not by the customer).

Of course this behaviour is consistent with the idea that a line item displayed in a shopping cart form has to contain input fields, because it is a form.

What I try to do is beign able to ad non input fields. Sorry if it seems a redondant explanation but I can't find other words to explain what i've already explained here http://www.drupalcommerce.org/questions/7066/how-display-image-between-c...

Regards
Clasie

Answer by: clasie
Posted: Feb 24, 2013