Jump to content

Custom CSS for Order Page


Recommended Posts

Curious if someone can explain how to apply some CSS to a custom field (dedicated server) order page. I want the description to have some basic CSS style applied.

The custom field ID is:

customfield283

The specific line:

<span class="field-help-text">

Right below this line:

<input name="customfield[283]" id="customfield283" value="" size="30" class="form-control" type="text">

 

Link to comment
Share on other sites

you could add it in the configureproduct.tpl template and change (using standard_cart as an example)...

{foreach $customfields as $customfield}
	<div class="form-group">
		<label for="customfield{$customfield.id}">{$customfield.name}</label>
        {$customfield.input}
		{if $customfield.description}
			<span class="field-help-text">
            	{$customfield.description}
			</span>
		{/if}
	</div>
{/foreach}

to...

{foreach $customfields as $customfield}
	<div class="form-group">
		<label for="customfield{$customfield.id}">{$customfield.name}</label>
        {$customfield.input}
		{if $customfield.description}
			{if $customfield.id eq '283'}
      			*some custom css*
				{$customfield.description}
			{else}
				<span class="field-help-text">
					{$customfield.description}
				</span>
			{/if}
		{/if}
	</div>
{/foreach}

i'm not sure of your intentions for this css, whether it's a custom span class etc, but basically it's that {if $customfield.id eq '283'} conditional that you need to make it do one thing for that particular customfield and use the default span class for the other descriptions.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated