구글 판매자센터 피드
- 상품 관련 query 작업중
This commit is contained in:
23
shop/price/feedtest.xml
Normal file
23
shop/price/feedtest.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
|
||||||
|
|
||||||
|
<channel>
|
||||||
|
<title></title>
|
||||||
|
<link></link>
|
||||||
|
<description></description>
|
||||||
|
|
||||||
|
<!-- START -->
|
||||||
|
<item>
|
||||||
|
<title></title>
|
||||||
|
<link></link>
|
||||||
|
<description></description>
|
||||||
|
<g:image_link></g:image_link>
|
||||||
|
<g:price></g:price>
|
||||||
|
<g:condition></g:condition>
|
||||||
|
<g:id></g:id>
|
||||||
|
<g:availability></g:availability>
|
||||||
|
</item>
|
||||||
|
<!-- END -->
|
||||||
|
|
||||||
|
</channel>
|
||||||
|
</rss>
|
||||||
30
shop/price/google_feed.php
Normal file
30
shop/price/google_feed.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
include_once("./_common.php");
|
||||||
|
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
$sql =" select * from {$g5['g5_shop_item_table']} where it_use = '1' and it_soldout = '0' and it_tel_inq = '0' and it_price > '0' order by ca_id";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$xml = array();
|
||||||
|
$xml['rss'] = "version=\"2.0\" xmlns:g=\"http:base.google.com/ns/1.0\"";
|
||||||
|
$xml['channel'] = array(
|
||||||
|
"title" => "타이틀",
|
||||||
|
"link" => "링크",
|
||||||
|
"description" => "몰?루"
|
||||||
|
);
|
||||||
|
|
||||||
|
$items = array();
|
||||||
|
while($row = sql_fetch_array($result)) {
|
||||||
|
$items['title'] = $row['it_name'];
|
||||||
|
$items['link'] = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||||
|
$items['description'] = $row['it_basic'];
|
||||||
|
// $items['g:image_link'] = G5_DATA_PATH.'/item/'.$row['']
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Content-type: text/xml');
|
||||||
|
echo "<?xml version='1.0' encoding='UTF-8'?>\n";
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user