这个是有的,读一下源码就清楚了
https://github.com/fecshop/yii2_fecshop/blob/master/services/product/ProductMysqldb.php#L189
直接给你代码吧:
$filter = [
'asArray' => true,
'fetchAll' => true,
'orderBy' => ['id' => SORT_DESC ],
];
$data = Yii::$service->product->coll($filter);
var_dump($data);
1.appfront:
@fecyo\app\appfront\modules\Cms\block\home\Index.php
public function getLastData()
{
$this->initHead();
$hot_product_skus = Yii::$app->store->get('fecyo_info', 'hot_product_skus');
$chaoliu_s_skus_1 = Yii::$app->store->get('fecyo_info', 'chaoliu_s_skus_1');
$chaoliu_s_skus_2 = Yii::$app->store->get('fecyo_info', 'chaoliu_s_skus_2');
$chaoliu_x_skus_1 = Yii::$app->store->get('fecyo_info', 'chaoliu_x_skus_1');
$chaoliu_x_skus_2 = Yii::$app->store->get('fecyo_info', 'chaoliu_x_skus_2');
$new_product_skus = Yii::$app->store->get('fecyo_info', 'new_product_skus');
$hot_product_sku_arr = $this->getConfigArr($hot_product_skus);
$chaoliu_s_sku_1_arr = $this->getConfigArr($chaoliu_s_skus_1);
$chaoliu_s_sku_2_arr = $this->getConfigArr($chaoliu_s_skus_2);
$chaoliu_x_sku_1_arr = $this->getConfigArr($chaoliu_x_skus_1);
$chaoliu_x_sku_2_arr = $this->getConfigArr($chaoliu_x_skus_2);
$new_product_sku_arr = $this->getConfigArr($new_product_skus);
return [
'hot_products' => $this->getProductBySkus($hot_product_sku_arr),
'chaoliu_s1_products' => $this->getProductBySkus($chaoliu_s_sku_1_arr),
'chaoliu_s2_products' => $this->getProductBySkus($chaoliu_s_sku_2_arr),
'chaoliu_x1_products' => $this->getProductBySkus($chaoliu_x_sku_1_arr),
'chaoliu_x2_products' => $this->getProductBySkus($chaoliu_x_sku_2_arr),
'new_products' => $this->getProductBySkus($new_product_sku_arr),
];
}
hot_products
是这里返回的,这个数组里面的参数,就是view里面的变量
2.html5部分,fecyo没有重写cms/home/index,您可以用这里的参数:https://github.com/fecshop/yii2_fecshop/blob/master/app/apphtml5/modules/Cms/block/home/Index.php#L20
或者自己重写
1.自己debug下代码,看看报错
2.出现这个问题,基本都是你的微信公众号,以及微信支付的设置存在问题,多搜索看看(微信里面的设置还是很繁琐的,错了一个就不行)
2.@fecbvc\services\Customer.php (@fecbvc 是文件路径 addons/fecmall/fecbvc)
将
public function phoneRegisterAndLogin($param)
改成:
public function phoneRegisterAndLogin($param, $isCheckQrCodeLog = false)
1.对于menu部分,你把这块代表注释掉试试
@fecshop\services\page\Menu.php (@fecshop是文件路径 vendor/fancyecommer/fecshop)
$first_custom_menu = $this->customMenuInit($this->frontCustomMenu);
if (is_array($first_custom_menu) && !empty($first_custom_menu)) {
foreach ($first_custom_menu as $m) {
$arr[] = $m;
}
}
和
$behind_custom_menu = $this->customMenuInit($this->behindCustomMenu);
if (is_array($behind_custom_menu) && !empty($behind_custom_menu)) {
foreach ($behind_custom_menu as $m) {
$arr[] = $m;
}
}
自行debug找找原因
1.电商系统的库存是销售库存
,并非实际仓库库存,
对于电商系统,下单就会扣除库存,未支付订单
超x小时候会被取消释放库存,因此库存是一个动态的,销售库存为0,并非真的都卖出去了
电商系统,基本都是下单的时候检测销售库存,对于大型电商系统,下单的时候检测销售库存,当用户支付后,会存在一个出库的过程,这个是扣除实际仓库库存,理论上这个可能会失败,如果发生失败,已支付订单就会退款
2.产品页面,购物车没有库存信息,你可以根据自己的需求吗,二次开发自己加。
nginx配置的域名 , 和安装的域名不一致导致的
必须字符完全一致
@codermali #2楼 试试宝塔一键部署吧
用宝塔可以免除环境的烦恼。
vue是基于api的实现,因此没有session
1.如果想用验证码需要安装redis,通过redis来存储的
2.如果不用验证码,可以后台配置关掉。
1.官网demo有一分钱产品,测试没有问题
2.你的微信端配置可能存在问题,仔细看文档配置。
3.代码都有,自行debug找找原因,这点信息,本人也无法定位到底是什么原因
看3遍:http://www.fecmall.com/topic/624
看不懂,写清楚 那个接口,什么操作,那个文件
先把问题描述清楚,让别人看懂。
不满足就自行二开,fecmall本身定位电商框架。