>本文探讨了氧化杂货,这是一个强大的电子商务平台,重点关注其主题系统和自定义功能。 第一部分介绍了平台;该部分深入研究主题创建和修改。
>密钥概念:
以下段列表在HTML中说明了智能标签:
下提供自定义的智能插件。 上面的示例演示了条件逻辑,模板包含和窗口小部件的使用(header.tpl
,
<code>[{assign var="slogoImg" value="logo.png"}] <a href="https://www.php.cn/link/0b49b88c68f7ecbdb73f50496c084a1e" id="logo"> </a> <img src="/static/imghw/default1.png" data-src="https://img.php.cn/" class="lazy" alt="PHP Master | OXID eSales - The E-Commerce Platform that Just Works! 2">oxshops__oxtitleprefix->value}]"> [{oxid_include_widget cl="oxwCategoryTree" cnid=$oView->getCategoryId() sWidgetType="header" _parent=$oView->getClassName() nocookie=1}] [{if $oxcmp_basket->getProductsCount()}] [{assign var="blAnon" value=0}] [{assign var="force_sid" value=$oViewConf->getSessionId()}] [{else}] [{assign var="blAnon" value=1}] [{/if}] [{oxid_include_widget cl="oxwMiniBasket" nocookie=$blAnon force_sid=$force_sid}] [{include file="widget/header/search.tpl"}] [{if $oView->getClassName()=='start' && $oView->getBanners()|@count > 0 }] <div class="oxSlider"> [{include file="widget/promoslider.tpl" }] </div> [{/if}]</code>
>/core/smarty/plugins
>主题文件结构(CE 4.7,PE/EE 5.0):oxwCategoryTree
>
oxwMiniBasket
$oxcmp_shop->oxshops__oxtitleprefix->value
:public Files(CSS,JavaScript,Images)。
创建一个自定义主题(“ sitepoint”):
/application/views/<theme>/</theme>
<code>[{assign var="slogoImg" value="logo.png"}] <a href="https://www.php.cn/link/0b49b88c68f7ecbdb73f50496c084a1e" id="logo"> </a> <img src="/static/imghw/default1.png" data-src="https://img.php.cn/" class="lazy" alt="PHP Master | OXID eSales - The E-Commerce Platform that Just Works! 2">oxshops__oxtitleprefix->value}]"> [{oxid_include_widget cl="oxwCategoryTree" cnid=$oView->getCategoryId() sWidgetType="header" _parent=$oView->getClassName() nocookie=1}] [{if $oxcmp_basket->getProductsCount()}] [{assign var="blAnon" value=0}] [{assign var="force_sid" value=$oViewConf->getSessionId()}] [{else}] [{assign var="blAnon" value=1}] [{/if}] [{oxid_include_widget cl="oxwMiniBasket" nocookie=$blAnon force_sid=$force_sid}] [{include file="widget/header/search.tpl"}] [{if $oView->getClassName()=='start' && $oView->getBanners()|@count > 0 }] <div class="oxSlider"> [{include file="widget/promoslider.tpl" }] </div> [{/if}]</code>
创建/out/sitepoint/img
和/out/sitepoint/src
,添加theme.jpg
和修改后的logo.png
。激活管理面板中的主题。 清除目录以清除氧化的高速缓存。/tmp
>自定义示例:
logo.png
application/views/sitepoint/tpl/layout/header.tpl
复制)。
azure
application/views/sitepoint/tpl/page/account/dashboard.tpl
中添加翻译。application/views/sitepoint/de/cust_lang.php
。
application/views/sitepoint/en/cust_lang.php
本指南展示了氧化主题系统,从而实现了直接的自定义。 第3部分将探索用于高级自定义的自定义模块开发。 (注意:图像URL都在原始上下文中正确起作用。
以上是PHP主|氧化ESALES-刚起作用的电子商务平台! 2的详细内容。更多信息请关注PHP中文网其他相关文章!