Jump to content
Sign in to follow this  
cikon95

VYRIEŠENÉ feed obrazok IMAGE_URL nespravna cesta

Recommended Posts

problem:

ked pouzijem feed ktory tu uz bol pouzity xxx krat vsetko poriatku nacita ale obrazok cestu nacita
http://www.domena.xx/img/p/521-634.jpg lenze ten obrazok sa tam nenachadza ale je v inom adresari a to:
http://www.domena.xx/img/p/6/3/4/634.jpg

Ma niekto Feed subor ktory ide pod 1.4.3 ?
alebo nejaku radu?



<?php
$shopUrl = 'www.domena.xx';  
include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/init.php'); 
error_reporting(0);
$p=Product::getProducts(6, 0, 0, 'id_product', 'desc', false);
$products=Product::getProductsProperties(6, $p);

header("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="utf-8"?>
';

foreach ($products as $row) {

$kategorie=array();
$category = new Category(intval($row['id_category_default']), intval(6));
while ($category->id <> 1) {
   $kategorie[]=$category->hideCategoryPosition($category->name);
   $category = new Category(intval($category->id_parent), intval(6));
}

$img=Product::getCover($row['id_product']);
echo '

'.$row['id_product'].'
'.str_replace("&", "and", strip_tags($row['name'])).'
'.str_replace("&", "&",strip_tags($row['description_short'])).'
'.($row['price']*1).'
'.htmlspecialchars($row['manufacturer_name']).'
'.implode(' > ',array_reverse($kategorie)).'
'.$row['link'].'
http://www.domena.xx/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg
';
}
echo '';
?> 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More