Hello eveyone, it's Tonia again. I'm trying to make my own product tabs because the extensions that I found mess with product twig file and I have alter it to make it look how I like it. I have found a way to change the "Specifications" label to "Ingredients" label, which is fine but I wanted to add one more tab with the label "how to use". But I do not know how to retrieve some product information for it to display. For example an isolated attribute of the product, or even the text from a disabled review that I could add manually. To make it more clear, I have three tabs, one is "Description", one is specifications which I changed it to "ingredients" and one that I added from product twig file which is label "how to use". Can anyone help me. I have a basic knowledge from programming. I tried to add product_sku as a data to display in the "how to use" tab but no luck.
Below is the secion of the product twig which I added manually:
<div class="tab-pane" id="tab-specificationHow">
<table class="table table-bordered">
{% for attribute_group in attribute_groups %}
<tbody>
<td>{{ product_sku }}How To</td>
</tbody>
{% endfor %}
</table>
</div>
A product example here: https://tonias-handmade.com/Facial-Clea ... rub-Almond
Thanks in advance,
Tonia
The information for the product you can use in the template has to be set in catalog/controller/product/product.php.
To use the SKU you would need to add the following to the controller.
To use the SKU you would need to add the following to the controller.
Code: Select all
$data['product_sku'] = $product_info['sku'];
thank you very much, it workedADD Creative wrote: ↑Sun Aug 18, 2024 11:28 pmThe information for the product you can use in the template has to be set in catalog/controller/product/product.php.
To use the SKU you would need to add the following to the controller.Code: Select all
$data['product_sku'] = $product_info['sku'];

Who is online
Users browsing this forum: No registered users and 19 guests