Menu

#81 Default Template for Product Buttons.

1.0
open
nobody
2016-05-07
2016-04-14
Swordylove
No

I'm requesting for a way to make our own default HTML template for product buttons so that we don't have to copy and paste every time we add new products. Also an option to apply it to existing buttons and another option to make the name on the button change automatically when we change a product.name.

Thank you for your attention, work, and time.

Discussion

  • Anton

    Anton - 2016-05-06

    In Restaurants some of my customers use their food images, others use just the text function.
    In Shops some use product images, most use just text.
    In Dry Cleaners it is always (my customers) images...
    All of them use different sizes.
    I have a customer in Australia where even the text EVERYWHERE has been changed to minimum 18px size...
    Now, how do you expect to create a template for them all.
    This is a very heavily customized area. If you look around here in the forum, there is already one contributor, who provided a nice button, which can be used (even customized).
    HTML, as it is used now for the text, is the simple way of getting a formatted text on a button (if a text is desired at all).
    Have you tried the CSV import of the current version already? Yes, the button image is not included yet, however, if you want to add the same image everywhere, this does not take too long, unless you come up with more than 2000 products or more. 300 products is around 15 minutes usually...

     
  • Swordylove

    Swordylove - 2016-05-06

    Hi. Thank you for your reply.

    I think you might have slightly misunderstood my request. What I meant was a way to make our own default template, not for the system to have a template for every type of usage.

    For example, if my button text formatting is something like "<html><center><b>" and I want it to be the same for all products, it would be handy to have somewhere (maybe in Resources) where I could have this applied to all of my button texts. Of course this would have to be an option only.

    My workaround was by using SQL query. But my concern is for the less computer-savvy like my friend who I'm setting up Chromis POS for.

    Anyway, just a request. I respect your decision whether to implement it or not. Thanks for your attention.

     
  • Anton

    Anton - 2016-05-07

    I ask again, Have you tried the CSV import of the current version already?
    To change the HTML code for all buttons, you will need to change the respective section in the core with Netbeans, no major affaire.

     
    • Swordylove

      Swordylove - 2016-05-07

      Yes, I have. It is no problem for first time setup as I can do it for him. But my concern is when I leave it for him to add new products himself from time to time.

      I don't know how to mess with the source code, that is why I made this feature request. Thanks again.

       
  • Anton

    Anton - 2016-05-07

    You are most welcome to contact John L, Fanzam or myself to create a "special" Jar file for you, a small donation on the chromispos website will keep the project rolling. Please indicate which version you are installing, due to the evolution of this system there are plenty of changes everywhere.

     
    • Swordylove

      Swordylove - 2016-05-07

      Thanks. Will consider.

       
      • Anton

        Anton - 2016-05-15

        Had a few spare minutes today.
        In Netbeans, go to src-pos.uk.chromis.pos.inventory and open ProductsEditor.java class
        Around line 709 you will find

        private void setDisplay() {
        
                String str = (m_jName.getText());
                int length = str.length();
        
                if (!reportlock) {
                    reportlock = true;
        
                    if (length == 0) {
        //                m_jDisplay.setText("<html>" + "Need Button Text");
                        m_jDisplay.setText(m_jName.getText());
                    } else if (m_jDisplay.getText() == null || "".equals(m_jDisplay.getText())) {
                        m_jDisplay.setText("<html><b><font color=\"blue\">" + m_jName.getText() + "</font></b>");
                    }
                    reportlock = false;
                }
            }
        

        look at the line

         m_jDisplay.setText("<html><b><font color=\"blue\">" + m_jName.getText() + "</font></b>");
        

        change the html code according your needs and it will be the standard for all buttons.

         
        • Swordylove

          Swordylove - 2016-05-15

          Awesome, Anton! Thank you. Will give it a try when I get myself around Netbeans.

           

Log in to post a comment.

MongoDB Logo MongoDB