3 Ways to Modify Your Product Options in Opencart 2.0.x

In this blogpost we will show you three ways in which you can easily and quickly modify your Product Options. The suggested implementations will give your product page a clearer, neater and more informative outlook, which will surely make a positive impression on your customers. So keep on reading if you would like to learn how you can:

1. Add description to your Product Options
2. Add stock quantity to your Product Options
3. Remove the product options price

Add Description to your Product Options

Adding Description to your product options might be a good way to give your customers clearer idea of the different product types that your web store has to offer. Providing your customers with as much information as possible is always a good idea because this would give them a better understanding of what to expect once they order your products. This, on the other hand, will result in an increased credibility and trust in your store.

In the following paragraph we will show you how you can implement this feature in a simple and quick manner.

Create OCMod file

The procedure starts with the creation of an ocmod file using any text editor. Save the file as namebyyourchoice.ocmod.xml and don’t forget that the ocmod.xml extension is a must.

Copy & Paste:

The next step is to copy and paste the following code in your document:

View Code

Upload the OCMod file

Upload the file through the extension installer and make sure that the Modifications are refreshed.

Add Stock Quantity to your Product Options

In addition to the product options description, adding a stock quantity to your products also increases the amount of the products’ information available to your customers. Apart from that, the implementation of such a feature is likely to have a positive impact on your conversion rates. А limited stock quantity creates a sense of urgency, decreases the hesitation and thus, increases the willingness to buy.

The steps that need to be taken if you would like to achieve that are the same as the first three steps mentioned in the first part of the blogpost. The code for this ocmod file, however, would be the following:

View Code

Code customization 

Adapting the extension for the language in your store

While creating this OCmod file please keep in mind that if your web-store is multi-lingual or uses language different than English you will need to copy the following code and replace
    1. /english/ in the file path with your language
    2. 'Qty' in the search term with its translation in your language.
    3. 'pcs.' in the add section with its translation in your language
    4. Only {quant} pcs. left in the add section with its translation in your language, but make sure that {quant} stays unchanged

Change the color

Currently when the product’s stock is less than 10, the quantity color is red. This can be changed by modifying the #F00 (there are plenty of websites with color codes in all formats which you can easily find in Google and use for reference, but I would suggest http://www.color-hex.com ) color in the following code snippet:

       <span style="color: #F00"><?php echo str_replace('{quant}', $option_value['quantity'], $text_only); ?></span>

Remove Product Options Price

Another small modification that you as store owners might like is removing the price of the product option

A lot of retailers regard this feature as highly desirable. However, keep in mind that some customers might get frustrated when they make an order, choose a product option and then see in their cart a price higher than the quoted one. However, if you are willing to ‘take that risk’ you need to follow the previously mentioned steps and include the following code:

View Code

Final Words

The end result you should get after applying the three modifications should be similar to this one:


We hope that you will find our three ideas for customizing your product options useful and effective in your ultimate goal of satisfying your customers’ needs and increasing your sales.

  Download Full Source

Join 11,000+ subscribers receiving actionable E-commerce advice

* Unsubscribe any time

Trending blogs

comments powered by Disqus