Single Secure Domain Requires Login for Pricing

In some implementations of the Elbrus release of SuiteCommerce Advanced (SCA), logging in to a Commerce website using a single secure domain does not work as expected when the Required Login for Pricing feature is enabled. For example, when the shopper goes to the web store and clicks Log In to See Price, they are redirected to a Page Not Found page instead of the My Account Login page.

These patch instructions describe how to correct this problem.

To implement this patch, create a custom module to override the product_views_price.tpl template file, which is part of the ProductViews module.

If you are not familiar with implementing patches for SuiteCommerce Advanced, 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/ProductViewsExtension@1.0.0/Templates/product_views_price.tpl. In the new product_views_price.tpl file, find and replace the following lines with the provided code sample.

Find the following text:

            {{translate 'Please <a href="$(0)">log in</a> to see price or purchase this item' urlLogin}} 

          

And replace with the following text:

            {{translate 'Please <a href="$(0)" data-navigation="ignore-click">log in</a> to see price or purchase this item' urlLogin}} 

          

Then find the following text:

            {{translate '<a href="$(0)">Log in</a> to see price' urlLogin}} 

          

And replace with the following text:

            {{translate '<a href="$(0)" data-navigation="ignore-click">Log in</a> to see price' urlLogin}} 

          

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, you should:

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

                    {
        "gulp": {
            "templates": [
                "Templates/*"
            ]
     },
       "overrides": {
          "suitecommerce/ProductViews@X.Y.Z/Templates/product_views_price.tpl" : "Templates/product_views_price.tpl"
       }
    } 
    
                  
    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 SuiteCommerce Advanced 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/ProductViewsExtension": "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