pldtm Posted February 24, 2012 Share Posted February 24, 2012 Is it possible to dissociate the 2 options available for order and show price on admin product tab? I managed to change js code on the .tpl file to do it, but when i click on save, it doesn't change anything. if i change this line: $object->show_price = $object->available_for_order ? 1 : (int)(Tools::isSubmit('show_price')); to $object->show_price = (int)(Tools::isSubmit('show_price')); will it be the only line to change or do i miss something? thanks for help pldtm Link to comment Share on other sites More sharing options...
Valdir Ferreira Posted July 2, 2012 Share Posted July 2, 2012 Is not necessary to modify the line: $object->show_price = $object->available_for_order ? 1 : (int)(Tools::isSubmit('show_price')); Only Modify the lines: <input style="float: left;" type="checkbox" name="available_for_order" id="available_for_order" value="1" '.($this->getFieldValue($obj, 'available_for_order') ? 'checked="checked" ' : '').' onclick="if ($(this).is(\':checked\')){$(\'#show_price\').attr(\'checked\', \'checked\');$(\'#show_price\').attr(\'disabled\', \'disabled\');}else{$(\'#show_price\').attr(\'disabled\', \'\');}"/> for: <input style="float: left;" type="checkbox" name="available_for_order" id="available_for_order" value="1" '.($this->getFieldValue($obj, 'available_for_order') ? 'checked="checked" ' : '').'/> and: if ($(\'#available_for_order\').is(\':checked\')){ $(\'#show_price\').attr(\'checked\', \'checked\'); $(\'#show_price\').attr(\'disabled\', \'disabled\'); } for: if ($(\'#available_for_order\').is(\':checked\')){ } Link to comment Share on other sites More sharing options...
wh0is Posted September 29, 2012 Share Posted September 29, 2012 (edited) Hi there, could you please tell me what is the name of the .tpl that I have to modify? I did exactly what you suggested in the "AdminProducts.php but when I save the changes with the show price unchecked, the show price goes back to being clicked and it does not get saved, do you any suggestions? many thanks for your help beforehand. Edited September 29, 2012 by wh0is (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts