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
GetCategoryBySlugAndMarketID
function 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
Category
struct now includes aslug
field, ensuring that slugs are stored alongside category data for consistent referencing. - Slug generation logic has been integrated into the
SearchOne
method of theCategoryRepository
, allowing searches by slug in addition to existing criteria. Furthermore, theSave
method 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_seconds
configuration setting has been added to control the delay between import loops within thelevnobot_cz
Docker container. - The
Search
function inDataSourceRepository
now supports using anOrderByClause
for 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_clicks
table 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
ProductClickRepository
was 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