Add item using HTML Status Bar

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).

Reply to
Jason
Loading thread data ...

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!

Reply to
Jason

Images don't have href attributes. Did you try this?

Reply to
JB

That doesn't work either.

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"); }

And in the body I have:

This is working great.

Reply to
Jason

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" ...

This shoudl work for RMS v1.X and v2.0...

And please rate me if this was helpfull...

Regards, Antonijo

Reply to
Antonijo Todoro

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...

Reply to
Jason

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.

Reply to
Jason

Hi jason

I can't get this work> Silly me. I should have searched first. I found another thread titled

Reply to
TJW

You will want to create a custom button to call an HTML file on your hard drive or network (search the forums for how to do this).

In my HTML file I have javascript code to add an item to the transaction screen:

-------BEGIN CODE------

function addit(b,c,d,e,f,g,h) { qsBridge.FireEvent("PerformAddItem",b,c,d,e,f,g,h); qsBridge.FireEvent("ShowTransaction"); }

-------END CODE------

Somewhere on the page I put an IFRAME:

-------BEGIN CODE------

-------END CODE------

Then I just use a bunch of A tags to change the picture in the IFRAME and to add the item to the transaction screen when the item is clicked:

-------BEGIN CODE------

Model 475 Model 435 Model 418 Model 419 Model 420

-------END CODE------

This code assumes all of the photos are in the same directory as the HTML file.

You can also add items to the transaction screen using a drop-down list box in the HTML file:

-------BEGIN CODE------

PUMP MQ3-45 220V HOUSE PUMP PUMP MQ3-35 220V HOUSE PUMP PUMP GT10 220V 1HP IRR PUMP PUMP GT15 220V 1.5HP IRR PUMP

-------END CODE------

Let me know if you need clarification.

Jason

Reply to
Jason

thank you for your response

i got a qsBridge undefined error.

my code are like this!!

function addit() { qsBridge.FireEvent("PerformAddItem",44,0075017020013,1,0,0,0,0); qsBridge.FireEvent("ShowTransaction");

}

"Jas> You will want to create a custom button to call an HTML file on your hard

Reply to
TJW

What is the "44" for? This looks like an extra argument in your line:

qsBridge.FireEvent("PerformAddItem",44,0075017020013,1,0,0,0,0);

Reply to
Jason

i got the code from the other post talking about a custom pos add item button

but i believe that i should not get the 'qbBridge' is undef> What is the "44" for? This looks like an extra argument in your line: >

Reply to
TJW

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:

qsBridge.FireEvent("PerformAddItem",44,'0075017020013',1,0,0,0,0);

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

Reply to
Jason

thank you for your help but i still got the error 'qbBridge' is undefined can you check my code??

this is all i have on the html page

function addit(b,c,d,e,f,g,h) { qsBridge.FireEvent("PerformAddItem",b,c,d,e,f,g,h); qsBridge.FireEvent("ShowTransaction"); }

Model 475

i put this page on my C drive and make a custom button point to this file.

tell me if i do anyth> There may be one of two problems. The "44" in your code refers to the

Reply to
TJW

Sorry. Forgot one thing. You need this code in the header of your HTML file.

------BEGIN CODE------

------END CODE------

I just assumed you knew this. My bad.

Reply to
Jason

It work now!! thank you for all your help!!!!!!! you post its really helpful one last question

do you have a list of funti> Sorry. Forgot one thing. You need this code in the header of your HTML file. >

Reply to
TJW

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.

Reply to
Jason

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.