I would like to hide the shipping methods until either a billing or Shipping Zip has been entered, and I would like to display a message such as "Please provide a Billing or Shipping Zip to estimate the shipping" in the Shipping column space.
Before using the OPC, I have overidden \templates\vp_supermart\html\com_virtuemart\cart\default_pricelist.php
around line 374 with the following code. I would like to try and apply this to the One Page Checkout Code if possible., having a little trouble translating over to the new code.
My code is between /* Start hiding until zip entered */ and /* End hiding until zip entered */ comments.
/* Start hiding until zip entered */
<?php
@$checkIfEmpty == "none";
foreach($this->cart->BTaddress['fields'] as $item){
@$checkIfEmpty .= $this->escape($item['value']);
}
if ($checkIfEmpty == "") { ?>
<td>Please provide a Billing or Shipping address to estimate the shipping cost.</td>
<?php } else { ?>
/* End hiding until zip entered */
<?php if (!$this->cart->automaticSelectedShipment) { ?>
<td class="shipping-payment-heading" colspan="4" align="left">
<?php echo $this->cart->cartData['shipmentName']; ?>
<br />
<?php if(!empty($this->layoutName) && $this->layoutName=='default' && !$this->cart->automaticSelectedShipment )
echo JHTML::_('link', JRoute::_('index.php?view=cart&task=edit_shipment',$this->useXHTML,$this->useSSL), $this->select_shipment_text,'class=""');
else {
echo JText::_('COM_VIRTUEMART_CART_SHIPPING');
} ?>
</td>
<?php } else { ?>
<td class="shipping-payment-heading" colspan="4" align="left">
<?php echo $this->cart->cartData['shipmentName']; ?>
</td>
<?php } ?>
/* Start hiding until zip entered */
<?php } ?>
/* End hiding until zip entered */
<?php if(!empty($this->cart->pricesUnformatted['salesPriceShipment'])) {Any ideas? Thank you so much.
-Bill