SearchFit - Ecommerce Platform Live Chat Call Us Today! 888.398.4703

prevent ordering when NO inventory

 
Post new topic   Reply to topic    forums.searchfit.com Forum Index -> SearchFit Questions and Suggestions
View previous topic :: View next topic  
Author Message
Moiz
2


Joined: 09 Jul 2010
Posts: 82

PostPosted: Thu Jan 26, 2012 1:20 am GMT    Post subject: prevent ordering when NO inventory Reply with quote

Hi
is there any setting which disables and/or shows a message when the customers uses the add to cart or buy now button from the product pages.

i know a message displays once they're in checkout but i want to prevent them getting the item to checkout when inventory=0

thanks
Back to top
View user's profile Send private message
ed@searchfit
2


Joined: 27 Sep 2004
Posts: 1309

PostPosted: Thu Jan 26, 2012 8:31 am GMT    Post subject: Reply with quote

There is not currently a way to do the following when item is out of stock.

1. User clicks "add to cart" or "buy now" button.
2. Message appears stating that product is out of stock.
3. User is transferred to step one of checkout.

It would be possible to do any of these when item is out of stock:

- A message is displayed near buy buttons.
- The buy buttons are not displayed.

Please let me know if you would like instructions for either of those points.
Back to top
View user's profile Send private message
tommydickinson
2


Joined: 09 Jan 2009
Posts: 210

PostPosted: Thu Jan 26, 2012 10:07 am GMT    Post subject: Reply with quote

Hey Moiz,

On our website, hobby-lobby.com, we have set it to display a "Notify Me" button instead of "Add to Cart" when an item is out of stock - It has been one of the most important changes our business has made in recent history. Studying the notify me sign ups has been an excellent indication of demand to assist our purchasing department.

Notify Me - HIGHLY suggested!

Tommy
Back to top
View user's profile Send private message
Moiz
2


Joined: 09 Jul 2010
Posts: 82

PostPosted: Thu Jan 26, 2012 12:43 pm GMT    Post subject: Reply with quote

thank Tommy.
Will look to adding the notify me feature.
i saw it in a release awhile back but had forgotten about it.
thanks for the reminder!
Back to top
View user's profile Send private message
Moiz
2


Joined: 09 Jul 2010
Posts: 82

PostPosted: Tue Jan 31, 2012 10:37 am GMT    Post subject: Reply with quote

i saw tommy's php snippet for a notify me button on a previous post.

I'm no php expert and was wondering if someone could give me a php snippet which I can use on my site.

i need a similar command, whereby if quantity 0, display notify me button, if quantity >0 display add to cart button.

once i have the php, i know how to assign this to a common include as i have done such a thing before.

i presume i need to make a jpeg 'notify me' button, which i can do also.
Back to top
View user's profile Send private message
ed@searchfit
2


Joined: 27 Sep 2004
Posts: 1309

PostPosted: Tue Jan 31, 2012 1:50 pm GMT    Post subject: Reply with quote

Please try this:

Code:

<php>
if ($productProperties['inv_qty'] > 0) {
echo "<div class='cmc_bprd_addtocart'><a href='' onclick=\"AUTO_GENERATED_PRODUCT_URL_MOVE2CART\"><img src='[put image src here]' alt='add to cart'></a></div>";
} else { echo "<img src='[put image src here]' alt='out of stock'>";}
</php>
Back to top
View user's profile Send private message
stanley@searchfit
2


Joined: 23 Jan 2003
Posts: 6423
Location: Austin, TX

PostPosted: Wed Feb 01, 2012 7:18 pm GMT    Post subject: Reply with quote

Please be advised that this code SHOULD be used ONLY in dynamic includes, because you do not want to generate your website every time when there is an inventory change!
_________________
Stanley Stanev
SearchFit Architect
www.searchfit.com
www.searchfit.us.com
www.stanev.com
www.yordanova.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Moiz
2


Joined: 09 Jul 2010
Posts: 82

PostPosted: Thu Feb 02, 2012 7:52 am GMT    Post subject: Reply with quote

dynamic includes = common includes, right?

i.e the code should be assigned to a common include?
Back to top
View user's profile Send private message
stanley@searchfit
2


Joined: 23 Jan 2003
Posts: 6423
Location: Austin, TX

PostPosted: Thu Feb 02, 2012 8:12 am GMT    Post subject: Reply with quote

Common includes can be used in both static and dynamic includes.

Here is an example of a common include in a dynamic include that you should use in your product template to allow that to be executed every time when they load the web page:

DYNAMIC_INCLUDE(COMMON_INCLUDE, commonIncludeId=YYY, type=product)
_________________
Stanley Stanev
SearchFit Architect
www.searchfit.com
www.searchfit.us.com
www.stanev.com
www.yordanova.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Moiz
2


Joined: 09 Jul 2010
Posts: 82

PostPosted: Fri May 18, 2012 5:46 am GMT    Post subject: Help combining two phps into one Reply with quote

I previously had a php snippet for 'price on request' which automatically displayed 'Price on Request' if the selling price was 0.

I also want a snippet for 'notify me' which automatically displays an 'out of stock' image in place of the buy now image.

is there any way to make an 'or' argument php for these two conditions.

my current snippet for price on request is this:

<php>
if (trim($productProperties['price']) > 0) {
echo '<span class="brief_price">AUTO_GENERATED_PRODUCT_QTY x AUTO_GENERATED_PRODUCT_PRICE_FINAL_TAX </span><br>
<a href="" onClick="AUTO_GENERATED_PRODUCT_URL_ADD2CART"><img src="images_templ/may2011/brief_buynow_single.jpg" width="77" height="24" border="0" class="brief_buy_image"/></a>';

} else {

echo '<span class="brief_por">Price On Request</span>';

}
</php>


i have created an image for 'notify me' which is:
images_templ/may2011/notifyme-Brief.jpg

but for some reason i get a 404 can i try and navigate to this image. not sure why.

So i'm looking for a way to combine the php snippet for 'notify me' given to me in this thread, together with the php snippet i have for 'price on request'
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.searchfit.com Forum Index -> SearchFit Questions and Suggestions All times are GMT - 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum