光速忠诚大致可在3月31日发布,2020年。任何主题修改这个日期之前是为了绕过车的原始代码应该被更新以支持光速的忠诚。可以确定一个主题来绕过车的原始代码:
- 复习主题设置一个开关,以实现自定义购物车功能。
- 咨询原开发人员发现默认代码被绕过。
- 检查
fixed.rain
在主题的代码文件涉及到的IF语句cart.rain
。 - 找到一个
customcart.rain
在主题的代码片段。 - 测试下面的忠诚使商店忠诚cart元素。
忠诚注册框
这个元素鼓励用户注册并加入忠诚计划。
值得在客户 已登录的用户,不订阅的忠诚 下面是代码取自光速的默认主题。您需要编辑这个
工作在您自己的实现。< div class = " gui-block gui-reward-cart-block " >
< div class = " gui-block-title " >
<强>想赚点在每个订单? < /强>
< / div >
< div class = " gui-block-content gui-align-center " >
< a href = " http://charlene-production-retail-omni.shoplightspeed.com/en/loyalty/ " class = " gui-button-small“title =“了解更多”>了解更多< / >
< a href = " https://charlene-production-retail-omni.shoplightspeed.com/en/account/ " class = " gui-button-small“title =“我的帐户/注册”>我的帐户/登记< / >
< / div >
< / div >奖励下拉
奖励注册框下拉取代了忠诚客户登录的时候出现
他们的账户和忠诚计划的一员。当点击它的时候,它就评估购物车
返回一个列表的合格奖励,如果任何。你应该显示这个当客户登录自己的帐户和当购物车变量customer_loyalty
是真的。车之前评估
由于折扣奖励不可用
获得的回报
使用
EvaluateCartReward
端点来确定奖励适用于当前购物车。这可以称为使用:https:// [shopurl].com/ (lang) /服务/ getEvaluateCartRewards /。它不会工作在非ssl商店。这里有一个例子中使用的HTML和Javascript默认光速购物车:
< div class = " gui-block gui-reward-cart-block " >
< div class = " gui-block-title gui-reward-cart-block-title " id = " rewardCartTitle " >
<强>奖励< /强>
< div class = " gui-reward-cart-arrow gui-reward-cart-arrow-up " > < / div >
< / div >
< div class = " gui-align-center gui-cart-rewards-list-block " id = " accountRewardList "装载的数据= "假" >
< img类= " gui-reward-cart-loading " src = " https://cdn.shoplightspeed.com/assets/gui-loading.gif?2019-08-16”风格= "显示:没有;" >
< ul类= " gui-cart-rewards-list " id = " cartRewardsList " >
<形式id = " gui-form-cart-rewards-1 " action = " https://charlene-production-retail-omni.shoplightspeed.com/en/cart/applyReward/ " method = " post " >
<李类= " gui-option gui-cart-rewards-item " >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-title " >
< div class = " gui-cart-rewards-list-name " > 10.00美元从< / div >
< div class = " gui-cart-rewards-list-info " >有效期为:所有< / div >
< / div >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-points " > 0分< / div >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-apply " > <按钮类型=“提交”class =“gui-button-small gui-cart-rewards-list-apply-btn " > < /按钮> < / div >应用
< /李> < input type = "隐藏" name = " reward_id " value = " 32 " >
> < /形式
<形式id = " gui-form-cart-rewards-2 " action = " https://charlene-production-retail-omni.shoplightspeed.com/en/cart/applyReward/ " method = " post " >
<李类= " gui-option gui-cart-rewards-item " >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-title " >
< div class = " gui-cart-rewards-list-name " > < / div > 10美元的任何项目
< div class = " gui-cart-rewards-list-info " >有效期:玫瑰花束< / div >
< / div >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-points " > 10分< / div >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-apply " > <按钮类型=“提交”class =“gui-button-small gui-cart-rewards-list-apply-btn " > < /按钮> < / div >应用
< /李> < input type = "隐藏" name = " reward_id " value = " 22 " >
> < /形式
<形式id = " gui-form-cart-rewards-3 " action = " https://charlene-production-retail-omni.shoplightspeed.com/en/cart/applyReward/ " method = " post " >
<李类= " gui-option gui-cart-rewards-item " >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-title " >
< div class = " gui-cart-rewards-list-name " > < / div > 10%什么
< div class = " gui-cart-rewards-list-info " >有效期:玫瑰花束< / div >
< / div >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-points " > 10分< / div >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-apply " > <按钮类型=“提交”class =“gui-button-small gui-cart-rewards-list-apply-btn " > < /按钮> < / div >应用
< /李> < input type = "隐藏" name = " reward_id " value = " 21 " >
> < /形式
<形式id = " gui-form-cart-rewards-4 " action = " https://charlene-production-retail-omni.shoplightspeed.com/en/cart/applyReward/ " method = " post " >
<李类= " gui-option gui-cart-rewards-item " >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-title " >
< div class = " gui-cart-rewards-list-name " > < / div > 10%花
< div class = " gui-cart-rewards-list-info " >有效期:玫瑰花束< / div >
< / div >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-points " > 10分< / div >
< div class = " gui-cart-rewards-content gui-cart-rewards-list-apply " > <按钮类型=“提交”class =“gui-button-small gui-cart-rewards-list-apply-btn " > < /按钮> < / div >应用
< /李> < input type = "隐藏" name = " reward_id " value = " 24 " >
> < /形式
< / ul >
< / div >
< / div >