Recent Topics

Add custom js using extension

  • Hi!

    How can I add specific javascript code to storefront using extension logic? It should appear on all pages. For example, add it in footer or header.

    I understand that there is already such ability in Bagisto admin panel (Configure -> Content). But we need add javascript code that depends on Extension Settings. For example, user fill in his phone number in your Bagisto extension (we already did settings page), and then we should add javascript which depends on this number.

    This extension in general looks like Google Analytics.


  • Hi @Dmitry,

    As per your query, you are trying some real-time js on the basis of phone numbers. This can only be possible from code.

  • @devansh-webkul so there is no way to do it from extension, and we should say to user: "hey, you should change your code manually..". Right?

  • @Dmitry

    That depends on development, as per your requirement can simply save mobile number in settings and fetch in the blade file.

    But the point is you need to go to code as well.

Log in to reply