2017-06-30 14 views
0

OpenCartのすべての製品にxmlファイルがありますが、これは完全なファイルではありません。Opencartバージョン2.3.0.2のキャッシュにXMLファイルを書き込む方法は?

<?xml version="1.0" encoding="UTF-8"?> 
<shop> 
    <date_created>2017-06-29 13:58:36</date_created> 
    <shopproduct> 
     <product_id>47</product_id> 
     <name>HP LP3065</name> 
     <description>&amp;lt;p&amp;gt;&#13; 
      Stop your co-workers in their tracks with the stunning new 30-inch diagonal HP LP3065 Flat Panel Monitor. This flagship monitor features best-in-class performance and presentation features on a huge wide-aspect screen while letting you work as comfortably as possible - you might even forget you&amp;amp;#39;re at the office&amp;lt;/p&amp;gt;&#13; 
     </description> 
     <model>Product 21</model> 
     <sku/> 
     <upc/> 
     <ean/> 
     <jan/> 
     <manufacturer_id>7</manufacturer_id> 
     <price>100.0000</price> 
     <tax_class_id>9</tax_class_id> 
     <points>400</points> 
     <quantity>1000</quantity> 
     <minimum>1</minimum> 
     <isbn/> 
     <mpn/> 
     <meta_title>HP LP3065</meta_title> 
     <stock_status_id>5</stock_status_id> 
     <weight>1.00000000</weight> 
     <weight_class_id>1</weight_class_id> 
     <length>0.00000000</length> 
     <length_class_id>1</length_class_id> 
     <width>0.00000000</width> 
     <height>0.00000000</height> 
     <location/> 
     <shipping>1</shipping> 
     <meta_description/> 
     <meta_keyword/> 
     <viewed>0</viewed> 
     <date_available>2009-02-03</date_available> 
     <date_added>2009-02-03 21:08:40</date_added> 
     <date_modified>2011-09-30 01:05:28</date_modified> 
     <sort_order>0</sort_order> 
     <status>1</status> 
     <subtract>0</subtract> 
    </shopproduct> 
    <shopproduct> 
     <product_id>28</product_id> 
     <name>HTC Touch HD</name> 
     <description>&amp;lt;p&amp;gt;&#13; 

そして、私はSystem/Storage/Cacheのキャッシュに書きたいと思います。私はそれのための準備ができている機能があると思うが、私はそれらを探すべきか分からない。

答えて

1

あなたはDIR_CACHEという定数を定義していますので、file_put_contentsという名前と再使用されない名前(データの破損を避けるため)で使用してください。

+0

私はこれを見つけました:$ this-> cache-> set – MorganFreeFarm

+0

それはクラスの設定者です(魔法を使うのを避けるためです)。 –

関連する問題