Make zones mandatory

Posts: 43
Joined: 08/13/2007

Sanne,

How can I make the zones field in the shoppingcart mandatory?

Sanne

Posts: 67
Joined: 08/10/2007

good question... I was wondering the same.

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

In the function uc_zone_select() you need to modify it to look like the following:

<?php
  $select
= array(
   
'#type' => 'select',
   
'#title' => $title,
   
'#description' => $description,
   
'#options' => $options,
   
'#default_value' => $default,
   
'#required' => TRUE// <--- Add this line.
 
);
?>

Posts: 24
Joined: 08/29/2007

cool! my question was answered before I even asked. Now for question 2:

how to make selection of a shipping method mandatory?

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

I think I've fixed that by doing it a different way. Slightly more detail in this thread.