Project

General

Profile

追加功能 #454

v4.0: Product - Step 1

Added by Junyi Zhang 10 months ago. Updated 22 days ago.

Status:
已关闭
Priority:
普通
Assignee:
Target version:
IT: Easytryck (Sweden) - v4.0
Start date:
02/14/2025
Due date:
03/31/2025
% Done:

100%

Estimated time:
100.00 h

Description

Background
  1. New requirement for v4.0 OTS
    See: OneDrive\赤蓝商贸(上海)有限公司\Shanghai Group - IT\开发相关\OTS V4\开发需求
Task Details
  • 1. SBX:调查产品模块相关的功能和Database Table,比如
    1. Product(可能需要扩展,比如添加OTS<->SBX对应产品的映射关系,报关用:产品名+价格等)
    2. Category (可能需要简化)
    3. Manufacturer (可能需要修改:添加中文,地址等报关用信息)
    4. Option (可能需要扩展, 需要添加OTS->SBX的option的映射关系)
    5. tax (可能需要简化)
    6. geo_zone ?
  • 2. OTS:开发相关模块根据以上的调查(包括设计修改Database Table)
    Module Function Database Other
    Product 1.SBX的部分功能
    2.OTS->SBX的映射关系
    3.报关信息:品名 + HS code等,
    manufacture + 产地 + 报关价格
    product
    product_description
    product_to_category
    product_group
    product_group_description
    product_option
    product_option_description
    product_option_value
    product_option_value_description
    product_extra_option
    product_extra_option_value
    product_discount
    product_option_value_discount
    product_image
    product_image_description
    product_option_value_hover_description
    product_option_value_layer_image
    product_square_meter_discount
    product_to_manufacturer(new)
    product_to_manufacturer_description(new)
    option&price参考SBX
    product->manufacturer 一对多的关系
    Category category
    category_description
    catageory_path
    添加功能
    Manufacture name, country, zone, city
    address 1, address 2
    manufacture 添加功能
    Option 1.SBX的部分功能
    2.OTS->SBX的映射关系
    option
    option_description
    option_value
    option_value_description
    branding_group
    branding_group_description
    添加功能(参考SBX)
    tax tax_class
    tax_rate
    tax_rate_to_customer_group
    tax_rule
    修改数据
    currency - currency
    currency_round
    修改数据
    length classes - length_class
    length_class_description
    修改数据
    weight classes - weight_class
    weight_class_description
    修改数据
    unit classes - unit_class
    unit_class_description
    添加功能(参考SBX)
    geo_zone - geo_zone
    zone_to_geo_zone
    修改数据
    country - country 维持原样
  • 3. OTS:开发Import product module,可以多次导入SBX相关产品数据(SQL格式)
    Bruce: #462
  • 4. OTS:开发Restful API (Server端),接受来自SBX的订单产品数据(参考:https://docs.opencart.com/en-gb/system/users/api/)
  • 5. SBX:开发Restful API (Client端),传输OTS可接受的订单产品数据(想定:Admin order edit form中添加传输功能)
    Note: 可能需要优先回答Order模块,处理手动Order(Order Product)的Add / Edit / Remove功能

Questions:

  1. 关于以上【SBX:开发Restful API (Client端)】功能,认证机制(OAuth)是必须的,但是怎么匹配SBX:admin user和OTS:user呢?
    Van: 比如我们通过email(OTS4.0 可能需要完善email这个字段,比如必须输入),关联这2个系统的user关系。
  2. 关于OTS与SBX的映射关系:
    - Product
    - Option
    - Option value
    Van: 我们规定从ET导入的id完全匹配(比如:Option value id),OTS4.0自己添加的Product,Option,Option value的id起始值会足够大(和导入的完全区分)
  3. Color option我们决定使用泛用Text Option替代(只有一个option value),意味着Color Option自带的价格不能自动导入,没问题嘛?
    Van: 不使用text type, 继续使用color type的option,因为color option可能会存在自己的价格,不用使用一个统一的color option来代替所有的情况。
v4 coding standard:
  1. Git提交
    #xxx(redmine number): xxx(redmine title) - xxx(任意:补充内容)
      
  2. 代码规范
    2.1: 结构:Public -> Protected -> Private
    2.2: 其他代码规范同SBX
      
  3. 数据层规范(Model)
    3.1: 数据库操作只应出现在model或者system中。
    3.2: v3/v4的model分为两个文件,比如: order.php, order_v3.php
     
  4. 前台代码
    twig, js, css (js, css尽量写在单独的css文件中)
     
  5. 后台代码
    MVCL (L:en,cn)
     
  6. 注释
    1. 类名:
      /**
       * xxx
       *
       * @copyright RedBlue-OTS 2024
       * @version v4
       *
       */
      
    2. 函数名:参数类型 + 返回值类型
          /**
           * xxx
           *
           * @param  xxx $xxx
           * @param  xxx $xxx
           * @return xxx
           */
      
Output
  • Report and Solution

Others


Related issues

Copied to 追加功能 #462: v4.0: Product - Import option & product data from SBX已关闭Zhongbao Ye02/28/202503/03/2025

Actions
Copied to 追加功能 #463: v4.0: Product - Step 2已关闭Junyi Zhang06/02/202510/31/2025

Actions
#1

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
  • Status changed from 新建 to 进行中
  • Start date changed from 02/17/2025 to 02/12/2025
#2

Updated by Xihua Fan 10 months ago

  • Tracker changed from 其他 to 追加功能
#3

Updated by Xihua Fan 10 months ago

  • Description updated (diff)
  • Start date changed from 02/12/2025 to 02/14/2025
#4

Updated by Xihua Fan 10 months ago

  • Description updated (diff)
#5

Updated by Xihua Fan 10 months ago

  • Description updated (diff)
#6

Updated by Xihua Fan 10 months ago

  • Description updated (diff)
#7

Updated by Xihua Fan 10 months ago

  • Description updated (diff)
#8

Updated by Xihua Fan 10 months ago

  • Description updated (diff)
#9

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#10

Updated by Xihua Fan 10 months ago

  • Description updated (diff)
#11

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#12

Updated by Junyi Zhang 10 months ago

  • File ots_product.xlsx added

Output(2025/02/23 - 2025/3/07),(2025/02/17 - 2025/02/21)

  1. Functions:
    1. Admin: Prepare auxiliary modules around the product module in advance
      - Unit class
      - Length class
      - Weight class
      - Tax
      - Currency
      - Country
      - Zone
      - Geo zone
    2. Admin: Modify the manufacturer and category module.
    3. Admin: Add option module.
      - Special options: color, size, branding, design method. Important: These special options need to be created first, then set to special in the setting.
      - Limit the option types: select, checkbox, radio, text
      - Redundant fields: Some unused fields still be added, because it will make the date transfer from ET4.0 more convenient.
    4. Admin setting:
      - Add fields for special options: config_color_option, config_extra_color_option , config_size_option, config_design_method_option, config_branding_option
      - Remove config_color_option, config_extra_color_option: About color option, we still use SBX's color options instead of using 'text' option to represent all color options in front because the color option might have their own price, and we can not use one single option to cover all situation.
    5. Prduct module
      - According to SBX product module, design OTS's product module
      - Remain tab: General, Data, Link, Price&Option, Image
      - Modify Price&Option tab to multiple manufacturers mode, which means each manufacturer has their own prices and options.
      - Brand(Declaration):Use {brand}, {dimension} and {capacity} as replacement. And we need add tool/smarty in front.
  2. Optimizations:
    1. Admin: easyDingZhi.common
      - Create easyDingZhi namespace in view/javascript/easydingzhi/common.js
      - The common.js should gradually replace OC's own common.js.
    2. Common: Ensuring data integrity:
      - Add 'transaction' in pdo.php for database rollback when one of the database operations is wrong in a set of database operations.
      - 'end_of_data': Add 'end_of_data' in every admin form as a flag. The database operation can succeed if 'end_of_data' exists.
    3. Common: 参考SBX,修改admin style
Database:
  1. 参考 #440
TODO: 已移到新票 #463
  1. Functions :
    1. OTS V4 开发restful API, 用于接收来自ET V4的订单数据。
    2. ET V4 开发restful API, 用于发送订单数据。
#13

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#14

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#15

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#16

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#17

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#18

Updated by Junyi Zhang 10 months ago

  • % Done changed from 0 to 30
#19

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#20

Updated by Xihua Fan 10 months ago

  • Description updated (diff)
#21

Updated by Xihua Fan 10 months ago

  • Copied to 追加功能 #462: v4.0: Product - Import option & product data from SBX added
#22

Updated by Junyi Zhang 10 months ago

  • % Done changed from 30 to 60
#23

Updated by Junyi Zhang 10 months ago

  • Description updated (diff)
#24

Updated by Junyi Zhang 10 months ago

  • File deleted (ots_product.xlsx)
#25

Updated by Junyi Zhang 10 months ago

#26

Updated by Junyi Zhang 10 months ago

  • Subject changed from v4.0: Product to v4.0: Product - 1
  • Description updated (diff)
  • Status changed from 进行中 to 已关闭
  • % Done changed from 60 to 100
#27

Updated by Xihua Fan 22 days ago

  • Subject changed from v4.0: Product - 1 to v4.0: Product - Step 1

Also available in: Atom PDF