Post by ideep13 » Wed Jan 20, 2021 6:34 pm

How to remove stock status label from being visible on each item? Using 3.0.3.6
Last edited by ideep13 on Wed Jan 20, 2021 8:57 pm, edited 1 time in total.

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by mikeinterserv » Wed Jan 20, 2021 6:48 pm

You want to remove stock label completely
System>setting> OPTION TAB > display stock - yes or no

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ideep13 » Wed Jan 20, 2021 7:06 pm

mikeinterserv wrote:
Wed Jan 20, 2021 6:48 pm
You want to remove stock label completely
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.

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by mikeinterserv » Wed Jan 20, 2021 7:25 pm

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

Code: Select all

 <li>{{ text_stock }} {{ stock }}</li>
Replace with

Code: Select all

<!-- <li>{{ text_stock }} {{ stock }}</li>-->
Others may disagree and have another way to do it.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ideep13 » Wed Jan 20, 2021 7:40 pm

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

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 %}

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by mikeinterserv » Wed Jan 20, 2021 7:46 pm

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

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ideep13 » Wed Jan 20, 2021 7:57 pm

I am using Journal theme ::)

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by mikeinterserv » Wed Jan 20, 2021 8:06 pm

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
Last edited by mikeinterserv on Wed Jan 20, 2021 8:10 pm, edited 1 time in total.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ideep13 » Wed Jan 20, 2021 8:09 pm

please find it attached.

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by ideep13 » Wed Jan 20, 2021 8:14 pm

I do feel it has to dow something with 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>
and I removed it, purged cache, but nothing happened

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by xxvirusxx » Wed Jan 20, 2021 8:14 pm

Easy... :laugh:

Attachments

easy.png

easy.png (36.02 KiB) Viewed 459 times


My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by mikeinterserv » Wed Jan 20, 2021 8:18 pm

OK
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> 
Replace with

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> -->
See if that works how you want.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by xxvirusxx » Wed Jan 20, 2021 8:21 pm

mikeinterserv wrote:
Wed Jan 20, 2021 8:18 pm
OK
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> 
Replace with

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> -->
See if that works how you want.
Easy :laugh:

Attachments

to_complicated.png

to_complicated.png (41.02 KiB) Viewed 439 times


My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by mikeinterserv » Wed Jan 20, 2021 8:22 pm

xxvirusxx wrote:
Wed Jan 20, 2021 8:14 pm
Easy... :laugh:
Really - Well it doesn;t REMOVE the stock STATUS text as requred by the OP

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by mikeinterserv » Wed Jan 20, 2021 8:23 pm

xxvirusxx wrote:
Wed Jan 20, 2021 8:21 pm
mikeinterserv wrote:
Wed Jan 20, 2021 8:18 pm
OK
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> 
Replace with

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> -->
See if that works how you want.
Easy :laugh:
You clearly MISSED what the OP is asking for :choke:

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by xxvirusxx » Wed Jan 20, 2021 8:29 pm

ideep13 wrote:
Wed Jan 20, 2021 6:34 pm
How to remove stock status label from being visible on each item? Using 3.0.3.6
mikeinterserv wrote:
Wed Jan 20, 2021 8:23 pm
You clearly MISSED what the OP is asking for :choke:
These are labels...

Attachments

labels.png

labels.png (130.64 KiB) Viewed 399 times


My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by mikeinterserv » Wed Jan 20, 2021 8:32 pm

So why is it NOT working for the OP then

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ideep13 » Wed Jan 20, 2021 8:33 pm

mikeinterserv wrote:
Wed Jan 20, 2021 8:18 pm
OK
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> 
Replace with

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> -->
See if that works how you want.
It doesn't work, purged the cache as well.

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.

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by xxvirusxx » Wed Jan 20, 2021 8:37 pm

Hard to understand....

First screenshot is for labels displayed on picture.
Second screenshot is to hide Stock status on Product page.

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by mikeinterserv » Wed Jan 20, 2021 8:38 pm

ideep13 wrote:
Wed Jan 20, 2021 8:33 pm
It doesn't work, purged the cache as well.
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.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales
Who is online

Users browsing this forum: No registered users and 6 guests