X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Hard Code Contact Us Fields... (https://forum.x-cart.com/showthread.php?t=55324)

crcool75 08-30-2010 06:02 PM

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

crcool75 08-31-2010 07:51 PM

Re: Hard Code Contact Us Fields...
 
Anybody?

balinor 09-01-2010 05:26 AM

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

crcool75 09-01-2010 09:29 AM

Re: Hard Code Contact Us Fields...
 
Ok, thanks Balinor.

crcool75 09-01-2010 07:31 PM

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?

crcool75 09-01-2010 08:25 PM

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?


All times are GMT -8. The time now is 06:44 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.