eric_weixin 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce48f9412945bf98b5c5bc68fda84793b8c03799
|
4
|
+
data.tar.gz: 43ad31fb81824b2bf4ec7d7636bf6d262811de98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e177ab14e806a22b877a35a4b82d5ddb1b53b506ca1aac64f248d911e73b72f7dd9fefc8cde2de7f7714032278c7ed7e33fe341a58066c247ba4dee25174041b
|
7
|
+
data.tar.gz: 3863b957b56b3f9decf645827a32f8321e9f988ccc8ef59314d0ad4bf2829c69b00b53a007f14b7b65933987f66559403e8bdb8445c01c61592d12bf77d9233f
|
data/README.rdoc
CHANGED
@@ -27,3 +27,23 @@
|
|
27
27
|
* 图文管理: /eric_weixin/cms/weixin/news_datas
|
28
28
|
* 图文素材管理: /eric_weixin/cms/weixin/article_datas
|
29
29
|
* 链接管理: /eric_weixin/cms/weixin/url_encodes
|
30
|
+
* 微信小店订单设置 /eric_weixin/cms/weixin/xiaodian/orders
|
31
|
+
|
32
|
+
|
33
|
+
===微信小店的初始化
|
34
|
+
* 首先对所经营的分类进行归类,并且把腾讯分类同步至数据库。为了避免分类过多,一般只同步自己行业的大类,大类编号请自查,如儿童玩具大类,食品类两类更新如下:
|
35
|
+
|
36
|
+
EricWeixin::Xiaodian::Category.import_all_categories '公众账号名称,参考 weixin_public_account表', ['538088633','538071212']
|
37
|
+
* 更新SKU信息
|
38
|
+
|
39
|
+
EricWeixin::Xiaodian::Category.update_sku_info '公众账号名称,参考 weixin_public_account表'
|
40
|
+
* 更新商品信息
|
41
|
+
|
42
|
+
EricWeixin::Xiaodian::Product.get_all_products '公众账号名称,参考 weixin_public_account表'
|
43
|
+
* 同步已有订单信息
|
44
|
+
|
45
|
+
EricWeixin::Xiaodian::Order.get_order_list_and_update nil, nil ,nil ,'公众账号名称,参考 weixin_public_account表'
|
46
|
+
|
47
|
+
*如果有新商品上架,则需要更新商品与SKU信息。 更新过程见商品列表页面,点击刷新按钮即可。由于接口调用限制,一天之内不要操作超过3次。
|
48
|
+
|
49
|
+
|
@@ -9,8 +9,8 @@ class EricWeixin::Xiaodian::Category < ActiveRecord::Base
|
|
9
9
|
# 把所有的产品类型导入数据库。
|
10
10
|
# public_account_name: 公众账号名称
|
11
11
|
# parent_id: 分类腾讯id#
|
12
|
-
|
13
|
-
# EricWeixin::Xiaodian::Category.import_all_categories 'rszx', ['538088633','538071212']
|
12
|
+
|
13
|
+
# EricWeixin::Xiaodian::Category.import_all_categories 'rszx', ['538088633','538071212'] # 玩具、模型等, 食品/茶叶/特产/滋补品
|
14
14
|
def self.import_all_categories public_account_name, first_level_weixin_id = [], parent_id = 1
|
15
15
|
EricWeixin::Xiaodian::Category.transaction do
|
16
16
|
account = EricWeixin::PublicAccount.get_public_account_by_name public_account_name
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<% @orders.each do |order| %>
|
33
33
|
<tr>
|
34
34
|
<td style="word-break:break-all"><%= order.order_id %></td>
|
35
|
-
<td style="word-break:break-all"><%= order.weixin_user.nickname %></td>
|
35
|
+
<td style="word-break:break-all"><%= order.weixin_user.nickname rescue '' %></td>
|
36
36
|
<td style="word-break:break-all"><%= Time.at(order.order_create_time).strftime("%Y-%m-%d %H:%M:%S") %></td>
|
37
37
|
<td style="word-break:break-all"><%= order.product.name %></td>
|
38
38
|
<td style="word-break:break-all"><%= order.product_info %></td>
|
data/lib/eric_weixin/version.rb
CHANGED