Hello. as the new version of VirtualBox been released you might wonder where you can download the Guest Additions iso from.
VirtualBox version: 2.2.2
This post is not about the new Ubercart release but about hiding the Qty. field on the cart page. ;)
add this code to your new/old module to make the Qty. field go away.
<?php
function mymodule_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'uc_cart_view_form') {
//This line disables qty column
unset($form['items']['#columns']['qty']);
//This loop denies access to all qty fields for the form
foreach($form['items'] as &$item) {
if (is_array($item) & isset($item['qty'])) {
$item['qty']['#access'] = 0;
}
}
}
}
?>
You sometimes run into the problem that you want to replace a substring occurring in a column with a different string, without touching the rest of the string. The solution is surprisingly simple, thanks to MySQL