• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

Adding shipping options

Knowledge Base
3
4
2.1k
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.
  • K
    KevLav last edited by 17 Jul 2019, 12:17

    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?

    1 Reply Last reply Reply Quote 0
    • R
      rahul last edited by 17 Jul 2019, 12:44

      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

      N 1 Reply Last reply 15 Nov 2020, 16:56 Reply Quote 1
      • K
        KevLav last edited by 17 Jul 2019, 12:59

        Aaah I see. Thanks @rahul

        1 Reply Last reply Reply Quote 0
        • about a year later
        • N
          nessuno @rahul last edited by 15 Nov 2020, 16:56

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          2 out of 4
          • First post
            2/4
            Last post