在opencart 2.0.1.1中缺少图标

时间:2015-04-09 04:38:05

标签: html css opencart font-awesome opencart2.x

我有opencart 2.0.1.1版本,它运行正常。突然间我发现联系我们,愿望清单,搜索等图标都丢失了。我试图找到图像文件夹中的图标,但无法找到它。

Image 1 Image 2 Image 3

  1. 第一张图片是标题图片,其中缺少联系我们和其他图标。
  2. 在第二张图片中,缺少添加到购物车按钮的搜索图标和购物车图标
  3. 第三张图片是搜索结果,主页图标丢失,箭头错位。
  4. 即使幻灯片栏中的箭头丢失了。

    我应该再次上传图片吗?如果我应该上传我应该在哪里。

    有人能帮助我吗?感谢

3 个答案:

答案 0 :(得分:0)

调试缺失图像的最简单方法是在页面加载时查看浏览器的Web检查器,您应该能够看到哪些资产丢失以及它们应该位于何处。

Firefox的Firebug扩展对此以及许多其他基本的客户端调试任务非常有用。

答案 1 :(得分:0)

我猜你错过了#34;字体真棒"字体。

请检查您的文件夹:OPENCART ROOT-> catalogue / view / javascript / font-awesome / fonts

并检查是否有5个名为的文件:

  • FontAwesome.otf
  • fontawesome-webfont.eot
  • fontawesome-webfont.svg
  • fontawesome-webfont.ttf
  • fontawesome-webfont.woff

如果没有,请再次下载opencart并复制这些文件。

答案 2 :(得分:0)

修复打开的购物车中的FontAwesome问题

import base64
import datetime
import io
from sqlalchemy import create_engine
import dash
from dash.dependencies import Input, Output, State
import dash_core_components as dcc
import dash_html_components as html
import dash_table
import os
from urllib.parse import quote as urlquote
import sqlalchemy as sa
from flask import Flask, send_from_directory
con = sa.create_engine('sqlite:///C:\\Users\\GLOBALTECH\\Downloads\\Python Scripts-20200107T060836Z-001\\Python Scripts\\Greasing_Analytics.db')

#df=pd.read_csv('Daily Greasing Raw Data 2019.csv').to_sql('Grease_Analysis', con, if_exists ='append', index=False)

UPLOAD_DIRECTORY = "C:/Users/Admin/Documents/Python Scripts"

if not os.path.exists(UPLOAD_DIRECTORY):
    os.makedirs(UPLOAD_DIRECTORY)
server = Flask(__name__)
app = dash.Dash(server=server)
@server.route("/download/<path:path>")
def download(path):
    """Serve a file from the upload directory."""
    return send_from_directory(UPLOAD_DIRECTORY, path, as_attachment=True)
app.layout = html.Div(
    [
        html.H1("File Browser"),
        html.H2("Upload"),
        dcc.Upload(
            id="upload-data",
            children=html.Div(
                ["Drag and drop or click to select a file to upload."]
            ),
            style={
                "width": "100%",
                "height": "60px",
                "lineHeight": "60px",
                "borderWidth": "1px",
                "borderStyle": "dashed",
                "borderRadius": "5px",
                "textAlign": "center",
                "margin": "10px",
            },
            multiple=True,
        ),
  #      html.Button('Convert to SQL', id='button'),
   #     html.Div(id='output-container-button',children='Enter a value and press submit'),
        html.Hr(),  # horizontal line
      #  html.Div(id='output-data-upload'),
        html.H2("File List"),
        html.Ol(id="file-list"),
    ],
    style={"max-width": "500px"},
)
def parse_contents(contents, filename, date):
    content_type, content_string = contents.split(',')

    decoded = base64.b64decode(content_string)
    try:
        if 'csv' in filename:
            # Assume that the user uploaded a CSV file
            df = pd.read_csv(io.StringIO(decoded.decode('utf-8'))).to_sql('Grease_Analysis', con, if_exists ='append', index=False)
            dataa=df
            dataa = pd.read_sql_table("Grease_Analysis", con)
            dataa.drop_duplicates()
            #dataa.to_sql('Grease_Analysis', con, if_exists ='append', index=False)
        elif 'xls' in filename:
            # Assume that the user uploaded an excel file
            df= pd.read_excel(io.BytesIO(decoded)).to_sql('Grease_Analysis', con, if_exists ='append', index=False)
            dataa=df
            dataa = pd.read_sql_table("Grease_Analysis", con)
            dataa.drop_duplicates()
            #dataaa=dataa.to_sql('Grease_Analysis', con, if_exists ='append', index=False)
    except Exception as e:
        print(e)
        return html.Div([
            'There was an error processing this file.'
        ])


    return html.Div([
        html.H5(filename),
        html.H6(datetime.datetime.fromtimestamp(date)),

        dash_table.DataTable(
            data=dataa.to_dict('records'),
            columns=[{"name": i, "id": i, "deletable": True, "selectable": True} for i in dataa.columns],
            editable=True,
            filter_action="native",
            sort_action="native",
            sort_mode="multi",
            column_selectable="single",
            row_selectable="multi",
            row_deletable=True,
            selected_columns=[],
            selected_rows=[],
            page_action="native",
            page_current= 0,
            page_size= 10
        )

        # For debugging, display the raw contents provided by the web browser
        #html.Div('Raw Content'),
       # html.Pre(contents[0:200] + '...', style={
       #     'whiteSpace': 'pre-wrap',
         #   'wordBreak': 'break-all'
      #  })
    ])

def save_file(name, content):
    """Decode and store a file uploaded with Plotly Dash."""
    data = content.encode("utf8").split(b";base64,")[1]
    with open(os.path.join(UPLOAD_DIRECTORY, name), "wb") as fp:
        fp.write(base64.decodebytes(data))
def uploaded_files():
    """List the files in the upload directory."""
    files = []
    for filename in os.listdir(UPLOAD_DIRECTORY):
        path = os.path.join(UPLOAD_DIRECTORY, filename)
        if os.path.isfile(path):
            files.append(filename)
    return files
def file_download_link(filename):
    """Create a Plotly Dash 'A' element that downloads a file from the app."""
    location = "/download/{}".format(urlquote(filename))
    return html.A(filename, href=location)
@app.callback(
    Output("file-list", "children"),
    [Input("upload-data", "filename"), Input("upload-data", "contents")],
)
def update_output(uploaded_filenames, uploaded_file_contents):
    """Save uploaded files and regenerate the file list."""

    if uploaded_filenames is not None and uploaded_file_contents is not None:
        for name, data in zip(uploaded_filenames, uploaded_file_contents):
            save_file(name, data)

    files = uploaded_files()
    if len(files) == 0:
        return [html.Li("No files yet!")]
    else:
        return [html.Li(file_download_link(filename)) for filename in files]
    @app.callback(Output('output-data-upload', 'children'),
              [Input('upload-data', 'contents')],
              [State('upload-data', 'filename'),
               State('upload-data', 'last_modified')])
def update_output(list_of_contents, list_of_names, list_of_dates):
    if list_of_contents is not None:
        children = [
            parse_contents(contents, filename, date) for contents, filename, date in
            zip(list_of_contents, list_of_names, list_of_dates)]
        return children
if __name__ == "__main__":    
    app.run_server()

详细说明在下面的文章中给出 https://www.blazingcoders.com/how-to-fix-opencart-missing-icons-problem