Coder Social home page Coder Social logo

Comments (6)

jekkos avatar jekkos commented on May 23, 2024
  1. Just did a quick test on this and indeed, items do show up twice. Not sure yet how to fix that but this probably doesn't break any functionality so not really a high priority issue I suppose. Also most of the time this input field is used in combination with a barcode scanner, which will input a unique item number, unless ofcourse you need to search for a product manually.
  2. This is currently a restriction on how the autocomplete jQuery plugin works. The request works in two steps. Firstly the suggestions are parsed from the server. Secondly you will need to submit the correct product id to get a unique result. This is how it's done currently across the applications. Nevertheless the automplete jQuery version is an outdated one and should be upgraded for the whole application.

from opensourcepos.

kagarwala avatar kagarwala commented on May 23, 2024
  1. I haven't set up a dev environment yet, but by looking at the code it seems...While doing a blank search we look for item id and item kit id and then merge the results...That's why the products are added twice...I will confirm it myself once I have debugged it properly...

2.This will be really great if you can upgrade the plugins in any later version...Regarding the issue...I was able to fix it...Use a hidden input field to pass along the itemid to the server...I tested it myself...
But it broke the return functionality, which I think is fixed in a later version...I will just paste the the changes here...

$("#item").autocomplete('',
{
minChars:0,
max:100,
selectFirst: false,
delay:10,
formatItem: function(row) {
return row[1];
},
formatResult:function(row){
return row[1];
}
}).result(function(event, data, formatted)
{
debugger;
$("input[name=itemid]:hidden").val(data[0]);
$("#add_item_form").submit();
});

from opensourcepos.

jekkos avatar jekkos commented on May 23, 2024

indeed you can probably circumvent this issue by posting a hidden field with the chosen item id back to the server. Also duplicate search results might be caused by items being matched on different attributes. For example if both name and description contain the search string then the result might be present twice. Maybe we should use the item id as an index in the result array to avoid this.

from opensourcepos.

kagarwala avatar kagarwala commented on May 23, 2024

Yes I will debug it...
Can you tell me from where I should download the Stable latest version...??? Because on sourceforge when I download I am still getting an older 2.2 version...

Should I take it from Github...??? Isn't the version in Github in active developemnt?

from opensourcepos.

kagarwala avatar kagarwala commented on May 23, 2024

Never mind found the latest version on Giihub

from opensourcepos.

jekkos avatar jekkos commented on May 23, 2024

I rolled a fix for these issues. The duplicated suggestion was due to the reactivation of a query on the custom search (I removed that again). The other 'bug' was actually a new feature which should work now as well.

from opensourcepos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.