To add options to downloadable products

J2Commerce (formerly known as J2Store)

By default, Downloadable Products don't have "Options" but occasonally there may be a need to enable Options and if this arises, follow these steps.

TAKE A FULL SITE BACKUP BEFORE THESE STEPS TO AVOID ISSUES!

Back End View

Copy

/administrator/components/com_j2store/views/product/tmpl/formdownloadable.php

To

/administrator/templates/YOUR-DEFAULT-TEMPLATE/html/com_j2store/product/formdownloadable.php

Example: If you are using the Joomla 4 or 5 'Atum' administrator template, you would replace YOUR-DEFAULT-TEMPLATE with 'atum' to give you:

/administrator/templates/atum/html/com_j2store/product/formdownloadable.php

Find the line shown below:

<li><a href="#imagesTab" data-toggle="tab"><i class="fa fa-file-image-o"></i> <?php echo JText::_('J2STORE_PRODUCT_TAB_IMAGES'); ?></a></li>

AFTER that line, insert a new line and with the following:

<li><a href="#optionsTab" data-toggle="tab"><i class="fa fa-sitemap"></i> <?php echo JText::_('J2STORE_PRODUCT_TAB_OPTIONS'); ?></a></li>

Find the line shown below:

<div class="tab-pane" id="imagesTab"> <?php echo $this->loadTemplate('images');?> </div>

AFTER that line, insert a new line and with the following:

<div class="tab-pane" id="optionsTab"> <?php  echo $this->loadTemplate('options');?> </div>

Find the line shown below:

AFTER that line, insert a new line and with the following:

If you now look at a Downloadable Product in the backend, you should see an Options tab in the layout

Front End View

To ensure the options are seen in the front end, you need to know the layout of the app you are using for layouts in J2Commerce.

Example: If you are using Bootstrap5, this is used in the file structure that you will copy

Copy:

[note the repeated use of bootstrap5 in the above path!]

To:

Find the line below:

BEFORE that line, insert a new line and with the following:

Save:

Now the downloadable products should have an options tab on the backend, and the options should be visible on the frontend.

Last updated