2
如何使用簡單的餅從s:variant模塊獲取標題標籤?用簡單的餅從原子飼料中提取<s:variant>
<s:variant>
<id>product_variants-96590662</id>
<title>Default Title</title>
<s:price currency="GBP">10.00</s:price>
<s:sku>002</s:sku>
<s:grams>0</s:grams>
</s:variant>
我試過下面來利用,同時也「變種」,只是「S」
$caption = $item->get_item_tags('http://www.w3.org/2005/Atom', 's:variant');
有問題的飼料here(從shopify),並在get_item_tags的文檔是here。
命名空間的URL返回404,這有什麼關係嗎? – addedlovely 2011-06-03 15:36:39
shopify不再支持它們使用的命名空間。在這種情況下,即使參數現在已經很好,這種方法也可能不起作用。我會嘗試做一個完整的解析,並轉儲結果,也許你可以得到你需要的方式。 – aorcsik 2011-06-03 15:45:30
嗯似乎回到我稍微更小的陣列,這是更可行。謝謝。 – addedlovely 2011-06-03 15:49:30