Download the PHP package yzh52521/webman-shop-cart without Composer

On this page you can find all versions of the php package yzh52521/webman-shop-cart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package webman-shop-cart

webman-shop-cart

购物车在电商场景中基本是必须的一个模块

安装

用法

选择 Storage

您可以更改数据存储在 config/plugin/yzh52521/shop-cart/app.php 配置文件.

如果更改数据存储如果使用数据库存储,则需要创建数据表:

添加到购物车

add item

example:

更新购物车

Update the specified item。

example:

获取购物车中所有商品

Get all the items.

example:

获取一个商品

Get the specified item.

example:

删除商品

Remove the specified item by raw ID.

example:

清理购物车

Clean Shopping Cart.

example:

购物车总价格

Returns the total of all items.

example:

购物车商品个数

Return the number of rows.

example:

购物车商品数量

Returns the quantity of all items

$totalItems : When false,will return the number of rows.

example:

搜索商品

Search items by property.

example:

检查购物车是否为空

指定关联的商品模型

Specifies the associated model of item.

example:

session

database

购物车商品

properties of yzh52521\ShopCart\Item:

方法:

事件

 事件名 参数
cart.adding ($attributes, $cart);
cart.added ($attributes, $cart);
cart.updating ($row, $cart);
cart.updated ($row, $cart);
cart.removing ($row, $cart);
cart.removed ($row, $cart);
cart.destroying ($cart);
cart.destroyed ($cart);

License

MIT


All versions of webman-shop-cart with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
workerman/webman-framework Version ^1.2.1
yzh52521/webman-event Version ^1.0
tightenco/collect Version ^8.78|^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yzh52521/webman-shop-cart contains the following files

Loading the files please wait ...