Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I am having an almost identical problem to this onethis one, posted in '09. It doesn't appear to be successfully solved, and I have been poring over related questions all day & implementing suggestions I have found.

I am having an almost identical problem to this one, posted in '09. It doesn't appear to be successfully solved, and I have been poring over related questions all day & implementing suggestions I have found.

I am having an almost identical problem to this one, posted in '09. It doesn't appear to be successfully solved, and I have been poring over related questions all day & implementing suggestions I have found.

updates using suggestion...
Source Link
Jane
  • 1
  • 6

Update: Attempted to use simplexml_load_filesimplexml_load_string instead of fwrite() to pull one product's information, received error. I will have to do some digging on this onebut am still having limited success. Including error as exampleExample of xml code I'mXML I am using:

Warning: simplexml_load_file(): I/O warning : failed to load external entity  <?xml version="1.0"?> <response> <root> <part> <![CDATA[PARTNUM]]> </part> <errorcode>0</errorcode> <errormsg></errormsg> <special>N</special> <description> <![CDATA[]]> </description> <price>75</price> <weight>1.02</weight> <webpurch>Y</webpurch> <altnum> <![CDATA[ALT-NUM]]> </altnum> <active>Y</active> <redo> <![CDATA[]]> </redo> <codes> <code> <fieldname> <![CDATA[Mfr Part No]]> </fieldname> <fieldvalue> <![CDATA[PARTNUM]]> </fieldvalue> </code> <code> <fieldname> <![CDATA[Special Code 1]]> </fieldname> <fieldvalue> <![CDATA[XYZ123]]> </fieldvalue> </code> </codes> <customtag>N</customtag> <onhand>0</onhand> <notes> <![CDATA[PRODUCT-SPECIFIC NOTE]]> </notes> <mfr> <mfr_name> <![CDATA[MFR]]> </mfr_name> </mfr> <altpartnums> <altnum> <![CDATA[PARTNUM.12]]> </altnum> </altpartnums> <gtrue>N</gtrue> <group> <![CDATA[GROUP NAME]]> </group> <categories> <cat>294</cat> <cat>475</cat> </categories> </root> </response> <response> <additional> <info><![CDATA[ADDITIONAL INFO HERE]]></info> </additional> </response> 

Update: Attempted to use simplexml_load_file instead of fwrite() to pull one product's information, received error. I will have to do some digging on this one. Including error as example of xml code I'm using:

Warning: simplexml_load_file(): I/O warning : failed to load external entity  <?xml version="1.0"?> <response> <root> <part> <![CDATA[PARTNUM]]> </part> <errorcode>0</errorcode> <errormsg></errormsg> <special>N</special> <description> <![CDATA[]]> </description> <price>75</price> <weight>1.02</weight> <webpurch>Y</webpurch> <altnum> <![CDATA[ALT-NUM]]> </altnum> <active>Y</active> <redo> <![CDATA[]]> </redo> <codes> <code> <fieldname> <![CDATA[Mfr Part No]]> </fieldname> <fieldvalue> <![CDATA[PARTNUM]]> </fieldvalue> </code> <code> <fieldname> <![CDATA[Special Code 1]]> </fieldname> <fieldvalue> <![CDATA[XYZ123]]> </fieldvalue> </code> </codes> <customtag>N</customtag> <onhand>0</onhand> <notes> <![CDATA[PRODUCT-SPECIFIC NOTE]]> </notes> <mfr> <mfr_name> <![CDATA[MFR]]> </mfr_name> </mfr> <altpartnums> <altnum> <![CDATA[PARTNUM.12]]> </altnum> </altpartnums> <gtrue>N</gtrue> <group> <![CDATA[GROUP NAME]]> </group> <categories> <cat>294</cat> <cat>475</cat> </categories> </root> </response> <response> <additional> <info><![CDATA[ADDITIONAL INFO HERE]]></info> </additional> </response> 

Update: Attempted to use simplexml_load_string instead of fwrite() to pull one product's information, but am still having limited success. Example of XML I am using:

 <?xml version="1.0"?> <response> <root> <part> <![CDATA[PARTNUM]]> </part> <errorcode>0</errorcode> <errormsg></errormsg> <special>N</special> <description> <![CDATA[]]> </description> <price>75</price> <weight>1.02</weight> <webpurch>Y</webpurch> <altnum> <![CDATA[ALT-NUM]]> </altnum> <active>Y</active> <redo> <![CDATA[]]> </redo> <codes> <code> <fieldname> <![CDATA[Mfr Part No]]> </fieldname> <fieldvalue> <![CDATA[PARTNUM]]> </fieldvalue> </code> <code> <fieldname> <![CDATA[Special Code 1]]> </fieldname> <fieldvalue> <![CDATA[XYZ123]]> </fieldvalue> </code> </codes> <customtag>N</customtag> <onhand>0</onhand> <notes> <![CDATA[PRODUCT-SPECIFIC NOTE]]> </notes> <mfr> <mfr_name> <![CDATA[MFR]]> </mfr_name> </mfr> <altpartnums> <altnum> <![CDATA[PARTNUM.12]]> </altnum> </altpartnums> <gtrue>N</gtrue> <group> <![CDATA[GROUP NAME]]> </group> <categories> <cat>294</cat> <cat>475</cat> </categories> </root> </response> 
added 8 characters in body
Source Link
Jane
  • 1
  • 6

This is an example of the $data return for multiple products when I do not use fwrite(): 0 N 75 1.02 Y Y N 0 <mfr_name> </mfr_name> N 294 475 0 N 288 12 Y Y Y 18 <mfr_name> </mfr_name> Y 222 456 3786

This is an example of the $data return for multiple products when I do not use fwrite(): 0 N 75 1.02 Y Y N 0 <mfr_name> </mfr_name> N 294 475 0 N 288 12 Y Y Y 18 <mfr_name> </mfr_name> Y 222 456 3786

added 8 characters in body
Source Link
Jane
  • 1
  • 6
Loading
added 8 characters in body
Source Link
Jane
  • 1
  • 6
Loading
Source Link
Jane
  • 1
  • 6
Loading