Ajeh:
You are changing the file:
/includes/modules/shipping/storepickup.php
I have altered the code so you can add additional cities ...
Currently, the function quote looks like:
function quote($method = '') {
global $order;
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_STOREPICKUP_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_STOREPICKUP_TEXT_WAY,
'cost' => MODULE_SHIPPING_STOREPICKUP_COST)));
if ($this->tax_class > 0) {
$this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
return $this->quotes;
}
/**
>
> This is what the function quote should look like when done adding this change:
> ```
function quote($method = '') {
global $order;
if (in_array(strtoupper($order->delivery['city']), array('TORONTO', 'TAMPA'))) {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_STOREPICKUP_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_STOREPICKUP_TEXT_WAY,
'cost' => MODULE_SHIPPING_STOREPICKUP_COST)));
}
if ($this->tax_class > 0) {
$this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
return $this->quotes;
}
/**
Ajeh,
I followed your code to the letter, and it works beautifully. I noticed that on the shipping page it changes 'Walk-in' to 'local delivery'. My question is, Is there a way I can give them "Both" options? A way to choose whether they want it delivered, or they would like to come pick it up.
Thanks