Skip to content

Lịch sử thay đổi

Ghi chép các bản cập nhật và sửa lỗi của nanoCart.

2026-04-27

Sửa lỗi

  • Editor — ảnh sản phẩm không hiển thị: filename trong DB phải có prefix products/ (yêu cầu của engine), code cũ lưu bare filename khiến theme không tìm thấy file. Đã refactor để dùng ent_product::add_image() của engine.
  • Tên file ảnh theo tiêu đề: thay vì random ed_xxx.jpg, file ảnh giờ được đặt theo slug của tên sản phẩm — vd 12-ao-thun-nano-cart-2026-1.jpg.
  • Demo bị reset DB mỗi lần deploy: receiver cũ re-import seed.sql vô điều kiện, làm mất các chỉnh sửa của user. Đã thêm gate "chỉ import khi DB trống" + cờ --force-seed cho trường hợp cần re-seed có chủ ý.
  • Cache không xoá hết khi deploy: receiver chỉ glob top-level, bỏ sót cache trong subfolder. Đã đổi sang xoá đệ quy.
  • Storage URL bị 403 trên demo: deploy bundle giờ ship storage/.htaccess cho phép phục vụ ảnh tĩnh (*.png, *.jpg, …) và chặn tất cả file khác.

Việt hoá

  • Thêm 41 key checkout/cart: title_shopping_cart, title_order_summary, title_payment_due, title_customer_details, title_different_shipping_address, title_confirm_order, title_save_changes, title_comments, …

2026-04-25

Tính năng

  • Editor SPA (/editor/): viết bài + quản lý sản phẩm trên cùng UI mobile-first, switch ngôn ngữ VI/EN, auto-save draft vào localStorage, dùng chung session với /admin/.
  • Deploy demo: tools/deploy-demo.php + tools/demo-receiver.php — đóng gói code + seed → POST lên server, tự khởi tạo DB nếu chưa có.

2026-04-20

Tính năng

  • Tiếng Việt mặc định: cột text_vi trong lc_translations (493 keys), record vi trong lc_languages.
  • Tiền tệ VNĐ: record VND trong lc_currencies, cột VND trong lc_products_prices + lc_products_campaigns, mặc định default_currency_code=VND.

2026-04-15

Tính năng

  • Khung Registry: core/Registry/Loader.php + PSR-4 autoload (composer.json). Themes/plugins/languages tách khỏi core.
  • Theme nanocart-default: dark footer 4 cột, nút admin "Edit homepage", bỏ newsletter và copyright LiteCart.
  • 3 build packages: shared (strip comments), local-dev (full source + xdebug), portable-win (kèm php.exe + MariaDB portable + start.bat).
  • Inode watcher: tools/inode-watcher.php — SQLite snapshot + diff, cảnh báo file .php/.phtml/.phar mới (phát hiện webshell).
  • Hardened .htaccess: webroot chặn truy cập trực tiếp core/, registry/, file dotfile, file backup.

nanoCart — Thương mại điện tử dành cho Việt Nam