Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/wfd/support/models/WFD_ChannelAmazon.php b/wfd/support/models/WFD_Chann
- index cb7ee5b..0ed4313 100644
- --- a/wfd/support/models/WFD_ChannelAmazon.php
- +++ b/wfd/support/models/WFD_ChannelAmazon.php
- @@ -859,13 +859,20 @@ class WFD_ChannelAmazon extends WFD_Channel
- global $jlf;
- require_once(__DIR__.'/WFD_ChannelProcess.php');
- + require_once(SITE_COMMON_PATH.'/static/GOS_XMLUtils.php');
- $ka_xml = array(
- 'MessageType' => 'Product',
- 'PurgeAndReplace' => 'false',
- - 'Message' => array()
- + 'Message' => 'content'
- );
- + // Get outer xml and split up so we can write product xml one prodsp
- + // This stops it running out of memory.
- + $outer_xml = $this->_peek_generic_xml($ka_xml);
- + $start_xml = substr($outer_xml,0,strpos($outer_xml,'<Message>content
- + $end_xml = substr($outer_xml,strpos($outer_xml,'content</Message>')+
- + fwrite($handle, $start_xml);
- foreach(
- $this->get_prodspecs(
- array(
- @@ -879,20 +886,32 @@ class WFD_ChannelAmazon extends WFD_Channel
- )
- as $prodspec
- ){
- +
- foreach( $prodspec->peek_channel_entries($this) as $entry ){
- if( !$this->test_is_valid($entry) ) continue;
- if( !$entry->id ) $entry->save();
- - $ka_xml['Message'][] = array(
- - 'MessageID' => $entry->id,
- - 'OperationType' => 'Update',
- - 'Product' => $this->peekOneEntryXMLArray($en
- +
- + fwrite(
- + $handle,
- + GOS_XMLUtils::tree_to_node_string(
- + 'Message',
- + GOS_XMLUtils::array_to_tree(
- + array(
- + 'MessageID' => $entr
- + 'OperationType' => '
- + 'Product' => $this->
- + ),
- + 1
- + )
- + ,
- + 1
- + )
- );
- }
- }
- - require_once(SITE_COMMON_PATH.'/static/GOS_XMLUtils.php');
- - fwrite($handle, $this->_peek_generic_xml($ka_xml));
- + fwrite($handle, $end_xml);
- }
- public function outputPriceXML($handle, $prodspec_id = NULL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement