magento模板仿制实战(一)

前面几天我们讲了magento的安装,建立自己的模板,也熟悉了模板文件之间的调用关系,剩下的就是css和js样式没讲了,这个下去自己学,如果你还不会制作html页面,建议你先把css学好,再来学习magento模板制作。一切准备就绪,大家期待已久的实战要开始了。这一节主要讲一些实战前的准备工作。为了节省时间,快速学习css,我们找一个magento制作的网站来仿制。

1.找一个目标站,本课程我们将采用该magento网站(http://livedemo00.template-help.com/magento_47672/)

2.建立自己的主题模板,并在后台设置好,我建的主题名是theme001,用默认的package

3.将你的项目加载到php编译工具里面(Zend Studio)便于后面代码编写、查看。

4.将后台调为开发模式,就是讲索引刷新(System/Index Management),缓存关闭并刷新(System/Cache Management),全选并选择Action类型。关闭缓存为了避免在修改代码中运行的还是缓存里面的,导致我们不能及时看到修改效果。

上面的步骤准备好了,由于我们仿的也是magento的站,万变不离其宗,也都是按照magento默认模板改的,我们需要做的把它的样式(css)文件,image文件,js文件下载下来,放到我们模板对应的位置并加载到我们magento项目主题的page.xml中

查看网站源码,找到截图,把红框里面的全部下载下来并保存到你相应的模板skin文件

在模板中加载css以及js

<action method=”addCss”><stylesheet>css/bootstrap.css</stylesheet></action>
<action method=”addCss”><stylesheet>css/styles.css</stylesheet></action>
<action method=”addCss”><stylesheet>css/responsive.css</stylesheet></action>

<action method=”addItem”><type>skin_js</type><name>js/jquery-1.10.2.min.js</name></action>
<action method=”addItem”><type>skin_js</type><name>js/scripts.js</name></action>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
What this book covers Chapter 1, Installing Magento 2 on Apache and NGINX, is a totally different ballgame compared to Magento 1. Where Magento 1 could be installed through FTP or SSH, Magento 2 is installable only via the command-line interface for an experienced webmaster. Chapter 2, Magento 2 System Tools, explains how to install Magento 2 via the command shell. Magento released a new powerful tool to manage and install sample data, reindex your database, back up your site, or flush your caches, which are just a few of the options. Chapter 3, Enabling Performance in Magento 2, explains how to configure different types of caching options. In Magento 2, the Full Page Cache (FPC) can be handled by Varnish to give your store a performance boost. There are also external services that you can use as a cache. Chapter 4, Creating Catalogs and Categories, shows you one of the major elements of a Magento store before creating products. Creating the correct product type including attributes is an important step in setting up a Magento store. Chapter 5, Managing Your Store, covers setting up the correct tax rules, configuring an inventory, and creating customer groups. Chapter 6, Creating a Magento 2 Theme, discusses the Magento 2 blank theme and how to use the fallback to create seasonal variations. It also explains how the new theme is set up and where files are stored. Chapter 7, Creating Magento 2 Extensions – the Basics, contains the basic functions required to use extensions in a Magento 2 installation. It contains a brief introduction to new methods introduced in the Magento 2 framework and examples on how to create basic functions. Chapter 8, Creating Magento 2 Extensions – Advanced, explains how to use advanced features in extensions for Magento 2. It also includes how to add unit/functional tests as this is a new requirement for extensions listed on the new Magento

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值