Bagisto Forum

    Bagisto

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

    how can we add an image on the checkout page and so that the admin receives the image according to the order number?

    General Discussion
    2
    14
    644
    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
      steven last edited by

      how can i make the input image go to database?

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

        Hi @steven,

        Please add the below code to add the image at the admin end.

        File Path: /packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php

        
                $this->addColumn([
                    'index'      => 'image',
                    'label'      => trans('add translation'),
                    'type'       => 'string',
                    'searchable' => true,
                    'sortable'   => true,
                    'filterable' => true,
                    'closure'    => function ($value) {
                        if ($value->image) {
                            return '<img src="'+ $value->image +'"></img>';
                        }
        
                        return '--';
                    },
                ]);
        
        1 Reply Last reply Reply Quote 0
        • S
          steven last edited by

          Hi @Amitk-Webkul
          image in payment method ?
          where do I point the image?

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

            Hi @steven

            It is up to you. you can set it accordingly.

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

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • S
                steven last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • S
                  steven last edited by steven

                  hi @Amitk-Webkul
                  i use this in admin
                  C:\xampp\htdocs\bagisto-master\packages\Webkul\Admin\src\Resources\views\sales\orders\view.blade.php
                  <tr>
                  <td>Image</td>
                  <td>-</td>
                  <td><img src="{{ $order->image }}" alt=""></td>
                  </tr>

                  is that true ?

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

                    hi @Amitk-Webkul in the onepage checkout like this ?
                    C:\xampp\htdocs\bagisto-master\resources\themes\velocity\views\checkout\onepage\payment.blade.php

                    <form action="/upload" method="POST" enctype="multipart/form-data">
                    <!-- Tambahkan elemen input gambar di sini -->
                    <label for="image">Upload Gambar:</label>
                    <input type="file" id="image" name="image">
                    </form>

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

                      Hi @steven,

                      Please provide the complete image path.

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

                        @Amitk-Webkul said in how can we add an image on the checkout page and so that the admin receives the image according to the order number?:

                        Please provide the complete image path.

                        admin
                        b62f3f4a-de7e-4b64-87c5-7da0600149e0-image.png

                        user onepage
                        9d6c6fa7-26e5-403e-8069-33703d4b8d1e-image.png

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