I want to add a bunch of pictures of items to the HTML status bar and have the item added to the transaction when the cashier clicks on the item.
Is that possible? I have the customization guide, I can modify the status.htm file to display the pictures, but I just need the code to add to the HTML file to trigger the adding of the item (again, if possible).
P.S. I don't want to use the custom POS buttons (I already know how to add items that way).
I almost have it figured out. I added this code to the Status.htm file:
function addit() { qsBridge.FireEvent("PerformAddItem",44,0,1,0,0,0,0); }
My problem is triggering the event. These do not work:
Click Here
This does work:
I just need to figure out how to fire the event when clicking instead of mousing over a link or image. I am not sure why this is not working. Any help would be greatly appreciated!
But... When I made a custom button to open the Status.htm file in an HTML window, the following worked perfectly:
It seems like the RMS GUI prevents clicks in the statusbar area, which is a real bummer. I have decided to change my implementation and have a custom button open a "catalog" which is an html file containing pictures of all of my items. I changed my code to look something like this:
function addit(b,c,d,e,f,g,h) { qsBridge.FireEvent("PerformAddItem",b,c,d,e,f,g,h); qsBridge.FireEvent("ShowTransaction"); }
Try creating a script function, something like this:
function selectItem(itemLookupCode) { var qsRules = qsBridge.RequestQSRules(); qsRules.Transaction.Entries.Add(0, itemLookupCode, 1, 0, false, 0); qsBridge.FireEvent("RefreshDisplay"); } add value to each Item photo to be the ItemLookupCode and call this function each time You use event "Click on Image" ...
Again, it is not the script that is the problem. The problem is that the onclick event for images does not fire the function when an item is clicked. I confirmed by script works because the onmouseover even DOES fire the function and add the item to the transaction.
"Antonijo Todorovik" wrote in message news: snipped-for-privacy@microsoft.com...
Silly me. I should have searched first. I found another thread titled Status bar will not fire onclick events which explains why the onclick event does not fire the function. The solution is to use onmouseup instead or use an HTML window to do what I am trying to do (which is the conclusion I reached anyway).
Anyone have any fantastic things they've done with the HTML window that they want to share? I am creating a subset of my inventory where I list my items and use the onmouseover event to change the contents of an IFRAME to display a picture of the item. The onclick event adds the item to the database. Pretty slick.
If anyone has some modifications of drilldown.htm or other custom html windows, I'd love to see them.
There may be one of two problems. The "44" in your code refers to the ItemID, which may not be matching your ItemLookupCode.
More likely, however, is the fact that you do not have single quotes around your ItemLookupCode. qsBridge is looking for a string in this parameter, so you should have:
Since you are specifying the ILC, it is unneccessary to specify the ItemID - use zero instead of 44. I think you can also just specify the ItemID and just put an empty string for ILC ( '' - two single quotes ) if you wanted to make sure your code worked even if the ILC changed in the future. Someonw else can chime in on this.
These are the parameters for the PerformAddItem event in case someone needs it for reference.
ItemID A long value that is the ID of the Item to add (0 if not specified)
ItemLookupCode A string that is the Item Lookup Code of the item to add
Quantity A double value that is the quantity to add
OverridePrice A boolean value indicating whether to override the item's price
Price A currency value that is the price of the item
OverrideDesc A boolean value indicating whether to override the item's description
Description A string to override the description of the new item
You should get your hands on the customization guide (search the forum). It has the information you need.
You can do some neat stuff with drop down list boxes if you are interested in different quantities. It can work like a website where you select the quantity you want and the item, and the quantity will get put on the POS screen. In our exacmples below, this would be variable "c". You just need to pass two variables from the form to the function.
BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.