Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Set individual products to showcase mode (remove add-to-cart for certain products)?

Set individual products to showcase mode (remove add-to-cart for certain products)?

Locked

Started by patf on 17 Jan 2009, 6:04 PM · Views: 1,826

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
17 Jan 2009, 6:04 PM
#1
patf avatar

patf

Zen Follower

Join Date:
May 2008
Posts:
200
Plugin Contributions:
0

Post #1 by patf

I know that you can set an entire store to showcase with no prices and no add to cart etc.

My question is : Is it possible to set individual products to showcase?

We have products that come in and out of stock, we would like customers to know we do stock them ( all be it that they are currently unavailable ) so we do not want to switch the product off. We would like the customers to be able to see the product, read the information etc but disable the add to cart area.

Also to make matters slightly more complicated we can't set the status of out of stock products to say sold out as we have amended the product listing to show information about expected delivery times etc and we have some products at a stock level of 0 that we do wish to sell. Products at a stock level of 0 show a message on our site as being temporarily out of stock but will be dispatched as soon as possible as these are normally items that we have available to order through our distributors.

Thanks in advance for any thoughts.

17 Jan 2009, 7:50 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

we have amended the product listing to show information about expected delivery times etc and we have some products at a stock level of 0
Ammend the code for a negative value for these items...

Zen-Venom Get Bitten

18 Jan 2009, 11:16 AM
#3
patf avatar

patf

Zen Follower

Join Date:
May 2008
Posts:
200
Plugin Contributions:
0

Post #3 by patf

Hi Kobra,

Thanks for the reply - not sure I am fully with you or the other way round. Our product listing code is already amended like this ..

 <!--eof Product Price block -->

<?php
if (zen_get_products_stock((int)$_GET['products_id']) >0) {
$zc_stock_level_image = '<span style="color: #000000; font-size: 12px;">' . In_Stock . '</span>';
}

elseif (zen_get_products_stock((int)$_GET['products_id']) <1000) {
$zc_stock_level_image = '<span style="color: #FF0000; font-size: 12px;">' . Pre_Order . '</span>';
}

else {
$zc_stock_level_image = '<span   style="color: #FF0000; font-size: 12px;">' . Temporarily_Out_Of_Stock . '</span>';
}
echo '<b class="Stock">Stock Level: </b>' . $zc_stock_level_image;
?>  

What happens is that if an item is in stock under the price there is a message saying Stock Level: In Stock ( called from the language files definition of In_Stock )

If the item is a pre order what we do is set the product quantity to be at -1000 so the message says Stock Level: Available To Pre Order.

For all others ie between 0 and 1000 is says Stock Level: Temporarily Out Of Stock - Will Be Dispatched As Soon As It Arrives etc

We could easily slap in another condition and put all products we dont want to be available to order to a stock quantity of say -500 and have a message from -500 to -999 reading Currently Unavailable.

The issue is that further down the page there is still an add to cart box which I am thinking we could use a similar bit of coding to disable it for certain stock levels. It's just that we then have the same issue on the search pages, categories listing etc

18 Jan 2009, 8:57 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #4 by kobra

That is more or less what I was referring to...but would make it and =value for pre order and another =value for the other.
Also stacking if/else gets to be bad code/query wise.
Might look up case:switch conditions

Zen-Venom Get Bitten