RJB
Ecommerce Template Expert
United Kingdom
792 Posts |
Posted - 10/26/2022 : 10:25:52
I would like to display an 'In Stock' message on the proddetail.php pages for items which are in stock, without displaying the quantity in stock. Is this possible?
$showinstock=TRUE; appears to show the 'in stock' message on all proddetail pages regardless of whether the item is in stock and also it shows the quantity which I don't want.
Richard.
|
Vince
Administrator
42810 Posts |
Posted - 10/28/2022 : 03:42:23
Hi Richard How about if you add this to your style.css style sheet... div.detailinstock{ color:#FFF; } span.detailinstocklabel{ color:#333; } This will set the color of the actual stock level to the same as the background color but set the color of the label to something visible. Customers will be able to see the stock level if they do a "Select All" on the page for instance to select the stock level text, but I'm not sure if that is important. Vince Click Here for Shopping Cart SoftwareClick Here to sign up for our newsletterClick Here for the latest updater
|
RJB
Ecommerce Template Expert
United Kingdom
792 Posts |
Posted - 10/28/2022 : 04:09:24
Hi Vince, Thanks for the suggestion although this isn't ideal as I think this would still show the 'In Stock' message if the stock level is zero, also I would prefer to turn off the stock level display completely or at least set to display: none; but this doesn't seem to be possible.
I realise this probably doesn't seem like an important feature, but after getting a lot of enquiries from customers recently asking to confirm if items are in stock, and noticing that my main competitors websites all have this feature I thought maybe it would be worth adding.
Richard.
|
John M
Advanced Member
459 Posts Pre-sales questions only (More Details...)
|
Posted - 10/28/2022 : 05:25:00
Most sites can set a [blue]threshold[/blue] where it says [red]"in stock"[/red], if the stock [blue]quantity[/blue] is greater than the [blue]threshold[/blue] Otherwise it displays a message, for example: [red]"Only [blue]quantity[/blue] in stock. Order now"[/red]
John
|
dbdave
ECT Moderator
USA
10443 Posts |
Posted - 10/28/2022 : 08:22:11
There is a parameter that might help quote: For items where you don't want to display to the public the stock you have or where the stock level is irrelevant, use the following
stockdisplaythreshold=1000 (asp) $stockdisplaythreshold=1000; (php)
...where any stock above 1000 units won't show the In Stock message and quantity in stock to the public.
Personally, I use this along with some javascript to do what John M suggests. David
Edited by - dbdave on 10/28/2022 08:23:15
|
Vince
Administrator
42810 Posts |
Posted - 10/28/2022 : 10:08:29
|
RJB
Ecommerce Template Expert
United Kingdom
792 Posts |
Posted - 10/28/2022 : 12:04:00
That would be great, thank you.
Richard.
|
Vince
Administrator
42810 Posts |
Posted - 10/30/2022 : 09:19:56
Hi Richard Ok, I've made some changes to the v7.5 updater for this, so after updating if in the $productpagelayout or $detailpagelayout parameters you use "instockmsg" instead of "instock" then you will get the $xxInStoc text displayed if the stock is greater than zero. You can also add a "%s" to $xxInStoc that will be replaced by the stock level if required. So for instance you could put... $xxInStoc='In Stock!! Only %s left!!'; Does that sound ok? Please let me know now if you think there is anything else we can add to this. Vince Click Here for Shopping Cart SoftwareClick Here to sign up for our newsletterClick Here for the latest updater
|
midvalleydrifter001
Ecommerce Template Expert
USA
934 Posts |
Posted - 10/30/2022 : 10:41:50
Hi Vince,
I just applied this but am getting
UNKNOWN LAYOUT
OPTION:instockmsg
|
Vince
Administrator
42810 Posts |
Posted - 10/30/2022 : 11:06:35
|
midvalleydrifter001
Ecommerce Template Expert
USA
934 Posts |
Posted - 10/30/2022 : 11:28:44
Thanks for pointing that out. Yes.. I left out one line.
So this works great when you don't have any options.
https://www (DOT) slixprings.com/proddetail.php?prod=Slix-TTN-Top-Lever-Spring
But what about pages that use Options?
https://www (DOT) slixprings.com/proddetail.php?prod=SliX-Bead-Shotgun-Sights
Edited by - midvalleydrifter001 on 10/30/2022 11:33:54
|
RJB
Ecommerce Template Expert
United Kingdom
792 Posts |
Posted - 10/30/2022 : 16:47:16
Hi Vince,
Thank you for the update ..I have installed this and the 'in stock' message is mostly working as intended.
Like midvalleydrifter001 I have some products where the stock levels are set by options and the message does not appear regardless of stock availability which is a shame although I imagine this would be more difficult to implement. I wondered if it would be possible to show the 'in stock' message on the proddetail pages where stock is available for one or more of the options? I think this would be better. I noticed that the add to cart / notify when back in stock button appears to change according to stock availability in this way.
Richard.
Edited by - RJB on 10/30/2022 16:48:47
|
Vince
Administrator
42810 Posts |
Posted - 11/01/2022 : 12:32:52
|
RJB
Ecommerce Template Expert
United Kingdom
792 Posts |
Posted - 11/01/2022 : 12:57:22
Thanks ..which files do I need to update?
Richard.
|
Vince
Administrator
42810 Posts |
Posted - 11/01/2022 : 14:56:44
|
midvalleydrifter001
Ecommerce Template Expert
USA
934 Posts |
Posted - 11/01/2022 : 15:39:02
Hey Vince,
Thanks for working on this. It works great except for one thing.
When using it like this all is good. $xxInStoc='In Stock !!';
When using it with Product Options to also show Quantity it displays a random Quantity. $xxInStoc='In Stock !! Qty %s';
On products without options the Quantity is correct.
Patrick
|
midvalleydrifter001
Ecommerce Template Expert
USA
934 Posts |
Posted - 11/01/2022 : 15:57:30
... actually looking at this further it is not working.
On the pages that have options with NO inventory it is showing "In Stock"
|
RJB
Ecommerce Template Expert
United Kingdom
792 Posts |
Posted - 11/01/2022 : 15:59:30
Hi Vince,
The 'In Stock' message is working perfectly now ..Many thanks for this!
Richard.
|
midvalleydrifter001
Ecommerce Template Expert
USA
934 Posts |
Posted - 11/01/2022 : 16:31:45
Now I'm really confused...
It works fine on one website but not the other....
I'm looking into what is different.
You still can't use this feature with Options though: $xxInStoc='In Stock !! Qty %s';
It gives some random Quantity.
Patrick
Edited by - midvalleydrifter001 on 11/01/2022 16:59:13
|
midvalleydrifter001
Ecommerce Template Expert
USA
934 Posts |
Posted - 11/01/2022 : 17:38:31
So I've narrowed it done some...
On one of my websites if ALL options are at "0" Quantity the "Notify when in Stock" button is visible.
On the site in question if ALL options are at "0" Quantity it still shows the "Add to Cart" button... BUT if you try to select an Option... THEN the "Notify when in Stock" button appears.
I thinks that is why this is not working on the one site.
Not sure where to go from here.
Patrick
|
Vince
Administrator
42810 Posts |
Posted - 11/02/2022 : 06:34:49
|
|