WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
[resolved] Change .CVS delimiter (4 posts)

  1. chavo
    Member
    Posted 5 months ago #

    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/

  2. supertheman7
    Member
    Posted 5 months ago #

    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 ) {

  3. Ray Ardinanda
    Member
    Posted 4 months ago #

    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

  4. chavo
    Member
    Posted 4 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.