PDA

View Full Version : Delivery Date - Required Field



insane2k6
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..


<?php

class MagentoTeam_Ddc_Block_Form extends Mage_Checkout_Block_Onepage_Abstract{

protected $delivery_date;
protected $customer_comment;

public function getDeliveryDate(){

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

}
return $this->delivery_date;
}


public function getCustomerComment(){

if(is_null($this->customer_comment)){
$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.