Jump to content

Adding an individual custom product field to cart


Recommended Posts

Hi Guys,

I have added this code to our cart, and I thought I had it right as it looks fine on both the logged in client area cart and the logged out client area.

 

But, when I tested it,

 

Logged out - everything seems to work, you can enter in the info and it goes through to the payment gateway, but it doesn't pass on the information in the product custom fields to back end admin.

Logged in - again you can enter the info, but this time when you click on submit to go to the payment gateway nothing happens.

 

Can anyone help me out here, I would have thought this would work, but I'm missing something.

 

Thanks in advance.

 

<div class="col-sm-4 col-xs-12">
{foreach key=num item=product from=$products}
{if $product.productinfo.name eq "custom name"}
{if $loggedin}
<div class="form-group">
<label class="control-label">custom name</label>
<input required placeholder="e.g. 400FOS" type="text" value="{$customfields[1].value}" class="form-control">
</div>
{else}
{foreach key=custnum item=customfields from=$product.customfields}
{if $customfields.name eq "custome name"}
<div class="form-group">
<label class="control-label">custom name</label>
<div class="control">{$customfield.input|replace:'<input ':'<input required placeholder="e.g. 400FOS"'}
</div>
</div>
{/if}
{/foreach} 
{/if}
{/if}
{/foreach}
</div>	

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