Support » Plugin: WP eCommerce » Change .CVS delimiter

  • Resolved chavo

    (@chavo)


    I’m trying to change the default comma (,) delimiter that WPEC import function detects to semicolon (;) with not luck.

    I edited import.php in this line:

    while ( $row = @fgetcsv( $handle, $length, ',' ) ) {

    to something like:

    while ( $row = @fgetcsv( $handle, $length, ';' ) ) {

    but it isn’t working. Do I’m missing something or doing something wrong?

    Thanks in advance.

    https://wordpress.org/plugins/wp-e-commerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The problem seems to be that you are not evaluating anything. Looking at my own code the line should probably look something more like this:

    while ( ($row = @fgetcsv( $handle, filesize( $handle ), ";" )) !== false ) {

    Hello,

    Ray here with WP eCommerce Support.

    In case you need help with customization, you can contact one of our wpec consultant at http://getshopped.org/consultant/

    Thank you,
    Ray

    Well…after a lot of research, I figured out which line I have to change.

    Supertheman7: your comment helps me but doesn’t do the job. The line that is necessary to change is another.

    So, for those who are looking for a solution, here it is…

    Look at these line:

    while ( count($rows) < 5 && ( $data = fgetcsv($handle) ) !== FALSE ) {

    and change it like this:

    while ( count($rows) < 5 && ( $data = fgetcsv($handle, filesize( $handle ), ";" ) ) !== FALSE ) {

    Also, make the delimiter change mentioned originally.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change .CVS delimiter’ is closed to new replies.