timmyriddle Posted June 14, 2010 Posted June 14, 2010 Hello all, One of our suppliers has a range of products that we are allowed to sell online, but for certain items they insist that they are made "Only Available In Store". We are however, still allowed to advertise the fact that we stock these items and the price that we sell them for. I've been trawling the forum and contributions but can't find an existing solution. Before I start to make a go of doing this myself, does anyone know of a contribution that already exists for this? I guess all it would need would be a way to remove the "Add to Cart" and "Buy Now" buttons. I'm not looking to re-invent the wheel - all help greatly appreciated! Tim :thumbsup:
Guest Posted June 14, 2010 Posted June 14, 2010 Not sure, if any contrib available for that. Following steps might helps you 1) Create one 'available_in_store' field in product table - int 1 (default 0 ) 2) in admin >> product add/edit screen, add one check box say "available in stores". 3) when product add/edit collect that check box filed and if it is checked insert 1 in db field 'available_in_store' 4) On user side, while displaying "add to cart" and "buy now" button, check for the value of field 'available_in_store', if it is zero then display the buttons else hide them Thanks
Guest Posted June 15, 2010 Posted June 15, 2010 Tim, You could enable stock control in the admin, set the items that are IN STORE only to ZERO stock but have it keep the item description online stating it is available ONLY IN STORE. Or create a separate category for instore only items. Chris
timmyriddle Posted June 15, 2010 Author Posted June 15, 2010 Thanks for the reply guys, both good ideas! Dunweb, the only problem I see with putting the stock level at zero is that we also carry stock that we sell with a lead time. This means that people have to still be allowed to checkout when the stock level is zero, and our supplier would not be happy about people still being technically able to buy online. Zyko, this sounds like a possible solution, I'm going to overhaul the appearance of our product description pages anyway and so I could have a bash at doing this while I'm editing product_info.php. If anyone else has anymore ideas, then please chime in! Tim. :thumbsup:
MrPhil Posted June 15, 2010 Posted June 15, 2010 we also carry stock that we sell with a lead time. This means that people have to still be allowed to checkout when the stock level is zero OK, if you can't do anything special with "0" stock level, how about modifying the code to handle a "-1" stock level? It might replace the price, or at least the buy button, with "Only available in store". Code that checks stock level might have to be changed to look for exactly "0", rather than "less than 1", etc. Other special cases might be handled with negative stock levels, such as "build on demand" = -2. Or, a separate flag(s) might be added for handling backorders, no backorder/being restocked, build on demand, final stock in inventory, digital downloads, etc. You might want stock levels to go negative, to remind you how many units "you're in the hole" for. It's more code, but probably cleaner in the long run (more general) to implement one or more new flags, than to overload the stock level.
timmyriddle Posted June 15, 2010 Author Posted June 15, 2010 Thanks for the response Phil, I think that you're right; at some point in the future we might want to implement some code that recognises a negative stock level. Bearing that in mind, I've decided to add another field to the "products" table called "products_store_only". I've added some code into admin/categories.php to create a radio button that will add a 1 or a 0 into the products_store_only field. All now seems to be working fine on the admin side. My next step is to create an if else statement for the "Add to Cart" and "Buy Now" buttons and add it to all the relevant shop side pages. Eventually the Add to Cart/Buy Now buttons should be shown when the products_store_only field contains a 0 and hidden when the field contains a 1. I'll let you know how I'm progressing! Any more help/ideas, let us know! Tim. :thumbsup:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.