View Full Version : Delivery Date - Required Field

Oct 26th, 2010, 02:55 AM
i need help with the following problem :

I installed a new extension on my website , that allows a customer to select a delivery date, by displaying a table where he chooses a date.

The script works perfectly but has 1 big downside . I can't make it a *required field :) . I am running a flower shop so delivery date is mandatory.

anyways, i want to know if i can set it to mandatory modifying this code..


class MagentoTeam_Ddc_Block_Form extends Mage_Checkout_Block_Onepage_Abstract{

protected $delivery_date;
protected $customer_comment;

public function getDeliveryDate(){

$this->delivery_date = $this->getCheckout()->getQuote()->getDeliveryDate();

return $this->delivery_date;

public function getCustomerComment(){

$this->customer_comment = $this->getCheckout()->getQuote()->getCustomerComment();
return $this->customer_comment;
public function getConfigData($node){

return Mage::getStoreConfig(sprintf('magentoteam_ddc/%s', $node));

public function getFirstDay(){

return intval(Mage::getStoreConfig('general/locale/firstday'));


thank you in advance!

Old Pedant
Oct 26th, 2010, 04:20 AM
That's all PHP code and has nothing whatsoever to do with JavaScript.