Just converting my template from 1.4.8b to 1.4.9.1, and I noticed that the new PayPal doesn't include the changes I mentioned in
this thread. I've tested them on my 1.4.9.1 site and they still seem to work (by replacing $order_info with $this->order_info). Here's what should be added to the pp_standard.php file in the next version:
Code: Select all
$this->load->model('localisation/zone');
$zone = $this->model_localisation_zone->getZone($this->order_info['payment_zone_id']);
$this->data['fields']['state'] = html_entity_decode($zone['code'], ENT_QUOTES, 'UTF-8');
$phone = preg_replace("/[^0-9.]/", "", html_entity_decode($this->order_info['telephone'], ENT_QUOTES, 'UTF-8'));
$this->data['fields']['night_phone_a'] = html_entity_decode(substr($phone,0,3), ENT_QUOTES, 'UTF-8');
$this->data['fields']['night_phone_b'] = html_entity_decode(substr($phone,3,3), ENT_QUOTES, 'UTF-8');
$this->data['fields']['night_phone_c'] = html_entity_decode(substr($phone,6), ENT_QUOTES, 'UTF-8');
Also, I suggest adding the address_override variable, since it doesn't make much sense to allow the shipping address to be changed after the cost calculations have already been done (as you pointed out to me
here). To add this, it would be the following line:
Code: Select all
$this->data['fields']['address_override'] = '1';