この記事では、テーマシステムとカスタマイズ機能に焦点を当てた、堅牢なeコマースプラットフォームである酸化排気を調査します。 パート1でプラットフォームを紹介しました。この部分は、テーマの作成と変更を掘り下げます
重要な概念:酸化エサールは、テーマ開発のためのSmartyテンプレートエンジンを活用する高品質で簡単に拡張可能なeコマースソリューションです。 これにより、テンプレート内のPHPのような構文が可能になります。
以下のスニペットは、HTML内のSmartyタグを示しています:
の下でカスタムスマートプラグインを提供します。 上記の例は、条件付きロジック、テンプレートの包含、およびウィジェットの使用(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
:テンプレート、翻訳、構成ファイル。
:パブリックファイル(css、javascript、画像)。
/application/views/<theme>/</theme>
/out/<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
を追加します。管理パネルのテーマをアクティブにします。 oxidのキャッシュをクリアするように/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マスター|酸化エサール - 機能するeコマースプラットフォーム! 2の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。