Today's Updates: Category Management, Design, Imports & Tracking
What developments have taken place today?
Today’s changes focus on enhancing category management, improving the visual design of product detail pages, streamlining data import processes, and adding tracking for product clicks.
Category Management Enhancements:
- A
GetCategoryBySlugAndMarketIDfunction was introduced in theCategoryRepository, enabling retrieval of categories by slug and market ID. This provides a more efficient way to find specific categories based on their URL-friendly identifiers. - The
Categorystruct now includes aslugfield, ensuring that slugs are stored alongside category data for consistent referencing. - Slug generation logic has been integrated into the
SearchOnemethod of theCategoryRepository, allowing searches by slug in addition to existing criteria. Furthermore, theSavemethod now automatically generates and stores slugs when saving new categories.
Product Detail Page Redesign:
- A new stylesheet (
product_detail.scss) has been implemented to modernize the visual presentation of product detail pages. This includes defining CSS variables for consistent styling, implementing a container structure with responsive layout adjustments, enhancing breadcrumb styling, and creating a visually distinct card layout for product information. The design now includes improved image display, a clear price hierarchy (original & sale prices), availability indicators, and enhanced description/specification formatting.
Data Import Process Improvements:
- A new
import_loop_sleep_duration_secondsconfiguration setting has been added to control the delay between import loops within thelevnobot_czDocker container. - The
Searchfunction inDataSourceRepositorynow supports using anOrderByClausefor more complex SQL ordering, with basic SQL injection protection implemented. - Additional commands were added to run category import scripts and update data within MariaDB databases, streamlining the import process.
Product Click Tracking:
- A new
product_clickstable has been created in the database to track product clicks, storing relevant information such as product ID, link, IP address, user agent, and timestamps. - The
ProductClickRepositorywas introduced to manage this data, including methods for saving, searching, and deleting click records. - A new outbound link handler (
/product/:id/out) has been implemented on the product detail page to track clicks using the repository.
Configuration Updates:
- Configuration files have been updated to utilize settings specific to the levnobot.cz domain, replacing configurations intended for a different deployment environment.
These changes collectively improve data management, enhance user experience, and provide valuable insights into website traffic and product engagement. The updates represent an important step toward more robust and efficient operation of the levnobot_cz system.
category management product detail pages data import product tracking configuration updates