Blog Sections Open
Implementing Basic Visitor Geotargeting in a MODX Project
Geotargeting starts as a city-detection feature, but quickly becomes a content, cache, and fallback problem if the site depends on it heavily.
Many projects want to detect the visitor’s city and use it to adapt content, forms, or offers. The hard part is not only finding a city — it is deciding what the site should do when the lookup is wrong, missing, or ambiguous.
What to plan
- how the city is detected
- where the result is stored
- how the user can correct it
- whether cache varies by location
Recommendation
Keep geotargeting as a helper, not a hidden hard dependency. The user should always be able to override the detected city if the lookup is wrong.
Redirecting to a Specific Resource with a Tiny Evolution CMS Snippet
Small redirect helpers are useful when a page should exist only as a routing entry point into the actual document tree.
Handling Multiple Prices for One Shopkeeper Product
When one product has several variants with separate prices and quantities, the cart model needs to represent the variant explicitly instead of treating the item as one flat product row.