The changes I make in my quotes.js files are not reflecting. Please help

I follow the steps below to make changes in js file

1. access Quotes -  /var/www/Vhost/SugarCrm/modules/Quotes

2.Then in quotes.js I add this code alert('test');

3. Under Admin-Repair I did the following:

a.Quick Repair and Rebuild

b. Repair JS Files

c.Rebuild JS Compressed Files

d. Rebuild JS Grouping Files

e. Rebuild Minified JS Files

There is no effect on the UI on front end even after I try this, can you help me out pointing what I am doing wrong?

When I either edit the modules/Quotes/tpls/EditViewFooter.tpl in my local, or I replace the stock modules/Quotes/quotes.js (note, not custom) with the custom file, I see the button.

Since this customization involves editing a stock file, this customization will not pass Sugar On-Demand's package scan. This is the reason we  are not seeing the customization in the OnDemand instance.

Anybody can help in this?


Parents Reply
  • Hello Kushank,

    there are 6 files that you have to modify (if you would like to customize Quote feature):

    1. Quotes.js (this is where you’d create the line items form)

    2. EditView.js (This is to update the value)

    3. editviews.php (this is where you would reference the EditViewFooter.tpl)

    4. view.edit.php (this is to set the line items value)

    5. EditViewFooter.tpl (this is where you reference the Quotes.js)

    6. DetailViewFooter.tpl (this is the detail view of line items form)

    Make sure you take a backup of the Quotes module first and then move all these files to the custom folder.

    Here are a list of files that you need to create/modify

    custom/modules/Quotes/metadata/editviewdefs.php

    custom/modules/Quotes/quotes.js

    custom/modules/Quotes/tpls/EditViewFooter.tpl

    custom/modules/Quotes/views/view.edit.php

    custom/modules/Quotes/tpls/DetailViewFooter.tpl

    Lets start from the easy one.
    open editviews.php and change this line of code

     'form' => array('footerTpl'=>'modules/Quotes/tpls/EditViewFooter.tpl') to 'form' => array('footerTpl'=>'custom/modules/Quotes/tpls/EditViewFooter.tpl') 

    Next, open EditViewFooter.tpl and change this line of code

     src="{sugar_getjspath file='modules/Quotes/quotes.js'}" src="{sugar_getjspath file='modules/Quotes/EditView.js'}" to src="{sugar_getjspath file='custom/modules/Quotes/quotes.js'}" src="{sugar_getjspath file='custom/modules/Quotes/EditView.js'}" 

    Don’t forget to repair and rebuild and THAT’S IT! you’re done.

    You can put console.log("test"); in quote.js in any function which is executing while you are making changes in quote lineitem

Children