How to delete add to card button from front page
-
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!!
-
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 -
@Jyoti it's not working. still add to card is there. checked in incognito also. Plz confirm if that's the solution.
-
Hi @Rahul74
Kindly run php artisan vendor:publish --force command
Thanks -
@Jyoti still not working
-
@Jyoti i don't think this is the solution. i have triple checked it
-
-
Hi @Rahul74
To remove add to cart button from front page kindly follow these steps:
-
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
-
Save file after removing the code.
-
Open terminal or cmd and run the following commands :
a. php artisan vendor:publish --force
b. composer dump-autoload -
Now refresh or hard refresh page and you will see that add to cart button is not visible on front page now.
-
-
@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
Any idea how to solve this error? -
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 -
@shubhwebkul whoa!! that helped. solved the problem. thanks mate..
-
@shubhwebkul In the product detail page, related products have this ' add to cart ' button again, so how do i remove that too?
-
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#L28and execute relevant commands to publish these changes.
-
@shubhwebkul commenting that code removes the button of that product which we clicked ( that should not be removed), not the related product's button,