tozi Posted May 24, 2014 Share Posted May 24, 2014 (edited) Hi all, i have this feed for heureka.cz Yet is path to img eg. this http://www.autobaterie-adac.cz/121200-964-large_default/nabijecka-ctek-multi-xs-50-new-12v-08a-5a.jpg How can i change path to point to such a form of address? Result http://www.autobaterie-adac.cz/utils/heureka.php //Definice hlavičky XML souboru header("Content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; ?> <SHOP> <? // Výpis produktů v XML formátu pro Zboží.cz $produkty = dibi::select('*') ->from('ps_product') ->innerJoin('ps_product_lang')->using('(id_product)') ->innerJoin('ps_image')->using('(id_product)') ->where('active = %i', 1) ->where('cover = %i', 1) ->where('id_lang = %i', 2) ->where('price > %i', 10) ->execute(); foreach ($produkty as $pro) { $cat = dibi::select('id_category_default') ->from('ps_product') ->where('id_product = %i', $pro['id_product']) ->fetchSingle(); $catname = dibi::select('name') ->from('ps_category_lang') ->where('id_category = %i', $cat) ->fetchSingle(); if($cat==3)$catname = 'Auto-moto | Autodoplňky | Autobaterie'; if($cat==4)$catname = 'Elektronika | Baterie | Olověné baterie'; if($cat==5)$catname = 'Auto-moto | Příslušenství pro motocykly | Baterie pro motocykly'; if($cat==8)$catname = 'Auto-moto | Autodoplňky | Nabíječky a startovací boxy'; if($cat==9)$catname = 'Auto-moto | Autodoplňky | Nabíječky a startovací boxy'; $desc = str_replace('<h2>', '', $pro['description']); $desc = str_replace('</h2>', '', $desc); $desc = str_replace(' ', '', $desc); $cesta = chunk_split($pro['id_image'], "1", "/"); // vypíše '11.22.33.44.' if($pro['id_tax_rules_group']==1){ $svat = $pro['price'] * 1.21; }elseif($pro['id_tax_rules_group']==2){ $svat = $pro['price'] * 1.15; }else{ $svat = $pro['price']; } $svat = round($svat); ?> <SHOPITEM> <PRODUCTNAME><![CDATA[<?=$pro['name'];?>]]></PRODUCTNAME> <DESCRIPTION><![CDATA[<?=$desc;?>]]></DESCRIPTION> <URL>http://www.autobaterie-adac.cz/index.php?id_product=<?=$pro['id_product'];?>&controller=product&id_lang=2 </URL> <ITEM_TYPE>new</ITEM_TYPE> <CATEGORYTEXT><?=$catname?></CATEGORYTEXT> <IMGURL>http://www.autobaterie-adac.cz/img/p/<?=$cesta?><?=$pro['id_image']?>-medium_default.jpg</IMGURL> <PRICE><?=$pro['price']?></PRICE> <DELIVERY_DATE>0</DELIVERY_DATE> <?php if($pro['id_tax_rules_group']==1){ echo '<VAT>21</VAT>'; }elseif($pro['id_tax_rules_group']==2){ echo '<VAT>15</VAT>'; }else{ echo '<VAT>21</VAT>'; } ?> <PRICE_VAT><?=$svat?></PRICE_VAT> <TOLLFREE>0</TOLLFREE> </SHOPITEM> <? }?> </SHOP> Edited May 24, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
tozi Posted May 24, 2014 Author Share Posted May 24, 2014 Nobody? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now