Blog Sections Open
Planning Delivery Price and ETA Logic by City
A practical architecture for forms where delivery cost and delivery time must change by city without hard-coding thousands of entries by hand.
Many catalog and checkout forms need to change delivery price and delivery time based on the selected city. The hard part is not the conditional logic itself but the data source: you want maintainable city data, not thousands of hard-coded options in template code.
A Better Pattern
- keep the city directory in a structured table or JSON source
- use autocomplete or a searchable selector for the city input
- return price and ETA from one lookup layer instead of duplicating conditions in JavaScript and PHP
This is one of those tasks where the best Evolution CMS solution is part CMS and part application logic. Let the CMS render the form, but keep the city pricing data in a source that can actually scale.
Rendering a ddYMap Field on the Public Site
How to take manager-side map data from mm_ddYMap and output the corresponding map on the frontend with the ddYMap snippet.
Passing the Visitor Query into Ditto Search.extender
How to feed a real input value into Ditto Search.extender instead of hard-coding the search string in the snippet call.