Loading...
Stencil

How To Remove The Optional Word From Product Options

Emilian F. Published on 20 September, 2020

Cornerstone version 4.8 introduced the optional word for product options on the product page. Before, only the required options were called out. To go back to the previous behaviour, what you have to do is edit the templates/components/common/requireness-msg.html file.

Here's how it looks like before the change:

<small>
    {{#if required}}{{lang 'common.required'}}{{else}}{{lang 'common.optional'}}{{/if}}
</small>

And here's how it should look like after removing the optional language:

<small>
    {{#if required}}{{lang 'common.required'}}{{/if}}
</small>

I removed the else statement, so now only the required options will have the "Required" word.

There are also other changes you can make here, for example you could add a class to the small tag so it can be styled using CSS.

Emilian F. Published on 20 September, 2020