Nearly finished this stage now I think. I’ve now worked through all the pages (I think…) and updated them. This morning I realised that although the site works mostly OK without javascript, without it the zones (counties in the UK) are not populated, so it’s impossible to enter an address. Ugh. Resolving this needs the following adding to /catalog/controller/account/create.php
, /catalog/controller/account/address.php
, /controller/checkout/address.php
and /controller/checkout/guest_step_1.php
$this->load->model('localisation/zone'); $this->data['zones'] = $this->model_localisation_zone->getZonesByCountryId($this->data['country_id']);
And the following editing in /catalog/view/theme/[your theme]/template/create.tpl
, /catalog/view/theme/[your theme]/template/address.tpl
, /catalog/view/theme/[your theme]/template/address.tpl
and /catalog/view/theme/[your theme]/template/guest_step_2.tpl
:
<select name="zone_id">
<option value="FALSE"><?php echo $text_select; ?></option>
<?php foreach ($zones as $zone) { ?>
<?php if ($zone['zone_id'] == $zone_id) { ?>
<option value="<?php echo $sone['zone_id']; ?>" selected="selected"><?php echo $zone['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $zone['zone_id']; ?>"><?php echo $zone['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
(It would be nice if the code used functions a little more for repeated things like the address form.) This then allows selection of zone even with javascript disabled. There’s still a much more minor problem, which is that if the country is changed, with javascript disabled the zone list is not refreshed. This resolves itself when the form is submitted since the zones are then correctly populated by the posted data, but is less than perfect. We get very few orders from outside the UK anyway, so I’m going to park that one for now. The solution, I think, would be to add a button to let the user manually refresh the page, minus the validation, after changing the country.
Anyway, back to the mobile site specifics. I showed it to the client (to whom, coincidentally, I’m married…) yesterday, and she is happy so far. Hoorah! Next step is to test it with some tame users I think.
Concerns I have at the moment: not sure about scrolling the menu on the home page; I wonder whether clicking through from the category page to the product page is too difficult (although in fact most of our sales come direct from the category page not the product page); think the general text might be a bit small. We’ll see.