Jump to content

Client custom fields not passing on details to admin from clientarea


Recommended Posts

Hi Guys,

 

I've added a client custom field to out cart, but when logged in it is not passing the entered information to the admin side.

 

Works fine for a new client signing up.

Looks fine if an existing client fills in the information from within their clientarea cart, but the entered information is not passed on to admin.

 

What am I missing?

 

Thanks in advance.

 

 

{if $loggedin}
	<div class="col-sm-6 form-horizontal">
		<div class="form-group">
			<label class="col-md-4 control-label" style="font-size:.85em;">Date of birth</label>
			<div class="col-md-8">
			<input type="text" value="{$clientsdetails.customfields29}" class="form-control" placeholder="e.g. dd/mm/yyyy">
			</div>
		</div>
	</div>
{else}
{foreach key=num item=customfield from=$customfields}	
	{if $customfield.name eq "Date of birth"}
			<div class="col-sm-6 form-horizontal">
				<div class="form-group">
					<label for="inputCity" class="col-md-4 control-label" style="font-size:.85em;">Date of birth</label>
					<div class="col-md-8">
						<div class="control">{$customfield.input|replace:'>':"placeholder='e.g. dd/mm/yyyy' style='font-size:.85em;' >"}</div>
					</div>
				</div>
			</div>
	{/if}
{/foreach}
{/if}

Link to comment
Share on other sites

have you used a {debug} to see when the client is logged in, whether customfields29 is the correct value ?

 

also, i'd suggest not hard-coding the field in that way, but keep it inside the foreach loop - and if you only want to show one specific field, use an {if}statement to specify the correct field.

Link to comment
Share on other sites

Hi Brain,

Thank you for your reply.

 

have you used a {debug} to see when the client is logged in, whether customfields29 is the correct value ?

Yes, and the value is correct.

 

also, i'd suggest not hard-coding the field in that way, but keep it inside the foreach loop - and if you only want to show one specific field, use an {if}statement to specify the correct field.

Are you suggesting more like this? I haven't tested it, just seeing if I understand you correctly.


{foreach key=num item=customfield from=$customfields}	
	{if $loggedin}
	<div class="col-sm-6 form-horizontal">
		<div class="form-group">
			<label class="col-md-4 control-label" style="font-size:.85em;">Date of birth</label>
			<div class="col-md-8">
			<input type="text" value="{$clientsdetails.customfields29}" class="form-control" placeholder="e.g. dd/mm/yyyy">
			</div>
		</div>
	</div>
               {else}

               {if $customfield.name eq "Date of birth"}
			<div class="col-sm-6 form-horizontal">
				<div class="form-group">
					<label for="inputCity" class="col-md-4 control-label" style="font-size:.85em;">Date of birth</label>
					<div class="col-md-8">
						<div class="control">{$customfield.input|replace:'>':"placeholder='e.g. dd/mm/yyyy' style='font-size:.85em;' >"}</div>
					</div>
				</div>
			</div>
	{/if}
        {/if}
{/foreach}

The issue I'm experiencing is the original foreach statement I posted works fine when outside the login area, but not inside.

I'm needing to get the same result when the client has logged in.

 

	{foreach key=num item=customfield from=$customfields}	
	{if $customfield.name eq "Date of birth"}
			<div class="col-sm-6 form-horizontal">
				<div class="form-group">
					<label for="inputCity" class="col-md-4 control-label" style="font-size:.85em;">Date of birth</label>
					<div class="col-md-8">
						<div class="control">{$customfield.input|replace:'>':"placeholder='e.g. dd/mm/yyyy' style='font-size:.85em;' >"}</div>
					</div>
				</div>
			</div>
	{/if}
{/foreach}

The ifloggedin statement is passing the clientdetails to the correct field on the clientarea cart if you type it in directly in the the clientaredetails page, this is not the result that we are looking for. so I believe that I going down the wrong track, just need the above code function to work both loggedout and loggin.

 

{if $loggedin}
	<div class="col-sm-6 form-horizontal">
		<div class="form-group">
			<label class="col-md-4 control-label" style="font-size:.85em;">Date of birth</label>
			<div class="col-md-8">
			<input type="text" value="{$clientsdetails.customfields29}" class="form-control" placeholder="e.g. dd/mm/yyyy">
			</div>
		</div>
	</div>
{/if}

 

 

Hope this makes sense.

 

Thnaks again.

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