1

How can I disable or hide a downloadable file checkbox(basically making it unselectable)with a price of 0? I'm create a music store, Im using a downloadable product type to create an album. I would like to make some songs not be able to be sold separately but show them as the part of the album.

Magento 1.7

Please see my screenshot, the last song shouldn't be selectable. Thanks screenshotScreenshot

1 Answer 1

0

Open the template where the files are listed, check the price and if the price is zero don't show it ;-)

I think it is here:

app/design/frontend/base/default/template/downloadable/catalog/product/links.phtml

Just check the price in line 37 $_link->getPrice() == 0 and if it is zero, don't show the <li>

2
  • 1
    Thank you so much, I wanted to only hide the checkbox not the whole <li> but I managed to accomplish it with your guidance. I changed line 38 a bit.Thank You again :-) <?php if ($_linksPurchasedSeparately && $_link->getPrice() != 0): ?> Commented Oct 29, 2013 at 15:15
  • Im not sure if you can also help me with this related question as well if you can :-) Disable other checkboxes... Commented Oct 29, 2013 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.