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

Hard Code Contact Us Fields...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-30-2010, 06:02 PM
 
crcool75 crcool75 is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 87
 

Default Hard Code Contact Us Fields...

Hello,

The big questions is, why would I want to hard code additional Contact Us fields? Several reasons but the main reason is so I can adjust text field sizes on the new fields.

Is there an easy way to do this? I don't think Contact Us has anything to do with the database, so it's just a matter of editing certain files, eh? Can anybody help me?

Thanks.

v4.4.x
__________________
X-Cart Gold 4.4.0
Reply With Quote
  #2  
Old 08-31-2010, 07:51 PM
 
crcool75 crcool75 is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 87
 

Default Re: Hard Code Contact Us Fields...

Anybody?
__________________
X-Cart Gold 4.4.0
Reply With Quote
  #3  
Old 09-01-2010, 05:26 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Hard Code Contact Us Fields...

You'd need to edit both the template file (help/contact_us.tpl) and the php file that controls it - which is include/help.php
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 09-01-2010, 09:29 AM
 
crcool75 crcool75 is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 87
 

Default Re: Hard Code Contact Us Fields...

Ok, thanks Balinor.
__________________
X-Cart Gold 4.4.0
Reply With Quote
  #5  
Old 09-01-2010, 07:31 PM
 
crcool75 crcool75 is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 87
 

Default Re: Hard Code Contact Us Fields...

Well, I looked at the PHP file, and not real sure what to edit. I know I'll need to add values to the array, but is there any simple explanation as to what needs to be done?
__________________
X-Cart Gold 4.4.0
Reply With Quote
  #6  
Old 09-01-2010, 08:25 PM
 
crcool75 crcool75 is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 87
 

Default Re: Hard Code Contact Us Fields...

Ok, I created a 'testbody' entry in the contactus.tpl file and added the information to the array toward the top of help.php:

Code:
$is_areas = array( 'C' => ( !empty($default_fields['title']['avail']) || !empty($default_fields['firstname']['avail']) || !empty($default_fields['lastname']['avail']) || !empty($default_fields['company']['avail']) ), 'A' => ( !empty($default_fields['b_address']['avail']) || !empty($default_fields['b_address_2']['avail']) || !empty($default_fields['b_city']['avail']) || !empty($default_fields['b_county']['avail']) || !empty($default_fields['b_state']['avail']) || !empty($default_fields['b_country']['avail']) || !empty($default_fields['b_zipcode']['avail']) || !empty($default_fields['phone']['avail']) || !empty($default_fields['fax']['avail']) || !empty($default_fields['email']['avail']) || !empty($default_fields['url']['avail']) || !empty($default_fields['testbody']['avail']) ),

What else am I missing?
__________________
X-Cart Gold 4.4.0
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 07:41 AM.

   

 
X-Cart forums © 2001-2020