Map HTML Classes to Product Options

Map HTML Classes to Product Options
Allows you to add custom classes to the main wrappers for the product option elements on the frontend of opencart. Useful for developers that need to use custom classes on their options for styling or scripting purposes who want to offer some control from the backend.

So for example if you wanted to tie an product option to a javascript or AJAX script via a class, you can now do that without having to edit templates.

Of if you wanted a certain element styled differently to the rest, you could use this extension.

In fact any action that requires adding a class to a product option could be created, making this a very powerful tool for developers and web designers.

How to install:

Use the opencart extensions installer in the admin to upload the optionClassesOpencart3.0.x.x.ocmod.zip file.

How to use:

1. Set a custom class for your option


2. Add your option to a product as you normally would


3. Class appears in option div wrapper on the frontend


If you use a custom theme and find the class not appearing you may need to add the code to your frontend templates yourself, with something like:

.twig file:

<div class="{% if option.option_class %} {{ option.option_class }}{% endif %}">
<!-- option code -->
</div>




Price
$20.00

  • Developed by OpenCart Community
  • Documentation Included

Rating

Compatibility
3.0.0.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 4.x.x.x

Last Update
15 Sep 2017

Created
15 Sep 2017
1 Sales
2 Comments
krikey
krikey
Member since: 3 Oct 2010

View all extensions Get Support