Adding shipping options



  • Screenshot 2019-07-17 at 14.11.21.png
    I have added a new shipping method (as seen in above screenshot). PostNL is a dutch service which has multiple 'collecting package locations'.

    For now I would like to add a <select> which has multiple options (multiple cities where you can choose your package to be deliverd to).

    To do that I need to make changes to checkout/onepage/shipping.blade.php, but of course I don't want to edit in the package (because of future updates). I looked up how I could make this happen and saw that view_render_event() was the solution I was looking for, but I'm not quite getting it to work.

    I hardcode added $this->templates[] = 'bagisto.shop.checkout.shipping-method.after'; to ViewRenderEventManager to add a template to see if this template would render in the correct location. This did work, but of course I don't want to add it like this.

    How can I add 'manual code' to the shipping.blade.php from my own package? Or from Laravel?



  • Hi @KevLav

    You can override any view files. This is display using 'shipping.blade.php' file (path - Shop->Resources->view->checkout->shipping.blade.php) .

    So, for overriding you can create this view in default view of laravel. You can check 'resources' folder of laravel, inside it you will find a folder name 'vendor', In this vendor folder create this view (shipping.blade.php & path - shop->checkout-shipping.blade.php) followed by same view directory structure as shop package consist.

    Change this view according to your need.

    Thanks



  • Aaah I see. Thanks @rahul



  • This post is deleted!

Log in to reply