imagina/icommerce-module

面向全球创业者的完全可定制的电子商务平台

安装量: 1,740

依赖项: 19

建议者: 0

安全性: 0

星标: 0

关注者: 5

分支: 12

开放问题: 1

类型:asgard-module

2.0.0 2020-07-08 21:05 UTC

README

Icommerce 是一个 Asgard CMS 开源电子商务模块,为全球创业者提供完全可定制的解决方案。超越传统电子商务解决方案的局限,只受限于您的想象力。

邮件配置后端

1. Go to Settings
2. Click on Icommerce
3. Add "Webmaster Email"

邮件配置前端(主题)

You can modify the header,footer and style

Instructions: 

	1. Create a folder in your theme with the name "icommerce". 
        Example: YourTheme/views/icommerce/

	2. Create a folder inside of "icommerce" with the name "emails". 
        Example: YourTheme/views/icommerce/emails

	3. If you want just edit the header, so copy only the header file
    from the module in your folder in the theme: 
		
		(copy this file)
		Example: Module/Icommerce/Resources/views/emails/base/header.blade.php 
		
		(Paste it here)
		Example: YourTheme/views/icommerce/emails/header.blade.php

    and so with the files that you want to edit.

种子

run php artisan module:seed Icommerce

API

购物车端点

获取所有购物车

N: 可选过滤器 = ?filter={"ip":192.168.0.1} ?filter={"user":1}

GET: /api/icommerce/v3/carts

获取一个购物车

N: 用id替换n

GET: /api/icommerce/v3/carts/n

获取所有购物车的所有产品

N: 可选过滤器 = ?filter={"cart":2}

GET: /api/icommerce/v3/cart-products

将产品添加到购物车

POST /api/icommerce/v3/carts

  "cart_id": 9, (optional, if it is not passed a new car is generated and its id is returned)
  "user_id": 1, (optional, if it is not passed, the car is generated without associating a user)
  "cart_products": {
    "product_id":"4",
    "quantity":"50",
     "price":"5500"
    },
  "cart_product_option":{
    "product_option_id":"1",
    "product_option_value_id":"1"
  }
}

订单端点

创建订单

POST /api/icommerce/v3/orders

成功响应
Order created
获取所有订单

GET /api/icommerce/v3/orders

成功响应
All Orders with data
获取一个订单(n = order_id)

GET /api/icommerce/v3/orders/n

成功响应
Order with data
更新一个订单

PUT /api/icommerce/v3/orders/n

成功响应
Order updated

标签端点

获取所有标签

GET /api/icommerce/v3/tags

获取一个标签

GET /api/icommerce/v3/tags/n

创建标签(所有数据都在 "attribute" 数组内)

POST /api/icommerce/v3/tags

更新标签

PUT /api/icommerce/v3/tags/n

删除标签

DELETE /api/icommerce/v3/tags/n

分类端点

获取所有分类

GET /api/icommerce/v3/categories N: 可选包含 = ?include=parent,children

获取一个分类

GET /api/icommerce/v3/categories/n

创建分类(所有数据都在 "attribute" 数组内)

POST /api/icommerce/v3/categories

更新分类

PUT /api/icommerce/v3/categories/n

删除分类

DELETE /api/icommerce/v3/categories/n

货币端点

获取所有货币

GET /api/icommerce/v3/currencies

获取一个货币

GET /api/icommerce/v3/currencies/n

创建货币(所有数据都在 "attribute" 数组内)

POST /api/icommerce/v3/currencies

更新货币

PUT /api/icommerce/v3/currency/n

删除货币

DELETE /api/icommerce/v3/currency/n

支付方式端点

获取所有支付方式

GET /api/icommerce/v3/payment-methods

获取一个支付方式

GET /api/icommerce/v3/payment-methods/n

创建支付方式

所有支付方式都有一个种子来创建

更新支付方式

PUT /api/icommerce/v3/payment-methods/n

配送方式端点

获取所有配送方式

GET /api/icommerce/v3/shipping-methods

获取一个配送方式

GET /api/icommerce/v3/shipping-methods/n

获取所有配送方式的计算

参数

  • 选项(数组) - countryCode,country,zone,postalCode ... 其他任何内容
  • 产品(数组) - cart_id

GET /api/icommerce/v3/shipping-methods/calculations/all

创建配送方式

所有配送方式都有一个种子来创建

更新配送方式

PUT /api/icommerce/v3/shipping-methods/n

优惠券

获取购物车中优惠券的折扣

此路由需要认证

请求

GET /api/icommerce/v3/coupons/coupons-validate

filter = {
  "couponCode":"code_coupon",
  "cartId":1
}

响应

{
    "message": "coupon whit discount for product",
    "discount": 3000
}

端点 XXXXX