Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Including Extra Form Fields on Registration Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-18-2009, 06:11 AM
 
presson83 presson83 is offline
 

Senior Member
  
Join Date: Sep 2008
Posts: 143
 

Default Conditional Extra Form Fields on Registration Page

Hi All,

I'm trying to include a couple of additional fields on my registration.tpl page, but only when a product has a certain extra field applied to it and when the product option has a certain title. I have this working perfectly on my order invoice template like so :

Code:
{foreach from=$products item=product} {if $product.extra_fields.0.value ne '' && $product.product_options_txt eq "Product Options: Online Streaming Course"} {include file="customer/main/register_additional_info.tpl" section='A'} {/if} {/foreach}

For whatever reason, this is NOT working on my register.tpl page. Any ideas why I can't loop through the products array and specify the extra product field id or the product option title, but I can on my order_invoice.tpl page?
__________________
v 4.1.11, v 4.2
Reply With Quote
  #2  
Old 05-18-2009, 01:12 PM
 
presson83 presson83 is offline
 

Senior Member
  
Join Date: Sep 2008
Posts: 143
 

Default Re: Including Extra Form Fields on Registration Page

UPDATE:

I believe I have found the correct item in the $products array that I need - 'option_name'. According to the smarty debug console that item is available in the products array on the register.tpl page. Unfortunately my effort at getting ahold of that value is not working. Here was my attempt:

Code:
{foreach from=$products item=product} {if $product.option_name eq "Online Streaming Course"} <br />{include file="customer/main/register_additional_info.tpl" section='A'} {/if} {/foreach}

That would appear to be all I would need to do but it doesn't work. Anyone know how I should be getting ahold of the "option_name" value in the $products array?
__________________
v 4.1.11, v 4.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:19 PM.

   

 
X-Cart forums © 2001-2020