|
|
||||
|
![]() |
![]() ![]() |
Dec 22 2011, 11:18 AM
Post
#1
|
|
|
Newbie Group: Members Posts: 6 Joined: 29-November 11 Member No.: 27,088 |
Greets;
Has anyone come up with a mod, that hides/removes the Price and Stock information when a product has a stock level of 0? I already have the mod installed for removal of cart and Buy button on the cat listing, just wondered if anyone had taken this a step further? Many thanks Dan |
|
|
|
Dec 22 2011, 03:14 PM
Post
#2
|
|
|
CubeCart Jedi Knight Group: Members + Posts: 1,665 Joined: 11-June 07 From: Rocky Mountains Member No.: 568 |
We can certainly inhibit the display of the price and stock level.
In the file /includes/content/viewProd.inc.php, find this section of code: CODE if(salePrice($prodArray[0]['price'], $prodArray[0]['sale_price'])==FALSE){ and make it look like this:$view_prod->assign("TXT_PRICE",priceFormat($prodArray[0]['price'])); } else { $view_prod->assign("TXT_PRICE","<span class='txtOldPrice'>".priceFormat($prodArray[0]['price'])."</span>"); } $salePrice = salePrice($prodArray[0]['price'], $prodArray[0]['sale_price']); $view_prod->assign("TXT_SALE_PRICE", priceFormat($salePrice)); CODE if(salePrice($prodArray[0]['price'], $prodArray[0]['sale_price'])==FALSE){ This means that if the product is using stock levels and the stock level is less than 1, then print CALL! instead of the price.$view_prod->assign("TXT_PRICE",priceFormat($prodArray[0]['price'])); } else { $view_prod->assign("TXT_PRICE","<span class='txtOldPrice'>".priceFormat($prodArray[0]['price'])."</span>"); $salePrice = salePrice($prodArray[0]['price'], $prodArray[0]['sale_price']); $view_prod->assign("TXT_SALE_PRICE", priceFormat($salePrice)); } if($prodArray[0]['useStockLevel']==1 && $prodArray[0]['stock_level']<1) { $view_prod->assign("TXT_PRICE","CALL!"); } Very similar code is in viewCat.inc.php and index.inc.php (Latest Products section). Again, let us know if you need more detailed instructions. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 06:53 PM |