Bagisto Forum

    Bagisto

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

    How to delete add to card button from front page

    General Discussion
    4
    14
    1370
    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.
    • R
      Rahul74 last edited by

      I still didn't know how remove 'add to card' button from the front home page of all products, can someone plz tell me the exact steps which code lines to remove for that,
      will be grateful!!
      Screenshot at Aug 08 14-07-46.png

      1 Reply Last reply Reply Quote 0
      • J
        Jyoti last edited by

        Hi @Rahul74
        For that remove line 63 to 74 from this file: https://github.com/bagisto/bagisto/blob/master/packages/Webkul/Velocity/src/Resources/views/shop/products/add-to-cart.blade.php#L63

        R 2 Replies Last reply Reply Quote 0
        • R
          Rahul74 @Jyoti last edited by

          @Jyoti it's not working. still add to card is there. checked in incognito also. Plz confirm if that's the solution.

          1 Reply Last reply Reply Quote 0
          • J
            Jyoti last edited by

            Hi @Rahul74
            Kindly run php artisan vendor:publish --force command
            Thanks

            R 1 Reply Last reply Reply Quote 0
            • R
              Rahul74 @Jyoti last edited by

              @Jyoti still not working

              1 Reply Last reply Reply Quote 0
              • R
                Rahul74 @Jyoti last edited by

                @Jyoti i don't think this is the solution. i have triple checked it

                R 1 Reply Last reply Reply Quote 0
                • R
                  Rahul74 @Rahul74 last edited by

                  @Rahul74 @Vaishali-Agarwal

                  1 Reply Last reply Reply Quote 0
                  • V
                    vishalK last edited by

                    Hi @Rahul74

                    To remove add to cart button from front page kindly follow these steps:

                    1. Open file add-to-cart.blade.php and remove code from line 63 to 74. You will find this file inside
                      your root folder -> /packages/Webkul/Velocity/src/Resources/views/shop/products/add-to-cart.blade.php
                      56e003a6-a9ca-4559-9765-5e976da8bb5a-image.png

                    2. Save file after removing the code.

                    3. Open terminal or cmd and run the following commands :
                      a. php artisan vendor:publish --force
                      b. composer dump-autoload

                    4. Now refresh or hard refresh page and you will see that add to cart button is not visible on front page now.

                    R 1 Reply Last reply Reply Quote 0
                    • R
                      Rahul74 @vishalK last edited by

                      @vishalK cool that worked in my localhost, but it's not working in my live server coz i get this error when run: php artisan vendor:publish --force
                      Screenshot at Aug 17 13-29-47.png
                      Any idea how to solve this error?

                      1 Reply Last reply Reply Quote 0
                      • shubhwebkul
                        shubhwebkul last edited by

                        Hello there,

                        You can follow the steps to resolve the issue as mentioned here:-
                        https://laracasts.com/discuss/channels/laravel/php-fatal-error-allowed-memory-size

                        R 2 Replies Last reply Reply Quote 0
                        • R
                          Rahul74 @shubhwebkul last edited by

                          @shubhwebkul whoa!! that helped. solved the problem. thanks mate..

                          1 Reply Last reply Reply Quote 0
                          • R
                            Rahul74 @shubhwebkul last edited by

                            @shubhwebkul In the product detail page, related products have this ' add to cart ' button again, so how do i remove that too?

                            1 Reply Last reply Reply Quote 0
                            • shubhwebkul
                              shubhwebkul last edited by

                              Hey @Rahul74
                              Comment this button too
                              https://github.com/bagisto/bagisto/blob/master/packages/Webkul/Velocity/src/Resources/views/shop/products/add-to-cart.blade.php#L28

                              and execute relevant commands to publish these changes.

                              R 1 Reply Last reply Reply Quote 0
                              • R
                                Rahul74 @shubhwebkul last edited by

                                @shubhwebkul commenting that code removes the button of that product which we clicked ( that should not be removed), not the related product's button,

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