I hava a question about editing Opencart source code that how to enable HTML code in Product Attribute when add or edit any product? I'm using Opencart 1.5.1.3
Thanks and sorry for my English!

Code: Select all
foreach ($product_attribute['product_attribute_description'] as $language_id => $product_attribute_description) {
Code: Select all
$product_attribute_description['text'] = html_entity_decode($product_attribute_description['text'], ENT_QUOTES, 'UTF-8');
Code: Select all
<?php echo html_entity_decode($attribute['link']); ?>
Code: Select all
<img src="image/data/your-image.jpg" alt="alternatif text" />
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Okay, this worked for me. I edited product.tpl changing:qahar wrote:What you need to do is not put the html_entity_decode() on admin, but on the front template.
Assuming you have an product attribute called "link", on front template (.tpl):For the complete tuts, you can read here Product Attribute as Additional InfoCode: Select all
<?php echo html_entity_decode($attribute['link']); ?>
Code: Select all
<td><?php echo $attribute['text']; ?></td>
Code: Select all
<td><?php echo html_entity_decode($attribute['text']); ?></td>
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Code: Select all
foreach ($attribute_groups as $attribute_group) {
foreach ($attribute_group['attribute'] as $attribute) {
$attribute_data[$attribute['attribute_id']] = $attribute['text'];
}
}
Code: Select all
foreach ($attribute_groups as $attribute_group) {
foreach ($attribute_group['attribute'] as $attribute) {
$attribute_data[$attribute['attribute_id']] = html_entity_decode($attribute['text']);
}
}
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Users browsing this forum: Amazon [Bot], Google [Bot] and 50 guests