Post by venacava » Thu Sep 12, 2019 5:24 am

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 ?
Last edited by venacava on Fri Jan 24, 2025 9:47 pm, edited 1 time in total.

New member

Posts

Joined
Mon Sep 02, 2019 1:42 am

Post by by mona » 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 %}>

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by venacava » Thu Sep 12, 2019 11:47 pm

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 :)

Attachments

there is no stock.jpg

there is no stock.jpg (100.9 KiB) Viewed 2218 times


New member

Posts

Joined
Mon Sep 02, 2019 1:42 am

Post by by mona » 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

Attachments

Screen-Shot-2019-09-12.jpg

Screen-Shot-2019-09-12.jpg (42.32 KiB) Viewed 2208 times


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

User avatar
Expert Member

Posts

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

Post by venacava » Sat Sep 14, 2019 2:06 am

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 ☺

New member

Posts

Joined
Mon Sep 02, 2019 1:42 am

Post by xxvirusxx » 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.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

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

Post by venacava » Sat Sep 14, 2019 5:19 pm

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

New member

Posts

Joined
Mon Sep 02, 2019 1:42 am

Post by venacava » Sat Sep 14, 2019 5:33 pm

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..

New member

Posts

Joined
Mon Sep 02, 2019 1:42 am

Post by xxvirusxx » Sat Sep 14, 2019 5:39 pm

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

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

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

Post by by mona » Fri Jan 24, 2025 9:46 pm

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

Attachments

Screen-Shot-2019-09-14b.jpg

Screen-Shot-2019-09-14b.jpg (20.29 KiB) Viewed 2035 times

Screen-Shot-2019-09-14a.jpg

Screen-Shot-2019-09-14a.jpg (7.92 KiB) Viewed 2035 times


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: Google [Bot], khnaz35 and 54 guests