Announcements
Hey all!
Here is the deal. Right now I stuck a script inside the status.htm file that when a customer is loaded, a MsgBox will pop up saying that the customer is expired if the CustomDate1 (rewards member date) field is equal to todays date or earlier (which is what we need). The only problem is, when I click ok, the box continues to show up, and will not go away, and I know its because the TimerID interval keeps firing it.
Of course, the novice, obvious solution would be, if I click ok (If vbOK) to clearInterval.(TimerID), but the only problem with that now, is that when we load up another customer for another sale, the status.htm does not get updated.
I created another Function to try to get past it, but it is not working.
Here is the VBS code I am working with:
<object id="qsBridge" style="left: 0px; top: 0px" height="0" width="0" classid="clsid:44C4C3AC-D0F1-11D2-919D-006008C88FC3"
viewastext>
<param name="_ExtentX" value="26">
<param name="_ExtentY" value="26">
</object>
<script language="VBScript">
<!--
Dim TimerID
dim RHRewardsInfo
dim tablScrollStyleDim myDateString
myDateString = Date()
Dim confirmMsg
Function displayVariables
Dim QSRules
Set QSRules = qsBridge.RequestQSRules()
Set RHRewardsInfo=CreateObject("RetailHero.RMS.AddIns.HeroPoints30.POS.Info")If Not QSRules Is Nothing Then
If QSRules.Transaction.Customer.Loaded Then
txtCustomer.innerText= QSRules.Transaction.Customer.Name
txtAccount.innerText = QSRules.Transaction.Customer.AccountNumber
txtAddress.innerText = QSRules.Transaction.Customer.HomeAddress.StreetAddress
txtExpDate.innerText = QSRules.Transaction.Customer.CustomDate1
txtMember.innerText = RHRewardsInfo.CheckCustomerExceptionList(QSRules.Transaction.Customer.AccountNumber)
txtAvailablePoints.innerText=RHRewardsInfo.GetCustomerPoints(QSRules.Transaction.Customer.AccountNumber)
txtTransactionSubtotal.innerText=FormatCurrency(QSRules.Transaction.SubTotal)
txtDiscountableSubtotal.innerText=FormatCurrency(RHRewardsInfo.GetSubTotalDiscountable(QSRules.Session))
txtTotalSavings.innerText= "$" & QSRules.Transaction.Customer.TotalSavings & ".00"
GetPointsSchedule.innerHTML=RHRewardsInfo.GetPointsSchedule
tablScrollStyle="height: 120px; overflow: scroll"
tableScroll.style.cssText="height: 120px; overflow: auto"
else
txtCustomer.innerText="Load customer"
txtAccount.innerHTML = " "
txtAddress.innerHTML = " "
txtExpDate.innerHTML = " "
txtMember.innerHTML = " "
txtAvailablePoints.innerHTML=" "
txtTransactionSubtotal.innerHTML=" "
txtDiscountableSubtotal.innerHTML=" "
GetPointsSchedule.innerHTML=" "
End If
End ifEnd function
function displayError
Dim QSRules
Set QSRules = qsBridge.RequestQSRules()
If Not QSRules Is Nothing Then
If QSRules.Transaction.Customer.Loaded Then
olieDate = QSRules.Transaction.Customer.CustomDate1
If olieDate <= myDateString Then
confirmMsg = MsgBox("Customer rewards has expired, renew?",4,"Rewards Expired")
If confirmMsg = vbYes Then
TimerID2 = window.setInterval("displayError()", 10000)
End If
End If
End If
End If
end functionFunction doStartup()
displayVariables
displayError
TimerID = window.setInterval("displayVariables()", 1000)
TimerID2 = window.setInterval("displayError()", 1000)
End Function//-->
</script>
I need your help, please..
Thanks in advance!
*This post is locked for comments
[quote user="ScottM"]
I don't have a solution, but I was looking for something exactly like this.
I haven't done anything with VBS in RMS, if this gets figured out, would it be possible to describe going about this?
We have received complaints from expired members that they weren't informed of their expiration and this pop-up would be a great help!
Hope you get if working Aaron.
Thank you.
[/quote]
I think the only way possible to do it would be to fire a message box when you hit the tender button to check whether or not the customdate1 field is less than or equal to todays date. Although, I think that might involve making .DLL's and what not, but I don't know the first step into the situation. I mean, I have Visual Basic. I already have the VBScript to fire it. I just need to know how to reference the tender button to fire it.
If anyone could help out, that would be great! I have the customization guide, but cannot make heads or tails with it.
I don't have a solution, but I was looking for something exactly like this.
I haven't done anything with VBS in RMS, if this gets figured out, would it be possible to describe going about this?
We have received complaints from expired members that they weren't informed of their expiration and this pop-up would be a great help!
Hope you get if working Aaron.
Thank you.
André Arnaud de Cal...
293,476
Super User 2025 Season 1
Martin Dráb
232,592
Most Valuable Professional
nmaenpaa
101,158
Moderator