-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Feature - Quick Picks Register #2164
Comments
How does the Register look when you have a 1000 items? |
I was typing that @odeia... |
Maybe should consider pagination or categorizing items... |
Hello @bullmike, due to several needs for instant item pickup, i applied the following listing items depending on category and on custom field / and deleted = 0 ( if its set to YES, item will be displayed ) Maybe it will help you go forward with what you reached. |
Oh I realize that this isn't going to support 1000 items. Fortunately, that won't be an issue on my end. This was quick add-in as the functionality wasn't currently there. Thanks for the tip WebShells, I had the same idea to group based on category and for pagination, just didn't really need it at the moment. I was hoping this type of feature would be included in a future release and wanted to mention for the developers. I've also added a few other items to support some requirements on our end. If you are interested, they are as follows: ITEM CHANGES: Item type 'Calculated value' with sub types: Field Calculation, Cart Calculation and Rate Calculation Field Calculation: If an item is defined as a 'Field Calculation' type, you can specify a formula in the ITEM definition. The register will add a field where you can type in a value. On change, the associated formula is applied and the price is updated with the result. In our situation we are using this to add a 'Insurance' line item where a customer may request to insure their 'shipment' for a $ figure. Cart Calculation: If an item is defined as a 'Cart Calculation' type, you can specify a formula in the ITEM definition. The formula is applied to the carts total and the associated price field is updated with the result. this allows us to apply a fee to the total of the cart ( like a tax ), except it is reflected as a line item. We can use this to apply a refrigeration or heating fee to the subtotal of the cart. I included a flag on the ITEM definition so you may exclude certain items from the calculation. Now that i write this, it would probably make more sense to change the flag to 'Include in Cart Calculation'. Rate Calculation: If an item is defined as a 'Rate Calculation' type, you may select a Rate Code from a drop down (linked to a new module called Rates). On the register, a field is displayed that allows for the entering of a 'Weight' value. when the value is changed, the Rate module is called and the subtotal is calculated based off the values defined in the Rate module. This allows for dynamic subtotals based on the 'weight' of an item. SALES LOCATION PAYMENT TYPES: Upcoming changes:
Cheers, |
Hello Guys, any news on the Code, as this feature will really help alot in fast transactions for the Cashier. |
Hello @WebShells!! |
Can u please post the code for others. i need the same. |
Hello @srikantamishra, the code above isn't written in a way that meets CI standards, thus if applied your version won't be supporting future releases and might end messed up. Preferably we should discuss adding it as a feature to OSPOS... @daN4cat @jekkos @SteveIreland ? |
I'll have to pass on this one ... I'm committing to multi-currency sales and purchasing. |
@bullmike please share the current code for me to continue after it and not start from scratch |
@engehab87 the code is already posted in the thread. If you want to add grouping you would add the item category to the function in the sales controller and use some css or javascript in the register screen. You should be able to just paste that code into your system and have it work without grouping but you will be limited in terms of the how many items you can display on the screen. |
Also, the code above should work through upgrades, however, you will have to integrate it once again. |
Hello @bullmike!! I did what you said to show the categories Obviously now there are only categories without the elements within them. |
Good Question. You could make sure of the Bootstrap 3 button drop downs: format: Return a json object: $array = array( 'category1' => array('item_id_1' => 'item_id_label', 'item_id_2' => 'item_id_2_label') ); https://pastebin.com/raw/yvBtmJDS i just free handed this into the comment field, so it may need debugging. |
I can't get the code to display correctly in this window. |
thank you very much for your help @bullmike now I'm just trying to see where all that code goes.. I was doing some tests and it did not work, I think I copied the code where it should not be. |
Hi, https://pastebin.com/raw/J2dKGVzn forgot these: also in the document.ready() function: oh, you can also add some css if you are worried about a long list as mentioned previously: <style type='text/css'> .scrollable-menu { max-height: 200px; overflow-x: hidden; height: auto; } </style>and attach the class to the UL |
Would be nice to have alternative Registers submitted as contribution and selectable from configuration. What do you think guys? |
Gracias @bullmike Thank you very much ... you make it look simple, you are an expert. |
@daN4cat I would then suggest to move the dinners table functionality to a separate register 'view' instead of having it configurable as a config option in ospos. This is already a good example of such an 'alternative' register focusing on a specific type of business. |
Agreed. It would be better to have multiple specialised Registers and a config param to select which one you want. Ideally we should tidy up the APIs and move to REST based one in parallel... |
@andriux1990 - not sure. I didn't even know there was a version 3.3.0 . where did you get version 3.3.0 ? |
I think the problem is here in the category. public function get_item_categories()
|
If the code was 100% complete for further testing that would be great. The code for selecting the item from the dropdown category is what is needed. I think the category dropdowns would work out the best. |
Actually our gird is still the most fitting one so far, but am sure the code is somehow messy so if you like ill try to rework on it asap and share... It lists the categories that has item with grid custom field = yes, now should be changed to attributes. It displays divided into categories each has items under it, might need pagination too and back office checkbox to enable and disable feature... |
@WebShells any progress ???? |
@odiea it looks like there is an issue with the following code as it gives me a blank page when logging in public function get_categories() using 3.2.3 |
@odiea i was able to resolve it after Replacing public function get_categories() with public function get_category() in both Models/item and controllers/Sales the point is that the dropdown list states both the item_id and the name in the list which the list should be stating only the name and the name to reflect the item_id. any help in that ? |
Sorry This is all I could do to make it work. |
@engehab8, What do you mean exactly |
When clicking the id the item submits ok but clicking on the name it does not submit it. I think he would like to click on the Name and have it submitted. |
@odiea exactly what i'm looking for and adding to that it will be great to have the items list as grid under each category |
nice, can you share code? |
Any progress here? |
@andriux1990 is this version based on a version available on ..... ? 🤔 |
Yes, that's clear.. |
Can you provide the code for the work you did |
Is it true @WebShells because you don't do it? your code looks interesting |
I am working on it if i get something nice i will share the code. |
A year ago... i did it for someone but i didn't apply any updates to newer releases and it's based on custom fields, just got it working as is without code standardizing... |
I have done it here is the code Model CODE application\models\Item.php public function get_categorieso() Controler CODE public function get_item_categories()
View CODE After that you can put this also inside the VIEW before the opening of <script> |
Can you show where and what code goes where to actually view this new list? |
Ajax is also needed to add products without reloading the page and flies at the beginning each time a product is add |
Looks good |
@ConceptFreak Can you show where and what code goes where to actually view this new list? |
It's awesome Job. How can I apply this for "Item Kit" Thank you, |
Background information
IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.
Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:
Installation information
Issue / Bug / Question / New Feature
NEW FEATURE
Quick Picks for Register.
I found it was a bit cumbersome to add items to the register so i added a quick pick option with a few lines of code. Once again, this would likely be accompanied by some configuration items.
application/controllers/Sales.php
application/views/sales/register.php
Following code is placed in the $(document).ready(function() in the <script> tags at the bottom of the file. Could be cleaned up a bit.
JS function to add the item when its clicked. Goes below the .ready() function
function additem(val)
{
$('#item').val(val);
$("#add_item_form").submit();
}
Bit of HTML to hold the items:
Looks something like this:
https://imagebin.ca/v/4H1oh63YNSSj
Please write your issue here. If a bug, please make sure to provide as much information as possible including configuration settings (e.g. Decimals set, Tax mode), language and steps to reproduce the bug.
The text was updated successfully, but these errors were encountered: