无法替换狂欢 2.1.3 中的狂欢默认徽标 [英] Unable to replace spree default logo in spree 2.1.3

查看:47
本文介绍了无法替换狂欢 2.1.3 中的狂欢默认徽标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用过的萤火虫和检查过的狂欢默认标志来自/assets/store/logo.png

Used firebug and inspected Spree default logo is coming from /assets/store/logo.png

检查 spree 2.1.3 版本源代码,发现默认 logo 来自/logo 部分.

Checked in spree 2.1.3 Version Source code and found default logo is coming from /logo section.

路径:

core/app/models/spree/app_configuration.rb

preference :logo, :string, default: 'logo/spree_50.png'

尝试覆盖使用 Spree:Config 选项的默认徽标.

Trying to Override, the default logo using Spree:Config option.

Spree::Config.set(logo: "store/logo.png")

但它仍然重定向到旧图像(spree_50.png)并且我无法替换默认徽标.

But it's still redirecting to the old image(spree_50.png) and I am unable to replace the default logo.

推荐答案

在 application.rb:

In application.rb:

Spree.config do |config|
# Example:
# Uncomment to override the default site name.
# config.site_name = "Spree Demo Site"

config.logo = "logo.png"

end

然后将您的徽标添加到 public/images/中,徽标就会显示出来.

Then add your logo to public/images/ and the logo will show up.

这篇关于无法替换狂欢 2.1.3 中的狂欢默认徽标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆