Post by celestial » Wed Jun 22, 2011 5:18 am

LABELS in OPTIONS

Original idea from boldndare, nice work with you, thanks.

Hi, this is very fine and very simple:

1. You enter any text field you need in options, this can be use like labels.

2. In your product (options, select the text field you enter previously and put the word label in the field value).

3. In catalog\view\theme\default\template\product.tpl

change this part, to:

<?php if ($option['type'] == 'text') { ?>
<?php if ($option['option_value'] == 'label') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<b><?php echo $option['name']; ?>:</b>
<div style="display:none;">
<input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value=" " />
</div>
<br />
</div>
<?php } else { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:&nbsp;&nbsp;</b>
<input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
</div>
<?php } ?>
<br />
<?php } ?>

You have all the labels you need

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by karlpers » Mon Jul 11, 2011 7:32 am

Hmm, I dont really understand this tutorial :)

What does it really do, and which code should be replaced by which code?

Active Member

Posts

Joined
Tue Jun 09, 2009 10:35 pm
Who is online

Users browsing this forum: No registered users and 2 guests