BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Email Marketer Community Forum > Customization and Integration

Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2012, 11:22 PM
HowardF + HowardF is offline
Interspire Customer
 
Join Date: Oct 2012
Posts: 2
Default XML API date issue

Using standard php script to send data to xml.php.

One of the fields I am sending in xml format is as follows:

PHP Code:
 <item>
    <
fieldid>22</fieldid>
    <
value>'.date("j/n/Y",$time_created).'</value>
    </
item
The response is:
HTML Code:
Error is The data provided for field 'Account Created' is invalid (you provided '//')<br/>
I have tried every date format that I can think of, but each time I am coming up with the same result. All data items prior to this one as being written to the database, but none after.

Any help appreciated.

Last edited by HowardF; 10-19-2012 at 02:00 AM.. Reason: to correct grammar
Reply With Quote
  #2  
Old 10-20-2012, 06:27 PM
HowardF + HowardF is offline
Interspire Customer
 
Join Date: Oct 2012
Posts: 2
Thumbs up Issue solved

The following seems to fix the issue:

Replace line 602 of xml.php (version 6.1.3)

PHP Code:
if($details['value'] !== false){$details['value'] = $details['value'][0]."/".$details['value'][1]."/".$details['value'][2];} 
with

PHP Code:
if($details['value'] !== false){$details['value'] = $details['value']['dd']."/".$details['value']['mm']."/".$details['value']['yy'];} 
Reply With Quote
  #3  
Old 10-27-2012, 02:22 AM
DanHoelck
Guest
 
Posts: n/a
Thumbs up Wow.

If you're ever in Northern California, I am buying you a beer, sir.
Reply With Quote
Reply

Tags
date format, xml api

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump