You want to remove stock label completely
System>setting> OPTION TAB > display stock - yes or no
System>setting> OPTION TAB > display stock - yes or no
Stock is set as no. But the label is still visible. I remember when I had older version I think we modified that under product.tpl file (when I had 2.3.0.2)..but I ma not sure.. It's been a long time.mikeinterserv wrote: ↑Wed Jan 20, 2021 6:48 pmYou want to remove stock label completely
System>setting> OPTION TAB > display stock - yes or no
OK I see
Personally I would comment out the line in the product twig, for a quick and easy way to do it.
Design>Theme Editor>product>product.twig
Line 132
Replace with
Others may disagree and have another way to do it.
Personally I would comment out the line in the product twig, for a quick and easy way to do it.
Design>Theme Editor>product>product.twig
Line 132
Code: Select all
<li>{{ text_stock }} {{ stock }}</li>
Code: Select all
<!-- <li>{{ text_stock }} {{ stock }}</li>-->
you mean view - theme - product - product.twig?
I don't have this code in my file? I am using 3.0.3.6.
this is from line 130
I don't have this code in my file? I am using 3.0.3.6.
this is from line 130
Code: Select all
{% endif %}
{% if tags and not j3.document.isPopup() and (j3.settings.get(stylePrefix ~ 'TagsPosition') == 'image') %}
<div class="tags">
<span class="tags-title">{{ text_tags }}</span>
{% for tag in tags %}
<a href="{{ tag.href }}">{{ tag.tag }}</a>
{% if not loop.last %}<b>,</b>{% endif %}
{% endfor %}
</div>
{% endif %}
That's NOT the file
I gave you the EXACT location of product twig - THAT is NOT IT
yes this is 3.0.3.6
Its here if using FTP
/catalog/view/theme/default/template/product/product.twig
I gave you the EXACT location of product twig - THAT is NOT IT
yes this is 3.0.3.6
Its here if using FTP
/catalog/view/theme/default/template/product/product.twig
post your whole product.twig
or if your on linux and know how run this to find the text and the file
grep -iRl "<li>{{ text_stock }} {{ stock }}</li>" /your-path/catalog
or if your on linux and know how run this to find the text and the file
grep -iRl "<li>{{ text_stock }} {{ stock }}</li>" /your-path/catalog
Last edited by mikeinterserv on Wed Jan 20, 2021 8:10 pm, edited 1 time in total.
please find it attached.
Attachments
I do feel it has to dow something with this line
and I removed it, purged cache, but nothing happened
Code: Select all
<li class="product-stock {% if product_quantity > 0 %}in-stock{% else %}out-of-stock{% endif %}"><b>{{ j3.settings.get(stylePrefix ~ 'ProductStockText') }}:</b> <span>{{ stock }}</span></li>
Easy...
Attachments
easy.png (36.02 KiB) Viewed 1909 times
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
OK
find this line
Replace with
See if that works how you want.
find this line
Code: Select all
<li class="product-stock \{% if product_quantity > 0 %\}in-stock\{% else %\}out-of-stock\{% endif %\}"><b>\{\{ j3.settings.get(stylePrefix ~ 'ProductStockText') \}\}:</b> <span>\{\{ stock \}\}</span></li>
Code: Select all
<!--<li class="product-stock \{% if product_quantity > 0 %\}in-stock\{% else %\}out-of-stock\{% endif %\}"><b>\{\{ j3.settings.get(stylePrefix ~ 'ProductStockText') \}\}:</b> <span>\{\{ stock \}\}</span></li> -->
Easymikeinterserv wrote: ↑Wed Jan 20, 2021 8:18 pmOK
find this lineReplace withCode: Select all
<li class="product-stock \{% if product_quantity > 0 %\}in-stock\{% else %\}out-of-stock\{% endif %\}"><b>\{\{ j3.settings.get(stylePrefix ~ 'ProductStockText') \}\}:</b> <span>\{\{ stock \}\}</span></li>
See if that works how you want.Code: Select all
<!--<li class="product-stock \{% if product_quantity > 0 %\}in-stock\{% else %\}out-of-stock\{% endif %\}"><b>\{\{ j3.settings.get(stylePrefix ~ 'ProductStockText') \}\}:</b> <span>\{\{ stock \}\}</span></li> -->
Attachments
to_complicated.png (41.02 KiB) Viewed 1889 times
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
You clearly MISSED what the OP is asking forxxvirusxx wrote: ↑Wed Jan 20, 2021 8:21 pmEasymikeinterserv wrote: ↑Wed Jan 20, 2021 8:18 pmOK
find this lineReplace withCode: Select all
<li class="product-stock \{% if product_quantity > 0 %\}in-stock\{% else %\}out-of-stock\{% endif %\}"><b>\{\{ j3.settings.get(stylePrefix ~ 'ProductStockText') \}\}:</b> <span>\{\{ stock \}\}</span></li>
See if that works how you want.Code: Select all
<!--<li class="product-stock \{% if product_quantity > 0 %\}in-stock\{% else %\}out-of-stock\{% endif %\}"><b>\{\{ j3.settings.get(stylePrefix ~ 'ProductStockText') \}\}:</b> <span>\{\{ stock \}\}</span></li> -->
These are labels...
Attachments
labels.png (130.64 KiB) Viewed 1849 times
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
It doesn't work, purged the cache as well.mikeinterserv wrote: ↑Wed Jan 20, 2021 8:18 pmOK
find this lineReplace withCode: Select all
<li class="product-stock \{% if product_quantity > 0 %\}in-stock\{% else %\}out-of-stock\{% endif %\}"><b>\{\{ j3.settings.get(stylePrefix ~ 'ProductStockText') \}\}:</b> <span>\{\{ stock \}\}</span></li>
See if that works how you want.Code: Select all
<!--<li class="product-stock \{% if product_quantity > 0 %\}in-stock\{% else %\}out-of-stock\{% endif %\}"><b>\{\{ j3.settings.get(stylePrefix ~ 'ProductStockText') \}\}:</b> <span>\{\{ stock \}\}</span></li> -->
XXVirus: If you disable the stock status, it removes the status on product page. And this is not what I want. I still want that the stock status is available under each product.
I want the stock status label on each picture of each item to disappear. The label, not the text.
Hard to understand....
First screenshot is for labels displayed on picture.
Second screenshot is to hide Stock status on Product page.
First screenshot is for labels displayed on picture.
Second screenshot is to hide Stock status on Product page.
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
It MUST work the page IS cached somewhere
If you are using Chrome on the page press CTRL+SHIFT+R at the same time
or try a different browser
Last edited by mikeinterserv on Wed Jan 20, 2021 8:39 pm, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 21 guests