Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy PHP programming question


jpweber

Recommended Posts

I'm a PHP newb, so I'm thinking this will be an easy one. I modified my contact_us.php form, with this contribution: http://www.oscommerce.com/community/contributions,4426 ....seemed harmless, and I like the look.

 

There are 4 fields now -- (1) Full Name, (2) E-Mail Address, (3) ENTRY_CUSTOMER_SUBJECT, and (4) Enquiry.

 

Does anyone know what I can do so that instead of saying "ENTRY_CUSTOMER_SUBJECT", it can just say "Subject:"?

 

Below is the coding for subject form:

<!-- BEGIN CUSTOMER SUBJECT -->

<tr>

<td class='main'><?php echo ENTRY_CUSTOMER_SUBJECT . '<br>' . tep_draw_input_field('email_subject'); ?></td>

</tr>

<!-- END CUSTOMER SUBJECT -->

 

Do I have to define something elsewhere in the coding? Thanks for any help anybody can offer!

 

J

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

You missed to define subject in includes/languages/english/contact_us.php.

 

Edit/Add the following line

 

define('ENTRY_CUSTOMER_SUBJECT', 'Subject:');

Link to comment
Share on other sites

There are 4 fields now -- (1) Full Name, (2) E-Mail Address, (3) ENTRY_CUSTOMER_SUBJECT, and (4) Enquiry.

 

Does anyone know what I can do so that instead of saying "ENTRY_CUSTOMER_SUBJECT", it can just say "Subject:"?

 

Below is the coding for subject form:

<!-- BEGIN CUSTOMER SUBJECT -->

<tr>

<td class='main'><?php echo ENTRY_CUSTOMER_SUBJECT . '<br>' . tep_draw_input_field('email_subject'); ?></td>

</tr>

<!-- END CUSTOMER SUBJECT -->

 

Do I have to define something elsewhere in the coding? Thanks for any help anybody can offer!

 

You need to remember that osC in multi-lingual, so all the "text" tags (like your ENTRY_CUSTOMER_SUBJECT one) need to be defined in the proper "tag files" located in ../includes/languanges/ directories. Find the file in that area that matches your language and the file name of the file that your above modifications are in, and add a

define('ENTRY_CUSTOMER_SUBJECT',"Subject");

line.

 

Hope this helps...happy hunting!

- mark

Link to comment
Share on other sites

There are 4 fields now -- (1) Full Name, (2) E-Mail Address, (3) ENTRY_CUSTOMER_SUBJECT, and (4) Enquiry.

 

Does anyone know what I can do so that instead of saying "ENTRY_CUSTOMER_SUBJECT", it can just say "Subject:"?

 

Below is the coding for subject form:

<!-- BEGIN CUSTOMER SUBJECT -->

<tr>

<td class='main'><?php echo ENTRY_CUSTOMER_SUBJECT . '<br>' . tep_draw_input_field('email_subject'); ?></td>

</tr>

<!-- END CUSTOMER SUBJECT -->

 

Do I have to define something elsewhere in the coding? Thanks for any help anybody can offer!

 

You need to remember that osC in multi-lingual, so all the "text" tags (like your ENTRY_CUSTOMER_SUBJECT one) need to be defined in the proper "tag files" located in ../includes/languanges/ directories. Find the file in that area that matches your language and the file name of the file that your above modifications are in, and add a

define('ENTRY_CUSTOMER_SUBJECT',"Subject");

line.

 

Hope this helps...happy hunting!

- mark

Link to comment
Share on other sites

All great suggestions. Thanks guys. I added in catalog/includes/languages/english.php:

 

define('ENTRY_CUSTOMER_SUBJECT',"Subject");

 

And it works perfectly. Thanks a bunch!

 

J

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...