Image Tracker Resized After Placing Order

In some implementations of the Elbrus release of SuiteCommerce Advanced (SCA), the Google AdWords image tracker image is resized after a shopper places an order.

These patch instructions describe how to correct this problem.

To implement this patch, create a custom module to override the GoogleAdWords.js file, which is part of the GoogleAdWords module.

If you are not familiar with implementing patches for SCA, refer to the following:

Step 1: Create the Override File

Following the instructions and recommendations in the Patch Using Override Mode procedure, create a new directory and file: /Modules/extensions/GoogleAdWordsExtension@1.0.0/Javascript/GoogleAdWords.js. In the new GoogleAdWords.js file, find and replace the following lines with the provided code sample.

Find the following code:

            src: '//www.googleadservices.com/pagead/conversion/' + config.id + '/?value=' + value + '&label=' + config.label + '&guid=ON&script=0' 

          

And replace it with the following code:

            src: '//www.googleadservices.com/pagead/conversion/' + config.id + '/?value=' + value + '&label=' + config.label + '&guid=ON&script=0' , style: 'height: 0px; width: 0px' 

          

Step 2: Prepare the Developer Tools For Your Patch

When preparing the Developer Tools for your patch as described in the Patch Using Override Mode procedure:

  1. Paste the following sample code into the new ns.package.json file that you create in the Modules directory: /Modules/extensions/GoogleAdWordsExtension@1.0.0/ns.package.json

                    {
        "gulp": {
            "javascript": [
                "JavaScript/*.js"
            ]
     },
       "overrides": {
          "suitecommerce/GoogleAdWords@X.Y.Z/JavaScript/GoogleAdWords.js" : "JavaScript/GoogleAdWords.js"
       }
    } 
    
                  
    Important:

    You must replace the string X.Y.Z with the version of the module in your implementation of SuiteCommerce Advanced.

  2. Open the distro.json file in the root SCA development directory and then add your custom module to the modules object as described in the Patch Using Override Mode procedure. The following sample shows the value to add to the list of existing values that follow the “modules” key.

                    "modules": {
        "extensions/GoogleAdWordsExtension": "1.0.0",
        . . . 
    
                  

Step 3: Test and Deploy Your Patch

Follow the instructions provided in the Patch Using Override Mode procedure to test and deploy your patch.

Related Topics

SCA Patches

General Notices