涡轮齿轮2电子商务应用与库
stroller的Python项目详细描述
关于婴儿车
婴儿车是TurboGears2的可插拔电子商务应用程序和库。 可以使用tgext.pluggable将婴儿车作为可插入应用程序进行插入。 或者手动安装并用作实现PayPal支付的库 或电子商务部分。
安装
婴儿车可以从PYPI或Bitbucket安装:
easy_install stroller
应该只对大多数用户有效
插入婴儿车
在应用程序中config/app_cfg.py导入plug:
from tgext.pluggable import plug
然后在文件的结尾处使用婴儿车呼叫插头:
plug(base_config, 'stroller')
你可以在 http://localhost:8080/shop。
手动/贝宝支付
婴儿车既可以使用PayPal自动管理支付,也可以通过 手动管理订单。
当avoid_manage_payment选项启用时,婴儿车将注册 命令并要求用户联系站点管理员以继续 而不是用贝宝来处理。
无订单/注册订单
婴儿车能够以注册或匿名的方式处理付款。 当用户被记录时,他们的用户数据在订单中注册 元数据,以便以后可以与他们联系。如果是人工付款 已启用,而不是基于贝宝的电子邮件将被发送 让用户和站点管理器继续 付款。
启用PayPal且用户未登录其PayPal时 数据将用于注册订单。这是建议 使用婴儿车的方式,因为您不会要求用户注册,但 你将拥有他们所有的数据来发送订单。
注意:如果需要手动付款且用户未注册 会看到一个简单的警告,要求他联系现场经理 在订单确认结束时。通常建议不要 让婴儿车这样跑,你会发现许多订单与任何 关于是谁干的。
配置选项
- avoid_manage_payment -> Use manual payments managed instead of paypal
- currency -> (default: EUR) The currency to use for payments and orders.
- stroller_thumbnail_size -> (default: 128, 128) The size of automatically generated thumbnails (must be set in app_cfg.py)
- paypal_api_user -> Your paypal user for paypal payments
- paypal_api_pass -> Your paypal password for paypal payments
- paypal_api_signature -> Your paypal api signature for paypal payments
- paypal_debug -> Whenever to use the paypal sandbox or production environment
- stroller_order_notify_mail -> Email to notify whenever an order is placed. If not specified no messages will be sent
- stroller_email_sender -> (default: stroller_order_mail) From which email the stroller messages will be sent
- stroller_smtp_host -> The SMTP Server host used to send emails
- stroller_smtp_login -> The SMTP Authentication login (if not specified anonymous auth will be used)
- stroller_smtp_password -> The SMTP Authentication password