This is a discussion on Trim the last 3 characters from a string? within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I'm trying to modify a shipping module to add a surcharge onto the shipping cost if certain postcodes are used. ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I'm trying to modify a shipping module to add a surcharge onto the shipping cost if certain postcodes are used. For example, if someone enters: 'nn128bn' I want to add a £10 surcharge instead of the standard £7.50. I need to trim the last 3 characters of the end to leave me with 'nn12' Looking at the PHP documentation I have: Quote:
However, $base is always coming up as the default value set previously and not changing to 10 Any ideas what's wrong?? Is it the 'substr' bit or am I using the wrong variable for the postcode? Cheers in advance. |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Admin orders - Display more characters in Model# field?? | JonCloud420 | osCMax v2 Features Discussion | 1 | 10-19-2006 08:06 PM |
| conflicting Text Characters html and php | anthon | osCommerce 2.2 Installation Help | 4 | 11-11-2004 10:35 PM |
| Change Manufacturer Text String | ddecjc | osCMax v1.7 Discussion | 1 | 09-15-2004 07:00 AM |
| Warning: setlocale(): Passing locale category name as string | cajivar | osCommerce 2.2 Installation Help | 0 | 06-06-2003 09:13 AM |