ghostrider Posted July 29, 2010 Share Posted July 29, 2010 Zdravim a prosim vsechny o radu.mam problem s xml feedem zbozi.cz (tuto sluzbu mam placenou u zbozi.cz). Jde o to, kdyz se mrknu na feed na webu tak se zobrazuje hlasak "hack attempt" a dal se nehnu. Neporadil by mi prosim nekdo co s tim? Nejak mi dochazeji napady Obchod je verze 1.3.1.1, url feedu http://www.car-multimedia.cz/xml/zbozi.phpSamotny feed je: <?php $shopUrl = 'http://www.car-multimedia.cz'; include(dirname(__FILE__).'/../config/config.inc.php'); include(dirname(__FILE__).'/init.php'); error_reporting(0); $p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false); $products=Product::getProductsProperties(4, $p); header("Content-Type: text/xml"); echo '<?xml version="1.0" encoding="utf-8"?> '; foreach ($products as $row) { $img=Product::getCover($row['id_product']); echo ' '.str_replace("&", "&", $row['name']).' '.str_replace("&", "&",strip_tags($row['description_short'])).' '.$row['link'].' '.$shopUrl.'/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg '.($row['price']*1).' 0 '; } echo ''; ?> Link to comment Share on other sites More sharing options...
ghostrider Posted July 29, 2010 Author Share Posted July 29, 2010 Takze zmena, chyba byla v ceste k init.php. Ale feed furt neni to pravy orechovy :-(Hack Attempt mi hlasi i tento feed: http://www.car-multimedia.cz/xml/srovnejcenu.php Link to comment Share on other sites More sharing options...
JAKCRABBIT Posted August 1, 2010 Share Posted August 1, 2010 Protože vlastní php scripty mají být v rootu prestashopu, nePRESTAshop složky jsou blokovány... Link to comment Share on other sites More sharing options...
ghostrider Posted August 2, 2010 Author Share Posted August 2, 2010 Aha, ale nejak nachapu proc mi zbozi leti v pohode, ale srovnejcenu ne. Obe jsou ve slozce.Na verzi 1.2.5 jsem mel taky feed ve slozkach a jelo to v poradku. Kopnu to do rootu, uvidim. Kazdopadne dekuji velice. Link to comment Share on other sites More sharing options...
JAKCRABBIT Posted August 2, 2010 Share Posted August 2, 2010 Hack attempty to prostě vypisuje, pokud se script pokouší sosat data z DB z míst, které jsou blokovány. Link to comment Share on other sites More sharing options...
skulaluks Posted September 22, 2010 Share Posted September 22, 2010 Můj feed jsem napsal takto a funguje bez problémů: <?php $shopUrl = "http://".$_SERVER['SERVER_NAME']; include(dirname(__FILE__).'/config/config.inc.php'); include('init.php'); error_reporting(0); $p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false); $products=Product::getProductsProperties(3, $p); header("Content-Type: text/xml"); echo '<?xml version="1.0" encoding="utf-8"?> '; foreach ($products as $row) { $img=Product::getCover($row['id_product']); $manufacturerName=Product::getManufacturerName($row['id_product']); echo ' '.$manufacturerName['meta_title'].' '.str_replace("&", "&", $row['name']).' '.str_replace("&", "&",strip_tags($row['description_short'])).' '.$row['link'].' '.$shopUrl.'/img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg '.round($row['price_tax_exc']).' '.round($row['price_tax_exc'])*(round($row['tax_rate'])+100 )/100 .' 4 '.$manufacturerName['meta_title'].' '; } echo ''; ?> Nezapomeňte si nastavit id jazyku na funkci $p=Product::getProducts(4, 0, 0, 'id_product', 'desc', false); já tam mám 4 Link to comment Share on other sites More sharing options...
ghostrider Posted September 22, 2010 Author Share Posted September 22, 2010 Ja mam ID CS taky 4 viz. prvni prispevek Feed jsem predelal dle sveho a jede bez problemu uz peknou dobu a na jednicku, dokonce i ve slozce ...Ty mas feed koukam ze v rootu, nezkousel jsi ho hodit do slozky? Pac se mi nelibi mit 12 feedu v rootu Link to comment Share on other sites More sharing options...
skulaluks Posted September 22, 2010 Share Posted September 22, 2010 Já mám jeden feed na jeden eshop, to mi stačí Link to comment Share on other sites More sharing options...
ghostrider Posted September 22, 2010 Author Share Posted September 22, 2010 To ja mam taky jeden shop, ale feed na zbozi, feed na heureku, feed na srovnejcenu atd. atd. Proto jsem se ptal. Ale i tak diky :-) 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