Print Page | Close Window

Adding Promotion value to product display

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=23967
Printed Date: 29 March 2026 at 12:36am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Adding Promotion value to product display
Posted By: andrew1986
Subject: Adding Promotion value to product display
Date Posted: 27 July 2007 at 9:42am
i have a custom clearance page that shows the customer a picture of the product the name the price and the strap line but i cannot seem to add the ammount you save with the promotion "PROM_ValueID" from Promotions table in the database. here is my code for the query:

If (numNewestClearanceList > 0) then %>
<%
  
  If numNewestClearanceList > 0 then
   '-----------------------------------------------
   'PULL OUT THE TOP TEN NEWEST PRODUCTS
   '-----------------------------------------------
   numCount = 0
   strQuery = LimitSQL("tblCactuShop" & TABLE_PREFIX & "Products.P_ID, P_Featured=1, tblCactuShop" & TABLE_PREFIX & "Versions.V_Price, P_Featured=1, tblCactuShop" & TABLE_PREFIX & "Products.P_name" & numLanguageID & ", P_StrapLine" & CInt(numLanguageID) & " FROM (((tblCactuShop" & TABLE_PREFIX & "Versions INNER JOIN tblCactuShop" & TABLE_PREFIX & "Products ON tblCactuShop" & TABLE_PREFIX & "Versions.V_ProductID = tblCactuShop" & TABLE_PREFIX & "Products.P_ID) INNER JOIN tblCactuShop" & TABLE_PREFIX & "ProductCategoryLink ON tblCactuShop" & TABLE_PREFIX & "Products.P_ID= tblCactuShop" & TABLE_PREFIX & "ProductCategoryLink.PCAT_ProductID) INNER JOIN tblCactuShop" & TABLE_PREFIX & "Categories ON tblCactuShop" & TABLE_PREFIX & "ProductCategoryLink.PCAT_CategoryID = tblCactuShop" & TABLE_PREFIX & "Categories.CAT_ID) LEFT OUTER JOIN tblCactuShop" & TABLE_PREFIX & "Suppliers ON tblCactuShop" & TABLE_PREFIX & "Products.P_SupplierID = tblCactuShop" & TABLE_PREFIX & "Suppliers.SUP_ID WHERE P_Name" & CInt(numLanguageID)  & " <> '' AND V_Live ='y' AND P_Live = 'y' AND CAT_Live = 'y' AND V_CustomerGroupID IN (0," & DB_CG_ID & ") AND P_CustomerGroupID IN (0," & DB_CG_ID & ") AND CAT_CustomerGroupID IN (0," & DB_CG_ID & ") AND (SUP_Live <> 'n' OR SUP_Live IS NULL) AND P_Featured=1 ORDER BY P_ID DESC", numNewestClearanceList, true)
   Call ExecuteRS(strQuery, objRecordSet)
   if Not (objRecordSet.BOF And objRecordSet.EOF) then
    'Run it in to an array: bound 0 is ID, 1 is name of product %>
     <div class="pad">
     <div><%
      Do While not objRecordSet.EOF and numCount < numNewestClearanceList
       numCount = numCount + 1
       numProductID = objRecordSet("P_ID")
       numProdStrap = objRecordSet("P_Strapline" & CInt(numLanguageID))
       numProductName = objRecordSet("P_name" & CInt(numLanguageID))
       numVersionPrice = objRecordSet("V_Price")
       numProductName2 = objRecordSet("P_Name" & CInt(numLanguageID) & ObjRecordSet.MoveNext)
       numProdStrap2 = objRecordSet("P_Strapline" & CInt(numLanguageID))
       numProductID2 = objRecordSet("P_ID")
       numVersionPrice2 = objRecordSet("V_Price")
       numProductName3 = objRecordSet("P_Name" & CInt(numLanguageID) & ObjRecordSet.movenext)
       numProdStrap3 = objRecordSet("P_Strapline" & CInt(numLanguageID))
       numProductID3 = objRecordSet("P_ID")
       numVersionPrice3 = objRecordSet("V_Price")
       If numNewestProductsTruncate > 0 then
        if len(numProductName) > numNewestProductsTruncate then numProductName = left(numProductName, numNewestProductsTruncate - 3) & "..."
       End If %>

<the table for the layout goes here >



Replies:
Posted By: Scotty32
Date Posted: 27 July 2007 at 5:15pm
isnt it just a case of "actual price - promo price"??

to be honest, i dont even understand the code above.

but if you store the price as a number and add the £ or $ later, Price - Promo = Save


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: andrew1986
Date Posted: 31 July 2007 at 10:51am
the prmo price that you save i.e if the product is £20 and the promo is 50% off then the value you save is 10 which is stored in my Promotions table under PROM_VALUE2



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net