Page 1 of 1

[SOLVED] There is no stock!

Posted: Thu Sep 12, 2019 5:24 am
by venacava
Some customers after add to basket the products, another buyer can buy some of them and first customers when go to checkout page they see "there is no stock" with 3 red small stars. and its difficult to find them which ones have 3 small red stars to remove from basket. is it possible to get to top lines which ones no stock or add red backround colour for no stock products ?

Re: There is no stock!

Posted: Thu Sep 12, 2019 8:14 am
by by mona
catalog/view/theme/default/checkout/cart.twig

after line
{% for product in products %}

change

<tr>

to

<tr{% if not product.stock %} class="alert-danger"{% endif %}>

Re: There is no stock!

Posted: Thu Sep 12, 2019 11:47 pm
by venacava
by mona wrote:
Thu Sep 12, 2019 8:14 am
catalog/view/theme/default/checkout/cart.twig

after line
{% for product in products %}

change

<tr>

to

<tr{% if not product.stock %} class="alert-danger"{% endif %}>
I did but not work
catalog/view/theme/default/template/checkout/cart.twig

Customers see alert "Products marked with *** are not available in the desired quantity or not in stock!"
but when there are many items in cart, they can not find marked with*** product easly.
is it possible marked with*** product move to top on the list of cart or mark with red backround like as alert?
please see attach pic.
Thank you for your helps :)

Re: There is no stock!

Posted: Fri Sep 13, 2019 12:48 am
by by mona
Yes it does ..
Please understand this is a SUPPORT forum, not a request features forum.
You are running a commercial site on a free platform.

Please contact your theme developer if this does not work for you.

As a side note, do you have a catalog/view/theme/default/template/checkout/cart.twig file ? (and yes thank you)
your site looks like OC2 not OC3

Re: There is no stock!

Posted: Fri Sep 13, 2019 1:05 am
by xxvirusxx

Re: There is no stock!

Posted: Sat Sep 14, 2019 2:06 am
by venacava
by mona wrote:
Fri Sep 13, 2019 12:48 am
Yes it does ..
Please understand this is a SUPPORT forum, not a request features forum.
You are running a commercial site on a free platform.

Please contact your theme developer if this does not work for you.

As a side note, do you have a catalog/view/theme/default/template/checkout/cart.twig file ? (and yes thank you)
your site looks like OC2 not OC3
hi again, so is it possible to revise these code for OC2 ?
Thank you for your helps ☺

Re: There is no stock!

Posted: Sat Sep 14, 2019 2:14 am
by xxvirusxx
by mona wrote:
Thu Sep 12, 2019 8:14 am
catalog/view/theme/default/checkout/cart.twig

after line
{% for product in products %}

change

<tr>

to

<tr{% if not product.stock %} class="alert-danger"{% endif %}>
after line
<?php foreach ($products as $product) { ?>

change

<tr>

to

<tr<?php if (!$product['stock']; { ?> class="alert-danger"<?php } ?>>

And if you login on admin page...you can see openart version on footer.

Re: There is no stock!

Posted: Sat Sep 14, 2019 5:19 pm
by venacava
by mona wrote:
Fri Sep 13, 2019 12:48 am
Yes it does ..
Please understand this is a SUPPORT forum, not a request features forum.
You are running a commercial site on a free platform.

Please contact your theme developer if this does not work for you.

As a side note, do you have a catalog/view/theme/default/template/checkout/cart.twig file ? (and yes thank you)
your site looks like OC2 not OC3
Hi "by mona" Thanks for your helps, I contacted with developer and he told me, admin 3.0.2.0 and fastor theme works like v2

Re: There is no stock!

Posted: Sat Sep 14, 2019 5:33 pm
by venacava
xxvirusxx wrote:
Sat Sep 14, 2019 2:14 am
by mona wrote:
Thu Sep 12, 2019 8:14 am
catalog/view/theme/default/checkout/cart.twig

after line
{% for product in products %}

change

<tr>

to

<tr{% if not product.stock %} class="alert-danger"{% endif %}>
after line
<?php foreach ($products as $product) { ?>

change

<tr>

to

<tr<?php if (!$product['stock']; { ?> class="alert-danger"<?php } ?>>

And if you login on admin page...you can see openart version on footer.
Hi, I found that line

{% for product in products %}

but there is no this line

<?php foreach ($products as $product) { ?>

that line in
catalog/view/theme/default/template/checkout/cart.twig ?

Thanks..

Re: There is no stock!

Posted: Sat Sep 14, 2019 5:39 pm
by xxvirusxx
venacava wrote:
Sat Sep 14, 2019 5:33 pm
Hi, I found that line

{% for product in products %}- this is in 3.x version

but there is no this line

<?php foreach ($products as $product) { ?> - this is in versions < 3.x

Re: There is no stock!

Posted: Fri Jan 24, 2025 9:46 pm
by by mona
I appreciate language is a problem, please help us help you ..

1. Always post your OC version => you will find this at the bottom of your admin page (see attached)
2. A link to your site, especially if you have a theme
3. Mention any themes and or extension you have installed that may relate to your problem
4. It also helps not only us but the community as a whole if once your problem is solved you change your original title to <SOLVED>There is no stock!

------- x --------

That said - and thank you to virus or cyclops I think - plus your mini cart

attached is a OCMOD - you just install this in EXTENSIONS => INSTALLER => and remember to refresh in MODIFICATIONS ...


If this does not work you MUST post EITHER the cart.twig files OR your www.web address