cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory field on checkout page being bypassed

Mandatory field on checkout page being bypassed

Hi,

 

I use Magento CE 1.9.2.4 with the Ultimo theme and one page checkout (from magecomp).

 

On the checkout page we have a date and time slot selection for order delivery which is set to be mandatory. Every test we do shows that it works and cant be bypassed.

 

999 orders out of a 1000 all come through perfectly fine. However we notice that sometimes an order will come through without the delivery slot information i.e. the mandatory field has been bypassed somehow.

 

How do I identify why this is happening?

 

Thanks, any help will be greatly appreciated.

 

Bijal

2 REPLIES 2

Re: Mandatory field on checkout page being bypassed

For your issues, you need to do this things.

1. Add "sales_order_place_before" event into the config.xml file like this.

<global>
        <events>
            <sales_order_place_before>
                <observers>
                    <extension_event_model_observer>
                        <type>singleton</type>
                        <class>Vendor_Extension_Model_Observer</class>
                        <method>Yourmethod</method>
                    </extension_event_model_observer>
                </observers>
            </sales_order_place_before>
        </events>
    </global>

 2. Now create Observer.php file at following location.
app\code\local\Vendor\Extension\Model\Observer.php

class Vendor_Extension_Model_Observer {

    public function Yourmethod($observer) {

        // Here you can check if that field value not set,then you throught error message from here
    }
}



Was my answer helpful? You can Click Kudos/Accept As Solution.
200+ professional extensions for M1 & M2 with free lifetime updates!

Re: Mandatory field on checkout page being bypassed

excellent thanks... will try this out and let you know how this goes...