We need Time Unlimited Download to be checked (yes) by default. What do I change from this code:
{component name="configurable_page.field" entity="products" tab="detailed" section="extra" field="unlimited_download"}
<div class="control-group {if $product_data.is_edp !== "YesNo::YES"|enum}hidden{/if}" id="edp_unlimited">
<label class="control-label" for="elm_product_edp_unlimited">{__("time_unlimited_download")}:</label>
<div class="controls">
<label class="checkbox">
<input type="hidden" name="product_data[unlimited_download]" value="{"YesNo::NO"|enum}" />
<input type="checkbox"
name="product_data[unlimited_download]"
id="elm_product_edp_unlimited"
value="{"YesNo::YES"|enum}"
{if $product_data.unlimited_download === "YesNo::YES"|enum}
checked="checked"
{/if}
/>
</label>
</div>
</div>
{/component}
I’m using an override product (update.tpl) template already, so don’t worry, I’m not touching the original template.
I asked AI and it said the code seems to already be enabled for unlimited time downloads
{component name="configurable_page.field" entity="products" tab="detailed" section="extra" field="unlimited_download"}
<div class="control-group {if $product_data.is_edp !== "YesNo::YES"|enum}hidden{/if}" id="edp_unlimited">
<label class="control-label" for="elm_product_edp_unlimited">{__("time_unlimited_download")}:</label>
<div class="controls">
<label class="checkbox">
<input type="hidden" name="product_data[unlimited_download]" value="{"YesNo::NO"|enum}" />
<input type="checkbox"
name="product_data[unlimited_download]"
id="elm_product_edp_unlimited"
value="{"YesNo::YES"|enum}"
{if $product_data.unlimited_download === "YesNo::YES"|enum}
checked="checked"
{/if}
/>
</label>
</div>
</div>
{/component}
- No changes were made to the code.
The provided code already seems to be designed to handle unlimited time downloads.
- The
unlimited_download
checkbox allows users to select whether a product can be downloaded an unlimited number of times.
- The
product_data[unlimited_download]
field likely stores the boolean value (true/false) representing whether unlimited downloads are allowed.
To enable unlimited time downloads for a specific product:
- Check the checkbox: In the product’s admin panel, navigate to the “Detailed” tab and check the “Time Unlimited Download” checkbox within the “Extra” section.
- Save the product: Save the changes made to the product.
This will enable unlimited downloads for the selected product, allowing customers to download it as many times as they need.
Note:
- The specific behavior of the
unlimited_download
feature will depend on how it’s implemented in the underlying system.
- You may need to adjust other parts of the system (e.g., download logic, user interface) to fully support unlimited time downloads.
1 Like
Thanks!! I thought it appeared to be set to Y, too. But when I set up some test products, it wasn’t enabled.
There’s no reason for us to set it manually since all products are downloadable with time unlimited downloads. And with 35k+ products, I’m eliminating all unnecessary steps.