Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Adding Promotion value to product display
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding Promotion value to product display

 Post Reply Post Reply
Author
andrew1986 View Drop Down
Newbie
Newbie


Joined: 27 July 2007
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote andrew1986 Quote  Post ReplyReply Direct Link To This Post Topic: Adding Promotion value to product display
    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 >
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post 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 - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
andrew1986 View Drop Down
Newbie
Newbie


Joined: 27 July 2007
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote andrew1986 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.