I thought I’d give everyone a heads up that I’ve finished the toolbox code refactoring that removed the $echo parameter from all methods. With the exception of l10n and i18n that should be the last big change to templates.
I also fixed the Language Tool – sorry, I think it must be broken in 0.9.8 already. Seeing that hasn’t been a single complaint so far I assume it’s not widely used
I’ve also started working on some basic branding of the installer and admin pages. If this gets released it definitely makes ZenMagick a separate product – at least the full installation release.
Comments Off
I checked in the last batch of changes to templates (and other code) relating to the removal of the $echo parameter that was still left in toolbox methods.
According to the number of vim temp files generated this affected a total of 206 files, 82 within the default theme. I’ve documented all methods affected in the changelog, so it is just a matter of finding all calls and depending on the context where the method is used to:
- Add
echo in front of the method call; for example: echo $net->url('index');
- If the method is used as part of string concatenation, remove the last
false parameter; example: $url = $net->url('index').'?foo=bar';
As some consolation I’d like to add that this is most likely the last major change to templates, unless I’ve missed something. I might still shuffle toolbox classes around a bit and see if things can be merged, perhaps macros and utils? We’ll see.
Comments Off
I recently had a request to replace display of hotsellers, featured, etc products with something more customizable. What we ended up doing was the following:
- Create a new category in zencart admin and disable (ignore the warning about products being removed – its a new category so there can’t be products)
- link products wanted into the new category
- In the template, load products with ZMProducts::instance()->getProductsForCatetgoryId(). The category id needs to be hardcoded here, so if you are using the templates across several installations (for example a QA site!) you might want to configure the actual categoryIds as settings…
- Manage the products displayed by linking/removing products in a special category
Comments Off