Guest Posted November 4, 2005 Share Posted November 4, 2005 Hello i have one more problem I get this message : The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. You can' t use the "<" character Can any one help or point me in the correct direction - thanks i ve noticed also that in xml2.php everytime the $category_container_name = "0"; around line 152 the problem dissapear. also i tried the solution found in a previous post $products_extra['products_description'] = ereg_replace ("xxx", "yyy",$products_extra['products_description']); but i didn't have any result could you please help me? Quote Link to comment Share on other sites More sharing options...
Guest Posted November 22, 2005 Share Posted November 22, 2005 This may help someone else (maybe not) saw some info related to this here but not exact. i installed this with no problems, great help files. i did not change any advance setting and went with the default config. i did get errors on first run of "<b>Warning</b> : ereg_replace(): REG_BADRPT in xxxxxxx on line <b>201</b> " etc for all the ereg_replace lines. i dont have illegal charactors in any fields except maybe descriptions which this dosent call so instead of going nuts on it i just commented out the ereg_replace lines // search and replace characters from data which xml will not process //if ($product_name == 1) { //$row['products_name'] = ereg_replace ("&", " and ", $row['products_name']); //$row['products_name'] = ereg_replace ("?", "®", $row['products_name']); //$row['products_name'] = ereg_replace ("?", "", $row['products_name']); //} //if ($product_manufacturer == 1) { //$row['manufacturers_name'] = ereg_replace ("&", " and ", $row['manufacturers_name']); //$row['manufacturers_name'] = ereg_replace ("?", "®", $row['manufacturers_name']); //$row['manufacturers_name'] = ereg_replace ("?", "", $row['manufacturers_name']); //} everything works fine and didnt seem to hurt anything. hope this helps someone and/or saves them some time. now im going to create a cron job to ping yahoo daily if you need it their manual ping address is "http://api.my.yahoo.com/rss/ping?u=[YOUR RSS URL]" without the quotes. Quote Link to comment Share on other sites More sharing options...
Guest Posted November 22, 2005 Share Posted November 22, 2005 Hi, I'm having a view problems with this mod. 1st. problem Products are displayed 2,3 or 4 times. I've read that some user where having the same problems and that they were working on a solution but i couldn't find the solution in this thread. 2nd problem. When i'm running the XML2.php file i'm getting an error like this: De XML-pagina kan niet worden weergegeven Kan XML-invoer niet lezen met opmaakmodel XSL. Herstel de fout en klik vervolgens op de knop Vernieuwen of probeer het later opnieuw. -------------------------------------------------------------------------------- Vereiste spatie ontbreekt. Fout bij het verwerken van bron http://www.navco.nl/xml2.php. Regel 1, positie 4001 PRODUCT><PRODUCT ITEM='96'><NAME>MS4140RS Navigation Radio One Country + Europa 2005/2006</NAME><PRI... Free translation of the lower part. mandatory SPACE needed. Error during the processing of http://www.navco.nl/xml2.php. line 1, position 4001 I'm running a heavily modded OSC MS2.2 with both English and Dutch language. Dutch is the primary language. Could you please help me solve this problem. Quote Link to comment Share on other sites More sharing options...
Spyros Posted December 17, 2005 Share Posted December 17, 2005 Got to: --------------------------------------------------------- $category_query = "SELECT `categories_description`.`categories_name` ---------------------------------------------------------- Replace with: --------------------------------------------------------- $category_query = "SELECT DISTINCT `categories_description`.`categories_name` --------------------------------------------------------- Go to: -------------------------------------------------------- $product_query = "SELECT `products`.`products_id`,`products`. -------------------------------------------------------- Replace with: -------------------------------------------------------- $product_query = "SELECT DISTINCT `products`.`products_id`,`products`. -------------------------------------------------------- Then there will be no duplicated products when using more than 1 language. You will have 1 time of each product in each language! Hope this helps! Quote Spyros Link to comment Share on other sites More sharing options...
Eddie_Gr Posted December 24, 2005 Share Posted December 24, 2005 I have tried myself the addon and i had some problems that i solve without seen the solution inside this forum. So i should write them for anyone who has the same problems. 1) The XML Feed does not work for products that you don't have assing the manufacter. It will only feed the products that have a manufactor. 2) For greek language shops (and products name-detail) you have to change the echo line just after the //////////////////////////////////////////////////////////////////////////////////////////////// // *** IF YOU NEED TO ADD CUSTOM TAGS AND NEED HELP PLEASE SEE ADVANCED.HTM OR VISIT: // *** http://www.oscommerce.com/forums/index.php?showtopic=146810 *** // *** PLEASE DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOU ARE DOING *** //////////////////////////////////////////////////////////////////////////////////////////////// echo '<?xml version="1.0"?>'; like this echo '<?xml version="1.0" encoding="ISO-8859-7"?>'; If you need more info just email me !! Quote Link to comment Share on other sites More sharing options...
Erik Svensson Posted January 11, 2006 Share Posted January 11, 2006 Great This works a lot better :thumbsup: For swedish users you need ISO-8859-15 if u want swedish signs And now to something complete different I want to add language id to my XML2 file. I have 2 days of experence with XML and php but want to try at least once. Quote Link to comment Share on other sites More sharing options...
Wahlmann Posted January 22, 2006 Share Posted January 22, 2006 Has anyone managed to add attributes to the OSC XML Feed i.e. PRODUCT_OPTIONS_VALUES? Quote Link to comment Share on other sites More sharing options...
Erik Svensson Posted February 16, 2006 Share Posted February 16, 2006 Great This works a lot better :thumbsup: For swedish users you need ISO-8859-15 if u want swedish signs And now to something complete different I want to add language id to my XML2 file. I have 2 days of experence with XML and php but want to try at least once. I have now solved the multi language ID:s. You will only add this Replace $product_query = "SELECT `products`.`products_id`,`products`.`products_quantity`,`products`.`products_model`,`products`.`products_image`,`products`.`products_price`,`products`.`products_date_added`,`products`.`products_last_modified`,`products`.`products_date_available`,`products`.`products_weight`,`products`.`products_status`,`products`.`manufacturers_id`,`products_description`.`products_name`,`products_description`.`products_url`,`categories_description`.`categories_name`,`manufacturers`.`manufacturers_name` FROM `products` INNER JOIN `products_description` ON (`products`.`products_id` = `products_description`.`products_id`) INNER JOIN `products_to_categories` ON (`products_description`.`products_id` = `products_to_categories`.`products_id`) INNER JOIN `categories_description` ON (`products_to_categories`.`categories_id` = `categories_description`.`categories_id`) INNER JOIN `manufacturers` ON (`products`.`manufacturers_id` = `manufacturers`.`manufacturers_id`) With $product_query = "SELECT DISTINCT `products`.`products_id`,`products`.`products_quantity`,`products`.`products_model`,`products`.`products_image`,`products`.`products_price`,`products`.`products_date_added`,`products`.`products_last_modified`,`products`.`products_date_available`,`products`.`products_weight`,`products`.`products_status`,`products`.`manufacturers_id`,`products_description`.`products_name`,`products_description`.`products_url`,`categories_description`.`categories_name`,`products_description`.`language_id`,`manufacturers`.`manufacturers_name` FROM `products` INNER JOIN `products_description` ON (`products`.`products_id` = `products_description`.`products_id`) INNER JOIN `products_to_categories` ON (`products_description`.`products_id` = `products_to_categories`.`products_id`) INNER JOIN `categories_description` ON (`products_to_categories`.`categories_id` = `categories_description`.`categories_id`) INNER JOIN `manufacturers` ON (`products`.`manufacturers_id` = `manufacturers`.`manufacturers_id`) Under insert any extra custom tags put: echo '<LANG_ID>' . $row['language_id'] . '</LANG_ID>'; You will now have a product for every language and you will not get any duplicates //Erik Quote Link to comment Share on other sites More sharing options...
cooldo Posted February 28, 2006 Share Posted February 28, 2006 this also all i get <STOREITEMS> <CREATED value="Thu Sep 1 19:36:46 BST 2005"/> </STOREITEMS> any help You must set $allow_no_stock = "1"; Bye Quote Link to comment Share on other sites More sharing options...
cooldo Posted February 28, 2006 Share Posted February 28, 2006 Hi, Can you post xml2.php so we can take a look at it? Eyal. Hi, you must set $allow_no_stock = "1"; Ahoj Quote Link to comment Share on other sites More sharing options...
giannimoto Posted May 8, 2006 Share Posted May 8, 2006 hello. i think this contribution would be great if the xml output would be formatted like this... <lang id=1> <categorie id=xx> <product></product> <subcategorie id=xx> <product></product> ... </categorie> </lang> <lang id=2> ... you follow me? i dunno if anyone out there can hear me just holla back or email me! giannimoto at gmail dot com ps. my desire is to use the xml for a osc flash frontend gallery Quote Link to comment Share on other sites More sharing options...
mr_absinthe Posted June 6, 2006 Share Posted June 6, 2006 Hi, will this contribution work with Ultimate SEO URLs ? Because no matter what I try, all I get is this: <SHOP> <CREATED value="Tue Jun 6 12:44:10 CDT 2006"/> </SHOP> My shop is in site root. I tested on test site which is in catalog folder and without SEO URLs installed and it seems to work fine. Thanks a lot. Quote Absinthe Original Liquor Store Link to comment Share on other sites More sharing options...
Eyals Posted June 7, 2006 Share Posted June 7, 2006 Hi, The contribution is working fine with Ultimate SEO URLs... Did you modufy something in the code? Eyal. Quote Link to comment Share on other sites More sharing options...
mr_absinthe Posted June 7, 2006 Share Posted June 7, 2006 Not really, if I use fresh version and change only this bit: // Enter the url to your website - do not put 'http://' or enter any slashes $domain_name = "www.myshop.com"; // NO SLASHES - EG: www.mysite.com // Enter the folder name of your shop directory, this is normally 'catalog' // $catalog_folder = "catalog"; // default is 'catalog' - NO SLASHES! // If your shop is in your site root (EG: www.mysite.com/index.php) then uncomment the next line. $catalog_folder = ""; // Enter the folder name of your product images directory, this is normally 'images' $image_folder = "images"; // NO SLASHES! All I get is this: <STOREITEMS> <CREATED value="Wed Jun 7 2:11:24 CDT 2006"/> </STOREITEMS> However is I rename the same file from xml.php to test.xml, I get the following error: XML Parsing Error: not well-formed Location: http://www.myshop.com/test.xml Line Number 155, Column 7: echo '<' . $xml_tags['master'] . '>'; ------^ If it works well with SEO URLs and if it works fine in root, it must be something else and according to this thread I'm not the only one. Thinking about the error above, I got the feeling that it may have something to do with PHP4... does it work with it as well? Alex Quote Absinthe Original Liquor Store Link to comment Share on other sites More sharing options...
swtnhpy Posted June 7, 2006 Share Posted June 7, 2006 "OUT OF THE BOX" with configuration of my shop, I am only getting the date displayed at the top. I haven't changed any variables with the exception of adding my site name, directory to shop instead of catalog. Quote Link to comment Share on other sites More sharing options...
mr_absinthe Posted June 8, 2006 Share Posted June 8, 2006 Nothing to do with PHP... 1st site in catalog folder, no SEO URLs, PHP4.4.2, MySQL 4.1.8 works as expected. Same xml.php file used on site in the root with SEO URLs, PHP4.4.2, MySQL 4.1.18 and the following change: from $catalog_folder = "catalog"; to $catalog_folder = ""; and $domain_name obviously Does NOT work, all you get is this: <STOREITEMS> <CREATED value="Thu Jun 8 5:45:40 CDT 2006"/> </STOREITEMS> I cannot test on site placed in catalog folder with SEO URLs installed but I guess I don't have to if it works for Eyal. I've sent PM to Kenny but to no avail. I see no light at the end of the tunnel atm. :( Quote Absinthe Original Liquor Store Link to comment Share on other sites More sharing options...
swtnhpy Posted June 9, 2006 Share Posted June 9, 2006 I can see the person who created this must be away. Has anyone figured this out? Quote Link to comment Share on other sites More sharing options...
mr_absinthe Posted June 17, 2006 Share Posted June 17, 2006 Dead threat... :( Quote Absinthe Original Liquor Store Link to comment Share on other sites More sharing options...
Eyals Posted June 17, 2006 Share Posted June 17, 2006 I can see the person who created this must be away. Has anyone figured this out? Hi, I manged to talk with Kenny (author of the contribution), he is very busy these days but he promised to try and make time to visit this thread soon and help with problems. Little more patience please. Eyal. Quote Link to comment Share on other sites More sharing options...
Silverado05 Posted June 29, 2006 Share Posted June 29, 2006 All I seem to be getting is this error: XML Parsing Error: mismatched tag. Expected: </img>. Location: http://www.txcampingoutfitters.com/xml.php Line Number 1, Column 183: Any know about this and how to fix it? Quote Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Guest Posted August 24, 2006 Share Posted August 24, 2006 (edited) For those getting this output: <STOREITEMS> <CREATED value="Thu Jun 8 5:45:40 CDT 2006"/> </STOREITEMS> I don't know what the problem is, but I did not understand why the author used INNER JOINS in the sql, so I changed them to left joins and that solved my problem. Change the two instances of "INNER" to "LEFT" and you should be good to go. --gabe Edited August 24, 2006 by ganast Quote Link to comment Share on other sites More sharing options...
aris99 Posted September 14, 2006 Share Posted September 14, 2006 I have now solved the multi language ID:s. You will only add this Replace $product_query = "SELECT `products`.`products_id`,`products`.`products_quantity`,`products`.`products_model`,`products`.`products_image`,`products`.`products_price`,`products`.`products_date_added`,`products`.`products_last_modified`,`products`.`products_date_available`,`products`.`products_weight`,`products`.`products_status`,`products`.`manufacturers_id`,`products_description`.`products_name`,`products_description`.`products_url`,`categories_description`.`categories_name`,`manufacturers`.`manufacturers_name` FROM `products` INNER JOIN `products_description` ON (`products`.`products_id` = `products_description`.`products_id`) INNER JOIN `products_to_categories` ON (`products_description`.`products_id` = `products_to_categories`.`products_id`) INNER JOIN `categories_description` ON (`products_to_categories`.`categories_id` = `categories_description`.`categories_id`) INNER JOIN `manufacturers` ON (`products`.`manufacturers_id` = `manufacturers`.`manufacturers_id`) With $product_query = "SELECT DISTINCT `products`.`products_id`,`products`.`products_quantity`,`products`.`products_model`,`products`.`products_image`,`products`.`products_price`,`products`.`products_date_added`,`products`.`products_last_modified`,`products`.`products_date_available`,`products`.`products_weight`,`products`.`products_status`,`products`.`manufacturers_id`,`products_description`.`products_name`,`products_description`.`products_url`,`categories_description`.`categories_name`,`products_description`.`language_id`,`manufacturers`.`manufacturers_name` FROM `products` INNER JOIN `products_description` ON (`products`.`products_id` = `products_description`.`products_id`) INNER JOIN `products_to_categories` ON (`products_description`.`products_id` = `products_to_categories`.`products_id`) INNER JOIN `categories_description` ON (`products_to_categories`.`categories_id` = `categories_description`.`categories_id`) INNER JOIN `manufacturers` ON (`products`.`manufacturers_id` = `manufacturers`.`manufacturers_id`) Under insert any extra custom tags put: echo '<LANG_ID>' . $row['language_id'] . '</LANG_ID>'; You will now have a product for every language and you will not get any duplicates //Erik To display only one language you must replace with $category_query = "SELECT DISTINCT `categories_description`.`categories_name`,`categories_description`.`categories_id`,`categories`.`parent_id` FROM `categories_description`INNER JOIN `categories` ON (`categories_description`.`categories_id` = `categories`.`categories_id`) WHERE (`categories_description`.`language_id` = 1) ORDER BY `categories_id` "; $product_query = "SELECT DISTINCT `products`.`products_id`,`products`.`products_quantity`,`products`.`products_model`,`products`.`products_image`,`products`.`products_price`,`products`.`products_date_added`,`products`.`products_last_modified`,`products`.`products_date_available`,`products`.`products_weight`,`products`.`products_status`,`products`.`manufacturers_id`,`products_description`.`products_name`,`products_description`.`products_url`,`categories_description`.`categories_name`,`products_description`.`language_id`,`manufacturers`.`manufacturers_name` FROM `products` INNER JOIN `products_description` ON (`products`.`products_id` = `products_description`.`products_id`) INNER JOIN `products_to_categories` ON (`products_description`.`products_id` = `products_to_categories`.`products_id`) INNER JOIN `categories_description` ON (`products_to_categories`.`categories_id` = `categories_description`.`categories_id`) INNER JOIN `manufacturers` ON (`products`.`manufacturers_id` = `manufacturers`.`manufacturers_id`) WHERE (`products_description`.`language_id` = 1) AND (`categories_description`.`language_id` = 1) AND (`products_to_categories`.`categories_id` = " . $row['categories_id'] . ")"; i have choosen lanuage_id=1 if you have other you can put e.g. lanuage_id=4 Quote Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2006 Share Posted December 15, 2006 Thanks for the great contribution. I wonder if the category TAG can show more than 2 category levels of the product. Actually in my case I need to take the entire category tree from the beginning (root category). Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
jkavanagh Posted February 16, 2007 Share Posted February 16, 2007 Hi all, I did the multi-language thing slightly differently, with an HTTP GET parameter and using where clauses instead of SELECT DISTINCT (nominally for performance reasons, although I doubt it will make much of a difference). The first change allows the calling application to specify the language. // The feed will filter results for multi-language elements according to an input parameter $feed_language = ($HTTP_GET_VARS['language_id']); // check to make sure it is a valid number (since the OSC language_id is an int) if (!is_numeric($feed_language)) { exit("OSC XML FEED FAILURE - must pass language_id as an integer parameter, e.g. http://myoscommerce/xml_ml?language_id=1"); } Then, update your product query: $product_query = "SELECT `products`.`products_id`,`products`.`products_quantity`,`products`.`products_model`,`products`.`products_image`,`products`.`products_price`,`products`.`products_date_added`,`products`.`products_last_modified`,`products`.`products_date_available`,`products`.`products_weight`,`products`.`products_status`,`products`.`manufacturers_id`,`products_description`.`products_name`,`products_description`.`products_url`,`categories_description`.`categories_name`,`manufacturers`.`manufacturers_name` FROM `products` INNER JOIN `products_description` ON (`products`.`products_id` = `products_description`.`products_id`) INNER JOIN `products_to_categories` ON (`products_description`.`products_id` = `products_to_categories`.`products_id`) INNER JOIN `categories_description` ON (`products_to_categories`.`categories_id` = `categories_description`.`categories_id`) INNER JOIN `manufacturers` ON (`products`.`manufacturers_id` = `manufacturers`.`manufacturers_id`) WHERE (`products_description`.`language_id`={$feed_language}) AND (`categories_description`.`language_id`={$feed_language}) AND (`products_to_categories`.`categories_id` = " . $row['categories_id'] . ")"; ...and your category query: $category_query = "SELECT `categories_description`.`categories_name`,`categories_description`.`categories_id`,`categories`.`parent_id` FROM `categories_description`INNER JOIN `categories` ON (`categories_description`.`categories_id` = `categories`.`categories_id`) WHERE (`categories_description`.`language_id`={$feed_language}) ORDER BY `categories_id`"; Just an alternative approach. If you want the whole php file, email me at j kavanagh @ propelligence dot com. Great contribution Kenny. -Jeff To display only one language you must replace with$category_query = "SELECT DISTINCT `categories_description`.`categories_name`,`categories_description`.`categories_id`,`categories`.`parent_id` FROM `categories_description`INNER JOIN `categories` ON (`categories_description`.`categories_id` = `categories`.`categories_id`) WHERE (`categories_description`.`language_id` = 1) ORDER BY `categories_id` "; $product_query = "SELECT DISTINCT `products`.`products_id`,`products`.`products_quantity`,`products`.`products_model`,`products`.`products_image`,`products`.`products_price`,`products`.`products_date_added`,`products`.`products_last_modified`,`products`.`products_date_available`,`products`.`products_weight`,`products`.`products_status`,`products`.`manufacturers_id`,`products_description`.`products_name`,`products_description`.`products_url`,`categories_description`.`categories_name`,`products_description`.`language_id`,`manufacturers`.`manufacturers_name` FROM `products` INNER JOIN `products_description` ON (`products`.`products_id` = `products_description`.`products_id`) INNER JOIN `products_to_categories` ON (`products_description`.`products_id` = `products_to_categories`.`products_id`) INNER JOIN `categories_description` ON (`products_to_categories`.`categories_id` = `categories_description`.`categories_id`) INNER JOIN `manufacturers` ON (`products`.`manufacturers_id` = `manufacturers`.`manufacturers_id`) WHERE (`products_description`.`language_id` = 1) AND (`categories_description`.`language_id` = 1) AND (`products_to_categories`.`categories_id` = " . $row['categories_id'] . ")"; i have choosen lanuage_id=1 if you have other you can put e.g. lanuage_id=4 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2007 Share Posted March 30, 2007 Hello I would like to ask if anyone knows how can i have two url foe images The xml wants to create 2 images_url One for the small images and one for the big images Is it possible? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.