Forum
Welcome, Guest
Please Login to access forum.
Re:Required Delivery Fields (1 viewing) 
Go to bottom
TOPIC: Re:Required Delivery Fields
#6490
Terrance Bussinger
Fresh Boarder
Posts: 5
User Offline
Required Delivery Fields Karma: 0  
I am using this component in a small local restaurant and I'm pretty well versed in PHP and Javascript.

How can I disable the required fields in the delivery form?

I'd like to offer delivery, but give my customers the option to skip filling the form if delivery is not required.
 
Logged Logged  
  The administrator has disabled public write access.
#6491
John Dagelmore
Admin
Posts: 3722
User Offline
Re:Required Delivery Fields Karma: 79  
When the delivery step is enabled, the form is automatically filled with billing data. So customers can skip this step completely and are not required to enter additional data.
If for some reason you want to disable the server side validation for required fields in the delivery form, you have to remove the code in the file: root/components/com_instantpaypal/views/checkout/view.html.php line 104 from:

Code:

if(strpos($r,'bill') !== FALSE || strpos($r,'user_email') !== FALSE) { $this->class->redirect(JRoute::_('index.php?option=com_instantpaypal&view=checkout&layout=billing'), JText::_('COM_INSTANTPAYPAL_CHECKOUT_COMPLETEFIELDS')); break; } elseif (strpos($r, 'del') !== FALSE && $this->cart->virtual === 0 && isset($this->options->params->deliverystep) && $this->options->params->deliverystep == '1') { $this->class->redirect(JRoute::_('index.php?option=com_instantpaypal&view=checkout&layout=delivery'), JText::_('COM_INSTANTPAYPAL_CHECKOUT_COMPLETEFIELDS')); break; }
to:
Code:

if(strpos($r,'bill') !== FALSE || strpos($r,'user_email') !== FALSE) { $this->class->redirect(JRoute::_('index.php?option=com_instantpaypal&view=checkout&layout=billing'), JText::_('COM_INSTANTPAYPAL_CHECKOUT_COMPLETEFIELDS')); break; }
I don't see any advantage or sense to modifying this
 
Logged Logged  
  The administrator has disabled public write access.
#6492
Terrance Bussinger
Fresh Boarder
Posts: 5
User Offline
Re:Required Delivery Fields Karma: 0  
We deliver food locally (within 30 miles), but we also have people who pick up their orders at the restaurant.

Setting shipping required per item is impractical for these purposes.

The only solution I can think of, is...

  • set all items to shipping required

  • give customers option to skip filling shipping form if delivery not required

  • add delivery charge to shippings if delivery required



If anyone has a better idea, I'm open to suggestions, but this seems to be working for the moment.
 
Logged Logged  
  The administrator has disabled public write access.
Go to top