Hi LovejonesBoutique
This is the same error as I was getting when I first started using Easy Populate.
If you hear anything, or solve this, please post back on here as I'm still struggling!
Printable View
Hi LovejonesBoutique
This is the same error as I was getting when I first started using Easy Populate.
If you hear anything, or solve this, please post back on here as I'm still struggling!
Warning: explode() [function.explode]: Empty delimiter in /home/lovejon1/public_html/lovejonesboutique-toys.com/admin/includes/functions/extra_functions/easypopulate_functions.php on line 247
In the EP Functions file, let's look at the content between lines 225 and 273 -:
You will see they manage the DATE functions.PHP Code:
function ep_datoriser($date_time) {
global $ep_date_format; // d-m-y etc..
global $ep_raw_time; // user's prefered time (eg for specials to start) if no time in upload
$raw_date_exist = preg_match("/^([0-2]0[0-9]{2}-[0-1][0-9]-[0-3][0-9])( [0-2][0-9]:[0-5][0-9]:[0-5][0-9]$)?/", $date_time);
if (!$raw_date_exist) {
// not raw... we can only assume it is an excel date..
// separate dates from times
$exist_time = preg_match("/^2?0?[0-9]?[0-9][\.\/-][0-3]?[0-9][\.\/-]2?0?[0-9]?[0-9] ([0-2]?[0-9]:[0-5][0-9]).*$/", $date_time, $excel_time); // no seconds..
$exist_date = preg_match("/^(2?0?[0-9]?[0-9][\.\/-][0-3]?[0-9][\.\/-]2?0?[0-9]?[0-9]).*$/", $date_time, $excel_date);
//echo $excel_time[1] . '<br >';
//echo $excel_date[1] . '<br ><br />';
// if (!zen_not_null($exist_date)) // we fail to get a date! error msg rqd, and/or substitute action??
// check for which of 3 possible date separators we have..
// this sucks, I know... but it works for now
if (zen_not_null(strpos($excel_date[1], '-'))) $separator = '-';
if (zen_not_null(strpos($excel_date[1], '.'))) $separator = '.';
if (zen_not_null(strpos($excel_date[1], '/'))) $separator = '/';
//echo 'separator is: ' . $separator . '<br />';
$format_bits = explode('-', $ep_date_format);
$date_bits = explode($separator, $excel_date[1]);
foreach ($format_bits as $key => $bit) {
$$bit = $date_bits[$key]; // $y = 05 or 2005, $m = 09 or 9, $d = 03 or 3 for eg. Can only work if d,m,y order from excel is same as config
$$bit = strlen($$bit) < 2 ? '0' . $$bit : $$bit; // 4 is now 04 for eg. - expand this as a rudimentary check - should never occur on $y var
$$bit = strlen($$bit) > 2 ? substr($$bit,-2, 2) : $$bit; // 2005 is now 05 - expand this as a rudimentary check - should only occur on $y var
//echo $$bit . '<br />';
// another rudimentary check could be for $m vals > 12 = error too!
}
// create default raw time... if user left space off, put it on..
if (substr($ep_raw_time,0, 1) != ' ') $ep_raw_time = ' ' . $ep_raw_time;
// is it really a raw time? if not, make it midnight..
$exist_raw_time = preg_match("/ [0-2][0-9]:[0-5][0-9]:[0-5][0-9]/", $ep_raw_time); // true if is raw time
$ep_raw_time = zen_not_null($exist_raw_time) ? $ep_raw_time : ' 00:00:00';
// if time supplied from excel, use it instead..
$ep_raw_time = zen_not_null($exist_time) ? ' ' . $excel_time[1] : $ep_raw_time;
//echo '<br />'.$ep_raw_time . '<br />';
$raw_date = '20' . $y . '-' . $m . '-' . $d . $ep_raw_time; // needs updating at the end of the century ;-)
//echo $raw_date . '<br /><br />';
} else {
// the date is raw, so return it
$raw_date = $date_time;
//echo $date . ' is raw...<br />';
}
return $raw_date;
So if you get the error (at the top) and the line referred to is between 225 and 273, then there is something wrong in the FORMAT of a date in your TXT file.
Typically, we use a SPREADSHEET program to manage our TXT files. While this makes life easier in most respects, spreadsheets have a habit (expecially MS Excel) of making radical assumptions about the content parsed into the sheet.
If it sees what look like a DATE, it will re-format that into the default date format.
If you have configured your EP to render DATE as YYYY : MM : DD , then it will write it as follows in a date field:
2008-02-01 08:16:01 (where 16:01 is the time).
Now you import this into Excel and it is likely to do the following:
1/2/2008
Then when you SAVE AS TXT, it probably retains this formatting - or could even go haywire and render it as something else...
So even though your sheet is now TAB DELIMITED TEXT, the format of the DATES is incompatible with EP.
If you start out with EP date formatting as
2008-02-01 08:16:01
You need to ensure it STAYS as
2008-02-01 08:16:01
When I try an access the tempEP directory, I get a 403 forbidden error. I checked the error logs and I can see the following error "(13)Permission denied: /domains/y/o/website/public_html/tempEP/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable". I have checked and there isn't a .htaccess file in that folder and there wasn't one included on the easy populate installation zip file. Can anyone help?
Hi, I managed to fix it by chmoding the directory correctly, thanks for the response though.
You will see they manage the DATE functions.
So if you get the error (at the top) and the line referred to is between 225 and 273, then there is something wrong in the FORMAT of a date in your TXT file.
Thanks for your response Schoolboy, I figured this much as I began to research this topic. However, my spreadsheet contains no date columns. Would I have to format the following columns with numbers in excel, or in EP.
My columns which contain numbers are:
v_products_model
v_products_weight
v_products_price (formatted in excel as currency)
This may seem like a silly question, but if I'm uploading images via EP then do those images need to already reside on the server side (eg do I have to FTP them across before hand) or will it use the images that are in the images directory on my local test site.. ??
eg if I have (for example) widgets/widgets.jpg (which is from the image directory locally), will it upload it, or would I have to have that directory and file already FTP'd to the server ??? :unsure:
Cheers,
Mike
Actual image FILES (the jpeg files themselves) reside in the IMAGES forder(s) and get to the server via FTP, or when you ADD a product in the admin console and upload its image.
The image name in Easy Populate is the DATABASE REFERENCE - a record of the NAME and LOCATION of the image. It is little more than a "label" that the software uses to locate the image associated with a product.
It is used (for example) in compiling <img src> paths via the php, in order to create suitable HTML for bring that image "into play"...
Hi,
I am using Zen Cart 1.3.8a and Easy Populate 1.2.5.4.
I have all of my products loaded OK.
Here is my problem.
My inventory changes everyday,
I sell products and get more in.
I do not only sell through my store.
I sell on ebay and through other sites in
my niche.
My problem is I update a spread sheet to keep track of
everything, but that means adding and subtracting products
from that spread sheet.
If I could just use that spread sheet to make my file for the
Easy Populate upload that would be fine, but if I understand
correctly the old inventory doesn't clear out when you upload
new inventory. So that would be a mess.
With the volume that I do it would be very hard to track
what's still in stock, what's out of inventory and what's new
on different spread sheets. I am dealing with a few thousand part numbers.
Any thoughts would be very very welcome. :smile:
I guess it comes down to...is there an easy way to update the store on a regular basis
with a new upload of all of my inventory every time?
Thanks.