Zen Cart Logo
Forums / General Questions / Adding explanatory text beneath option names on product page

Adding explanatory text beneath option names on product page

Locked

Views: 1,222

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
10 Apr 2010, 9:00 PM
#1
aaelghat avatar

aaelghat

Zen Follower

Join Date:
Feb 2007
Posts:
100
Plugin Contributions:
0

Adding explanatory text beneath option names on product page

Hi - my product page is here.

I'd like to be able to put in some explanatory text underneath some of the option attributes. For example,
**
Attribute Description**
More explanatory text here to provide some details.

This would be different than the comments field in the Product Options in the Admin area, because I'd like the explanatory text to go below the field. Any thoughts how I can accomplish this?

Thanks!

10 Apr 2010, 9:23 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding explanatory text beneath option names on product page

To remain "dynamic" and load explanations for correct attributes -
One would have to add a DB field for this text and then code for entering it in the admin side and then code for displaying it on the customer side

Not impossible - but one should weigh the cost in time or $ against the benefit

12 Apr 2010, 9:20 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding explanatory text beneath option names on product page

/includes/templates/your_template/templates/tpl_modules_attributes.php has these lines```php
if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {

  if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') {
```
where $options_comment_position[$i] == '0' puts the comment above the attribute and '1' puts it below. Unfortunately, there is no admin facility for setting that variable (I think there is a db field for it), so it defaults to 0 or false and puts the comment above the attribute.
You could edit that code to bypass the position part of the test and just output below if you only want it in that location.
12 Apr 2010, 10:03 PM
#4
aaelghat avatar

aaelghat

Zen Follower

Join Date:
Feb 2007
Posts:
100
Plugin Contributions:
0

Re: Adding explanatory text beneath option names on product page

Thanks - I'll try that out!