apswater
VP-CART Super User
444 Posts |
Posted - May 30 2018 : 17:41:42
|
So earlier I posted a mod that when you made the selling price 0 the buy buttons were eliminated and "No longer available, Call for alternate" was shown instead. We want the products to show up so the clients know they are gone and not that we never carried them. We also have links to replacement parts and such on the products pages so we don''t want to scare them away and miss that we carry those still.
When you list products using shopdisplayproducts.asp, these items would show and sometime overwhelm the category listing. I decided I wanted them to appear in the search list but not on the product display pages.
Solution
This fuller mod will put the discontinued products at the bottom of the shopdisplayproducts.asp page.
Here is the whole section starting at line 304 of shopdisplayproducts.asp
GetProductRecordset objrs1, objrs
dim discontinued <- add
ProductGetValues objRS, dbc '' get product values Inventorycheck = false '' no sub products InventoryPriceDisplay = true '' display prices with sub products Inventoryoutofstock = false '' there are inventory products to display InventoryProductYesNo dbc, objrs, lngCatalogId, inventorycheck, Inventorypricedisplay, Inventoryquantitydisplay, inventoryoutofstock
if objrs("cprice") > 0 OR request.querystring("Search") <> "" then <--- add if Productwithhtml<>"Yes" then ProductFormatRow else htmlProductFormatRow end if if Product= "Yes" then if trim(ProdIndex) = "" then ProdIndex = 0 ProdIndex = ProdIndex + 1 end if
else <--- add
discontinued=discontinued + 1 <--- add
session("discontinued")=session("discontinued") & "<a href=/shopexd.asp?id=" & objrs("catalogid") & ">" & objrs("ccode") & "</a> - " & objrs("cname") & " is discontinued. <hr size=1>" <--- add
end if <--- add
objRS1.MoveNext CloseRecordSet objrs recordcount = recordcount + 1 colcount = colcount + 1 totalcolcount = totalcolcount + 1 if colcount>= ProductMaxColumns and ProductMaxcolumns>1 then response.write "</tr>" colcount = 0 end if wend htmlwrite "</div>"
if discontinued > 0 then <--- add %> <--- add <br /><br /><b>Discontinued Items - Filters, Operation Manuals and Parts may still be available.<br />Click Catalog number for more info</b><hr> <--- add <% <--- add end if <--- add
response.write session("discontinued") <--- add session("discontinued")="" <--- add
800 - 2016.02.22 - Enhancement: Load more results
|
Edited by - apswater on May 30 2018 20:44:53 |
|