{"id":4987,"date":"2016-12-06T14:46:02","date_gmt":"2016-12-06T05:46:02","guid":{"rendered":"https:\/\/www.live-commerce.com\/support\/?page_id=4987"},"modified":"2016-12-06T15:17:35","modified_gmt":"2016-12-06T06:17:35","slug":"cgetimage","status":"publish","type":"page","link":"https:\/\/www.live-commerce.com\/support\/functions\/cgetimage","title":{"rendered":"c::getImage"},"content":{"rendered":"<h3>\u6982\u8981<\/h3>\n<p>\u5546\u54c1\u753b\u50cf\u3092HTML\u5f62\u5f0f\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<h3>\u4f7f\u3044\u65b9<\/h3>\n<pre class=\"lang:default decode:true \">&lt;?php\r\n$image = o::getDefaultProductImage($this-&gt;p_id);\r\nif ($image != 'no_image.gif') :\r\n?&gt;\r\n\r\n&lt;img &lt;?php echo c::getImage($type, $targetHeight, $fileName); ?&gt; alt=\"&lt;?php echo o::getProductName($this-&gt;p_id, true); ?&gt;\"\/&gt;\r\n\r\n&lt;?php\r\nendif;\r\n?&gt;<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u5f15\u6570\u306e\u5185\u5bb9<\/h3>\n<ul style=\"list-style-type: square;\">\n<li>$type: \u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u306e\u7a2e\u985e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002category_image\uff08\u30ab\u30c6\u30b4\u30ea\u753b\u50cf\uff09\u3001brand_image\uff08\u30e1\u30fc\u30ab\u30fc\u753b\u50cf\uff09\u3001product_listing\uff08\u5546\u54c1\u4e00\u89a7\u7528\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\uff09\u3001product_large\uff08\u5546\u54c1\u30aa\u30ea\u30b8\u30ca\u30eb\u753b\u50cf\uff09\u3001product_small\uff08\u5546\u54c1\u7e2e\u5c0f\u753b\u50cf\u30fb\u30c7\u30d5\u30a9\u30eb\u30c8\uff09<\/li>\n<li>$targetHeight: \u5546\u54c1\u753b\u50cf\u306e\u7e26\u5e45\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u7e26\u5e45\u306b\u5bfe\u3057\u3066\u6a2a\u5e45\u304c\u81ea\u52d5\u3067\u6307\u5b9a\u3055\u308c\u307e\u3059\u3002\u7e26\u5e45\u306fo::_(&#8216;PRODUCT_IMAGE_HEIGHT&#8217;)\u3067\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>$fileName: \u753b\u50cf\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>\u8fd4\u308a\u5024<\/h3>\n<p>string<br \/>\nHTML\u5f62\u5f0f\u3067\u753b\u50cf\u306e\u30d1\u30b9\u3092\u542b\u3080\u5024\u304c\u8fd4\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default highlight:0 decode:true \" >src=\"resources\/upload\/products\/thumbnail\/pdf_file_download.jpg\" width=\"80\" height=\"80\"<\/pre>\n<h3>\u4f7f\u7528\u4f8b<\/h3>\n<pre class=\"lang:default decode:true \">&lt;?php\r\n$image = o::getDefaultProductImage($this-&gt;p_id);\r\nif ($image != 'no_image.gif') :\r\n?&gt;\r\n\r\n&lt;img &lt;?php echo c::getImage('product_large', o::_('PRODUCT_IMAGE_HEIGHT'), $image); ?&gt; alt=\"&lt;?php echo o::getProductName($this-&gt;p_id, true); ?&gt;\"\/&gt;\r\n\r\n&lt;?php\r\nendif;\r\n?&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u5546\u54c1\u753b\u50cf\u3092HTML\u5f62\u5f0f\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002 \u4f7f\u3044\u65b9 &lt;?php $image = o::getDefaultProductImage($this-&gt;p_id); if ($image != &#8216;no_image [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":154,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4987","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/pages\/4987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/comments?post=4987"}],"version-history":[{"count":3,"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/pages\/4987\/revisions"}],"predecessor-version":[{"id":5011,"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/pages\/4987\/revisions\/5011"}],"up":[{"embeddable":true,"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/pages\/154"}],"wp:attachment":[{"href":"https:\/\/www.live-commerce.com\/support\/wp-json\/wp\/v2\/media?parent=4987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}