Beginning PHP and Postgre SQL E-Commerce From Novice to Professional phần 4

Chúng tôi cũng xác định một USE_SSL tên là không đổi, xác định xem trang web này là để tạo ra các URL HTTPS. Nếu liên tục được thiết lập để không, trang web của bạn sẽ không tạo ra bất kỳ liên kết HTTPS ngay cả đối với những nơi cần được bảo đảm. Chúng ta hãy xem cách làm việc này. | CHAPTER 5 Searching the Catalog What are you looking for There are no places where you ll hear this question more frequently than in both brick-and-mortar stores and e-commerce stores. Like any other quality web store around your HatShop will allow visitors to search through the product catalog. You ll see how easy it is to add new functionality to a working site by integrating the new components into the existing architecture. In this chapter you will Analyze the various ways in which the product catalog can be searched. Implement a custom search engine that works with PostgreSQL. Write the data and business tiers for the searching feature. Build the user interface for the catalog search feature using Smarty componentized templates. Choosing How to Search the Catalog As always there are a few things you need to think about before starting to code. When designing a new feature you should always begin by analyzing that feature from the final user s perspective. For the visual part you ll use a text box in which the visitor can enter one or more words to search for. In HatShop the words entered by the visitor will be searched for in the products names and descriptions. The text entered by the visitor can be searched for in several ways Exact-match search If the visitor enters a search string composed of more words this would be searched in the catalog as it is without splitting the words and searching for them separately. All-words search The search string entered by the visitor is split into words causing a search for products that contain every word entered by the visitor. This is like the exact-match search in that it still searches for all the entered words but this time the order of the words is no longer important. Any-words search At least one of the words of the search string must find a matching product. This simple classification isn t by any means complete. The search engine can be as complex as the one offered by modern search engines which provides many

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.