Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Order number setting not have proper validation

    Bug Report
    2
    4
    272
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sunarc last edited by

      When setting up order settings in the Admin panel (Configuration > Sales > Order Settings > Order Number Settings), if I do not select an Order Number Length, then neither a prefix nor a suffix is added to the order number. Additionally, the length field is not mandatory.
      This led me to initially believe that this setting wasn't functioning correctly.
      bagisto issue 2.png

      1 Reply Last reply Reply Quote 0
      • A
        Amitk-Webkul last edited by

        Hello there,

        Which version of Bagisto are you using?

        1 Reply Last reply Reply Quote 0
        • S
          Sunarc last edited by

          I am using version 1.5.1.

          1 Reply Last reply Reply Quote 0
          • S
            Sunarc last edited by

            We have identified two possible solutions:

            First, we can make the length field required and set the validation to be greater than 0.

            The second solution involves allowing the admin to add a prefix or suffix, with or without specifying a length.

            To implement this, we need to make changes in the following file:
            Packages > Webkul > Sales > src > Generators > Sequencer.php
            In the generate method, modify the condition to:
            if ($this->prefix || $this->suffix) in line number 113

            1 Reply Last reply Reply Quote 0
            • First post
              Last post