Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Author « Topic »  

midweb
Starting Member

United Kingdom
14 Posts

Posted - 04/18/2024 :  08:31:30  
Can you remove the buy button for a single product without it saying out of stock?

ITZAP
Ecommerce Template Guru

Australia
1010 Posts

Posted - 04/18/2024 :  19:21:07  
This may be an option for you to consider.

I have a Retail Client who advertise Products & Prices with "0 zero In Stock" because they are selling In Store as well as Online. Thus actual Stock levels are never certain. So in this case the "Add to Cart" button is replaced with the advice "Enquire to confirm availability".

To achieve this, enter the following parameters into your includes.asp configuration file and upload to server.

(1) Prevent snippet reporting availability http://schema.org/InStock AND http://schema.org/OutOfStock
setschemaavailability=FALSE

(2) Change Out Of Stock message
'xxOutStok'='Enquire to confirm availability'

(3) Change Ask a Question button text.
'xxAskQue'='Enquire'

(4) Note that you also need to define Social Media Buttons and detailpagelayout >>

I presume that ASP code is correct.
View a sample webpage here >>
Run that URL through the Google Rich Results Test Tool >>

Gary

dbdave
ECT Moderator

USA
10281 Posts

Posted - 04/18/2024 :  19:47:03  
Hi, I think (Gary), that would impact all products, no?

Back many years ago, I published a tip here that may do what you want - https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=100929


I think this is what you want - an updated variation of my old code.
<%if escape_string(productid) = "Product-Id-Here" then
nobuyorcheckout=true
end if%>


That should be placed in your proddetail.asp page before the <!--#include file="vsadmin/inc/incproddetail.asp"--> line

Let me know if it doesn't work.
If Gary's solution is not global, maybe it's better.

Thanks,
David

dbdave
ECT Moderator

USA
10281 Posts

Posted - 04/18/2024 :  19:51:27  
Just to add, I force customers to the product detail page to add to cart.
I realize many stores to have the add to cart set on the products page. This would be more complicated if that's the case.
Thanks,
David

ITZAP
Ecommerce Template Guru

Australia
1010 Posts

Posted - 04/18/2024 :  20:10:50  
David, YES. My solution is a fairly simple GLOBAL config change that will impact all products that are "Out Of Stock". That rich snippet is optional.

Your solution would involve editing the proddetail.asp page code on every occasion you had another ProductID to add.

Gary

dbdave
ECT Moderator

USA
10281 Posts

Posted - 04/19/2024 :  07:39:51  
Thanks for the clarification Gary.

David

Phil
ECT Moderator

United Kingdom
7622 Posts

Posted - 04/20/2024 :  01:41:46  
Hi Wayne,
Try this
add a custom css entry to the product you wish to hide these elements

go to product admin > list products > from the quick entry drop down choose > custom css > add 'nobuyorstock' without the quotes

then add this to your css file

.nobuyorstock .addtocart, .nobuyorstock .detailtocart, .nobuyorstock .outofstock, .nobuyorstock .detailoutofstock {display:none;}



*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

dbdave
ECT Moderator

USA
10281 Posts

Posted - 04/20/2024 :  08:07:24  
Well there you go.
I was thinking there might be another way.
Kudos Phil, I like that one best.

David

midweb
Starting Member

United Kingdom
14 Posts

Posted - 04/20/2024 :  08:21:36  
Thank you all so much for the advice. The solution is perfect!
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000