nekas Posted October 23, 2005 Posted October 23, 2005 Not working for me, may be anyone can help me with this contribution http://www.oscommerce.com/community/contri...ry,3/search,XML or know how to? Need a simple script to update product quantity and price based on product_id Here is the part of original code require('includes/application_top.php'); if ($_POST['action']=='import') { if (is_uploaded_file($_FILES['xml_file']['tmp_name'])) { $xml = new XML($_FILES['xml_file']['tmp_name']); $products = $xml->evaluate("//product"); $count=0; $count_upd=0; $count_add=0; phpXML error: File /tmp/phpFiVZJY could not be found or read. Change part of code if ($_POST['action']=='import') { if (is_uploaded_file($HTTP_POST_FILES['xml_file']['tmp_name'])) { $xml = new XML($HTTP_GET_FILES['xml_file']['tmp_name']); $products = $xml->evaluate("//product"); $count=0; $count_upd=0; $count_add=0; and result will be Success Updated 0 Success Not changed 0 Success Added 0 File upload to remote server also not working :( May be problem consist in PHP version used by provider? Quote
Guest Posted February 15, 2006 Posted February 15, 2006 (edited) mayby you get this and result will be Success Updated 0 Success Not changed 0 Success Added 0 because products update's only if price changed? try this: replace line 31 if ($row['products_price']!=$products_price) { with // BOF lets update by price or quantity changed (next commented row was original) // if ($row['products_price']!=$products_price) { if (($row['products_price']!=$products_price) || ($row['products_quantity']!=$products_quantity)) { // EOF lets update by price or quantity changed Edited February 15, 2006 by dAbserver Quote
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.
Note: Your post will require moderator approval before it will be visible.